Deep learning-based multi-level adaptive compression cross-layer transmission optimization method and system for video

By optimizing video compression and transmission strategies through deep learning, the problems of resource waste and poor performance in traditional methods are solved. Global optimization of video compression and transmission is achieved, improving network utilization efficiency and user experience.

CN120111246BActive Publication Date: 2026-07-03NANJING COENQI INFORMATION TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING COENQI INFORMATION TECHNOLOGY CO LTD
Filing Date
2025-03-10
Publication Date
2026-07-03

Smart Images

  • Figure CN120111246B_ABST
    Figure CN120111246B_ABST
Patent Text Reader

Abstract

The deep learning-based video multi-level adaptive compression cross-layer transmission optimization method and system of the application relates to the technical field of video transmission. By designing a compression level selection model based on deep learning, the optimal compression level is output based on the original video data and network environment parameters, and the corresponding compression strategy of the optimal compression level is obtained. A transmission strategy selection model is designed to generate a transmission strategy based on video quality parameters and network environment parameters. A global utility function is defined to calculate the global utility value when the compression strategy and the transmission strategy are assumed to be executed. An optimization objective function is designed, which inputs the compression strategy and the transmission strategy and outputs the optimized compression strategy and the transmission strategy. A condition judgment logic is set to select the final strategy based on the compression strategy and the transmission strategy before and after optimization, thereby achieving global optimization of video compression and transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video transmission technology, and in particular to a deep learning-based method and system for optimizing multi-level adaptive compression and cross-layer transmission of video. Background Technology

[0002] Multi-level video compression and cross-layer transmission is a comprehensive approach for complex video data streams. Its core objective is to achieve efficient video compression and reliable cross-layer data transmission optimization through collaborative work between edge computing nodes and terminals in network environments with limited or unstable bandwidth. The key to this technology is the deep integration of video compression algorithms, transmission protocols, and edge computing capabilities.

[0003] Patent application CN111510774A discloses an image compression algorithm for smart terminals that combines edge computing and deep learning. This algorithm deploys an image compression model during data transmission between the terminal and the cloud, compressing image and video data acquired by the edge terminal while retaining keyframes and motion information. This reduces data transmission, alleviates bandwidth pressure, saves significant storage space, and reduces the time spent locating abnormal behavior.

[0004] Traditional video compression and transmission strategies are relatively fixed and cannot be dynamically adjusted according to actual conditions, resulting in poor compression and transmission effects and wasted resources. Summary of the Invention

[0005] This application aims to at least partially address one of the technical problems in related technologies. To this end, one objective of this application is to propose a deep learning-based method and system for optimizing multi-level adaptive compression and cross-layer transmission of video, achieving global optimization of video compression and transmission.

[0006] One aspect of this application provides a deep learning-based method for optimizing cross-layer transmission of multi-level adaptive compression for video, including:

[0007] Step S100: Design a deep learning-based compression level selection model, output the optimal compression level based on the original video data and network environment parameters, and obtain the compression strategy corresponding to the optimal compression level;

[0008] Step S200: Design a transmission strategy selection model and generate a transmission strategy based on video quality parameters and network environment parameters;

[0009] Step S300: Define a global utility function, calculate the global utility value when the compression and transmission strategies are assumed to be executed, and design an optimization objective function. The optimization objective function takes the compression and transmission strategies as input and outputs the optimized compression and transmission strategies.

[0010] Step S400: Set up conditional judgment logic to select the final strategy based on the compression and transmission strategies before and after optimization;

[0011] The design is based on a deep learning-based compression level selection model. The specific method for outputting the optimal compression level based on the original video data and network environment parameters is as follows:

[0012] Step S110: Construct a compression level selection model based on deep learning, wherein the compression level selection model adopts a combination structure of convolutional neural network and long short-term memory network;

[0013] Step S120: Obtain real-time raw video data and network environment parameters;

[0014] Step S130: The convolutional neural network extracts features from the video frames of the original video data to obtain the feature vector of each frame. The feature vectors of all frames constitute the frame feature sequence. The frame feature sequence extracted by the convolutional neural network is input into the long short-term memory network to extract the video dynamic features of the frame feature sequence.

[0015] Step S140: Concatenate the video dynamic features with the network environment parameters to form a comprehensive feature vector;

[0016] Step S150: Use the decision-maker in the compression level selection model to map the comprehensive feature vector to a probability distribution of compression levels, and output the compression level with the highest probability value as the optimal compression level of the original video data; the decision-maker is a fully connected layer and a softmax activation function;

[0017] The training process of the deep learning-based compression level selection model is as follows:

[0018] Step S111: Collect various types of raw video samples from the dataset, use network simulation tools to compress and transmit the raw video samples based on different network environments, and record the network environment parameters;

[0019] Step S112: For each set of original video samples and network environment parameters, label its optimal compression level.

[0020] Step S113: Use the cross-entropy loss function to measure the difference between the probability distribution of the optimal compression level predicted by the deep learning-based compression level selection model and the true optimal compression level label;

[0021] Step S114: Use the stochastic gradient descent algorithm to update the model parameters through backpropagation, with minimizing the value of the cross-entropy loss function as the optimization objective, to train the deep learning-based compression level selection model and obtain the trained compression level selection model.

[0022] The specific method for obtaining the compression strategy corresponding to the optimal compression level is as follows:

[0023] Step S160: Define compression levels and compression parameters, including quantization parameter QP, intra-frame prediction mode Intra, inter-frame prediction mode Inter, and entropy coding mode Entropy. Design a mapping table between compression levels and compression parameters based on the compression parameters.

