Cross-Layer Wireless Resource Allocation Method Based on Environment-Awareness in High-Speed Mobile Networks

: In high-speed mobile scenarios characteristic of the Fifth Generation Mobile Networks (5G) environment, the user video experience may be compromised due to concurrent access by numerous users and frequent base station transitions. Addressing this issue, this study introduces a cross-layer resource allocation model that integrates environmental awareness and is tailored for the exigencies of high-speed mobile networks. The paper delves into the challenges engendered by rapid mobility and extensive user access within the 5G environment and critiques the constraints of prevalent resource allocation methodologies. The model delineated herein is conceptualized as an optimization challenge and characterized as a nonlinear, NP-hard problem. In response to this challenge, this study advocates a novel streaming media transmission algorithm underpinned by edge computing, in tandem with an environment-aware wireless resource allocation algorithm. The article articulates the foundational principles and operational modalities of these algorithms, underscoring the significance of environmental cognizance in resource distribution and the efficacy of edge computing in increasing video transmission efficiency. Empirical validation, achieved through simulation experiments, corroborates the efficacy of the proposed approach. Comparative analysis reveals that, relative to conventional methodologies, the proposed framework significantly improves video transmission quality and user experience, particularly in contexts characterized by frequent network fluctuations and high user densities. This research contributes novel insights and pragmatic solutions to optimize video transmission in existing 5G and prospective network paradigms.


Introduction
Video streaming is an increasingly significant social and entertainment activity for users who travel at high speed.With the rapid development of network technology, users are increasingly demanding higher video quality.However, in the high-speed network environments, such as those encountered on high-speed railways, user experience may suffer from frequent base station handovers, severe channel quality fluctuations, and limited wireless resources along the high-speed rail.As the speed of user movement increases, the duration of connection to a base station decreases.This frequent base station switching results in rapid and frequent changes in wireless channel quality, making it challenging to predict channel quality in high-speed networks.This unpredictability adversely affects the performance of rate selection algorithms, which rely on user channel quality.Accurately predicting channel quality changes in high-speed networks is a significant challenge.Additionally, the retransmissions caused by base station switching increase the video transmission latency, severely impacting user experience.Edge computing technology can alleviate this issue by caching data in advance at the edge or by providing real-time media data format conversion through its robust computing capabilities, thereby reducing transmission delay.However, in high-speed networks, choosing the location for caching and the media data format conversion is also challenging.In high-speed network environments, the distribution of wireless resources is uneven both temporally and spatially.When multiple users access the wireless network at high speeds, the wireless resource allocation algorithm must consider time, space, user viewing environment, and the varying channel qualities of different users.Therefore, adequately allocating wireless resources for a large number of users in high-speed mobile networks is another significant challenge.In a word, improving user video experience in a high-speed network is a challenging problem.
In this context, the term "high-speed network" refers to the scenario where users access wireless networks while moving at high speeds.Significantly, when the user's movement speed exceeds 250 km/h, such as during high-speed train travel, this rapid mobility significantly impacts the network experience.Conversely, when the user's speed is below 250 km/h, it is termed as a "low-speed network".This speed threshold is derived from our experimental tests conducted along high-speed rail lines and is related to the distribution of base stations along these routes.
Currently, extensive research has been conducted on streaming media transmission technology.Variable bitrate technology adapts to the jittery network bandwidth by sending videos with different bitrates [1].One study [2] incorporates the subjective Quality of Experience (QoE) of users into the bitrate selection algorithm, choosing an appropriate video bitrate based on user preferences.Another study [3] proposes a dynamic block quality-aware adaptive bitrate algorithm that caters to diverse QoE requirements by selecting higher quality for dynamic blocks while not excessively reducing the quality of static blocks.Another research [4] suggests an intelligent variable video segment division strategy that makes decisions based on network and user viewing information data, striking a balance between accuracy and cost of variable-length division.It also introduces a data-driven I-frame adaptive bitrate switching algorithm to enhance data transmission efficiency.However, these studies primarily focus on low-speed mobile scenarios, and their proposed algorithms may not perform as well in high-speed mobile scenarios.In highspeed mobile scenarios, base station handovers occur more frequently, the packet loss rate is higher, and predicting user channel quality becomes more challenging.Therefore, the current study proposes an optimization scheme for single-user video streaming in a high-speed mobile network [5].However, the previous work of this study does not consider the scenario of multiple-user video streaming, and its optimization objectives also differ.The main objective of this paper is to enhance the overall video experience for all users.
However, in high-speed mobile scenarios, multiple users requesting media data simultaneously face the following challenges.First, the base station has limited wireless resources, and allocating suitable wireless resources for each user is difficult.Second, users frequently switch base stations, and predicting the channel quality of multiple users is challenging.Third, in Mobile Edge Computing (MEC), the data caching method and the user's decision after a cache failure are also problematic.
This paper proposes an environment-aware wireless resource allocation algorithm based on edge computing to address the above challenges.The algorithm considers the operational state of high-speed rail, the video streaming environment of users, the limited wireless resources of the base station, and other constraints.This paper mathematically models the wireless resource allocation problem of the base station in the high-speed mobile network environment as a nonlinear, NP-hard problem.To address this challenge, the paper proposes a user channel quality prediction model, updates the QoE model for multiple users video streaming, and introduces two algorithms to solve the NP-hard problem.The simulation experiments validate the effectiveness of the proposed algorithms.
The contributions of this paper can be summarized as follows: 1.
A wireless resource allocation method based on spatio-temporal attributes is proposed.This method involves selecting suitable base stations and allocating appropriate wireless resources for each user, based on time and environmental parameters related to the user's video-watching experience.

2.
A mathematical formulation of the problem is provided, and it is demonstrated that the optimization problem addressed in this paper is an NP-hard problem.

3.
The effectiveness of the proposed method is validated through simulation experiments.
The paper is organized as follows.Section 2 reviews the related work on the research topic both at home and abroad.Section 3 introduces the proposed system architecture and system model.Section 4 presents the solution to the problem.Section 5 provides the simulation results.Section 6 analyzes the results and discusses the implications.Section 7 discusses the results of the experiments, and Section 8 provides a summary of the entire paper.

