A video communication resource allocation decision method and system
By building an agent and using time difference errors to optimize the expected return value, the problem of response delay in WebRTC-SVC resource allocation in dynamic changes in the network is solved, and the efficiency and quality of network communication are improved.
Patent Information
- Application Number
- CN202311815947.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-12-26
AI Technical Summary
The existing WebRTC-SVC resource allocation strategy reacts delayed or excessively when faced with dynamic changes in the network, making it difficult to adapt to rapid changes immediately, resulting in a degraded user experience. In addition, traditional methods have challenges in weighing fairness, efficiency, and device capabilities.
The intelligent agent is built with the goal of maximizing the expected return value. It calculates the time difference error by extracting samples from the experience buffer, updates the expected return value and assigns sampling priorities, obtains the system status in real time to select the best action strategy, and optimizes network communication resource allocation.
It achieves real-time adaptation to dynamic changes in the network, improves network communication efficiency and quality, and provides users with better services.
Smart Images

Figure CN117768451B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication resource allocation, and in particular to a video communication resource allocation decision method and system. Background Art
[0002] In the digital age, real-time communication technology has penetrated into our daily life, work and study. Among them, WebRTC (Web Real-Time Communication) is an open standard that allows web applications to conduct real-time audio and video communications. The core advantage of WebRTC is that it is point-to-point and can transmit data directly between two communication terminals without the intervention of a central server. However, a core challenge facing real-time video communication is the dynamic changes in network conditions. Factors such as network bandwidth, latency, and packet loss rate may affect the quality of video communication. To meet these challenges, WebRTC introduced SVC (Scalable Video Coding) technology. SVC can dynamically adjust the quality of the video stream to adapt to different network conditions, thereby providing users with a better experience.
[0003] At present, there are three common resource allocation strategies for WebRTC-SVC. The first is static resource allocation, which is based on predefined settings or configurations. In this strategy, the behavior of the sender is fixed and does not consider changes in network conditions. Although this method is simple and easy to implement, it lacks flexibility and cannot adapt well to changes in network conditions. The second is dynamic adjustment based on feedback, which relies on RTCP feedback received from the receiver. The feedback provides information about network conditions, such as packet loss rate, jitter, etc. The sender dynamically adjusts the sent video layer based on these feedbacks. Although this method can adapt to network changes, there may be reaction delays or overreactions, and it cannot immediately adapt to rapid changes in the network, thereby reducing user experience. The third is that the sender considers the hardware and software performance of the receiver to decide which video layers to send. This method can only ensure that the receiver can play the video smoothly, but may not fully utilize the available network bandwidth. Traditional resource allocation strategies often face challenges in balancing fairness, efficiency, or adapting to different user needs and device capabilities. Summary of the invention
[0004] The embodiment of the present invention provides a video communication resource allocation decision method and system, which adapts to the dynamic changes of the network in real time, selects the best action strategy that maximizes the expected return value, optimizes the allocation of network communication resources, and improves the efficiency and quality of network communication.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a video communication resource allocation decision method, including:
[0006] An intelligent agent is constructed with the goal of maximizing the expected reward value; wherein the expected reward value is obtained by converting the communication index of the video data transmitted to the receiving end;
[0007] A plurality of experience samples extracted from the experience buffer are used as learning samples, and the time difference error of each learning sample is calculated according to the multi-step reward value corresponding to each learning sample; wherein each learning sample includes the expected reward value obtained by the agent when performing different actions in different system states, and the state transferred to by the agent when performing different actions in different system states, and the multi-step reward value corresponding to the learning sample is the maximum value of the expected reward values obtained by the agent when performing different multi-step actions starting from different system states;
[0008] Based on the time difference error of each of the learning samples, the expected return values corresponding to all the experience samples in the experience buffer are updated, and sampling priorities are assigned to all the learning samples to complete the optimization of the intelligent agent;
[0009] The system status is obtained in real time, and the best action strategy at the current moment is obtained through the optimized intelligent agent, and the allocation of network communication resources is realized based on the best action strategy.
[0010] The embodiment of the present invention is implemented, and an intelligent agent is constructed with the goal of maximizing the expected return value, and the expected return value is obtained by converting the communication index of the video data transmitted to the receiving end, which means that the intelligent agent will select the best action strategy according to the communication index of the video data to achieve the goal of maximizing the expected return value. Then, multiple experience samples in the experience buffer are extracted as learning samples, and the multi-step return value of each learning sample is calculated according to the multi-step return value of each learning sample, which can more accurately evaluate the effect of different action strategies, and then based on the time difference error of each learning sample, the expected return value corresponding to all experience samples in the experience buffer is updated, and based on the time difference error, the sampling priority is assigned to all learning samples, providing reliable reference data for action strategy optimization. Finally, the optimized intelligent agent can adapt to the dynamic changes of the network in real time according to the current system state and all learned experiences, predict the expected return value of the future network status according to the historical data in the experience buffer, and accurately select the best action strategy to achieve the maximum expected return value, and apply the best action strategy to the allocation of network communication resources, which helps to improve the efficiency and quality of network communication and provide users with better services.
[0011] As a preferred solution, before taking the multiple experience samples extracted from the experience buffer as learning samples and calculating the time difference error of each learning sample according to the multi-step reward value corresponding to each learning sample, the method further includes:
[0012] Using a priority experience playback mechanism, extracting a plurality of the experience samples from the experience buffer as learning samples;
[0013] According to the following formula, the multi-step reward value corresponding to each learning sample is calculated:
[0014]
[0015] In the formula, G t Represents the state s from time t t The reward value of the first N steps; γ represents the discount factor used to reduce the value of future rewards; r t+i represents the reward of the i-th step starting from time t; a represents the action taken; N represents the number of steps considered; Indicates that from state s t The maximum expected reward from starting to execute all possible N actions.
[0016] The preferred scheme for implementing the embodiments of the present invention uses a priority experience replay mechanism to select samples that are more important to the current learning goal or have a higher learning effect for priority learning, which can avoid repeated learning of the same or similar experiences and make more effective use of limited training resources. By calculating the multi-step reward values starting from the current state, the long-term impact of different actions in the current state can be more accurately estimated, thereby helping the intelligent agent to find effective action strategies more quickly and accelerate the learning process.
[0017] As a preferred solution, based on the time differential error of each learning sample, the expected reward values corresponding to all experience samples in the experience buffer are updated, and sampling priorities are assigned to all the learning samples to complete the optimization of the agent, specifically:
[0018] Based on the Dueling Network structure, the expected return value of each learning sample is decomposed into a state value function and an advantage function;
[0019] Using the time difference error of each of the learning samples, respectively updating the state value function and the advantage function of each of the experience samples, and using the updated state value function and the updated advantage function, respectively updating the expected return value corresponding to each of the experience samples;
[0020] All the learning samples are arranged in order from large to small according to the time differential errors, and sampling priorities from high to low are assigned to each learning sample in turn according to the arrangement results to complete the optimization of the intelligent agent.
[0021] The preferred solution of the embodiment of the present invention is to decompose the expected return value of each learning sample into a state value function and an advantage function based on the Dueling Network structure to reduce interference and redundant information in the learning process, thereby improving learning efficiency. In addition, the learning samples are sorted in descending order according to the time difference error and different sampling priorities are assigned, so that the samples with the greatest impact on the long-term strategy can be learned first, so that the intelligent agent converges to the optimal action strategy faster.
[0022] As a preferred solution, the multiple experience samples extracted from the experience buffer are used as learning samples, and the time difference error of each learning sample is calculated according to the multi-step reward value corresponding to each learning sample, specifically:
[0023] Using multiple experience samples extracted from the experience buffer as learning samples;
[0024] According to a preset error algorithm, based on the multi-step reward values of the multiple learning samples extracted from the experience buffer and the expected reward value obtained from each learning sample, the time difference error of each experience sample is calculated; wherein the preset error algorithm is specifically:
[0025]
[0026] In the formula, δ t represents the time difference error of the learning sample; G t Represents the state s from time t t The first N steps of return value; Q(s t , a t ) indicates that the agent is in state s t Execute action a t The expected return value.
[0027] By implementing the preferred scheme of the embodiment of the present invention, by calculating the time difference error of the experience samples, the gap between the expected reward value and the actual reward value of the agent under the current strategy can be evaluated, so that the time difference error of the experience samples can be used later to assist the agent to better explore and adjust the action strategy, thereby improving the robustness and stability of the algorithm.
[0028] As a preferred solution, the expected return value is obtained as follows:
[0029] When the agent completes action a in system state s, the communication index of the video data transmitted to the receiving end is obtained; wherein the communication index includes video quality, fluency and delay;
[0030] According to the following formula, the expected reward value R(s, a) obtained by the agent when performing action a in system state s is calculated:
[0031] R(s, a)=f(video quality, smoothness, latency);
[0032] Q(s,a)=R(s,a)+γmax a′ Q(s′, a′);
[0033] Where R(s, a) represents the reward obtained by the agent for performing action a in system state s; videoquality, smoothness and latency are the input parameters of function f; video quality represents video quality, smoothness represents smoothness, latency represents delay; γ is the discount factor, which represents the value of future rewards; s′ represents the new state after performing action a; max a′ Q(s′, a′) represents the maximum expected reward value obtained by executing all possible actions in the new state s′.
[0034] By implementing the preferred scheme of the embodiment of the present invention, by obtaining the video quality, smoothness and delay of the video data transmitted to the receiving end, the expected reward value obtained by the intelligent agent from performing actions under the current system state can be comprehensively and intuitively evaluated, thereby helping to achieve a more fair and comprehensive performance evaluation.
[0035] As a preferred solution, the system status is obtained in real time, and the best action strategy at the current moment is obtained through the optimized intelligent agent, and the allocation of network communication resources is realized based on the best action strategy, specifically:
[0036] In the WebRTC-SVC environment, get the current system status;
[0037] By completing the optimization of the intelligent agent, based on the current system state, the best action strategy at the current moment is analyzed to achieve the allocation of network communication resources; wherein the best action strategy is the action performed to enable the optimized intelligent agent to achieve the goal under the current system state.
[0038] A preferred solution for implementing the embodiment of the present invention is to obtain the system status at the current moment in a WebRTC-SVC environment, and analyze and obtain the best behavior strategy at the current moment by completing the optimized intelligent agent, so as to reasonably allocate network communication resources to optimize resource utilization, reduce latency, etc., thereby improving system performance and user experience.
[0039] In order to solve the same technical problem, an embodiment of the present invention further provides a video communication resource allocation decision system, including:
[0040] An intelligent agent construction module, used to construct an intelligent agent with the goal of maximizing the expected reward value; wherein the expected reward value is obtained by converting the communication index of the video data transmitted to the receiving end;
[0041] An error analysis module is used to use multiple experience samples extracted from the experience buffer as learning samples, and calculate the time difference error of each learning sample according to the multi-step reward value corresponding to each learning sample; wherein each learning sample includes the expected reward value obtained by the agent when performing different actions in different system states, and the state transferred to by the agent when performing different actions in different system states, and the multi-step reward value corresponding to the learning sample is the maximum value of the expected reward values obtained by the agent when performing different multi-step actions starting from different system states;
[0042] An agent optimization module, used to update the expected return values corresponding to all experience samples in the experience buffer based on the time difference error of each learning sample, and assign sampling priorities to all the learning samples to complete the optimization of the agent;
[0043] The allocation decision module is used to obtain the system status in real time, and obtain the best action strategy at the current moment through the optimized intelligent agent, and realize the allocation of network communication resources based on the best action strategy.
[0044] As a preferred solution, the video communication resource allocation decision system further includes:
[0045] The multi-step reward analysis module is used to extract a plurality of the experience samples from the experience buffer as learning samples using a priority experience playback mechanism; and calculate the multi-step reward value corresponding to each learning sample according to the following formula:
[0046]
[0047] In the formula, G t Represents the state s from time t t The reward value of the first N steps; γ represents the discount factor used to reduce the value of future rewards; r t+i represents the reward of the i-th step starting from time t; a represents the action taken; N represents the number of steps considered; Indicates that from state s t The maximum expected reward from starting to execute all possible N actions.
[0048] As a preferred solution, the agent optimization module specifically includes:
[0049] A decomposition unit, used for decomposing the expected return value of each learning sample into a state value function and an advantage function based on a Dueling Network structure;
[0050] An updating unit, configured to respectively update the state value function and the advantage function of each of the experience samples using the time difference error of each of the learning samples, and respectively update the expected return value corresponding to each of the experience samples using the updated state value function and the updated advantage function;
[0051] The grading unit is used to arrange all the learning samples in order from large to small according to the time differential errors, and assign a sampling priority from high to low to each learning sample in accordance with the arrangement result, so as to complete the optimization of the intelligent agent.
[0052] As a preferred solution, the video communication resource allocation decision system further includes:
[0053] The expected reward analysis module is used to obtain the communication indicators of the video data transmitted to the receiving end when the agent completes the action a in the system state s; wherein the communication indicators include video quality, fluency and delay; and calculate the expected reward value R(s, a) obtained by the agent when performing the action a in the system state s according to the following formula:
[0054] R(s, a)=f(video quality, smoothness, latency);
[0055] Q(s,a)=R(s,a)+γmax a′ Q(s′, a′);
[0056] Where R(s, a) represents the reward obtained by the agent for performing action a in system state s; videoquality, smoothness and latency are the input parameters of function f; video quality represents video quality, smoothness represents smoothness, latency represents delay; γ is the discount factor, which represents the value of future rewards; s′ represents the new state after performing action a; max a′ Q(s′, a′) represents the maximum expected reward value obtained by executing all possible actions in the new state s′. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 : A flowchart of a video communication resource allocation decision method provided in Embodiment 1 of the present invention;
[0058] Figure 2: A structural diagram of a video communication resource allocation decision system provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] Embodiment one:
[0061] In real-time video communication, especially in scenarios using WebRTC-SVC technology, network conditions, receiving end hardware conditions and user needs are constantly changing. Therefore, how to intelligently allocate resources according to these dynamically changing conditions to provide the best user experience is a key issue. WebRTC-SVC provides scalable video coding, which allows the encoded video stream to easily adapt to different network and device conditions. In this context, embodiments of the present invention can regard the resource allocation problem as a reinforcement learning problem, in which the agent needs to learn how to optimally allocate resources in interaction with the environment.
[0062] Please refer to Figure 1 , is a video communication resource allocation decision method provided by an embodiment of the present invention, the method includes steps S1 to S4, each step is specifically as follows:
[0063] Step S1, construct an intelligent agent with the goal of maximizing the expected return value.
[0064] The expected return value is obtained by converting the communication index of the video data transmitted to the receiving end.
[0065] It should be noted that the system architecture and environment definition, as well as the definition of the reinforcement learning model are as follows:
[0066] Environment (E): In this scenario, the environment includes factors such as the WebRTC-SVC communication network, the sender, the receiver, the network conditions, the hardware and software capabilities of the receiver, and the user's quality requirements.
[0067] Agent (A): A reinforcement learning model running on the sender side that needs to decide how to encode and transmit the video based on the state of the environment to provide the best video quality.
[0068] State (S): Please refer to formula (1). The state is a vector that describes the current system status. It includes factors such as the current network bandwidth, network delay, data packet loss rate, decoding and display capabilities of the receiving end, and the dynamics and complexity of the current video. Each state corresponds to a specific system status.
[0069] S=(s1,s2,...,s n ); (1)
[0070] Action (A): See equation (2). Action describes the resource allocation strategy that the agent can take. For example, the agent can decide which SVC layers to send, whether the encoding rate needs to be adjusted, whether the video resolution needs to be changed, etc.
[0071] A=(a1,a2,...,a m ); (2)
[0072] Reward (R): Reward is a numerical value that represents the reward that the agent gets after taking action a in state s. This is a numerical value that measures the goodness or effect of taking an action. For example, if the user gets a smooth, high-quality video, the agent will get a positive reward; if the video is stuck or the quality decreases, the agent will get a negative reward.
[0073] In this embodiment, in order to maximize long-term rewards, the agent uses the Q-learning algorithm for learning. The Q value represents the expected reward value of taking a certain action in a given state. The goal of the agent is to find a strategy that maximizes the expected reward value Q. Then, through steps 1) to 5), the reinforcement learning model is trained to obtain the agent described in step S1.
[0074] 1) Data initialization:
[0075] Initialize a Q value for each possible state-action pair (s, a) to form a Q value table. These initial values can be random or set to a constant, such as 0.
[0076] 2) Action selection:
[0077] At each state s, the choice of action a is based on the current Q-value and an ε-greedy policy. Specifically, the agent randomly selects actions with probability ε, and selects the action with the largest Q-value with probability 1-ε.
[0078] 3) Iterative Learning:
[0079] ① In state s, the agent executes the selected action a and obtains the immediate reward r and the new state s′ after execution;
[0080] ②Please refer to formula (3) and update the Q value.
[0081]
[0082] Where α represents the learning rate, which determines the impact of the new estimate on the old estimate; γ is the discount factor for future rewards, which determines the importance of future rewards.
[0083] 4) Strategy extraction and application:
[0084] Based on the learned values, an action strategy can be generated for each state, where the strategy is to select the action that maximizes the value, which can then be applied in the actual task to guide the decision-making of the agent.
[0085] 5) Evaluation and refinement:
[0086] In order to verify the effectiveness of the learned strategy, it should be evaluated in the test environment. Based on the evaluation results, it may be necessary to adjust certain parameters, such as learning rate and exploration probability, and repeat the learning process to optimize the performance of the strategy.
[0087] As a preferred solution, the process for obtaining the expected return value mentioned in step S1 includes steps S01 to S02, and each step is specifically as follows:
[0088] Step S01, when the agent completes action a in system state s, the communication indicators of the video data transmitted to the receiving end are obtained; wherein the communication indicators include video quality, fluency and delay.
[0089] Step S02, please refer to equations (4) and (5), calculate the expected reward value Q(s, a) obtained by the agent when performing action a in system state s.
[0090] R(s, a)=f(video quality, smoothness, latency); (4)
[0091] Q(s,a)=R(s,a)+γmax a′ Q(s′, a′); (5)
[0092] Where R(s, a) represents the reward obtained by the agent for performing action a in system state s; videoquality, smoothness and latency are the input parameters of function f; video quality represents video quality, smoothness represents smoothness, latency represents delay; γ is the discount factor, which represents the value of future rewards; s′ represents the new state after performing action a; max a′Q(s′, a′) represents the maximum expected reward value obtained by executing all possible actions in the new state s′.
[0093] The agent will choose actions based on the Q value. Specifically, see equation (6), under a given state s, choose the best action a * Maximize the expected return value Q(s, a) to obtain the maximum reward in the long run. The agent continuously interacts with the environment, collects new states, performs actions and obtains rewards. These data are used to update values and improve resource allocation strategies. In order to avoid falling into local optimality too early and better adapt to changes in the environment, the agent will adopt an ε-greedy strategy, that is, randomly select actions with a certain probability to maintain a certain degree of exploration.
[0094] a * = argmax a Q(s, a); (6)
[0095] As a preferred solution, before executing step S2, an error analysis process is also included, and the process includes steps S03 to S04, and each step is specifically as follows:
[0096] Step S03, using the priority experience playback mechanism, extracting multiple experience samples from the experience buffer as learning samples.
[0097] Step S04, please refer to formula (7) to calculate the multi-step reward value corresponding to each learning sample:
[0098]
[0099] In the formula, G t Represents the state s from time t t The reward value of the first N steps; γ represents the discount factor used to reduce the value of future rewards; r t+i represents the reward of the i-th step starting from time t; a represents the action taken; N represents the number of steps considered; Indicates that from state s t The maximum expected reward from starting to execute all possible N actions.
[0100] In step S2, multiple experience samples extracted from the experience buffer are used as learning samples, and the time difference error of each learning sample is calculated according to the multi-step reward value corresponding to each learning sample.
[0101] Among them, each learning sample includes the expected reward value obtained by the agent when performing different actions in different system states, and the state to which the agent transfers to when performing different actions in different system states. The multi-step reward value corresponding to the learning sample is the maximum value of the expected reward values obtained by the agent when performing different multi-step actions starting from different system states.
[0102] As a preferred solution, step S2 includes step S21 to step S22, and each step is specifically as follows:
[0103] In step S21, a plurality of experience samples extracted from the experience buffer are used as learning samples.
[0104] Step S22, according to a preset error algorithm, based on the multi-step reward values of multiple learning samples extracted from the experience buffer and the expected reward value obtained from each learning sample, the time difference error of each experience sample is calculated; wherein, the preset error algorithm is shown in formula (8).
[0105] δ t =G t -Q(s t , a t ); (8)
[0106] In the formula, δ t represents the time difference error of the learning sample; G t Represents the state s from time t t The first N steps of return value; Q(s t , a t ) indicates that the agent is in state s t Execute action a t The expected return value.
[0107] Step S3, based on the time differential error of each learning sample, updates the expected return value corresponding to all experience samples in the experience buffer, and assigns sampling priority to all learning samples to complete the optimization of the intelligent agent.
[0108] As a preferred solution, step S3 includes step S31 to step S32, and each step is specifically as follows:
[0109] Step S31, based on the Dueling Network structure, decompose the expected return value of each learning sample into a state value function V(s) and an advantage function A(s, a).
[0110] In step S32, please refer to equations (9) and (10), use the time difference error of each learning sample to update the state value function V(s) and advantage function A(s, a) of each experience sample respectively, and refer to equation (11), use the updated state value function and updated advantage function to update the expected return value corresponding to each experience sample respectively.
[0111] V(s)←V(s)+α×IS weight×δ t ; (9)
[0112] A(s, a)←A(s, a)+α×IS weight×δ t ; (10)
[0113]
[0114] In the formula, δ t represents the time difference error of the learning sample; Q(s, a) represents the predicted reward of taking action a in state s; V(s) represents the predicted value of state s; A(s, a) represents the advantage of action a over the average action in state s; A(s, a′) represents the advantage of action a′ over the average action in state s; |A| represents the size of the action space; α represents the learning rate, which determines the speed of learning; IS weight represents the importance sampling weight in the priority experience replay, which is used to correct the deviation caused by priority sampling.
[0115] Step S33, arrange all learning samples in order from large to small according to the time differential errors, and assign sampling priorities from high to low to each learning sample in the experience buffer according to the arrangement results, so as to update the sampling priority of each learning sample in the experience buffer and complete the optimization of the intelligent agent.
[0116] In this embodiment, a learning sample / experience sample with a larger time difference error is regarded as more "unexpected" and has a higher sampling probability, that is, the larger the time difference error of the learning sample / experience sample, the higher its sampling priority.
[0117] Step S4, real-time acquisition of system status, and through the optimized intelligent agent, the best action strategy at the current moment is acquired, and based on the best action strategy, the allocation of network communication resources is realized.
[0118] Please refer to Figure 2 , is a structural diagram of a video communication resource allocation decision system provided by an embodiment of the present invention, the system includes an agent construction module M1, an error analysis module M2, an agent optimization module M3 and an allocation decision module M4, and each module is specifically as follows:
[0119] The intelligent agent building module M1 is used to build an intelligent agent with the goal of maximizing the expected reward value; wherein the expected reward value is obtained by converting the communication index of the video data transmitted to the receiving end;
[0120] The error analysis module M2 is used to use multiple experience samples extracted from the experience buffer as learning samples, and calculate the time difference error of each learning sample according to the multi-step reward value corresponding to each learning sample; wherein each learning sample includes the expected reward value obtained by the agent when performing different actions in different system states, and the state to which the agent transfers when performing different actions in different system states, and the multi-step reward value corresponding to the learning sample is the maximum value of the expected reward values obtained when the agent performs different multi-step actions starting from different system states;
[0121] The agent optimization module M3 is used to update the expected return values corresponding to all experience samples in the experience buffer based on the time difference error of each learning sample, and assign sampling priorities to all learning samples to complete the optimization of the agent;
[0122] The allocation decision module M4 is used to obtain the system status in real time, and obtain the best action strategy at the current moment through the optimized intelligent agent, and realize the allocation of network communication resources based on the best action strategy.
[0123] As a preferred option, please refer to Figure 2 The video communication resource allocation decision system provided by the embodiment of the present invention further includes a multi-step feedback analysis module M5, which is specifically as follows:
[0124] The multi-step reward analysis module M5 is used to extract multiple experience samples from the experience buffer as learning samples using the priority experience playback mechanism; the multi-step reward value corresponding to each learning sample is calculated according to the following formula:
[0125]
[0126] In the formula, G t Represents the state s from time t t The reward value of the first N steps; γ represents the discount factor used to reduce the value of future rewards; r t+i represents the reward of the i-th step starting from time t; a represents the action taken; N represents the number of steps considered; Indicates that from state s t The maximum expected reward from starting to execute all possible N actions.
[0127] As a preferred solution, the agent optimization module M3 specifically includes a decomposition unit 31, an update unit 32 and a classification unit 33, and each unit is specifically as follows:
[0128] A decomposition unit 31, used for decomposing the expected return value of each learning sample into a state value function and an advantage function based on the Dueling Network structure;
[0129] An updating unit 32, used to update the state value function and advantage function of each experience sample respectively using the time difference error of each learning sample, and to update the expected return value corresponding to each experience sample respectively using the updated state value function and the updated advantage function;
[0130] The grading unit 33 is used to arrange all learning samples in order from large to small according to each time differential error, and assign a sampling priority from high to low to each learning sample in turn according to the arrangement result, so as to optimize the intelligent agent.
[0131] As a preferred option, please refer to Figure 2 The video communication resource allocation decision system provided by the embodiment of the present invention further includes an expected return analysis module M6, which is specifically as follows:
[0132] The expected reward analysis module M6 is used to obtain the communication indicators of the video data transmitted to the receiving end when the agent completes action a in the system state s; wherein the communication indicators include video quality, fluency and delay; and calculate the expected reward value R(s, a) obtained by the agent when performing action a in the system state s according to the following formula:
[0133] R(s, a)=f(video quality, smoothness, latency);
[0134] Q(s,a)=R(s,a)+γmax a′ Q(s′, a′);
[0135] Where R(s, a) represents the reward obtained by the agent for performing action a in system state s; videoquality, smoothness and latency are the input parameters of function f; video quality represents video quality, smoothness represents smoothness, latency represents delay; γ is the discount factor, which represents the value of future rewards; s′ represents the new state after performing action a; max a′ Q(s′, a′) represents the maximum expected reward value obtained by executing all possible actions in the new state s′.
[0136] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0137] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0138] The present invention provides a video communication resource allocation decision method and system, with the maximum expected return value as the goal, constructing an intelligent agent, and the expected return value is obtained by converting the communication index of the video data transmitted to the receiving end, which means that the intelligent agent will select the best action strategy according to the communication index of the video data to achieve the goal of maximizing the expected return value. Then, multiple experience samples in the experience buffer are extracted as learning samples, and each learning sample is calculated according to the multi-step return value of each learning sample, which can more accurately evaluate the effect of different action strategies, and then based on the time difference error of each learning sample, the expected return value corresponding to all experience samples in the experience buffer is updated, and based on the time difference error, the sampling priority is assigned to all learning samples, providing reliable reference data for action strategy optimization. Finally, the optimized intelligent agent can adapt to the dynamic changes of the network in real time according to the current system state and all learned experiences, predict the expected return value of the future network status according to the historical data in the experience buffer, and accurately select the best action strategy to achieve the maximum expected return value, and apply the best action strategy to the allocation of network communication resources, which helps to improve the efficiency and quality of network communication and provide users with better services.
[0139] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A video communication resource allocation decision method, characterized in that: include: An intelligent agent is constructed with the goal of maximizing the expected reward value; wherein the expected reward value is obtained by converting the communication index of the video data transmitted to the receiving end; A plurality of experience samples extracted from the experience buffer are used as learning samples, and the time difference error of each learning sample is calculated according to the multi-step reward value corresponding to each learning sample; wherein each learning sample includes the expected reward value obtained by the agent when performing different actions in different system states, and the state transferred to by the agent when performing different actions in different system states, and the multi-step reward value corresponding to the learning sample is the maximum value of the expected reward values obtained by the agent when performing different multi-step actions starting from different system states; Based on the time difference error of each of the learning samples, the expected return values corresponding to all the experience samples in the experience buffer are updated, and sampling priorities are assigned to all the learning samples to complete the optimization of the intelligent agent; Acquire the system status in real time, and obtain the best action strategy at the current moment through the optimized intelligent agent, and realize the allocation of network communication resources based on the best action strategy; The method of updating the expected return values corresponding to all the experience samples in the experience buffer based on the time difference error of each learning sample and assigning sampling priorities to all the learning samples to complete the optimization of the agent is as follows: Based on the Dueling Network structure, the expected return value of each learning sample is decomposed into a state value function and an advantage function; Using the time difference error of each of the learning samples, respectively updating the state value function and the advantage function of each of the experience samples, and using the updated state value function and the updated advantage function, respectively updating the expected return value corresponding to each of the experience samples; The state value function and the advantage function of each experience sample are updated respectively by using the time difference error of each learning sample, as follows: The updated state value function and the updated advantage function are used to update the expected return value corresponding to each of the experience samples, as follows: In the formula, represents the time difference error of the learning sample; Indicates in status Take action The predicted return of Indicates status The prediction value of is calculated using the updated state value function; Indicates action Relative to the state The average action advantage of is calculated using the updated advantage function; Indicates action Relative to the state The average action advantage of is calculated using the updated advantage function; Indicates the size of the action space; Represents the learning rate, which determines the speed of learning; , represents the importance sampling weight in the priority experience replay, which is used to correct the deviation caused by the priority sampling; All the learning samples are arranged in order from large to small according to the time differential errors, and sampling priorities from high to low are assigned to each learning sample in turn according to the arrangement results to complete the optimization of the intelligent agent.
2. A video communication resource allocation decision method as claimed in claim 1, characterized in that: Before taking the multiple experience samples extracted from the experience buffer as learning samples and calculating the time difference error of each learning sample according to the multi-step reward value corresponding to each learning sample, the method further includes: Using a priority experience playback mechanism, extracting a plurality of the experience samples from the experience buffer as learning samples; According to the following formula, the multi-step reward value corresponding to each learning sample is calculated: ; In the formula, Indicates from time Status The initial N-step return value; represents the discount factor used to reduce the value of future rewards; Indicates from time The beginning Step reward; Indicates the action taken; represents the number of steps considered; Indicates from the state The maximum expected reward from starting to execute all possible N actions.
3. A video communication resource allocation decision method as claimed in claim 1, characterized in that: The multiple experience samples extracted from the experience buffer are used as learning samples, and the time difference error of each learning sample is calculated according to the multi-step reward value corresponding to each learning sample, which is specifically: Using multiple experience samples extracted from the experience buffer as learning samples; According to a preset error algorithm, based on the multi-step reward values of the multiple learning samples extracted from the experience buffer and the expected reward value obtained from each learning sample, the time difference error of each experience sample is calculated; wherein the preset error algorithm is specifically: ; In the formula, represents the time difference error of the learning sample; Indicates from time Status The initial N-step return value; Indicates that the agent is in state Next execution action The expected return value.
4. A video communication resource allocation decision method as claimed in claim 1, characterized in that: The expected return value is obtained as follows: When the agent is in the system state Next action is completed When the video data is transmitted to the receiving end, the communication indicators are obtained; wherein the communication indicators include video quality, fluency and delay; According to the following formula, calculate the agent in the system state Next execution action The expected return value : ; ; In the formula, Indicates the agent in the system state Next execution action and the rewards received; , and is a function The input parameters of Indicates the video quality. Indicates fluency, Indicates delay; is the discount factor, which indicates the value of future rewards; Indicates execution of action The new state after In the new state The maximum expected reward from taking all possible actions.
5. A video communication resource allocation decision method as claimed in claim 1, characterized in that: The system status is obtained in real time, and the optimal action strategy at the current moment is obtained through the optimized intelligent agent, and the allocation of network communication resources is realized based on the optimal action strategy, specifically: In the WebRTC-SVC environment, get the current system status; By completing the optimization of the intelligent agent, based on the current system state, the best action strategy at the current moment is analyzed to achieve the allocation of network communication resources; wherein the best action strategy is the action performed to enable the optimized intelligent agent to achieve the goal under the current system state.
6. A video communication resource allocation decision system, characterized in that: include: An intelligent agent construction module, used to construct an intelligent agent with the goal of maximizing the expected reward value; wherein the expected reward value is obtained by converting the communication index of the video data transmitted to the receiving end; An error analysis module is used to use multiple experience samples extracted from the experience buffer as learning samples, and calculate the time difference error of each learning sample according to the multi-step reward value corresponding to each learning sample; wherein each learning sample includes the expected reward value obtained by the agent when performing different actions in different system states, and the state transferred to by the agent when performing different actions in different system states, and the multi-step reward value corresponding to the learning sample is the maximum value of the expected reward values obtained by the agent when performing different multi-step actions starting from different system states; An agent optimization module, used to update the expected return values corresponding to all experience samples in the experience buffer based on the time difference error of each learning sample, and assign sampling priorities to all the learning samples to complete the optimization of the agent; The allocation decision module is used to obtain the system status in real time, obtain the best action strategy at the current moment through the optimized intelligent agent, and realize the allocation of network communication resources based on the best action strategy; Wherein, the intelligent agent optimization module specifically includes: A decomposition unit, used for decomposing the expected return value of each learning sample into a state value function and an advantage function based on a Dueling Network structure; An updating unit, configured to respectively update the state value function and the advantage function of each of the experience samples using the time difference error of each of the learning samples, and respectively update the expected return value corresponding to each of the experience samples using the updated state value function and the updated advantage function; A grading unit, used to arrange all the learning samples in order from large to small according to the time difference errors, and assign a sampling priority from high to low to each of the learning samples in turn according to the arrangement result, so as to complete the optimization of the intelligent agent; The state value function and the advantage function of each experience sample are updated respectively by using the time difference error of each learning sample, as follows: The updated state value function and the updated advantage function are used to update the expected return value corresponding to each of the experience samples, as follows: In the formula, represents the time difference error of the learning sample; Indicates in status Take action The predicted return of Indicates status The prediction value of is calculated using the updated state value function; Indicates action Relative to the state The average action advantage of is calculated using the updated advantage function; Indicates action Relative to the state The average action advantage of is calculated using the updated advantage function; Indicates the size of the action space; Represents the learning rate, which determines the speed of learning; , represents the importance sampling weight in the priority experience replay, which is used to correct the deviation caused by the priority sampling.
7. A video communication resource allocation decision system as claimed in claim 6, characterized in that: Also includes: A multi-step reward analysis module, used to extract a plurality of experience samples from the experience buffer as learning samples using a priority experience playback mechanism; According to the following formula, the multi-step reward value corresponding to each learning sample is calculated: ; In the formula, Indicates from time Status The initial N-step return value; represents the discount factor used to reduce the value of future rewards; Indicates from time The beginning Step reward; Indicates the action taken; represents the number of steps considered; Indicates from the state The maximum expected reward from starting to execute all possible N actions.
8. A video communication resource allocation decision system as claimed in claim 6, characterized in that: Also includes: The expected return analysis module is used when the agent is in the system state Next action is completed , obtain the communication index of the video data transmitted to the receiving end; wherein the communication index includes video quality, fluency and delay; calculate the agent in the system state according to the following formula Next execution action The expected return value : ; ; In the formula, Indicates the agent in the system state Next execution action and the rewards received; , and is a function The input parameters of Indicates the video quality. Indicates fluency, Indicates delay; is the discount factor, which indicates the value of future rewards; Indicates execution of action The new state after In the new state The maximum expected reward from taking all possible actions.