[0024] Step S170: Using the optimal compression level as an index, find the corresponding compression parameters in the mapping table, and combine the compression parameters as a compression strategy;

[0025] The specific method for generating transmission strategies based on video quality parameters and network environment parameters in the aforementioned transmission strategy selection model is as follows:

[0026] Step S210: Define a state space based on video quality parameters and network environment parameters, wherein the state includes application layer state s app Transport layer state s trans Network layer state s net ;

[0027] The application layer state is video quality parameters, specifically including video encoding parameters, frame rate, and resolution;

[0028] The transport layer state and network layer state are network environment parameters. The transport layer state includes current bandwidth, packet loss rate, and latency, while the network layer state includes network topology, link quality, and congestion level.

[0029] Step S220: Define the action space, the actions including application layer action a app Transport layer action a trans Network layer action a net ;

[0030] Step S230: Define the reward function r, based on the application layer reward r app Transport layer reward r trans Network layer reward r net Design a comprehensive reward function;

[0031] Step S240: Design an intelligent agent system, wherein the intelligent agents include application layer intelligent agents, transport layer intelligent agents and network layer intelligent agents, and construct a transport strategy selection model using a deep reinforcement learning model;

[0032] Step S250: At each time step, based on the state and policy network of each layer observed by the agent, generate the corresponding action of the layer, combine the actions generated by the agent into a transmission policy and output it;

[0033] The design method for the reward function r is as follows:

[0034] Step S231: At the application layer, the peak signal-to-noise ratio (PSNR) of the video is statistically analyzed as a measure of video quality, based on the PSNR at each time step and the maximum PSNR. max Calculate the normalized value of video quality and count the number of times the video playback stutters. count And stuttering duration duration Calculate the video smoothness impact factor, obtain the video startup time impact factor, calculate the product of the video startup time impact factor, the normalized value of video quality, and the video smoothness impact factor, and obtain the application layer reward r. app ;

[0035] Step S232: At the transport layer, count the time interval delay between the transmission and reception of video frames, and calculate its difference from the target delay. target The difference is used to calculate the transmission delay impact factor, the proportion of video frames lost during transmission (loss) is statistically analyzed, the packet loss rate impact factor is calculated, and the product of the normalized video quality value, the transmission delay impact factor, and the packet loss rate impact factor is calculated to obtain the transport layer reward r. trans ;

[0036] Step S233: Obtain network bandwidth utilization at the network layer; calculate the influence factor of network bandwidth utilization based on the network bandwidth utilization and the target utilization; obtain queuing delay in the network; calculate the influence factor of queuing delay based on the queuing delay and the target queuing delay; calculate the influence factor of resource consumption based on the resource consumption during the transmission process; and calculate the product of the influence factors of network bandwidth utilization, queuing delay, and resource consumption to obtain the network layer reward r. net ;

[0037] Step S234: Calculate a comprehensive reward function based on application layer rewards, transport layer rewards, and network layer rewards;

[0038] The training process of the transmission strategy selection model is as follows:

[0039] Step S241: Collect historical data from the application layer, transport layer, and network layer, including state transition data, action selection, and performance feedback data;

[0040] Step S242: For each agent, initialize the parameters of its policy network and value network;

[0041] Step S243: Initialize the agent's experience replay cache; the experience replay cache is used to store state transition data during the training process;

[0042] Step S244: For each agent, based on the current state s and the policy network π(a|s;θ), generate action a, execute the generated action, and the agent interacts with the environment to obtain the immediate reward function r and the state s′ of the next time step;

[0043] Step S245: Store the state transition data (s,a,r,s′) into the experience replay buffer, and randomly select a batch of state transition data (s′) from the experience replay buffer. i ,a i ,r i ,s′ i For each agent, the temporal difference error is calculated, and the parameters φ of the value network are updated using the temporal difference error to minimize the mean squared error loss; where s i a i r i ,s′ i The state, action, reward function, and state of the next time step are obtained from the state transition data of a randomly selected time step i.

[0044] Step S246: Update the parameters θ of the policy network using the policy gradient algorithm to maximize the expected reward;

[0045] Step S247: Repeat steps S245 to S246 above until the preset number of training rounds is reached to obtain the trained transmission strategy selection model;

[0046] The specific method for defining a global utility function, calculating the global utility value under the assumptions of implementing compression and transmission strategies, and designing the optimization objective function is as follows:

[0047] Step S310: Define a global utility function U(s) based on video quality parameters, transmission delay, bandwidth utilization, compression ratio, and resource consumption. c ,s t );

[0048] Step S320: Calculate the global utility function value when assuming the execution of the compression strategy and the transmission strategy, wherein the global utility function value includes the global utility function value of executing the compression strategy. and the global utility function value for executing the transmission strategy and the global utility function value when both compression and transmission strategies are executed simultaneously.

[0049] Step S330: Design an optimization objective function, taking the current compression and transmission strategies as input, and setting the optimization objectives as maximizing video quality, minimizing transmission latency, maximizing bandwidth utilization, and minimizing total resource consumption. Output the optimized compression strategy s. c and transmission strategies t ′;

[0050] The specific method for setting the condition judgment logic is as follows:

[0051] Step S410: The condition judgment logic includes:

[0052] if and Where θ1 is the first utility threshold, the compression strategy before optimization is directly executed. and transmission strategy U(s c ′,s t ′) to execute the optimized compression strategy s c and optimized transmission strategies t The global utility function value of ′;