Related Works
In recent years, the continuous development and expansion of high-speed rail have increased the demand for network services onboard high-speed rail.As people also expect higher video quality, providing better media services for users in high-speed mobile networks is a challenge.Currently, the main methods of video transmission optimization in a high-speed network involve optimizing protocols such as the Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and Hypertext Transfer Protocol (HTTP).
In high-speed mobile network environments, frequent base station switching causes a lot of packet losses.The TCP transmission protocol may experience excessive congestion control when working, as the TCP congestion control algorithm cannot determine the cause of losses of user data packets.This reduces the user's available bandwidth.Therefore, many researchers have proposed some TCP optimization schemes, detailed as follows.Binary increase congestion control (BIC): BIC is a congestion control algorithm used with the TCP protocol.It aims to provide improved performance in high-speed networks [6].Explicit congestion notification (ECN): ECN is a network congestion management mechanism used to explicitly notify the congestion status of packets in a network [7].Multipath TCP (MPTCP): MPTCP is an extension of the TCP protocol that allows a single connection to transmit data across multiple network paths [8].High-speed TCP (HSTCP): HSTCP is a variant of the TCP protocol designed specifically for high-speed network environments.It optimizes TCP's congestion control algorithm to accommodate the specific requirements of high-speed networks, offering improved performance.These schemes can dynamically adjust network bandwidth and delay and improve the performance of the TCP protocol in high-speed mobile network environments.
The UDP protocol can improve transmission efficiency in high-speed mobile networks.However, UDP is unreliable and does not guarantee data transmission reliability.Hence, researchers have proposed UDP optimization techniques, such as the Real-time Transport Protocol (RTP)/RTP Control Protocol (RTCP) and UDP Lite, to enhance UDP's reliability and stability.Additionally, the Stream Control Transmission Protocol (SCTP) [9], which combines features of both UDP and TCP, offers another approach to achieve reliable and efficient data transmission.
The Dynamic Adaptive Streaming over HTTP (DASH) protocol is a popular variable bitrate protocol that can adapt to network bandwidth jitter and enhance the stability and quality of video transmission.As it is based on the HTTP protocol, scholars have optimized HTTP to better support DASH, for example, through HTTP-FLV (HTTP-Flash Video) and WebSocket [10].These optimizations have greatly improved video transmission efficiency.
Researchers have conducted extensive research to improve the quality of high-speed rail streaming.However, in high-speed vehicular networks, network congestion and reliability remain challenging due to factors such as user behavior prioritizing individual performance and link failures.In [11], authors propose an Enhanced Congestion Game with Link Failure (E-CGF) scheme to cope with these challenges and achieve optimal network selection.E-CGF employs a hidden Markov model to estimate the probability of link failure.In [12], the authors propose a user-assisted base station (BS) caching and cooperative prefetching scheme for high-speed rail (HSR) communication, where adjacent BSs exchange information periodically, such as coverage area and communication rate, to facilitate content caching and prefetching.Additionally, users can cache varying content received from BSs, augmenting the caching capabilities.The scheme formulates a content caching and prefetching optimization problem to minimize the overall transmission delay.The authors in [13] propose a switching algorithm for the high-speed rail wireless communication environment, based on the combination of train running direction and speed.This algorithm analyzes the measurement, filtering, and control parameters involved in the Time Division-Long Term Evolution (TD-LTE) switching process.
Adaptive bitrate selection algorithms and video data caching strategies are applied by some scholars to improve video transmission technology.In [14], the authors explore the challenges of scalable video with varying content popularity and viewing demands, suggesting various cache content types and transmission schemes.The authors in [15] introduce a Multi-Rate cache (MRC) scheme for video offloading in Device-To-Device (D2D) networks, which in communication technology refer to wireless networks that enable devices to directly exchange data independently of central communication towers or servers, a key advancement in decentralized network communications.MRC adopts a tactical approach in caching systems, storing and retrieving data at varying rates based on its access frequency and importance.This strategy is essential in environments that require efficient data handling, such as high-speed mobile networks.The goal of MRC is to rapidly improve data accessibility and use storage capacities wisely, leading to enhanced overall system performance.MRC enables smart management of cache resources, ensuring quick access to frequently demanded or high-priority data, while efficiently handling lessused data.The study in [16] introduces a collaborative caching architecture for scalable video coding, tailored for use in drones and client devices.This architecture allows for efficient content distribution at high transmission rates and personalized video quality in hotspot regions.
Wireless resource allocation in the base station directly affects the user's network bandwidth and is a current research hotspot.This research in [17] focuses on studying network energy efficiency in downlink scenarios, incorporating user cooperation and quality of service guarantees.This study jointly considers relay selection, power allocation, and network selection to maximize the energy efficiency of mobile users while maintaining high Quality of Service (QoS).Another study [18] combines resource allocation with power control and jointly optimizes resource block allocation and power control.The authors propose a multi-agent deep reinforcement learning algorithm to improve the efficiency of resource block allocation.Additionally, the research in [19] studies a multi-band wireless network, where orthogonal and non-orthogonal multiple-access techniques coexist.They investigate the joint optimization of user association, transmit power allocation, subchannel assignment, and multiple-access technique selection to maximize the downlink sum rate under the minimum user rate requirement and power constraint.Furthermore, [20] proposes a time-varying demand resource allocation method for QoE-oriented wireless communication networks.This can predict the time-varying demand and make the network operate under the constraint of random blocking probability.This also considers queuing delay requirements as a practical design for QoE.Utilizing a time-varying queuing model and an approximation method based on the Continuous-Time Markov Chain (CTMC), the authors formulate the technical design as a convex stochastic optimization and propose a dynamic capacity allocation method based on it.
Wireless resource allocation is an important research area in high-speed mobile scenarios.It involves allocating a certain number of Resource Blocks (RBs) to users.An RB is the smallest data transmission unit in the 5G NR (5G New Radio) system, consisting of a group of adjacent subcarriers that are capable of transmitting one symbol of data.The RB allocation directly affects the communication quality and network bandwidth of users on high-speed trains.Traditional RB allocation algorithms allocate RBs based on user channel quality, but this method is not adaptive to the network environment in high-speed mobile scenarios.
Edge computing technology has been widely used to enhance streaming media transmission, notably facilitating the reduction of latency in video transmission.This domain has garnered considerable attention and in-depth investigation from numerous scholars in the field.In [21], the researchers delve into the realm of serverless edge computing technologies, proposing a dual deep Q-network based solution adept at facilitating scheduling decisions amidst dynamic system alterations.This solution harnesses the dual deep Q-network architecture, thereby augmenting decision-making efficacy and adaptability within environments subject to volatility.In [22], the authors conduct a study on a collective deep reinforcement learning approach tailored for intelligent sharing in the Internet landscape, grounded in edge computing.They put forth an avant-garde collective deep reinforcement learning algorithm, dedicated to optimizing resource deployment and enhancing user experiences in edge computing milieus.Distinguished by its collaborative learning paradigm, this algorithm markedly elevates the efficiency and effectiveness of learning in distributed computing contexts.The study in [23] introduces a resource allocation and management mechanism for 5G networks utilizing Mobile Edge Computing (MEC) and straightforward mathematical approaches to reduce model complexity.This mechanism focuses on allocating resources within mobile edge computing to fulfill user request requirements.In [24], the authors investigate offloading decisions, collaborative decisions, and the allocation of computing and communication resources in the context of Cooperative Mobile Edge Computing (C-MEC).They propose a novel strategy where users' latency-sensitive tasks are processed locally and offloaded to collaborative devices or MEC servers.The primary goal is to minimize the total energy consumption of all mobile users under latency constraints.The aforementioned studies explored wireless resource allocation methods in edge computing, but they were conducted in scenarios of low mobility or stationarity.In high-speed mobility scenarios, wireless resource allocation faces new challenges.As different users request various media data and frequent base station handovers occur due to high-speed movement, it becomes crucial to consider how base stations, varying over time and space, can allocate appropriate wireless resources to different users.Addressing these issues is also one of the contributions of this paper.
Many scholars have researched VANETs.Comprising highly mobile and self-organizing nodes, VANETs enable wireless communication among these nodes, facilitating the transmission of various information, including media data.The study in [25] explored VANET's routing protocols, proposing a Trust-based Geographical Routing Protocol for VANETs (TGRV) that limits the participation of malicious vehicles in routing.The research in [26] introduced a secure access control protocol for VANETs, which utilizes a pseudonym mechanism to provide conditional privacy, allowing legitimate vehicles to remain anonymous while tracking malicious ones.The work in [27] addressed issues of location privacy and reliability in VANET routing protocols, proposing DARVAN, a fully decentralized, anonymous, and reliable routing for VANETs that maximizes privacy and reliability using distributed databases and collective consensus.Furthermore, authors in [28] proposed an Intelligent Real-time Multimedia Traffic Shaping based on Reinforcement Multi-Distributed Learning (RMDRL) to control the flow and rate of traffic sent to 5G-VANETs.While VANETs can transmit media data and perform well in some scenarios, they are not suitable for media data transmission in high-speed train scenarios or high-speed networks.
The above methods investigated various optimization schemes for video transmission in high-speed mobile scenarios, but some problems remain unresolved.For example, the network parameters in high-speed mobile scenarios are highly uncertain, and the network bandwidth, channel quality, and transmission delay vary significantly.Hence, this paper proposes an environment-aware wireless resource algorithm based on edge computing, designed to enhance the video experience for all users in high-speed mobile scenarios.