[0053] if and Where θ2 is the second utility threshold, then only the transmission strategy is optimized and the compression strategy is executed. and optimized transmission strategies t ′;

[0054] if and Then only the compression strategy is optimized, and the optimized compression strategy s is executed. c and transmission strategy

[0055] Otherwise, optimize both the compression and transmission strategies simultaneously, and execute the optimized compression strategy s. c and transmission strategies t ′;

[0056] Step S420: Based on the conditional judgment logic output, select the compression strategy and transmission strategy to be executed to obtain the final strategy;

[0057] The adjustment method for the first utility threshold and the second utility threshold is as follows: obtain the average global utility function values ​​of the compression strategy and transmission strategy before optimization, the compression strategy before optimization and the transmission strategy after optimization, and the compression strategy after optimization and the transmission strategy before optimization within the historical time period at the current moment, respectively. Based on the current first utility threshold θ1 and second utility threshold θ2, and combined with the average global utility function value, the first utility threshold and second utility threshold are adjusted to obtain the adjusted first utility threshold θ1′ and second utility threshold θ2′.

[0058] One aspect of this application provides a deep learning-based video multi-level adaptive compression cross-layer transmission optimization system, comprising:

[0059] The compression strategy generation module is used to design a deep learning-based compression level selection model. Based on the original video data and network environment parameters, it outputs the optimal compression level and obtains the compression strategy corresponding to the optimal compression level.

[0060] The transmission strategy generation module is used to design a transmission strategy selection model and generate transmission strategies based on video quality parameters and network environment parameters.

[0061] The global optimization calculation module is used to define a global utility function, calculate the global utility value when the compression and transmission strategies are assumed to be executed, and design an optimization objective function. The optimization objective function takes the compression and transmission strategies as inputs and outputs the optimized compression and transmission strategies.

[0062] The final strategy output module is used to set condition judgment logic and select the final strategy based on the compression and transmission strategies before and after optimization.

[0063] The deep learning-based video multi-level adaptive compression cross-layer transmission optimization method and system proposed in this application have the following advantages over existing technologies:

[0064] This application designs a compression level selection model that uses a convolutional neural network to extract video frame features, combines a long short-term memory network to capture the temporal dynamic features of the video, and comprehensively considers network environment parameters to intelligently predict the optimal compression level. It fully considers the differences between video content and network conditions, overcomes the limitations of traditional fixed compression parameters, and the dynamic adjustment of the compression level can reduce the video bitrate to the maximum extent while ensuring video quality, saving transmission bandwidth and improving network utilization efficiency.

[0065] This application constructs a multi-agent system that utilizes deep reinforcement learning technology from three perspectives: application layer, transport layer, and network layer. It autonomously learns and generates optimal combinations of transport strategies, achieving comprehensive and multi-layered transport strategy optimization. This breaks away from the traditional single-layer optimization approach, enabling more comprehensive adaptation to complex and ever-changing network environments. By comprehensively considering factors at all levels and dynamically adjusting transport strategies, it can minimize transmission latency, improve bandwidth utilization, and reduce stuttering and frame drops while ensuring video playback quality, thereby significantly improving the user's viewing experience.

[0066] The jointly optimized compression and transmission strategy designed in this application can better balance multiple objectives such as video quality, latency, and bandwidth utilization, achieving optimal resource allocation and performance overall, and avoiding waste of resources and loss of effect.

[0067] This application uses compression and transmission strategies before and after optimization, makes logical judgments based on global utility, and dynamically decides to execute strategies before and after optimization. This avoids resource waste and increased latency caused by blind optimization, and achieves global optimization of video compression and transmission. Attached Figure Description

[0068] Figure 1 A flowchart of the deep learning-based video multi-level adaptive compression cross-layer transmission optimization method provided in this application;

[0069] Figure 2 A flowchart illustrating the method for generating the transmission strategy provided in this application;

[0070] Figure 3 A flowchart of the optimization method for the objective function provided in this application;

[0071] Figure 4 Functional block diagram of the deep learning-based video multi-level adaptive compression cross-layer transmission optimization system provided in this application. Detailed Implementation

[0072] To better understand this application, various aspects of this application will be described in more detail with reference to the accompanying drawings. It should be understood that these detailed descriptions are merely illustrative of exemplary embodiments of this application and are not intended to limit the scope of this application in any way. Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.

[0073] In the accompanying drawings, the size, dimensions, and shapes of the elements have been slightly adjusted for ease of illustration. The drawings are for illustrative purposes only and are not strictly to scale. As used herein, the terms “approximately,” “about,” and similar terms are used to indicate approximation, not degree, and are intended to illustrate inherent deviations in measured or calculated values ​​that will be recognized by one of ordinary skill in the art. Furthermore, the order in which the steps are described in this application does not necessarily indicate the order in which these steps occur in actual operation, unless otherwise expressly defined or deduced from the context.

[0074] It should also be understood that expressions such as "comprising," "including," "having," "containing," and / or "comprising" are open-ended rather than closed-ended expressions in this specification, indicating the presence of the stated features, elements, and / or components, but not excluding the presence of one or more other features, elements, components, and / or combinations thereof. Furthermore, when expressions such as "at least one of..." appear after a list of listed features, they modify the entire list of features, not just individual elements in the list. Additionally, when describing embodiments of this application, the word "may" is used to mean "one or more embodiments of this application." And the term "exemplary" is intended to refer to examples or illustrations.