Optimization Model
This section provides a detailed introduction to a streaming transmission architecture specifically designed for high-speed railway scenarios, as shown in Figure 1.In this architecture, high-speed railway stations not only serve as communication nodes but also establish an edge computing module responsible for executing the optimization algorithm proposed in this paper.The high-speed railway stations collect data, including the Channel Quality Indicator (CQI) reported periodically by mobile users, and transmit these data to the edge computing module.The module executes an optimization algorithm dedicated to determining the optimal caching locations for video data along the high-speed railway line, taking into account factors such as the user's moving speed, the distribution of high-speed railway stations, and the available Resource Blocks (RBs) at each station.According to the results of the algorithm, video data can be dynamically cached across different high-speed railway stations along the line.Furthermore, the algorithm allocates suitable RBs to all users connected to the high-speed railway stations.Users select the most appropriate video bitrate based on the allocated RBs and the actual CQI, optimizing their viewing experience.The method proposed in this paper is broadly applicable and suitable for various transmission protocols, such as Dynamic Adaptive Streaming over HTTP (DASH), Vehicle-to-Everything (V2X), and HTTP Live Streaming (HLS).

User Channel Quality Prediction Method
The media server stores the video data encoded into different quality levels.Let l 1 , l 2 , . . ., l k denote video segments with different quality levels, where q l i represents the resolution of the video segment l i for each i ∈ 1, 2, . . ., k.Let UE j , where j ∈ 1, 2, . . ., k, denote the jth user.During the high-speed rail movement, the user UE j needs to connect (switch) to N base stations.Let B n , where n ∈ 1, 2, . . ., N, denote the nth base station.Let NRB k t denote the number of radio resources that the user UE k allocates at time t and N k t denote the network bandwidth of the user at time t.Let C k b(t) denote the edge buffer when the user UE k connects to base station B n , and Bitrate k b(t) (bit/s) denote the media bitrate requested by the edge buffer.
Let γ denote the bandwidth calculation function, N t represent the network bandwidth predicted at time t, and l k indicate the level of the video segment requested by the user.Let U denote the environmental parameters of the user watching the video, such as the user's moving speed. (2) An RB represents the smallest wireless resource allocation unit.In the time domain, it encompasses a time slot denoted as N TRB , which represents the number of time slots within 1 ms, amounting to 2. Additionally, it comprises seven orthogonal frequency-division multiplexing (OFDM) symbols, i.e., N OFDM = 7, and includes 12 consecutive subcarriers in the frequency domain, indicated as N subchannel = 12.The base station is responsible for determining the number of RBs to be allocated.The modulation and coding scheme (MCS) represents the data encoding method, which correlates with the channel quality indicator (CQI) value provided by the user.The symbol R m denotes the maximum bit rate achievable within the CQI index under 5G network conditions.Equation (3) defines the prior value of CQI.
CQI − t−1 and Z t−1 denote the predicted and detected value of CQI at time t − 1, respectively.Let A and B denote different weight parameters.Let V t denote the deviation between prediction and actual value, and P − t denote the prior error covariance matrix, as Equation ( 4) shows.
The weight equation can be calculated by Equation ( 5) where R denotes the average value of measurement noise and H denotes the scaling factor.Equation ( 6) represents the calculation of the posterior estimate CQI t based on the prior