[0075] Unless otherwise specified, all terms used herein (including engineering and technical terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that, unless expressly stated herein, terms defined in common dictionaries shall be interpreted as having the meaning consistent with their meaning in the context of the relevant art, and not as having an idealized or overly formalized meaning.

[0076] It should be noted that, where there is no conflict, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0077] Example 1

[0078] like Figure 1 As shown, the deep learning-based video multi-level adaptive compression cross-layer transmission optimization method provided in this application includes:

[0079] Step S100: Design a deep learning-based compression level selection model, output the optimal compression level based on the original video data and network environment parameters, and obtain the compression strategy corresponding to the optimal compression level;

[0080] The design is based on a deep learning-based compression level selection model. The specific method for outputting the optimal compression level based on the original video data and network environment parameters is as follows:

[0081] Step S110: Construct a compression level selection model based on deep learning, wherein the compression level selection model adopts a combination structure of convolutional neural network and long short-term memory network;

[0082] The training process of the deep learning-based compression level selection model is as follows:

[0083] Step S111: Collect various types of raw video samples from the dataset, use network simulation tools to compress and transmit the raw video samples based on different network environments, and record the network environment parameters;

[0084] Step S112: For each set of original video samples and network environment parameters, label its optimal compression level.

[0085] The optimal compression level label is labeled by averaging scores from multiple experts.

[0086] Step S113: Use the cross-entropy loss function to measure the difference between the probability distribution of the optimal compression level predicted by the deep learning-based compression level selection model and the true optimal compression level label;

[0087] Step S114: Use the stochastic gradient descent algorithm to update the model parameters through backpropagation, with minimizing the value of the cross-entropy loss function as the optimization objective, to train the deep learning-based compression level selection model and obtain the trained compression level selection model.

[0088] The deep learning-based compression level selection model utilizes video dynamic features and network environment parameters to learn the potential rules of compression level selection through end-to-end training. It can also adjust the compression strategy according to real-time dynamic input to improve the quality and efficiency of video transmission.

[0089] Step S120: Obtain real-time raw video data and network environment parameters;

[0090] The network environment parameters include current bandwidth, packet loss rate, latency, network topology, link quality, and congestion level. These network environment parameters refer to relevant network status data at the transport layer and network layer.

[0091] Step S130: The convolutional neural network extracts features from the video frames of the original video data to obtain the feature vector of each frame. The feature vectors of all frames constitute the frame feature sequence. The frame feature sequence extracted by the convolutional neural network is input into the long short-term memory network to extract the video dynamic features of the frame feature sequence.

[0092] The video dynamic features refer to the temporal dynamic features of video sequences learned by the Long Short-Term Memory Network.

[0093] Step S140: Concatenate the video dynamic features with the network environment parameters to form a comprehensive feature vector;

[0094] The integrated feature vector represents the current state of the video content and network environment;

[0095] Step S150: Use the decision-maker in the compression level selection model to map the comprehensive feature vector to a probability distribution of compression levels, and output the compression level with the highest probability value as the optimal compression level of the original video data; the decision-maker is a fully connected layer and a softmax activation function;

[0096] The fully connected layer in the decision-maker includes multiple hidden layers, and the specific number of layers can be adjusted according to the complexity of the task.

[0097] The specific method for obtaining the compression strategy corresponding to the optimal compression level is as follows:

[0098] Step S160: Define compression levels and compression parameters, including quantization parameter QP, intra-frame prediction mode Intra, inter-frame prediction mode Inter, and entropy coding mode Entropy. Design a mapping table between compression levels and compression parameters based on the compression parameters.

[0099] The mapping table is designed based on human experience and domain knowledge; preferably, the mapping table between compression levels and compression parameters is designed as follows:

[0100] CL=1: QP=20, Intra=3, Inter=2, Entropy=1;

[0101] CL=2: QP=25, Intra=3, Inter=1, Entropy=1;

[0102] CL=3: QP=30, Intra=2, Inter=1, Entropy=0;

[0103] CL=4: QP=35, Intra=2, Inter=0, Entropy=0;

[0104] CL=5: QP=40, Intra=1, Inter=0, Entropy=0;

[0105] Where CL represents the compression level;

[0106] Step S170: Using the optimal compression level as an index, find the corresponding compression parameters in the mapping table, and combine the compression parameters as a compression strategy;

[0107] The above-mentioned compression strategy generation method based on the mapping table is seamlessly integrated with the compression level selection model, realizing a fast mapping from compression level to compression strategy, and providing strong support for subsequent video transmission and optimization.

[0108] The above step S100 aims to select the optimal compression level based on a deep learning model according to the network status and video characteristics. The optimal compression level can achieve local optima at the compression level, ensuring video quality and adapting to network transmission limitations.

[0109] Step S200: Design a transmission strategy selection model and generate a transmission strategy based on video quality parameters and network environment parameters;

[0110] like Figure 2 As shown, the specific method for generating transmission strategies based on video quality parameters and network environment parameters in the design transmission strategy selection model is as follows:

[0111] Step S210: Define a state space based on video quality parameters and network environment parameters, wherein the state includes application layer state s app Transport layer state s trans Network layer state s net ;

[0112] The application layer state is video quality parameters, specifically including video encoding parameters, frame rate, and resolution;

[0113] The transport layer state and network layer state are network environment parameters. Specifically, the transport layer state includes current bandwidth, packet loss rate, and latency, while the network layer state includes network topology, link quality, and congestion level.

[0114] The state space s is represented as s = [s app ,s trans ,s net ];

[0115] Step S220: Define the action space, the actions including application layer action a app Transport layer action a trans Network layer action a net ;

[0116] The application layer actions include adjusting video quality parameters;