User-Subjective Video Experience Model
The network state in high-speed mobile scenarios is complex and unstable, due to the high-speed train movement and rapid change at the base station.Users may experience video buffering and image blur when watching videos, which degrades the user's experience [29].Figure 2 shows some QoE factors used in this paper.The excessive speed causes wireless channel jitter, which seriously reduces the user's viewing experience in high-speed mobile scenarios.To establish a QoE model for users in these scenarios, we consider various factors, such as video objective quality, video smoothness, extra overhead from video cache misses, and video quality jitter.These factors affect the overall QoE of users differently, and each user's subjective experience has a different influence weight.Thus, the model has trade-off parameters that the user can define.
User QoE depends mainly on video objective quality, which is determined by the resolution and bitrate of the video.Higher-quality videos offer users a better subjective experience.The function ψ represents the quality of the video and its mapping relationship with the QoE of the user.It can be expressed by peak signal-to-noise ratio (PSNR) or structural similarity index (SSIM).PSNR is a measurement used to assess the quality of an image or video by comparing it to a reference (original) image.It quantifies the level of distortion or noise introduced during the compression or transmission of media.SSIM is a metric used to measure the structural similarity between two images, where one is typically the reference (original) image and the other a distorted or processed version of it.It assesses not only changes in pixel values but also considers structural information, such as textures, edges, and patterns.This paper considers various factors, such as the video quality and the user's viewing environment.It proposes a QoE model that suits this transmission architecture.

QoE Influencing Factors
Video

Cost
The cost of transcoding paid by users for cache misses.

Cost
The cost of transcoding paid by users for cache misses.The objective quality of the video, which can be measured using PSNR or SSIM, is the most important factor for the user viewing experience.Equation (7) states the relationship between the user's objective quality and the video supervisor's assessment of quality.
ln denotes the natural logarithm, that is, the logarithm to the base e.
Rebuffering is one of the main factors that affect the subjective experience of users when watching videos.This situation occurs more frequently in high-speed mobile scenarios.This paper models the impact of rebuffering on the subjective quality of users as an exponential function, as Equation (8) shows.
According to the IQX hypothesis, the rebuffering number N and the stalling duration L are input parameters mapped to QoE .The parameter N denotes the number of rebuffering occurrences, and the parameter L denotes the average duration of each rebuffering.
Let Ω denote the mapping relationship between video quality jitter and user QoE.Let q denote the jitter amplitude and s denote the number of jitters in the video.Let ∆ q = |q k − q k−1 | denote the value of video level switching between l k−1 and l k .Let f (∆ q ) = ∆ q /q k denote the impact of jitter amplitude on QoE.
The parameter cost represents the video transcoding cost.The cost is 0 when the user obtains the video from the server.Otherwise, if the video is transcoded on the computing module, the cost is calculated as described in Equation (10).
Let T n be the playback time of the video segment and Bitrate n × T n be the total data amount of the transcoded video segment.The parameter c denotes the cost of transcoding 1 bit of data.In this paper, we aim to maximize the QoE of all users, which can be computed by Equation (11).
The parameters α, β, and γ are the weight parameters for video quality, smoothness, and jitter, respectively.The parameter ∆ is a binary trade-off parameter of cost.In this paper, we normalize the value of QoE.

Wireless Resource Allocation Model
We consider a high-speed mobile scenario with n users passing through N base stations.In the 5G NR network environment, each user reports their channel quality to the current base station in time slot t. Figure 3 shows the system sequence diagram proposed in this paper.The base station allocates wireless resources to the user and sends the video data as a carrier through the wireless channel.The streaming server provides video streaming service to the user.We propose a channel prediction model to forecast the future channel quality of users.Based on the predicted value, the number of available RBs at the base station, and the user's video viewing environment (e.g., moving speed), we select the suitable bit rate video data to cache in different base station caches.Let S be the remaining available RB number in the base station and 1 RB be the minimum allocation unit of wireless resources.One RB provides a carrier for user video transmission in time slot t.The base station allocates RBs in time slot t using the predicted value of wireless channel quality and user viewing environment parameters.Our goal is to maximize the total QoE of all users by allocating an optimal number of RBs for each user.Assuming the user's wireless channel quality is predicted at time t, the CQI prediction value is then approximately mapped to determine the optimal MCS value for the current user channel.For a given MCS value, the corresponding modulation method and coding rate are determined according to the international standard, in order to determine the required channel quality and bit error rate.Then, the achievable data rate is determined using the corresponding bit error rate and modulation method.The base station runs the algorithm proposed in this paper to allocate wireless resources for each user.The user can calculate the current available bandwidth N t according to their own wireless channel quality and the number of RBs allocated by the base station.The base station then selects a video segment with a bit rate less than or equal to the available bandwidth N t for caching.The data volume D n of the nth video segment is represented as the media bit rate multiplied by the segment duration.Assuming that the available RBs at time t is N t , the number of RBs allocated by the base station must be less than or equal to N t .
Given the user's wireless channel quality predicted at time t, we map the CQI prediction value to the optimal MCS value for the current user channel.For a given MCS value, we determine the corresponding modulation method and coding rate according to the international standard, as well as the required channel quality and bit error rate.We then determine the achievable data rate using the bit error rate and modulation method.The base station allocates wireless resources to each user using the algorithm proposed in this paper.The user calculates the current available bandwidth N t based on their wireless channel quality and the number of RBs allocated by the base station.The base station selects a video segment with a bit rate less than or equal to N t for caching.The data volume D n of the nth video segment is the media bit rate times the segment duration.Let N t be the available RBs at time t.The base station allocates no more than N t RBs.
Let N t be the available bandwidth at time t.The selected video segment has a bitrate no greater than N t .
Bitrate n < N t , ( 13) In a high-mobility scenario, the base station performs frequent handovers, leading to significant fluctuations in the user's communication channel quality.When a user requests a video, the current base station searches the edge cache.If the cache contains the requested media data, it is immediately delivered to the user.Otherwise, there are two options.One is to request media data from the server, which incurs a retransmission delay of T o f f .
Let ∆ s be the user's moving distance during the retransmission time and V be the current speed of the high-speed rail.We compare the distance between the user and the two adjacent base stations and determine the base station that will receive the video data based on the above data.Alternatively, the video data can be transcoded in the edge computing module of the base station, but this will consume the base station's computing resources and incur costs.
The function Γ(n) indicates whether the n − th segment of the video needs to be transcoded.If Γ(n) = 1, the segment is transcoded.If Γ(n) = 0, the media server retransmits the segment.
The function T δ (n) denotes the transcoding time of the nth segment of the video.The function T trans (n) denotes the retransmission time of segment n.