[0117] The transport layer actions include transmission rate and retransmission mechanism;

[0118] The network layer actions include transmission paths and network traffic;

[0119] The action space 'a' is represented as a = [a... app ,a trans ,a net ];

[0120] Step S230: Define the reward function r, based on the application layer reward r app Transport layer reward r trans Network layer reward r net Design a comprehensive reward function;

[0121] The design method for the reward function r is as follows:

[0122] Step S231: At the application layer, the peak signal-to-noise ratio (PSNR) of the video is statistically analyzed as a measure of video quality, based on the PSNR at each time step and the maximum PSNR. maxCalculate the normalized value of video quality and count the number of times the video playback stutters. count And stuttering duration duration Calculate the video smoothness impact factor, obtain the video startup time impact factor, calculate the product of the video startup time impact factor, the normalized value of video quality, and the video smoothness impact factor, and obtain the application layer reward.

[0123] The formula for calculating the application layer reward is as follows: in, This is a normalized value for video quality. As a factor affecting video smoothness, γ is the video startup time influencing factor, δ is the balance factor that controls the degree of impact of stuttering on application layer rewards, and δ is the balance factor that controls the degree of impact of startup time on application layer rewards.

[0124] The values ​​of the balancing factors for the impact of control delay on application layer rewards and the balancing factors for the impact of control startup time on application layer rewards are set by those skilled in the art based on experience.

[0125] The application layer reward takes into account video quality, stuttering, and startup time. The three indicators are combined by multiplication. The higher the video quality, the less stuttering, and the shorter the startup time, the greater the application layer reward, indicating a better viewing experience for the user.

[0126] Step S232: At the transport layer, count the time interval delay between the transmission and reception of video frames, and calculate its difference from the target delay. target The difference is used to calculate the transmission delay impact factor, the proportion of video frames lost during transmission is statistically analyzed, the packet loss rate impact factor is calculated, and the product of the normalized value of video quality, the transmission delay impact factor, and the packet loss rate impact factor is calculated to obtain the transmission layer reward.

[0127] The formula for calculating the transport layer reward is as follows: in, The factors affecting transmission delay, The factors affecting packet loss rate To act as a balancing factor to control the impact of transmission delay on rewards, ∈ is a constant;

[0128] The values ​​of the balancing factor and constant ∈ that control the impact of transmission delay on rewards are set by those skilled in the art based on experience.

[0129] The transport layer reward comprehensively considers video quality, latency, and packet loss rate, combining these three metrics through a product. The higher the video quality, the lower the latency, and the lower the packet loss rate, the larger the transport layer reward, indicating better transmission performance.

[0130] Step S233: Obtain network bandwidth utilization at the network layer, and compare the network bandwidth utilization util with the target utilization util. target Calculate the factors affecting network bandwidth utilization and obtain the queuing delay in the network. delay Based on queuing delay and target queuing delay Calculate the impact factor of queuing delay, calculate the impact factor of resource consumption based on the resource consumption during the transmission process, and calculate the product of the impact factors of network bandwidth utilization, queuing delay, and resource consumption to obtain the network layer reward.

[0131] The formula for calculating the network layer reward is as follows: Where η is a balancing factor that controls the degree of influence of queuing delay on reward, and ∈' is a constant used to control the denominator from being non-zero. As a factor affecting network bandwidth utilization, The influencing factor of queuing delay, Influencing factors of resource consumption;

[0132] The values ​​of the balancing factor for controlling the impact of queuing delay on rewards and the constant used to control the denominator from being non-zero are set by those skilled in the art based on experience.

[0133] Step S234: Calculate a comprehensive reward function based on application layer rewards, transport layer rewards, and network layer rewards;

[0134] The formula for calculating the reward function is as follows: Wherein, α and β are balancing factors; the balancing factors are used to control the contribution of network layer rewards to the overall reward function, and their values ​​are set by those skilled in the art based on experience.

[0135] Where, r app ×r trans This represents the combined performance of the application layer and the transport layer. The larger the two sub-rewards are, the better the user experience and transmission quality of video transmission. This represents the factor by which network layer performance affects the total reward function, when r net When r is greater than β, the function value is close to 1, indicating that the network layer performance contributes significantly to the total reward; when r net When it is less than β, the function value is close to e. α×β This indicates that the performance of the network layer contributes relatively little to the total reward function.

[0136] The reward function *r* embodies the idea of ​​cross-layer optimization. When the network layer performance is good, the reward function *r* is largely determined by the application layer and transport layer rewards, indicating that, given network conditions, improving user experience and transmission quality should be prioritized. When the network layer performance is poor, the reward function *r* is limited by network layer performance, indicating that, under less than ideal network conditions, improving network transmission efficiency and quality should be prioritized. This non-linear combination approach can balance the performance of different layers, prompting the agent to comprehensively consider various factors in cross-layer optimization, thereby making more comprehensive and reasonable decisions.

[0137] Step S240: Design an intelligent agent system, wherein the intelligent agents include application layer intelligent agents, transport layer intelligent agents and network layer intelligent agents, and construct a transport strategy selection model using a deep reinforcement learning model;

[0138] The intelligent agents communicate and collaborate to achieve cross-layer information sharing and joint decision-making. Specifically, the application layer intelligent agent feeds back video quality parameters to the transport layer intelligent agent, and the network layer intelligent agent feeds back congestion information to the application layer intelligent agent.

[0139] The training process of the transmission strategy selection model is as follows:

[0140] Step S241: Collect historical data from the application layer, transport layer, and network layer, including state transition data, action selection, and performance feedback data;