Complexity Analysis
Our problem is to select the optimal bit rate for each user and allocate wireless resources in the high-speed rail scenario to maximize user QoE.We first show that the problem is NP-hard.
Proof.Consider a special case of Equation (20) with fixed parameter values in the highspeed rail scenario.Let N = 1, α = 1, β = 0, γ = 0, δ = 0, QoE r = NRBt r (assuming the same CQI value for each user), and bandwidth be constant.The base station determines the RB allocation according to Equation (19).
where NRBt r is the number of RBs allocated by the base station to user r.
To show the equivalence between Equation ( 20) and the exact cover problem, which is a well-known NP-hard problem, consider an arbitrary family G of p sets, each with a cardinality of 3. Represent all sets in G by binary sequences of length 3p.For example, 101001 and 011010 represent the sets {y1, y3, y6} and {y2, y3, y5}, respectively.These sequences correspond to integers in the base-p + 1 system: where Z r is the set corresponding to the (r)-th digit in the binary sequence.Note that Z r ⊆ y 1 , . . ., y 3p and |Z r | = 1) for all (r ∈ 1, . . ., p).Construct integers NRBt 1 , NRBt 2 , . . ., NRBt p , and S such that NRBt i has a subset sum of S if and only if a subfamily of G, denoted by Z = {y 1 , . . ., y 3p ′ }, forms an exact cover.The value of S is the sequence 11 . . . 1 (of length 3p ′ ): We will prove the equivalence by showing the sufficiency and the necessity.Sufficiency: Suppose that there is a non-empty set Y ⊆ {1, 2, . . ., p} such that ∑ r∈Y (NRBtr) = S.In the base-p + 1 arithmetic, each addend in the sum of S is either 0 or 1, and less than p + 1.Therefore, there is no "carry" in this addition.This implies that for each r ∈ 1, . . ., p, there is at most one i ∈ Y such that Zi ∩ Z r ̸ = ∅.Hence, the sets Z i for i ∈ Y are pairwise disjoint.Moreover, since ∑ r∈Y (NRBtr) = S, we have that i ∈ YZ i = Z.Therefore, C = Z i : i ∈ Y is an exact cover of (Z).
Necessity: Suppose that C ⊆ G is an exact cover of (Z).Then, for each r ∈ 1, . . ., p, there is exactly one Then, (Y) is a non-empty subset of 1, 2, . . ., p, and we have that This shows that Equation ( 19) defines an NP-hard problem.The global optimal solution is hard to find.Heuristic algorithms usually provide approximate solutions.We use a heuristic algorithm to solve this problem.

Transcoding and Retransmission
The base station makes a decision on whether to transcode or retransmit video data when the edge node cache is missed.The Algorithm 1 works as follows: The edge computing module in the base station divides users with cache misses into two groups, G A and G B , based on the predicted CQI value.Users in group G A have higher channel quality than users in group G B .The grouping criterion is as follows: A user belongs to group G A if CQI > CQI MAX +CQI MI N 2 , and to group G B if CQI ⩽ CQI MAX +CQI MI N

2
. The two groups of users have different options: (1) transcoding media data for both groups; (2) tetransmitting media data for both groups; (3) transcoding for group G A and retransmit for group G B ; and (4) retransmitting for group G A and transcode for group G B .
1: for all {UE k } do 2: if the media data is not found in the base station cache.
3:  The edge computing module in the base station computes the overall QoE of all users for each of the four selection schemes.Let V be the train speed, r 1 and r 2 be the signal coverage radii of base stations BS 1 and BS 2 , respectively, S 1 and S 2 be the distances between user u i and base stations BS 1 and BS 2 , respectively, D n = Bitrate n × T n be the amount of video data, T trans be the retransmission delay from server to base station, ∆ s = V × T o f f be the user's displacement, cost(n) = Bitrate n × T n × c be the cost of transcoding data, and T δ (n) = Bitrate n × T n /η be the transcoding time.The edge computing module transcodes video data and determines the location of cached data by comparing the distances S 1 + ∆ s and S 2 − ∆ s .It then selects the scheme that maximizes the overall QoE.