[0141] The historical data comes from actual video transmission systems or is generated through simulation environments.

[0142] Step S242: For each agent, initialize the parameters of its policy network and value network;

[0143] The policy network is used to generate the probability distribution of actions, and its parameters include the application layer policy network parameters θ. app Transport layer strategy network parameters θ trans and network layer strategy network parameters θ net ;

[0144] The value network is used to estimate the value of state-action pairs, and its parameters include the application layer value network parameter φ. app Transport layer value network parameters φ trans and network layer value network parameters φ net ;

[0145] Step S243: Initialize the agent's experience replay cache; the experience replay cache is used to store state transition data during the training process;

[0146] Step S244: For each agent, based on the current state s and the policy network π(a|s;θ), generate action a, execute the generated action, and the agent interacts with the environment to obtain the immediate reward function r and the state s′ of the next time step;

[0147] Step S245: Store the state transition data (s,a,r,s′) into the experience replay buffer, and randomly select a batch of state transition data (s′) from the experience replay buffer. i ,a i ,r i ,s′ i For each agent, the temporal difference error is calculated, and the parameters φ of the value network are updated using the temporal difference error to minimize the mean square error loss.

[0148] Among them, s i a i r i ,s′ i The state, action, reward function, and state of the next time step are obtained from the state transition data of a randomly selected time step i.

[0149] The timing difference error δ i The calculation formula is: Where Q(s) i ,a i ;φ) represents the state-action value estimated by the value network, γ δ This is the discount factor.

[0150] The discount factor ranges from 0 to 1 and is used to weigh the importance of current rewards and future rewards.

[0151] The formula for calculating the mean square error loss L(φ) is as follows: Where N and i are the number of samples;

[0152] Step S246: Update the parameters θ of the policy network using the policy gradient algorithm to maximize the expected reward;

[0153] The expected return The calculation formula is: Where, ρ π Represents the steady-state distribution of the state;

[0154] Step S247: Repeat steps S245 to S246 above until the preset number of training rounds is reached to obtain the trained transmission strategy selection model;

[0155] The preset number of training rounds is set by those skilled in the art based on experience.

[0156] Step S250: At each time step, based on the state and policy network of each layer observed by the agent, generate the corresponding action of the layer, combine the actions generated by the agent into a transmission policy and output it;

[0157] Step S300: Define a global utility function, calculate the global utility value when the compression and transmission strategies are assumed to be executed, and design an optimization objective function. The optimization objective function takes the compression and transmission strategies as input and outputs the optimized compression and transmission strategies.

[0158] like Figure 3 As shown, the specific method for defining the global utility function, calculating the global utility value under the assumption of executing compression and transmission strategies, and designing the optimization objective function is as follows:

[0159] Step S310: Define a global utility function U(s) based on video quality parameters, transmission delay, bandwidth utilization, compression ratio, and resource consumption. c ,s t );

[0160] The formula for calculating the global utility function is as follows: Among them, PSNR(s) c ) represents the compression strategy s c The video quality is as follows, delay(s) t ) is the transmission strategy s t The transmission delay is set below, where delay0 is the transmission delay threshold, and uti(s) t ) is the transmission strategy s t Bandwidth utilization under C(s) c ) represents the compression strategy s c The compression ratio is C0, which is the optimal compression ratio, and energy. consumption (s c ,s t ) indicates the compression strategy s c and transmission strategies t The total resource consumption is denoted as follows: α1, β1, γ1 are balance factors, σ is the standard deviation of the normal distribution, used to control the balance between video quality and compression ratio, and ∈1 is a constant to avoid the denominator being 0.

[0161] The values ​​of the transmission delay threshold, optimal compression ratio, balance factor, standard deviation of normal distribution, and constant to avoid a denominator of 0 are set by those skilled in the art based on experience.

[0162] The compression ratio is the ratio of the original video data size to the compressed video size;

[0163] Step S320: Calculate the global utility function value when assuming the execution of the compression strategy and the transmission strategy, wherein the global utility function value includes the global utility function value of executing the compression strategy. and the global utility function value for executing the transmission strategy and the global utility function value when both compression and transmission strategies are executed simultaneously.

[0164] Step S330: Design an optimization objective function, taking the current compression and transmission strategies as input, and setting the optimization objectives as maximizing video quality, minimizing transmission latency, maximizing bandwidth utilization, and minimizing total resource consumption. Output the optimized compression strategy s. c and transmission strategies t ′;

[0165] Step S400: Set up conditional judgment logic to select the final strategy based on the compression and transmission strategies before and after optimization;

[0166] The specific method for setting the condition judgment logic is as follows:

[0167] Step S410: The condition judgment logic includes:

[0168] if and Where θ1 is the first utility threshold, the compression strategy before optimization is directly executed. and transmission strategy U(s c ′,s t ′) to execute the optimized compression strategy s c and optimized transmission strategies t The global utility function value of ′;

[0169] if and Where θ2 is the second utility threshold, then only the transmission strategy is optimized and the compression strategy is executed. and optimized transmission strategies t ′;

[0170] if and Then only the compression strategy is optimized, and the optimized compression strategy s is executed. c and transmission strategy

[0171] Otherwise, optimize both the compression and transmission strategies simultaneously, and execute the optimized compression strategy s. c and transmission strategies t ′;

[0172] The adjustment method for the first utility threshold and the second utility threshold is as follows: obtain the average global utility function values ​​of the compression strategy and transmission strategy before optimization, the compression strategy before optimization and the transmission strategy after optimization, and the compression strategy after optimization and the transmission strategy before optimization within the historical time period at the current moment, respectively. Based on the current first utility threshold θ1 and second utility threshold θ2, and combined with the average global utility function value, the first utility threshold and second utility threshold are adjusted to obtain the adjusted first utility threshold θ1′ and second utility threshold θ2′.

[0173] The formula for calculating the adjusted first utility threshold is as follows:

[0174] The formula for calculating the adjusted second utility threshold is as follows:

[0175] Wherein, α2 is a smoothing coefficient; the value of α2 is set by those skilled in the art based on experience.

[0176] Step S420: Based on the conditional judgment logic output, select the compression strategy and transmission strategy to be executed to obtain the final strategy;

[0177] The above steps enable the direct execution of the unoptimized strategy when the global utility values ​​of the compression and transmission strategies are high, avoiding unnecessary optimization overhead; when the optimization potential of the compression or transmission strategies is large, targeted optimization is performed, improving optimization efficiency; when the global utility value of the unoptimized strategies is low and both have room for optimization, both strategies are optimized simultaneously to achieve global optimization. By adaptively adjusting the threshold, the decision-making efficiency and optimization performance are dynamically balanced under different network environments and video content.

[0178] Furthermore, the final strategy obtained is distributed to the edge nodes, which are responsible for executing and implementing the final strategy.

[0179] Specifically, the step of sending the acquired final policy to the edge nodes, with the edge nodes responsible for executing and implementing the final policy, includes: the central server encapsulating the final decision into a policy update message, sending the policy update message to each edge node through a communication channel, and the edge nodes receiving the policy update message and parsing out the specific compression policy parameters and transmission policy parameters.

[0180] The edge node stores the received compression strategy parameters and transmission strategy parameters in its local strategy database;

[0181] When an edge node receives a user's video request, it retrieves the final policy from the policy mapping table based on the original video data of the video request and the user's network environment parameters, and performs real-time compression and transmission of the video.

[0182] Optionally, a video transcoding service can be set up on the edge nodes to transcode and adapt the original video data in real time based on the user's network environment parameters, thereby reducing the computational burden on the terminal devices.

[0183] Optionally, a video caching service can be deployed on edge nodes to store popular or frequently accessed video content; when a user requests the video content, it can be obtained directly from the edge node, reducing the latency and bandwidth consumption of transmission from remote servers.

[0184] Example 2

[0185] like Figure 4 As shown, the deep learning-based video multi-level adaptive compression cross-layer transmission optimization system provided in this application includes:

[0186] The compression strategy generation module is used to design a deep learning-based compression level selection model. Based on the original video data and network environment parameters, it outputs the optimal compression level and obtains the compression strategy corresponding to the optimal compression level.

[0187] The transmission strategy generation module is used to design a transmission strategy selection model and generate transmission strategies based on video quality parameters and network environment parameters.

[0188] The global optimization calculation module is used to define a global utility function, calculate the global utility value when the compression and transmission strategies are assumed to be executed, and design an optimization objective function. The optimization objective function takes the compression and transmission strategies as inputs and outputs the optimized compression and transmission strategies.

[0189] The final strategy output module is used to set condition judgment logic and select the final strategy based on the compression and transmission strategies before and after optimization.

[0190] The methods, apparatus, and devices of this application may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the method is for illustrative purposes only, and the steps of the method of this application are not limited to the order specifically described above, unless otherwise specifically stated. Furthermore, in some embodiments, this application may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the method according to this application. Thus, this application also covers recording media storing programs for performing the method according to this application.

[0191] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.

[0192] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for optimizing cross-layer transmission of multi-level adaptive compression in video, characterized in that, include: Design a deep learning-based compression level selection model, which outputs the optimal compression level based on the original video data and network environment parameters, and obtains the compression strategy corresponding to the optimal compression level; Design a transmission strategy selection model to generate transmission strategies based on video quality parameters and network environment parameters; Define a global utility function, calculate the global utility value when the compression and transmission strategies are assumed to be implemented, and design an optimization objective function. The optimization objective function takes the compression and transmission strategies as inputs and outputs the optimized compression and transmission strategies. Set up conditional judgment logic to select the final strategy based on the compression and transmission strategies before and after optimization; The specific method for defining a global utility function, calculating the global utility value under the assumptions of implementing compression and transmission strategies, and designing the optimization objective function is as follows: A global utility function is defined based on video quality parameters, transmission latency, bandwidth utilization, compression ratio, and resource consumption. ; Calculate the global utility function value assuming the execution of compression and transmission strategies, wherein the global utility function value includes the global utility function value for executing the compression strategy. and the global utility function value for executing the transmission strategy and the global utility function value when both compression and transmission strategies are executed simultaneously. ; Design an optimization objective function, taking the current compression and transmission strategies as input, with the optimization objectives being to maximize video quality, minimize transmission latency, maximize bandwidth utilization, and minimize total resource consumption, and outputting the optimized compression strategy. and transmission strategy ; The specific method for setting the condition judgment logic is as follows: The conditional judgment logic includes: if ,and ,in If the first utility threshold is met, then the compression strategy before optimization is directly executed. and transmission strategy ; To execute the optimized compression strategy and optimized transmission strategy The global utility function value; if ,and ,in If the second utility threshold is met, then only the transmission strategy is optimized, and the compression strategy is executed. and optimized transmission strategy ; if ,and If the compression strategy is optimized, then only the optimized compression strategy will be executed. and transmission strategy ; Otherwise, optimize both the compression and transmission strategies simultaneously, and execute the optimized compression strategy. and transmission strategy ; The final strategy is obtained by selecting the compression and transmission strategies to be executed based on the conditional judgment logic output.