Environment-Aware Wireless Resource Allocation Algorithm (EA-WRAA)
This paper presents an environment-aware wireless resource allocation algorithm to enhance the user's streaming experience.Figure 4 illustrates the overall flowchart of the algorithm.
In summary, the process initiates by setting the initial number of wireless Resource Blocks (RBs) and determining the step size for adjusting the RB count during the optimization process.Part A is the description of allocating wireless resources to users, thereby determining the available bandwidth for users.Part B is the descriptive decision-making process for users applying for streaming media.Parts A and B occur simultaneously in the base station to maximize overall network performance.Part C is the output result of these processes.If the users report a Channel Quality Indicator (CQI) greater than 0, this indicates that the channel quality is acceptable, allowing the process to proceed to the next step.The base station then applies Kalman filtering to the CQI data to assess the quality of the wireless channel more accurately.Subsequently, the QoE value for each user is calculated based on the current allocation of RBs, and the maximum achievable QoE under the present RB configuration is recorded.Following this, the RB count for each user is adjusted based on the calculated impact of increasing or decreasing the RB count on their QoE.After adjusting the RB count, the total QoE for all users is recalculated.If no further improvement in QoE is observed after adjusting the RB count, the process concludes.Otherwise, the algorithm reverts to the previous step for continued optimization.Through this process, the RB count and bandwidth for high-speed railway users are ultimately determined, maximizing user QoE.The specific algorithms for this process are shown in the two detailed algorithms below.For detailed information, please refer to Algorithm 2.

Start
The base station performs Kalman filtering on the CQI.

δQoEup(u) > δQoEdown(u)
Increase the number of RB of the user by δn.
Decrease the number of RB of the user by δn.

End
Does the user report CQI>0?
Initialization the number of RB:NRBt and adjustment step size δn.
Calculate the initial QoE for all users.
Record the max QoEmax.

Calculate Nt
For each user.
Calculate the contribution of increasing and decreasing the number of RBs to the total QoE, which are represented as δQoEup(u) and δQoEdown(u), respectively.
Is the QoE no longer increasing?
Calculate the current total QoE.

Start
The base station performs Kalman filtering on the CQI.

δQoEup(u) > δQoEdown(u)
Increase the number of RB of the user by δn.
Decrease the number of RB of the user by δn.

End
Does the user report CQI>0?
Initialization the number of RB:NRBt and adjustment step size δn.
Calculate the initial QoE for all users.
Record the max QoEmax.

Calculate Nt
For each user.
Calculate the contribution of increasing and decreasing the number of RBs to the total QoE, which are represented as δQoEup(u) and δQoEdown(u), respectively.
Is the QoE no longer increasing?
Calculate the current total QoE.The base station predicts the user's channel state based on the channel prediction algorithm proposed in the previous section.It then caches video data with suitable bit rates from the media server to appropriate locations of the base station, considering the CQI prediction values of all users, the number of RBs available at the base station, and the high-speed rail's running state.Next, it allocates an optimal number of RBs to each user, transmits the relevant video data, and maximizes the QoE of all users.Let S be the available RBs at the base station.

Input
In each time slot, the base station initially allocates NRB t RBs to each user, computes the user's available bandwidth based on their CQI value, and predicts the trend of change in the user's QoE.The efficiency of each RB is calculated as δQoE(NRB t ) = δQoE/NRB t .It then allocates an appropriate number of RBs to each user based on their δQoE(NRB t ).For example, user A receives more RBs, which increases their bandwidth, transmits video with a higher bit rate, and improves their QoE, denoted by δQoE.The improvement efficiency is δQoE(NRB t ) = δQoE/NRB t .The base station computes the improvement efficiency of all users and selects the allocation method with the highest efficiency.It repeats this process until no RBs remain.Algorithm 2: Environment-aware wireless resource allocation algorithm (EA-WRAA)

Require:
Initialize the number of RB is S.
For each time slot t: The end for 20: end for Let N t be the minimum bandwidth for transmitting video streams at a bit rate of BitrateC u , NRB t be the number of time slots in 1 ms, N OFDM be the number of OFDM symbols occupied by RB, and N subchannel be the number of consecutive subcarriers occupied by RB in the frequency domain.The base station determines the number of RBs according to the current state of the channel.MCS is a data encoding scheme corresponding to the user's CQI feedback.Rm is the maximum bit rate in the CQI index under the 5G protocol.

Data Collection and Predictive Analysis
This study employs an advanced network transport simulation system based on Ubuntu 18.04 for the simulation wireless communication.The system was chosen for its advantages in high-speed data processing and complex network modeling.To ensure that the simulation model accurately reflects the real-world wireless communication environment, the simulation considered limitations on the number of Resource Blocks (RB) at the base station, the distance between users and the base station, the speed of user mobility and channel conditions.The RB limit is a critical factor, reflecting the maximum resources that a base station can allocate to users at any given time, significantly impacting network performance.The distance between users and the base station affects signal strength and quality, crucial for communication efficiency and reliability.User mobility speed, especially in high-speed train scenarios, leads to Doppler effects and rapidly changing channel conditions, which are essential to consider in simulations to evaluate the algorithm's performance in high-mobility environments.Specifically, we simulated a communication scenario on a high-speed train traveling at 300 km/h, with base stations spaced at an average distance of 1500 m along the railway.The simulation covered a 50 km section with a total simulation time of 10 min.The number of passengers in the carriage was set to 80, in line with the configuration of second-class seats on high-speed railways.Additionally, to create a realistic simulation environment, we collected real-time network data from various high-speed train routes.During the train's operation, we measured the Channel Quality Indicator (CQI), train speed, and other environmental parameters every 0.5 s.
This paper presents a method for predicting the user CQI and using real CQI values of users to test its effectiveness in simulation experiments.Figure 5 shows the experimental results.The results show a discrepancy between the predicted CQI values and the actual CQI values.To quantify this difference, we calculated the R-squared value, which was found to be 0.8531.The mean absolute error (MAE) was 0.88, and the root mean square error (RMSE) was 0.938.Table 1 of this paper provides a detailed comparison of the predicted CQI values for each video segment with the actual CQI values.We built a network simulation environment in Python and compared our algorithm with three others: Markov Decision Process-Adaptive (MDP-A) [30], Quality-Based Algorithm (QBA) [31], and Alternating Direction Method of Multipliers/Stochastic Approximation (ADMM/SA) [32].We used real data collected previously to simulate the dynamic channel state of high-speed rail users.We performed simulation experiments with three public videos [33], each divided into segments and encoded with different quality levels (Table 2).The videos were looped in the simulation experiment.We encoded and decoded the video with the Joint Scalable Video Model (JSVM, version 9.19) [34].We denote the resolution of the video segment as lk.Each video segment has six resolution levels: 4k, 2k, 1080p, 720p, 480p, and 360p.This paper presents the simulation results of the proposed algorithm and compares it with other algorithms based on the following key performance indicators.
QoE: We establish and standardize the Quality of Experience (QoE) for users in highspeed mobility states, using this as a standard to measure the performance of different algorithms.SSIM: The structural similarity index (SSIM) is an important metric for assessing image quality, used to evaluate the structural similarity between images before and after transmission.An SSIM value ranges from 0 to 1, with higher values indicating closer image quality to the original image.CDF: The cumulative distribution function (CDF) is used to comprehensively describe the probability distribution of user QoE.Through the analysis of the CDF, we can gain deeper insights into the overall impact of the proposed algorithm on user experience.

Comparison of Algorithms
Markov Decision Process-Adaptive (MDP-A) [30]: MDP-A is an adaptive algorithm based on the Markov decision process.It optimizes decisions by considering historical data and the current state, making it particularly suitable for decision-making in dynamic environments and under uncertainty.The algorithm adjusts the bitrate data during video encoding to enhance video quality and minimize stalling.It segments video transmission into multiple time periods and states.The algorithm aims to select the optimal bitrate video data in each time period to maximize user experience.
Quality-Based Algorithm (QBA) [31]: QBA is an algorithm predicated on video quality requirements, designed to enhance user experience while ensuring efficient use of resources.It dynamically modulates the quality level of video transmission to adapt to network conditions and user preferences, thus optimizing the overall performance of the video stream.
The alternating direction method of multipliers/stochastic approximation (ADMM/ SA) [32]: This is an optimization algorithm that combines the alternating direction method of multipliers with stochastic approximation techniques.ADMM/SA is suitable for solving large-scale and complex optimization problems, especially in environments with limited resources and high uncertainty.The strategy adapts the transcoding resolution based on the network status and device hardware capabilities, optimizing video quality and transmission efficiency.It segments the video source and transmits these segments to the mobile terminal and the MEC server, leveraging the MEC server's computing and storage capabilities.The algorithm then adjusts the video streaming's bitrate and resolution based on user QoE parameters, such as stalling rate and buffering time, to enhance user experience.

Results
This section presents the simulation results of the proposed algorithm and compares them with those of other algorithms, using the following parameters.
QoE: The performance of different algorithms is measured by the QoE of users in high-speed mobile state, which is defined and normalized in this paper.
SSIM: The structural similarity index (SSIM) is an indicator of image quality.It measures the structural similarity between images before and after transmission.The SSIM value ranges from 0 to 1, with higher values indicating higher similarity [35].
CDF: The cumulative distribution function (CDF), or simply the distribution function, is the integral of the probability density function (PDF) and fully characterizes the probability distribution of a real random variable X.This paper analyzes the CDF of user QoE.
Figures 6-8 display the aggregate Quality of Experience (QoE) of all users in a highspeed train carriage utilizing the EA-WRAA, MDP-A, QBA, and ADMM/SA algorithms for transmitting three different videos, respectively.
Figure 6 shows the QoE for the EA-WRAA, MDP-A, QBA, and ADMM/SA algorithms transmitting three videos.The EA-WRAA algorithm proposed in this paper surpasses the others in QoE and stability, as demonstrated in Figure 6.For instance, during the interval between 5 and 10 s, there is a significant drop in the user's channel quality, potentially due to the train entering a tunnel or an arch bridge.Despite this, the EA-WRAA algorithm maintains a more stable QoE.The network state of the train during the 'blue sky' segment is more stable than during the '50 mobcal' segment.As clearly observed in Figure 6a, when watching the 'old town cross' video, the EA-WRAA algorithm provides the highest QoE.Notably, during periods of significant network quality fluctuation (as indicated between seconds 10 and 30 and between seconds 50 and 60), the QoE of the EA-WRAA algorithm does not significantly decrease, illustrating its robustness and adaptability.In stark contrast, the QoE for MDP-A and QBA algorithms noticeably drops during these intervals, indicating their less sensitive or insufficient adaptive response to network fluctuations.
Figure 7 presents the Cumulative Distribution Function (CDF) of user QoE for the same video under different algorithms.The EA-WRAA algorithm, as proposed in this paper, achieves a smoother and higher QoE for a greater number of users compared to the other three algorithms, which show poorer results.In Figure 7c, the CDF distribution for the 'blue sky' video content demonstrates the statistical superiority of the EA-WRAA algorithm.The CDF curve of the EA-WRAA algorithm rises rapidly and approaches a CDF value closer to 1, indicating that almost all users enjoy a high-quality video experience.In contrast, the CDF curve for comparative algorithms like MDP-A starts to show a gradient increase around a QoE of 0.6, suggesting that a significant proportion of users are subjected to a lower QoE.
Figure 8 displays the SSIM values for three videos before and after transmission using four algorithms: EA-WRAA, MDP-A, QBA, and ADMM/SA.The chart indicates that the 'old town cross' video segment exhibits a lower SSIM value in comparison to the other two segments, attributable to its higher complexity and increased susceptibility to noise during transmission.Figure 8b showcases the SSIM performance of the EA-WRAA algorithm for the '50 mobcal ter' video segment.It is observed that the SSIM value for the EA-WRAA algorithm maintains a consistently high level throughout the transmission process.This is particularly notable within the 30-40 s interval, where the SSIM values of the other algorithms exhibit significant fluctuations.Consequently, the stability of the EA-WRAA algorithm becomes quite pronounced.This highlights the EA-WRAA algorithm's superior capability in preserving video details, ensuring that video quality is robustly maintained, even in a high-speed mobile network environment.Overall, the EA-WRAA algorithm exhibits advantages in QoE by adeptly adapting to network fluctuations and stabilizing the user experience.In SSIM, it showcases its capability by maintaining high image quality, and in CDF, it highlights its performance by providing a consistent high QoE experience to a broader user group.These advantages collectively make the EA-WRAA algorithm particularly suitable for high-speed mobile network scenarios, effectively addressing network quality variations due to high mobility and environmental changes.
QoE (Quality of Experience): The EA-WRAA algorithm maintains a higher QoE during network condition fluctuations (as illustrated in the 5-10 s interval in Figure 6), such as when the train enters a tunnel.This demonstrates the algorithm's remarkable stability and adaptability in response to network fluctuations.During the 'blue sky' segment, the EA-WRAA algorithm provides a more stable QoE, demonstrating that the algorithm can flexibly adjust to different network states to optimize the overall user experience.Furthermore, the EA-WRAA algorithm achieves a higher QoE in the CDF distribution shown in Figure 7, indicating a significant improvement in user satisfaction compared to other algorithms.SSIM (Structural Similarity Index): Image Quality Maintenance: The EA-WRAA algorithm maintains a high SSIM value even in segments of high video complexity, such as 'old town cross', reducing the quality loss during transmission.In the SSIM comparison across the three video segments, the EA-WRAA algorithm displays a higher image quality, reflecting its superior encoding and transmission strategy.
CDF (Cumulative Distribution Function): The CDF curve of the EA-WRAA algorithm rises quickly and approaches a value of 1, meaning that most users enjoy a high level of QoE, providing a more consistent and broad high-quality experience compared to other algorithms.The CDF analysis shows that the EA-WRAA algorithm provides a more stable and higher QoE level across the entire user group, demonstrating its statistical advantage and overall improvement in user experience.