2. The video multi-level adaptive compression cross-layer transmission optimization method as described in claim 1, characterized in that, The design is based on a deep learning-based compression level selection model. The specific method for outputting the optimal compression level based on the original video data and network environment parameters is as follows: A compression level selection model based on deep learning is constructed, wherein the compression level selection model adopts a combination structure of convolutional neural network and long short-term memory network; Acquire real-time raw video data and network environment parameters; Convolutional neural networks extract features from video frames of raw video data to obtain feature vectors for each frame. The feature vectors of all frames constitute a frame feature sequence. The frame feature sequence extracted by the convolutional neural network is input into a long short-term memory network to extract the dynamic features of the video. The video dynamic features are concatenated with network environment parameters to form a comprehensive feature vector; The decision-maker in the compression level selection model maps the comprehensive feature vector to a probability distribution of compression levels, and outputs the compression level with the highest probability value as the optimal compression level of the original video data. The decision-maker is a fully connected layer and a softmax activation function.

3. The video multi-level adaptive compression cross-layer transmission optimization method as described in claim 2, characterized in that, The specific method for obtaining the compression strategy corresponding to the optimal compression level is as follows: Define compression levels and compression parameters, including quantization parameter QP, intra-frame prediction mode Intra, inter-frame prediction mode Inter, and entropy coding mode Entropy. Design a mapping table between compression levels and compression parameters based on the compression parameters. The optimal compression level is used as an index to look up the corresponding compression parameters in the mapping table, and the compression parameters are combined to form a compression strategy.

4. The video multi-level adaptive compression cross-layer transmission optimization method as described in claim 3, characterized in that, The specific method for generating transmission strategies based on video quality parameters and network environment parameters in the aforementioned transmission strategy selection model is as follows: The state space is defined based on video quality parameters and network environment parameters, and the states include application layer states. Transport layer state Network layer state ; Define an action space, wherein the actions include application layer actions. Transport layer actions Network layer actions ; Define a reward function r, based on application layer rewards. Transport layer rewards Network layer rewards Design a comprehensive reward function; Design an intelligent agent system, wherein the intelligent agents include application layer intelligent agents, transport layer intelligent agents and network layer intelligent agents, and construct a transport strategy selection model using a deep reinforcement learning model; At each time step, based on the state and policy network of each layer observed by the agent, actions for the corresponding layer are generated, and the actions generated by the agent are combined into a transmission policy and output.

5. The video multi-level adaptive compression cross-layer transmission optimization method as described in claim 4, characterized in that, The design method for the reward function r is as follows: At the application layer, the peak signal-to-noise ratio (PSNR) of the video is used as a measure of video quality, based on the PSNR at each time step. With maximum peak signal-to-noise ratio Calculate the normalized value of video quality and count the number of times the video playback stutters. and duration of lag Calculate the video smoothness impact factor, obtain the video startup time impact factor, calculate the product of the video startup time impact factor, the normalized value of video quality, and the video smoothness impact factor, and obtain the application layer reward. ; The time interval between sending and receiving video frames is counted at the transport layer. Calculate its delay relative to the target. The difference is used to calculate the transmission delay impact factor and to statistically analyze the proportion of video frames lost during transmission. The impact factors of packet loss rate are calculated, and the product of the normalized value of video quality, the impact factor of transmission delay, and the impact factor of packet loss rate is calculated to obtain the transport layer reward. ; The network layer obtains network bandwidth utilization, calculates the influence factor of network bandwidth utilization based on the network bandwidth utilization and the target utilization, obtains queuing delay in the network, calculates the influence factor of queuing delay based on the queuing delay and the target queuing delay, calculates the influence factor of resource consumption based on the resource consumption of the transmission process, and calculates the product of the influence factors of network bandwidth utilization, queuing delay, and resource consumption to obtain the network layer reward. ; A reward function is calculated based on a combination of application layer rewards, transport layer rewards, and network layer rewards.

6. The video multi-level adaptive compression cross-layer transmission optimization method as described in claim 5, characterized in that, The adjustment method for the first utility threshold and the second utility threshold is as follows: obtain the average global utility function values ​​of the compression strategy and transmission strategy before optimization, the compression strategy before optimization and the transmission strategy after optimization, and the compression strategy after optimization and the transmission strategy before optimization within the historical time period at the current moment, respectively. , , Based on the current first utility threshold Second utility threshold Based on the average global utility function value, the first utility threshold and the second utility threshold are adjusted to obtain the adjusted first utility threshold. Second utility threshold .

7. A video multi-level adaptive compression cross-layer transmission optimization system, used to implement the video multi-level adaptive compression cross-layer transmission optimization method according to any one of claims 1-6, characterized in that, include: The compression strategy generation module is used to design a deep learning-based compression level selection model. Based on the original video data and network environment parameters, it outputs the optimal compression level and obtains the compression strategy corresponding to the optimal compression level. The transmission strategy generation module is used to design a transmission strategy selection model and generate transmission strategies based on video quality parameters and network environment parameters. The global optimization calculation module is used to define a global utility function, calculate the global utility value when the compression and transmission strategies are assumed to be executed, and design an optimization objective function. The optimization objective function takes the compression and transmission strategies as inputs and outputs the optimized compression and transmission strategies. The final strategy output module is used to set condition judgment logic and select the final strategy based on the compression and transmission strategies before and after optimization.