Discussion
Compared to three other algorithms, the EA-WRAA algorithm delivers higher and more consistent user QoE in high-speed mobile scenarios.This algorithm comprehensively considers factors such as objective video quality, subjective user perception, network state, and switching costs, and dynamically adjusts video resolution and bitrate to adapt to highspeed mobile network fluctuations.User QoE is significantly affected by video complexity and noise susceptibility.For example, the 'old city cross' video segment has a lower SSIM value than the other two segments, indicating poorer user QoE.This video has higher spatial and temporal complexity, with various colors, textures, motions, and details, which are prone to noise interference during transmission.This results in reduced structural similarity and increased distortion of the video, culminating in a diminished viewing experience for users.
The EA-WRAA algorithm is tailored to the unique features of high-speed mobile scenarios, such as frequent base station handovers, rapid rail velocities, and various environmental factors, rendering it more suitable for these network environments.Network conditions in high-speed mobile scenarios vary with user location, velocity, and direction, leading to instability in network parameters such as bandwidth, latency, and packet loss.Merely adjusting video parameters based on the current network state can result in fluctuations in video quality and a reduction in user QoE.The EA-WRAA algorithm enhances video quality and user QoE by proactively adjusting videos based on predicted user trajectories and network states.

Conclusions
This study introduces a novel environment-aware wireless resource allocation algorithm, specifically designed to enhance the user video experience in high-speed mobile network scenarios.The algorithm comprehensively takes into account the network fluctuations, user mobility speed, and environmental factors prevalent in high-speed mobile environments.It dynamically adjusts video resolution and bitrate to adapt to network changes.Experimental results indicate that the EA-WRAA algorithm outperforms other algorithms in terms of overall User QoE, SSIM, and CDF.Compared to traditional video transmission optimization methods, the EA-WRAA algorithm shows greater proficiency in adapting to the distinct characteristics of high-speed mobile networks, thereby providing a more stable and higher quality video viewing experience.In high-speed mobile network environments, frequent base station transitions, the velocity of high-speed railways, and other environmental factors significantly impact network parameters such as bandwidth, latency, and packet loss rate.The EA-WRAA algorithm proactively adjusts video parameters based on user trajectory predictions and current network status, with the goal of optimizing video quality and stability.In the experiments, the EA-WRAA algorithm's performance was compared with three other algorithms (MDP-A, QBA, and ADMM/SA), demonstrating notable superiority in maintaining high SSIM values and providing a broader high-QoE experience.
Overall, the EA-WRAA algorithm demonstrates significant advantages in enhancing video transmission quality and user experience in high-speed mobile network environments.Future research will delve into various video encoding and transmission schemes, such as semantic transmission, to further augment video quality and stability.The resolution of the video segment RB The smallest wireless resource allocation unit l k The video segment UE k The user k N The number of base stations B n The nth base station NRB t The number of radio resources N t The network bandwidth the user at time t C k b(t) The edge buffer γ The bandwidth calculation function The impact of jitter amplitude on QoE N t Refers to the available RBs and bandwidth at time t Φ(N, L) Function mapping the rebuffering number (N) and the stalling duration (L) to QoE Ω(q, s) The mapping relationship between video quality jitter and user QoE The media bitrate that the edge buffer requests

Figure 1 .
Figure 1.The resource allocation and media transmission optimization model.

Figure 3 .
Figure 3. Three-level system diagram of a user base station server.

Figure 4 .
Figure 4.The overall flowchart of the wireless resource allocation optimization rate algorithm.

t
N OFDM Number of OFDM symbols occupied by RBN subchannelThe number of consecutive subcarriers occupied by RB in the frequency domain MCS Data encoding scheme R mThe maximum bit rate in CQI index under 5G protocol NRB r Number of RBs allocated by the base station to user r UE sends a video request and the CQI information to base station

Table 1 .
Simulation Result.Figure 5. Comparison of actual and predicted CQI values.
l 2 , . . ., l k } Video segments with different quality levels q lk

1
Predicted detected value of CQI at time t − 1 Z t−1 Detected value of CQI at time t − 1 V t The deviation between prediction and actual value P − The prior error covariance matrix D n Product of Bitrate n and T n cost(n) Calculated as Bitrate n × T n × c T δ(n) Transcoding time of the nth video segment, calculated as Bitrate n × T n /η f ∆(q) t