A method, system and device for wide-area video offloading, compression and resource allocation based on multi-agent reinforcement learning under cloud edge cooperation
By deploying a multi-agent reinforcement learning decision network in edge servers, video compression rate, offloading mode, and resource allocation are optimized, solving the problems of latency and bandwidth consumption in cloud video processing and achieving efficient offloading and resource optimization of video tasks.
Patent Information
- Application Number
- CN202611486498.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-23
- Publication Date
- 2026-11-03
AI Technical Summary
Existing video processing methods cannot effectively address the challenges in the field of video processing technology that involves uploading to the cloud, particularly in the areas of wide-area video offloading, compression, and resource allocation methods, systems, and devices based on multi-agent reinforcement learning under cloud-edge-device collaboration.
By deploying a multi-agent reinforcement learning decision network across K edge servers, distributed decision-making is achieved to optimize video compression rate, offloading mode, computing resources, and uplink sub-channel allocation, thereby maximizing analysis accuracy and minimizing analysis time.
It achieves joint optimization of video task offloading, compression, computing resources and communication resources in a cloud-edge-device collaborative environment, reducing transmission latency and bandwidth consumption, and improving the efficiency and accuracy of video analysis.
Smart Images

Figure CN123035320A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video processing technology, and in particular to a method, system and device for wide-area video offloading, compression and resource allocation based on multi-agent reinforcement learning under cloud-edge-device collaboration. Background Technology
[0002] By integrating various video acquisition devices such as tower cameras and drones, intelligent monitoring of a wider sea area can be achieved, providing strong technical support for maritime surveillance. After being collected by these front-end devices, video data typically needs to be sent to the cloud, where deep learning models deployed in the cloud perform target detection and anomaly identification. However, uploading all video to the cloud results in significant transmission latency and bandwidth consumption.
[0003] Therefore, a new video processing method is urgently needed. Summary of the Invention
[0004] In view of the above problems, embodiments of this application provide a method, system and device for wide-area video offloading, compression and resource allocation based on multi-agent reinforcement learning under cloud-edge-device collaboration, so as to overcome the above problems or at least partially solve the above problems.
[0005] In a first aspect, this application provides a method for wide-area video offloading, compression, and resource allocation based on multi-agent reinforcement learning under cloud-edge-device collaboration, the method comprising: The k-th edge server among K edge servers obtains its own server information in the t-th time slot and the video analysis task information of each video acquisition terminal within its jurisdiction in the t-th time slot, as local observation information of the k-th edge server in the t-th time slot; the server information includes: the amount of computing resources and uplink spectrum resources of the edge server; the video analysis task information includes: the amount of data of the video analysis task and the amount of computing resources required for the video analysis task; K is an integer greater than 1; t is an integer greater than 0; K edge servers, based on their local observation information in the t-th time slot, utilize their own decision networks to execute distributed decisions in parallel, obtaining the values of decision variables for the video analysis task of each video acquisition terminal within their respective jurisdictions in the t-th time slot. The decision variables include: video compression rate decision variables, offload mode decision variables, computing resource allocation decision variables, and uplink subchannel allocation decision variables. The decision networks of the K edge servers are trained through multi-agent reinforcement learning with the goal of maximizing the global analysis accuracy of the t-th sample time slot and minimizing the global analysis time of the t-th sample time slot. The global analysis accuracy of the t-th sample time slot is determined based on the analysis accuracy of the video analysis task of all video acquisition terminals in the global scope in the t-th sample time slot, and the global analysis time of the t-th sample time slot is determined based on the analysis time of the video analysis task of all video acquisition terminals in the global scope in the t-th sample time slot.
[0006] Optionally, the multi-agent reinforcement learning training process includes: The k-th edge server among the K edge servers obtains its own server information in the t-th sample time slot, and obtains the video analysis task information of each video acquisition terminal within its jurisdiction in the t-th sample time slot, as local observation information of the k-th edge server in the t-th sample time slot. K edge servers act as K intelligent agents. Based on their local observation information in the t-th sample time slot, they use the decision network to be trained to execute distributed decision-making in parallel, and obtain the values of the decision variables of each video acquisition terminal in the t-th sample time slot within the jurisdiction of each of the K edge servers. All video acquisition terminals, the K edge servers, and the cloud server in the global scope work together to execute the value of the decision variable corresponding to the t-th sample time slot, and obtain the global analysis time and global analysis accuracy corresponding to the t-th sample time slot, which are used as the reward function value corresponding to the t-th sample time slot; The decision network to be trained is deployed on the K edge servers, and the parameters of the decision network to be trained are updated with the goal of maximizing the cumulative reward function value.
[0007] Optionally, the global analysis time corresponding to the t-th sample time slot is: the sum of the analysis times of each video analysis task of all video acquisition terminals in the t-th sample time slot globally; for any video analysis task of any video acquisition terminal in the t-th sample time slot globally, the analysis time of that video analysis task is determined according to the following steps: When the values of the unloading mode decision variables of the video analysis task represent local analysis, the local analysis time of the video analysis task is determined based on the amount of computing resources of the video acquisition terminal in the t-th sample time slot, the amount of computing resources required by the video analysis task, and the values of the video compression rate decision variables of the video analysis task. The values of the offloading mode decision variables for this video analysis task represent: when the task is offloaded to the edge server of the video acquisition terminal that manages the video analysis task, the transmission time of the edge server for the video analysis task is determined; and the analysis time of the edge server for the video analysis task is determined based on the amount of computing resources of the edge server of the video acquisition terminal that manages the video analysis task in the t-th sample time slot, the value of the computing resource allocation decision variable for the video analysis task, the amount of computing resources required by the video analysis task, and the value of the video compression rate decision variable for the video analysis task. The values of the decision variables for the unloading mode of the video analysis task represent: when unloading to the cloud server, the transmission time of the video analysis task to the edge server is determined, and the transmission time of the video analysis task to the cloud server is determined based on the transmission rate from the edge server of the video acquisition terminal that governs the video analysis task to the cloud server, the data volume of the video analysis task, and the values of the video compression rate decision variables of the video analysis task.
[0008] Optionally, when the value of the offloading mode decision variable for the video analytics task represents: offloading to the edge server of the video acquisition terminal that manages the video analytics task, or when the value of the offloading mode decision variable for the video analytics task represents: offloading to the cloud server, determining the edge server transmission time for the video analytics task includes: Based on the uplink spectrum resources and the number of uplink sub-channels of the edge server that manages the video acquisition terminal for the video analysis task in the t-th sample time slot, determine the bandwidth of each uplink sub-channel of the edge server in the t-th sample time slot; Based on the noise power, interference power, uplink transmit power of the video acquisition terminal for the video analysis task, the channel gain of the video acquisition terminal for the video analysis task accessing the edge server through the i-th uplink sub-channel in the t-th sample time slot, and the bandwidth of the i-th uplink sub-channel of the edge server in the t-th sample time slot, determine the transmission rate of the video acquisition terminal for the video analysis task accessing the edge server through the i-th uplink sub-channel in the t-th sample time slot. Based on the values of the uplink subchannel allocation decision variables for the video analysis task, and the transmission rate of the video acquisition terminal of the video analysis task accessing the edge server through the i-th uplink subchannel in the t-th sample time slot, the transmission rate from the video acquisition terminal of the video analysis task to the edge server that governs the video acquisition terminal of the video analysis task is determined. Based on the data volume of the video analysis task, the value of the video compression rate decision variable of the video analysis task, and the transmission rate from the video acquisition terminal of the video analysis task to the edge server that manages the video acquisition terminal of the video analysis task, the transmission time of the edge server of the video analysis task is determined.
[0009] Optionally, the global analysis precision corresponding to the t-th sample time slot is the sum of the analysis precisions of each video analysis task of all video acquisition terminals in the t-th sample time slot globally. For any video analysis task of any video acquisition terminal in the t-th sample time slot globally, the analysis precision of the video analysis task is determined according to the following steps: The sample video analysis task is compressed according to different video compression rates to obtain compressed sample videos corresponding to different video compression rates. A terminal video analysis task model is deployed in all video acquisition terminals globally, an edge server video analysis task model is deployed in each of the K edge servers, and a cloud server video analysis task model is deployed in the cloud server; the analysis accuracy of the terminal video analysis task model, the edge server video analysis task model, and the cloud server video analysis task model increases sequentially. Using the terminal video analysis task model, the edge server video analysis task model, and the cloud server video analysis task model, compressed sample videos corresponding to different video compression rates are processed respectively to obtain the corresponding analysis accuracy, so as to determine the accuracy function of each of the terminal video analysis task model, the edge server video analysis task model, and the cloud server video analysis task model. The accuracy function is used to characterize the change of video analysis accuracy with compression rate. When the values of the unloading mode decision variables of the video analysis task represent local analysis, the analysis accuracy of the video analysis task is determined based on the values of the video compression rate decision variables of the video analysis task and the accuracy function of the terminal video analysis task model. The values of the unloading mode decision variables for this video analysis task represent: when the task is unloaded to the edge server of the video acquisition terminal that manages the video analysis task, the analysis accuracy of the video analysis task is determined based on the values of the video compression rate decision variables for the video analysis task and the accuracy function of the edge server video analysis task model. The values of the decision variables for the unloading mode of this video analysis task represent: when unloading to the cloud server, the analysis accuracy of the video analysis task is determined based on the values of the video compression rate decision variables for this video analysis task and the accuracy function of the video analysis task model on the cloud server.
[0010] Optionally, all video acquisition terminals, the K edge servers, and the cloud server globally collaborate to determine the value of the decision variable corresponding to the t-th sample time slot, including at least: Any video acquisition terminal within the global scope compresses the video acquired by that terminal based on the value of the video compression rate decision variable issued by the edge server that manages that video acquisition terminal, thus obtaining a compressed video. For any video acquisition terminal within the global scope, under the condition that the value of the offload mode decision variable issued by the edge server that manages the video acquisition terminal represents local analysis, the compressed video is analyzed through the terminal video analysis task model to obtain the local analysis time of the video analysis task.
[0011] Optionally, the collaborative execution of the decision variable corresponding to the t-th sample time slot by all video acquisition terminals, the K edge servers, and the cloud server globally further includes: For any video acquisition terminal in the global scope, the value of the offloading mode decision variable issued by the edge server that manages the video acquisition terminal represents: when the video acquisition terminal is offloaded to the edge server that manages the video analysis task, the edge server that manages the video analysis task allocates the corresponding uplink sub-channel to the video acquisition terminal according to the value of the uplink sub-channel allocation decision variable. The video acquisition terminal uses the allocated uplink sub-channel to transmit the compressed video to the edge server of the video acquisition terminal that manages the video analysis task, so as to obtain the transmission time of the edge server for the video analysis task. The edge server that manages the video acquisition terminal for the video analysis task analyzes the compressed video using the corresponding computing resources based on the value of the computing resource allocation decision variable and the edge server video analysis task model. This results in the edge server analysis time for the video analysis task, and the analysis results are then fed back to the video acquisition terminal for the video analysis task.
[0012] Optionally, the collaborative execution of the decision variable corresponding to the t-th sample time slot by all video acquisition terminals, the K edge servers, and the cloud server globally further includes: For any video capture terminal in the global scope, the value of the offload mode decision variable issued by the edge server that manages the video capture terminal represents: when offloaded to the cloud server, after the video capture terminal uses the allocated uplink sub-channel to transmit the compressed video to the edge server that manages the video capture terminal for the video analysis task, the edge server that manages the video capture terminal for the video analysis task transmits the compressed video to the cloud server to obtain the cloud server transmission time of the video analysis task. The cloud server analyzes the compressed video using the cloud server video analysis task model, and feeds back the analysis results to the video acquisition terminal that performs the video analysis task via the edge server that manages the video acquisition terminal.
[0013] A second aspect of this application provides a wide-area video offloading, compression, and resource allocation system based on multi-agent reinforcement learning under cloud-edge-device collaboration, the system comprising: The information acquisition module is used by the k-th edge server among K edge servers to obtain its own server information in the t-th time slot, and to obtain the video analysis task information of each video acquisition terminal within its jurisdiction in the t-th time slot, as local observation information of the k-th edge server in the t-th time slot; the server information includes: the computing resources and uplink spectrum resources of the edge server; the video analysis task information includes: the data volume of the video analysis task and the computing resources required for the video analysis task; K is an integer greater than 1; t is an integer greater than 0; The distributed decision execution module is used by K edge servers to execute distributed decisions in parallel based on their local observation information in the t-th time slot and using the decision network deployed on themselves. The module obtains the values of the decision variables for the video analysis task of each video acquisition terminal within the jurisdiction of each of the K edge servers in the t-th time slot. The decision variables include: video compression rate decision variables, offload mode decision variables, computing resource allocation decision variables, and uplink subchannel allocation decision variables. The training and determination module aims to maximize the global analysis accuracy of the t-th sample time slot and minimize the global analysis time of the t-th sample time slot. It trains the decision networks of K edge servers through multi-agent reinforcement learning, determines the global analysis accuracy of the t-th sample time slot based on the analysis accuracy of the video analysis task of all video acquisition terminals in the global scope in the t-th sample time slot, and determines the global analysis time of the t-th sample time slot based on the analysis time of the video analysis task of all video acquisition terminals in the global scope in the t-th sample time slot.
[0014] A third aspect of this application provides an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the steps of the wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration as described in the first aspect of this application.
[0015] The beneficial effects of this application are: This application provides a wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration. The method includes: the k-th edge server among K edge servers obtains its own server information in the t-th time slot and obtains the video analysis task information of each video acquisition terminal within its jurisdiction in the t-th time slot, as local observation information of the k-th edge server in the t-th time slot; the server information includes: the computational resources and uplink spectrum resources of the edge server; the video analysis task information includes: the data volume of the video analysis task and the computational resources required for the video analysis task; K is an integer greater than 1; t is an integer greater than 0; the K edge servers, based on their respective local observation information in the t-th time slot, utilize their own deployed decision networks to execute distributed decision-making in parallel, obtaining... The decision variables for the video analysis task in the t-th time slot of each video acquisition terminal within the jurisdiction of each of the K edge servers are determined. These decision variables include: video compression rate decision variables, offload mode decision variables, computing resource allocation decision variables, and uplink subchannel allocation decision variables. The decision networks of the K edge servers are trained through multi-agent reinforcement learning with the goal of maximizing the global analysis accuracy and minimizing the global analysis time in the t-th time slot. The global analysis accuracy in the t-th time slot is determined based on the analysis accuracy of the video analysis task of all video acquisition terminals in the t-th time slot globally, and the global analysis time in the t-th time slot is determined based on the analysis time of the video analysis task of all video acquisition terminals in the t-th time slot globally.
[0016] This application achieves joint optimization of offloading, compression, computing resources, and communication resources for wide-area video tasks in a cloud-edge-device collaborative environment by having K edge servers acquire their own server information and video analysis task information within their respective jurisdictions in each time slot. This is achieved by having K edge servers acquire their own server information and video analysis task information within each time slot in each time slot in each time slot, and using their own decision networks to execute distributed decision-making in parallel. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1This is a flowchart illustrating the steps of a wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration provided in an embodiment of this application. Figure 2 This is a flowchart illustrating the steps of a method for determining the analysis time of any video analysis task in the t-th sample time slot of any video acquisition terminal within a global scope, as provided in an embodiment of this application. Figure 3 This is a flowchart illustrating the steps of a method for determining the analysis accuracy of any video analysis task in the t-th sample time slot of any video acquisition terminal within a global range, as provided in an embodiment of this application. Figure 4 This is a schematic diagram of the architecture of a wide-area video offloading, compression and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration provided in an embodiment of this application; Figure 5 This is a schematic diagram of a wide-area video offloading, compression, and resource allocation system based on multi-agent reinforcement learning under cloud-edge-device collaboration, provided in an embodiment of this application. Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.
[0020] In a first aspect, this application provides a method for wide-area video offloading, compression, and resource allocation based on multi-agent reinforcement learning in a cloud-edge-device collaborative environment, such as... Figure 1 As shown, the method includes: S101, the k-th edge server among the K edge servers obtains its own server information in the t-th time slot, and obtains the video analysis task information of each video acquisition terminal within its jurisdiction in the t-th time slot, as the local observation information of the k-th edge server in the t-th time slot; the server information includes: the amount of computing resources and uplink spectrum resources of the edge server; the video analysis task information includes: the amount of data of the video analysis task and the amount of computing resources required for the video analysis task; K is an integer greater than 1; t is an integer greater than 0.
[0021] In this step, the kth edge server among the K edge servers obtains its own server information in the tth time slot, and obtains the video analysis task information of each video acquisition terminal within its jurisdiction in the tth time slot. The obtained server information and video analysis task information are used as the local observation information of the kth edge server in the tth time slot.
[0022] In this application, server information includes the computing resources and uplink spectrum resources of the edge server. Video analytics task information includes the data volume and computing resources required for the video analytics task. Here, K is an integer greater than 1, and t is an integer greater than 0.
[0023] S102, K edge servers, based on their local observation information in the t-th time slot, utilize their own decision networks to execute distributed decisions in parallel, obtaining the values of decision variables for the video analysis task of each video acquisition terminal within the jurisdiction of each of the K edge servers in the t-th time slot. The decision variables include: video compression rate decision variables, offload mode decision variables, computing resource allocation decision variables, and uplink subchannel allocation decision variables. The decision networks of the K edge servers are trained through multi-agent reinforcement learning with the goal of maximizing the global analysis accuracy of the t-th sample time slot and minimizing the global analysis time of the t-th sample time slot. The global analysis accuracy of the t-th sample time slot is determined based on the analysis accuracy of the video analysis task of all video acquisition terminals in the global scope in the t-th sample time slot, and the global analysis time of the t-th sample time slot is determined based on the analysis time of the video analysis task of all video acquisition terminals in the global scope in the t-th sample time slot.
[0024] In this step, the K edge servers, based on their local observation information in the t-th time slot, utilize their own decision networks to perform distributed decision-making in parallel, obtaining the values of the decision variables for the video analysis task of each video acquisition terminal within their respective jurisdictions in the t-th time slot.
[0025] In this application, the aforementioned decision variables include video compression rate decision variables, offload mode decision variables, computing resource allocation decision variables, and uplink subchannel allocation decision variables.
[0026] It should be noted that in this application, the decision networks of each of the K edge servers are trained through multi-agent reinforcement learning with the goal of maximizing the global analysis accuracy of the t-th sample time slot and minimizing the global analysis time of the t-th sample time slot.
[0027] The global analysis accuracy of the t-th sample time slot is determined based on the analysis accuracy of the video analysis task of all video acquisition terminals in the t-th sample time slot within the global scope; the global analysis time consumption of the t-th sample time slot is determined based on the analysis time consumption of the video analysis task of all video acquisition terminals in the t-th sample time slot within the global scope.
[0028] This application achieves joint optimization of offloading, compression, computing resources, and communication resources for wide-area video tasks in a cloud-edge-device collaborative environment by having K edge servers acquire their own server information and video analysis task information within their respective jurisdictions in each time slot. This is achieved by having K edge servers acquire their own server information and video analysis task information within each time slot in each time slot in each time slot, and using their own decision networks to execute distributed decision-making in parallel.
[0029] In one embodiment, the multi-agent reinforcement learning training process includes: The k-th edge server among the K edge servers obtains its own server information in the t-th sample time slot, and obtains the video analysis task information of each video acquisition terminal within its jurisdiction in the t-th sample time slot, as local observation information of the k-th edge server in the t-th sample time slot. K edge servers act as K intelligent agents. Based on their local observation information in the t-th sample time slot, they use the decision network to be trained to execute distributed decision-making in parallel, and obtain the values of the decision variables of each video acquisition terminal in the t-th sample time slot within the jurisdiction of each of the K edge servers. All video acquisition terminals, the K edge servers, and the cloud server in the global scope work together to execute the value of the decision variable corresponding to the t-th sample time slot, and obtain the global analysis time and global analysis accuracy corresponding to the t-th sample time slot, which are used as the reward function value corresponding to the t-th sample time slot; The decision network to be trained is deployed on the K edge servers, and the parameters of the decision network to be trained are updated with the goal of maximizing the cumulative reward function value.
[0030] This embodiment describes in detail the process of multi-agent reinforcement learning training. The specific training process is as follows: The k-th edge server among the K edge servers obtains its own server information in the t-th sample time slot, and obtains the video analysis task information of each video acquisition terminal within its jurisdiction in the t-th sample time slot. The obtained server information and video analysis task information in the t-th sample time slot are used as the local observation information of the k-th edge server in the t-th sample time slot.
[0031] Furthermore, the K edge servers are treated as K agents. Based on the local observation information of each edge server in the t-th sample time slot, the decision network to be trained is used to execute distributed decision-making in parallel, so as to obtain the values of the decision variables of each video acquisition terminal in the t-th sample time slot within the jurisdiction of each of the K edge servers.
[0032] In this embodiment, the values of the decision variables satisfy preset constraints, which include: each uplink subchannel is allocated to at most one video acquisition terminal; each video analysis task selects only one offloading mode among local analysis, offloading to an edge server, or offloading to a cloud server; the sum of the computing resource ratios allocated to each video analysis task within the jurisdiction of each edge server does not exceed 1; the analysis time of each video analysis task does not exceed a preset time limit; and the values of the video compression rate decision variables of each video analysis task are within a preset compression rate range.
[0033] Furthermore, all video acquisition terminals, K edge servers, and cloud servers globally collaborate to determine the value of the decision variable corresponding to the t-th sample time slot, obtaining the global analysis time and global analysis accuracy corresponding to the t-th sample time slot. The global analysis time and global analysis accuracy corresponding to the t-th sample time slot are then used as the basis for determining the reward function value corresponding to the t-th sample time slot.
[0034] In this embodiment, the reward function value is used to characterize the comprehensive performance corresponding to the global analysis accuracy and global analysis time consumption within the t-th sample time slot. In this embodiment, the decision network to be trained is deployed on the K edge servers. During the multi-agent reinforcement learning training process, the parameters of the decision network to be trained are updated with the goal of maximizing the cumulative reward function value.
[0035] Furthermore, after obtaining the trained decision network, the trained decision network is deployed on K edge servers, so that each edge server can perform distributed decision-making in parallel based on its own local observation information in subsequent time slots, and obtain the values of the decision variables of the video analysis task of each video acquisition terminal within its jurisdiction.
[0036] In one embodiment, the global analysis time corresponding to the t-th sample time slot is: the sum of the analysis times of each video analysis task of all video acquisition terminals in the t-th sample time slot globally; for any video analysis task of any video acquisition terminal in the t-th sample time slot globally, the analysis time of the video analysis task is determined according to the following... Figure 2 The steps shown determine: S201, when the value of the unloading mode decision variable of the video analysis task represents the local analysis, the local analysis time of the video analysis task is determined according to the amount of computing resources of the video acquisition terminal in the t-th sample time slot, the amount of computing resources required by the video analysis task, and the value of the video compression rate decision variable of the video analysis task. S202, the values of the offloading mode decision variables for the video analysis task represent: when the task is offloaded to the edge server of the video acquisition terminal that manages the video analysis task, the transmission time of the edge server for the video analysis task is determined; and the analysis time of the edge server for the video analysis task is determined based on the amount of computing resources of the edge server of the video acquisition terminal that manages the video analysis task in the t-th sample time slot, the value of the computing resource allocation decision variable for the video analysis task, the amount of computing resources required by the video analysis task, and the value of the video compression rate decision variable for the video analysis task. S203, the values of the unloading mode decision variables for the video analysis task represent: when unloading to the cloud server, the transmission time of the video analysis task to the edge server is determined, and the transmission time of the video analysis task to the cloud server is determined based on the transmission rate from the edge server of the video acquisition terminal that governs the video analysis task to the cloud server, the data volume of the video analysis task, and the values of the video compression rate decision variables for the video analysis task.
[0037] In this embodiment, the global analysis time corresponding to the t-th sample time slot is the sum of the analysis times of each video analysis task of all video acquisition terminals in the t-th sample time slot globally. Specifically, for any video acquisition terminal in the global scope, such as the n-th video acquisition terminal, the analysis time of any video analysis task in the t-th sample time slot can be calculated as follows: Figure 2 The steps shown are as follows; In S201, when the values of the unloading mode decision variables of the video analysis task represent local analysis, the local analysis time of the video analysis task is determined based on the amount of computing resources of the video acquisition terminal n in the t-th sample time slot, the amount of computing resources required by the video analysis task, and the values of the video compression rate decision variables of the video analysis task.
[0038] In this embodiment, the local analysis time of the video analysis task is... It can be expressed by the following formula: (1) in, The value of the video compression rate decision variable for the video acquisition terminal n in the t-th sample time slot represents the video analysis task. This represents the amount of computational resources required by the video acquisition terminal n for the t-th sample time slot in the video analytics task. This represents the amount of computational resources required for video acquisition terminal n in the t-th sample time slot.
[0039] In S202, when the value of the offloading mode decision variable of the video analysis task represents the offloading to the edge server of the video acquisition terminal that governs the video analysis task, the transmission time of the edge server of the video analysis task is determined. Also, based on the amount of computing resources of the edge server of the video acquisition terminal that governs the video analysis task in the t-th sample time slot, the value of the computing resource allocation decision variable of the video analysis task, the amount of computing resources required by the video analysis task, and the value of the video compression rate decision variable of the video analysis task, the analysis time of the edge server of the video analysis task is determined.
[0040] In this embodiment, when the value of the unloading mode decision variable for the video analysis task represents the unloading to the edge server of the video acquisition terminal that manages the video analysis task, the analysis time of the edge server for the video analysis task can be expressed by the following formula: (2) in, This represents the transmission time of the video acquisition terminal n to the edge server in the t-th sample time slot for this video analysis task. This represents the amount of data collected by the video acquisition terminal n in the t-th sample time slot for this video analysis task. This represents the total transmission rate from the video acquisition terminal n to the edge server k in the t-th sample time slot. This represents the value of the computational resource allocation decision variable for edge server k in the t-th sample time slot for the video acquisition terminal n of this video analysis task. This represents the amount of computing resources required for edge server k in the t-th sample time slot.
[0041] In S203, when the value of the unloading mode decision variable of the video analysis task represents unloading to the cloud server, the transmission time of the edge server of the video analysis task is determined, and the transmission time of the cloud server of the video analysis task is determined based on the transmission rate from the edge server of the video acquisition terminal that governs the video analysis task to the cloud server, the data volume of the video analysis task, and the value of the video compression rate decision variable of the video analysis task.
[0042] In this embodiment, it is assumed that the transmission rate from edge server k to cloud server is... The value of the unloading mode decision variable for this video analysis task represents the total transmission time to the edge server when the task is unloaded to the cloud server. It can be expressed by the following formula: (3) Among them, the transmission rate from edge server k to cloud server in the t-th sample time slot. It is obtained through periodic measurements, and the measurement method can be implemented using existing technology. This represents the time taken for edge server k to transmit the compressed video data to the cloud server in the t-th sample time slot. This represents the time taken for the video acquisition terminal n to transmit the compressed video data to the edge server k in the t-th sample time slot.
[0043] In one optional embodiment, to uniformly represent the time consumption of video analysis tasks under different unloading modes, this embodiment defines three binary selection variables: , , And satisfy The analysis time of the video analysis task of the video acquisition terminal n in the t-th sample time slot is... This can be expressed by the following formula: (4) In one embodiment, when the value of the offloading mode decision variable for the video analytics task represents: offloading to the edge server of the video acquisition terminal that manages the video analytics task, or when the value of the offloading mode decision variable for the video analytics task represents: offloading to the cloud server, determining the edge server transmission time for the video analytics task includes: Based on the uplink spectrum resources and the number of uplink sub-channels of the edge server that manages the video acquisition terminal for the video analysis task in the t-th sample time slot, determine the bandwidth of each uplink sub-channel of the edge server in the t-th sample time slot; Based on the noise power, interference power, uplink transmit power of the video acquisition terminal for the video analysis task, the channel gain of the video acquisition terminal for the video analysis task accessing the edge server through the i-th uplink sub-channel in the t-th sample time slot, and the bandwidth of the i-th uplink sub-channel of the edge server in the t-th sample time slot, determine the transmission rate of the video acquisition terminal for the video analysis task accessing the edge server through the i-th uplink sub-channel in the t-th sample time slot. Based on the values of the uplink subchannel allocation decision variables for the video analysis task, and the transmission rate of the video acquisition terminal of the video analysis task accessing the edge server through the i-th uplink subchannel in the t-th sample time slot, the transmission rate of the video acquisition terminal of the video analysis task to the edge server that governs the video acquisition terminal of the video analysis task in the t-th sample time slot is determined. Based on the data volume of the video analysis task, the value of the video compression rate decision variable of the video analysis task, and the transmission rate from the video acquisition terminal of the video analysis task to the edge server that manages the video acquisition terminal of the video analysis task, the transmission time of the edge server of the video analysis task is determined.
[0044] In this embodiment, when the value of the unloading mode decision variable of the video analysis task represents unloading to the edge server of the video acquisition terminal that manages the video analysis task, or when the value of the unloading mode decision variable of the video analysis task represents unloading to the cloud server, the edge server transmission time of the video analysis task can be determined in the following manner.
[0045] Similarly, assume that the video analysis task is generated by video acquisition terminal n, and video acquisition terminal n is managed by the k-th edge server. Assume that the uplink spectrum resources of edge server k in the t-th sample time slot are... The number of uplink sub-channels is Then the bandwidth of each uplink subchannel in the t-th sample time slot is .
[0046] After determining the bandwidth of each uplink sub-channel, the transmission rate between terminal n and the k-th edge server on the i-th uplink sub-channel is determined based on noise power, interference power, uplink transmit power of the video acquisition terminal for this video analysis task, channel gain of video acquisition terminal n when accessing the k-th edge server through the i-th uplink sub-channel in the t-th sample time slot, and the bandwidth of each uplink sub-channel of the k-th edge server in the t-th sample time slot. In this embodiment, the transmission rate between terminal n and the k-th edge server on the i-th uplink sub-channel is as follows: (5) in, This represents the transmit power when video capture terminal n sends data to edge server k. This represents the channel gain when video acquisition terminal n accesses the k-th edge server through the i-th uplink sub-channel in the t-th sample time slot. Indicates noise power. This indicates the interference power.
[0047] Furthermore, based on the values of the uplink subchannel allocation decision variables for this video analysis task, and the transmission rate of the video acquisition terminal n accessing the edge server through the i-th uplink subchannel in the t-th sample time slot, the transmission rate from the video acquisition terminal n to the k-th edge server for this video analysis task is determined.
[0048] Specifically, assume that the uplink subchannel allocation decision variable is When the i-th uplink subchannel in the t-th sample time slot is allocated to the video acquisition terminal n for communication with the edge server k, If the value is 1, then the total transmission rate from the video acquisition terminal n to the edge server k can be expressed by the following formula: (6) In this embodiment, after obtaining the transmission rate from video acquisition terminal n to the k-th edge server, the transmission time to the edge server for the video analysis task is determined based on the data volume of the video analysis task, the value of the video compression rate decision variable for the video analysis task, and the transmission rate from video acquisition terminal n to the k-th edge server, as shown in the following formula: (7) in, This represents the amount of data collected by the video acquisition terminal n in the t-th sample time slot for this video analysis task.
[0049] In one embodiment, the global analysis precision corresponding to the t-th sample time slot is the sum of the analysis precisions of each video analysis task of all video acquisition terminals in the t-th sample time slot globally; for any video analysis task of any video acquisition terminal in the t-th sample time slot globally, the analysis precision of the video analysis task is determined according to the following... Figure 3 The steps shown determine: S301, the sample video analysis task is compressed according to different video compression rates to obtain compressed sample videos corresponding to different video compression rates; S302, Terminal video analysis task models are deployed in all video acquisition terminals globally, edge server video analysis task models are deployed in the K edge servers, and cloud server video analysis task models are deployed in the cloud server; the analysis accuracy of the terminal video analysis task model, the edge server video analysis task model, and the cloud server video analysis task model increases sequentially. S303, using the terminal video analysis task model, the edge server video analysis task model, and the cloud server video analysis task model, respectively process compressed sample videos corresponding to different video compression rates to obtain the corresponding analysis accuracy, so as to determine the accuracy function of each of the terminal video analysis task model, the edge server video analysis task model, and the cloud server video analysis task model. The accuracy function is used to characterize the change of video analysis accuracy with compression rate. S3031, when the value of the unloading mode decision variable of the video analysis task represents local analysis, the analysis accuracy of the video analysis task is determined according to the value of the video compression rate decision variable of the video analysis task and the accuracy function of the terminal video analysis task model. S3032, the value of the unloading mode decision variable of the video analysis task represents: when the video is unloaded to the edge server of the video acquisition terminal that manages the video analysis task, the analysis accuracy of the video analysis task is determined according to the value of the video compression rate decision variable of the video analysis task and the accuracy function of the edge server video analysis task model. S3033, the value of the unloading mode decision variable of the video analysis task represents: when unloading to the cloud server, the analysis accuracy of the video analysis task is determined according to the value of the video compression rate decision variable of the video analysis task and the accuracy function of the video analysis task model of the cloud server.
[0050] In this embodiment, as Figure 3 As shown, for any video analysis task in the t-th sample time slot of any video acquisition terminal within the global scope, the analysis accuracy of the video analysis task is determined according to the following steps: In S301, the sample video analysis task is compressed according to multiple preset video compression rates to obtain multiple compressed sample videos.
[0051] In S302, due to the different computing resources of the video capture terminal, edge server, and cloud server, video analytics task models of varying complexity can be deployed on each of these devices. For example, a terminal video analytics task model can be deployed on the video capture terminal, an edge server video analytics task model on the edge server, and a cloud server video analytics task model on the cloud server. The model complexity increases sequentially from the terminal video analytics task model to the edge server video analytics task model and then to the cloud server video analytics task model.
[0052] In step S303, compressed sample videos corresponding to different video compression rates are input into the terminal video analysis task model, the edge server video analysis task model, and the cloud server video analysis task model, respectively, to obtain the analysis accuracy of each video analysis task model under different video compression rates. In this embodiment, based on different video compression rates and their corresponding analysis accuracies, the accuracy functions of the terminal video analysis task model, the edge server video analysis task model, and the cloud server video analysis task model can be determined.
[0053] In S3031, when the value of the unloading mode decision variable of the video analysis task represents local analysis, the analysis accuracy of the video analysis task is determined based on the value of the video compression rate decision variable of the video analysis task and the accuracy function of the terminal video analysis task model.
[0054] In S3032, when the value of the unloading mode decision variable of the video analysis task represents the unloading to the edge server of the video acquisition terminal that manages the video analysis task, the analysis accuracy of the video analysis task is determined according to the value of the video compression rate decision variable of the video analysis task and the accuracy function of the edge server video analysis task model.
[0055] In S3033, when the value of the unloading mode decision variable of the video analysis task represents the unloading to the cloud server, the analysis accuracy of the video analysis task is determined based on the value of the video compression rate decision variable of the video analysis task and the accuracy function of the video analysis task model on the cloud server.
[0056] In one embodiment, all video acquisition terminals globally, the K edge servers, and the cloud server collaboratively execute the value selection of the decision variable corresponding to the t-th sample time slot, including at least: Any video acquisition terminal within the global scope compresses the video acquired by that terminal based on the value of the video compression rate decision variable issued by the edge server that manages that video acquisition terminal, thus obtaining a compressed video. For any video acquisition terminal within the global scope, under the condition that the value of the offload mode decision variable issued by the edge server that manages the video acquisition terminal represents local analysis, the compressed video is analyzed through the terminal video analysis task model to obtain the local analysis time of the video analysis task.
[0057] In this embodiment, the collaborative execution of the decision variable corresponding to the t-th sample time slot by all video acquisition terminals, K edge servers, and the cloud server across the global scope can include the following process: Any video capture terminal within the global scope can receive the value of the video compression rate decision variable sent by the edge server that manages the video capture terminal, and compress the video captured by the video capture terminal according to the value of the video compression rate decision variable to obtain the compressed video.
[0058] In this embodiment, the value of the video compression rate decision variable is determined by the edge server governing the video acquisition terminal using the decision network to be trained. After receiving the value of the video compression rate decision variable, the video acquisition terminal can compress the acquired video according to the value, so that subsequent local analysis, edge server analysis, or cloud server analysis are all performed based on the compressed video.
[0059] Within the global scope, any video acquisition terminal, under the condition that the value of the offload mode decision variable issued by the edge server that manages the video acquisition terminal represents local analysis, analyzes the compressed video through the terminal video analysis task model deployed in the video acquisition terminal to obtain the local analysis time of the video analysis task.
[0060] In one embodiment, the global video acquisition terminals, the K edge servers, and the cloud server collaboratively execute the value selection of the decision variable corresponding to the t-th sample time slot, further comprising: For any video acquisition terminal in the global scope, the value of the offloading mode decision variable issued by the edge server that manages the video acquisition terminal represents: when the video acquisition terminal is offloaded to the edge server that manages the video analysis task, the edge server that manages the video analysis task allocates the corresponding uplink sub-channel to the video acquisition terminal according to the value of the uplink sub-channel allocation decision variable. The video acquisition terminal uses the allocated uplink sub-channel to transmit the compressed video to the edge server of the video acquisition terminal that manages the video analysis task, so as to obtain the transmission time of the edge server for the video analysis task. The edge server that manages the video acquisition terminal for the video analysis task analyzes the compressed video using the corresponding computing resources based on the value of the computing resource allocation decision variable and the edge server video analysis task model. This results in the edge server analysis time for the video analysis task, and the analysis results are then fed back to the video acquisition terminal for the video analysis task.
[0061] In this embodiment, the collaborative execution of the decision variable value corresponding to the t-th sample time slot by all video acquisition terminals, K edge servers, and cloud servers globally may also include the following process: For any video acquisition terminal within the global scope, if the value of the offload mode decision variable issued by the edge server governing the video acquisition terminal indicates that the offload is to the edge server governing the video acquisition terminal for the video analysis task, the edge server governing the video acquisition terminal for the video analysis task will allocate the corresponding uplink subchannel to the video acquisition terminal according to the value of the uplink subchannel allocation decision variable.
[0062] After allocating an uplink subchannel, the video acquisition terminal uses the allocated uplink subchannel to transmit the compressed video to the edge server of the video acquisition terminal that manages the video analysis task, and obtains the transmission time of the edge server for the video analysis task based on the transmission process.
[0063] The edge server that manages the video acquisition terminal for this video analysis task uses the corresponding computing resources based on the value of the computing resource allocation decision variable, and analyzes the compressed video through the edge server video analysis task model to obtain the edge server analysis time for this video analysis task, and then feeds the analysis results back to the video acquisition terminal for this video analysis task.
[0064] In one embodiment, the global video acquisition terminals, the K edge servers, and the cloud server collaboratively execute the value selection of the decision variable corresponding to the t-th sample time slot, further comprising: For any video capture terminal in the global scope, the value of the offload mode decision variable issued by the edge server that manages the video capture terminal represents: when offloaded to the cloud server, after the video capture terminal uses the allocated uplink sub-channel to transmit the compressed video to the edge server that manages the video capture terminal for the video analysis task, the edge server that manages the video capture terminal for the video analysis task transmits the compressed video to the cloud server to obtain the cloud server transmission time of the video analysis task. The cloud server analyzes the compressed video using the cloud server video analysis task model, and feeds back the analysis results to the video acquisition terminal that performs the video analysis task via the edge server that manages the video acquisition terminal.
[0065] In this embodiment, the collaborative execution of the decision variable corresponding to the t-th sample time slot by all video acquisition terminals, K edge servers, and cloud servers globally may also include the following process: In any video acquisition terminal within the global scope, when the value of the offloading mode decision variable issued by the edge server that manages the video acquisition terminal indicates that the video acquisition terminal is offloaded to the cloud server, the video acquisition terminal will use the allocated uplink sub-channel to transmit the compressed video to the edge server that manages the video acquisition terminal for the video analysis task.
[0066] After the edge server receives the compressed video, the edge server that manages the video acquisition terminal for the video analysis task transmits the compressed video to the cloud server. The cloud server transmission time for the video analysis task is obtained based on the process of the edge server transmitting the compressed video to the cloud server.
[0067] The cloud server analyzes the compressed video using the cloud server video analysis task model to obtain the analysis results of the video analysis task, and then feeds the analysis results back to the video acquisition terminal of the video analysis task via the edge server that manages the video acquisition terminal.
[0068] In one embodiment, reference is made to... Figure 4 The diagram shows the architecture of a wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration. Figure 4 As shown: The system architecture diagram illustrates multiple video capture terminals, K edge servers, and a cloud server. Each video capture terminal captures video and generates corresponding video analysis tasks based on the captured video. Each of the K edge servers deploys a corresponding agent; each edge server can act as an intelligent agent, performing distributed decision-making based on its own server information and the video analysis task information of each video capture terminal within its jurisdiction. The cloud server is used to analyze and process the corresponding video analysis tasks when they are offloaded to the cloud server.
[0069] like Figure 4As shown, video analytics tasks can adopt different processing modes based on the values of the offloading mode decision variables. These processing modes can include Mode 1, Mode 2, and Mode 3. Mode 1 involves local processing after compression; Mode 2 involves compression and offloading to an edge server; and Mode 3 involves compression and offloading to a cloud server.
[0070] Furthermore, such as Figure 4 As shown, different terminals can cooperate to achieve coordinated optimization of computing and communication resources. Specifically, each edge server can use its own local observation information and the decision network deployed on its own to determine the processing mode, video compression level, and communication and computing resources allocated to the video analysis tasks of each video acquisition terminal within its jurisdiction, thereby reducing time consumption and improving accuracy.
[0071] In another implementation, the processing modes may include Mode 4 in addition to Mode 1, Mode 2, and Mode 3. Therefore, in addition to defining three binary selection variables: , , In addition, a binary selection variable was defined: And satisfying, The analysis time of the video analysis task of the video acquisition terminal n in the t-th sample time slot is... This can be expressed by the following formula: (8) In Mode 4, each edge server has a set of neighboring edge servers. The set of neighboring edge servers of the kth edge server includes one or more edge servers whose distance from the kth edge server is within a preset distance threshold. When the computing resources of edge server k are insufficient to handle the video analysis tasks unloaded by the video acquisition terminals within its jurisdiction, edge server k can determine the target edge server from its own set of neighboring edge servers and forward the compressed sample video of the video analysis task that edge server k cannot handle to the target edge server.
[0072] In Mode 4, the analysis time for the video analytics task includes: the transmission time of the compressed sample video from video acquisition terminal n to edge server k, the transmission time of edge server k transmitting the compressed sample video to the target edge server, and the time spent by the target edge server processing the compressed sample video. The transmission time of edge server k transmitting the compressed sample video to the target edge server is determined based on the following factors: the amount of data in the compressed sample video to be transmitted and the transmission rate from edge server k to the target server.
[0073] Based on the same inventive concept, a second aspect of the embodiments of this application provides a wide-area video offloading, compression, and resource allocation system based on multi-agent reinforcement learning under cloud-edge-device collaboration, such as... Figure 5 As shown, the system includes: The information acquisition module 501 is used by the kth edge server among the K edge servers to obtain its own server information in the tth time slot, and to obtain the video analysis task information of each video acquisition terminal within its jurisdiction in the tth time slot, as local observation information of the kth edge server in the tth time slot; the server information includes: the amount of computing resources and uplink spectrum resources of the edge server; the video analysis task information includes: the amount of data of the video analysis task and the amount of computing resources required for the video analysis task; K is an integer greater than 1; t is an integer greater than 0; The distributed decision execution module 502 is used by K edge servers to execute distributed decisions in parallel based on their local observation information in the t-th time slot and using the decision network deployed on themselves. The module obtains the values of the decision variables for the video analysis task of each video acquisition terminal within the jurisdiction of each of the K edge servers in the t-th time slot. The decision variables include: video compression rate decision variables, offload mode decision variables, computing resource allocation decision variables, and uplink subchannel allocation decision variables. The training and determination module 503 is used to maximize the global analysis accuracy of the t-th sample time slot and minimize the global analysis time of the t-th sample time slot. It trains the decision networks of K edge servers through multi-agent reinforcement learning, determines the global analysis accuracy of the t-th sample time slot based on the analysis accuracy of the video analysis task of all video acquisition terminals in the global scope in the t-th sample time slot, and determines the global analysis time of the t-th sample time slot based on the analysis time of the video analysis task of all video acquisition terminals in the global scope in the t-th sample time slot.
[0074] Based on the same inventive concept, a third aspect of the embodiments of this application provides a method as follows: Figure 6 The electronic device 100 shown includes a processor 120, a memory 110, and a program or instructions stored in the memory 110 and executable on the processor 120. When the program or instructions are executed by the processor 120, they implement the steps of the wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration as described in the first aspect of this application.
[0075] Each embodiment in this specification focuses on the differences from other embodiments. For the same or similar parts between the embodiments, please refer to each other.
[0076] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0077] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0078] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0079] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0080] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0081] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0082] The above provides a detailed description of a wide-area video offloading, compression, and resource allocation method, system, and device based on multi-agent reinforcement learning under cloud-edge-device collaboration. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration, characterized in that, The method includes: The k-th edge server among K edge servers obtains its own server information in the t-th time slot and the video analysis task information of each video acquisition terminal within its jurisdiction in the t-th time slot, as local observation information of the k-th edge server in the t-th time slot; the server information includes: the amount of computing resources and uplink spectrum resources of the edge server; the video analysis task information includes: the amount of data of the video analysis task and the amount of computing resources required for the video analysis task; K is an integer greater than 1; t is an integer greater than 0; K edge servers, based on their local observation information in the t-th time slot, utilize their own decision networks to execute distributed decisions in parallel, obtaining the values of decision variables for the video analysis task of each video acquisition terminal within their respective jurisdictions in the t-th time slot. The decision variables include: video compression rate decision variables, offload mode decision variables, computing resource allocation decision variables, and uplink subchannel allocation decision variables. The decision networks of the K edge servers are trained through multi-agent reinforcement learning with the goal of maximizing the global analysis accuracy of the t-th sample time slot and minimizing the global analysis time of the t-th sample time slot. The global analysis accuracy of the t-th sample time slot is determined based on the analysis accuracy of the video analysis task of all video acquisition terminals in the global scope in the t-th sample time slot, and the global analysis time of the t-th sample time slot is determined based on the analysis time of the video analysis task of all video acquisition terminals in the global scope in the t-th sample time slot.
2. The wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration as described in claim 1, characterized in that, The multi-agent reinforcement learning training process includes: The k-th edge server among the K edge servers obtains its own server information in the t-th sample time slot, and obtains the video analysis task information of each video acquisition terminal within its jurisdiction in the t-th sample time slot, as local observation information of the k-th edge server in the t-th sample time slot. K edge servers act as K intelligent agents. Based on their local observation information in the t-th sample time slot, they use the decision network to be trained to execute distributed decision-making in parallel, and obtain the values of the decision variables of each video acquisition terminal in the t-th sample time slot within the jurisdiction of each of the K edge servers. All video acquisition terminals, the K edge servers, and the cloud server in the global scope work together to execute the value of the decision variable corresponding to the t-th sample time slot, and obtain the global analysis time and global analysis accuracy corresponding to the t-th sample time slot, which are used as the reward function value corresponding to the t-th sample time slot; The decision network to be trained is deployed on the K edge servers, and the parameters of the decision network to be trained are updated with the goal of maximizing the cumulative reward function value.
3. The wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration as described in claim 2, characterized in that, The global analysis time corresponding to the t-th sample time slot is: the sum of the analysis times of each video analysis task of all video acquisition terminals in the t-th sample time slot globally; for any video analysis task of any video acquisition terminal in the t-th sample time slot globally, the analysis time of that video analysis task is determined according to the following steps: When the values of the unloading mode decision variables of the video analysis task represent local analysis, the local analysis time of the video analysis task is determined based on the amount of computing resources of the video acquisition terminal in the t-th sample time slot, the amount of computing resources required by the video analysis task, and the values of the video compression rate decision variables of the video analysis task. The values of the offloading mode decision variables for this video analysis task represent: when the task is offloaded to the edge server of the video acquisition terminal that manages the video analysis task, the transmission time of the edge server for the video analysis task is determined; and the analysis time of the edge server for the video analysis task is determined based on the amount of computing resources of the edge server of the video acquisition terminal that manages the video analysis task in the t-th sample time slot, the value of the computing resource allocation decision variable for the video analysis task, the amount of computing resources required by the video analysis task, and the value of the video compression rate decision variable for the video analysis task. The values of the decision variables for the unloading mode of the video analysis task represent: when unloading to the cloud server, the transmission time of the video analysis task to the edge server is determined, and the transmission time of the video analysis task to the cloud server is determined based on the transmission rate from the edge server of the video acquisition terminal that governs the video analysis task to the cloud server, the data volume of the video analysis task, and the values of the video compression rate decision variables of the video analysis task.
4. The wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration as described in claim 3, characterized in that, The value of the offloading mode decision variable for this video analytics task represents, in the case of offloading to the edge server of the video acquisition terminal that manages the video analytics task, or, in the case of offloading to the cloud server, determining the transmission time of the edge server for this video analytics task, including: Based on the uplink spectrum resources and the number of uplink sub-channels of the edge server that manages the video acquisition terminal for the video analysis task in the t-th sample time slot, determine the bandwidth of each uplink sub-channel of the edge server in the t-th sample time slot; Based on the noise power, interference power, uplink transmit power of the video acquisition terminal for the video analysis task, the channel gain of the video acquisition terminal for the video analysis task accessing the edge server through the i-th uplink sub-channel in the t-th sample time slot, and the bandwidth of the i-th uplink sub-channel of the edge server in the t-th sample time slot, determine the transmission rate of the video acquisition terminal for the video analysis task accessing the edge server through the i-th uplink sub-channel in the t-th sample time slot. Based on the values of the uplink subchannel allocation decision variables for the video analysis task, and the transmission rate of the video acquisition terminal of the video analysis task accessing the edge server through the i-th uplink subchannel in the t-th sample time slot, the transmission rate from the video acquisition terminal of the video analysis task to the edge server that governs the video acquisition terminal of the video analysis task is determined. Based on the data volume of the video analysis task, the value of the video compression rate decision variable of the video analysis task, and the transmission rate from the video acquisition terminal of the video analysis task to the edge server that manages the video acquisition terminal of the video analysis task, the transmission time of the edge server of the video analysis task is determined.
5. The wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration as described in claim 2, characterized in that, The global analysis precision corresponding to the t-th sample time slot is the sum of the analysis precisions of each video analysis task of all video acquisition terminals in the t-th sample time slot globally. For any video analysis task of any video acquisition terminal in the t-th sample time slot globally, the analysis precision of that video analysis task is determined according to the following steps: The sample video analysis task is compressed according to different video compression rates to obtain compressed sample videos corresponding to different video compression rates. A terminal video analysis task model is deployed in all video acquisition terminals globally, an edge server video analysis task model is deployed in each of the K edge servers, and a cloud server video analysis task model is deployed in the cloud server; the analysis accuracy of the terminal video analysis task model, the edge server video analysis task model, and the cloud server video analysis task model increases sequentially. Using the terminal video analysis task model, the edge server video analysis task model, and the cloud server video analysis task model, compressed sample videos corresponding to different video compression rates are processed respectively to obtain the corresponding analysis accuracy, so as to determine the accuracy function of each of the terminal video analysis task model, the edge server video analysis task model, and the cloud server video analysis task model. The accuracy function is used to characterize the change of video analysis accuracy with compression rate. When the values of the unloading mode decision variables of the video analysis task represent local analysis, the analysis accuracy of the video analysis task is determined based on the values of the video compression rate decision variables of the video analysis task and the accuracy function of the terminal video analysis task model. The values of the unloading mode decision variables for this video analysis task represent: when the task is unloaded to the edge server of the video acquisition terminal that manages the video analysis task, the analysis accuracy of the video analysis task is determined based on the values of the video compression rate decision variables for the video analysis task and the accuracy function of the edge server video analysis task model. The values of the decision variables for the unloading mode of this video analysis task represent: when unloading to the cloud server, the analysis accuracy of the video analysis task is determined based on the values of the video compression rate decision variables for this video analysis task and the accuracy function of the video analysis task model on the cloud server.
6. The wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration as described in claim 5, characterized in that, The global video capture terminals, the K edge servers, and the cloud server collaboratively execute the value selection of the decision variable corresponding to the t-th sample time slot, including at least: Any video acquisition terminal within the global scope compresses the video acquired by that terminal based on the value of the video compression rate decision variable issued by the edge server that manages that video acquisition terminal, thus obtaining a compressed video. For any video acquisition terminal within the global scope, under the condition that the value of the offload mode decision variable issued by the edge server that manages the video acquisition terminal represents local analysis, the compressed video is analyzed through the terminal video analysis task model to obtain the local analysis time of the video analysis task.
7. The wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration as described in claim 6, characterized in that, The global video acquisition terminals, the K edge servers, and the cloud server collaboratively execute the value selection of the decision variable corresponding to the t-th sample time slot, and also include: For any video acquisition terminal in the global scope, the value of the offloading mode decision variable issued by the edge server that manages the video acquisition terminal represents: when the video acquisition terminal is offloaded to the edge server that manages the video analysis task, the edge server that manages the video analysis task allocates the corresponding uplink sub-channel to the video acquisition terminal according to the value of the uplink sub-channel allocation decision variable. The video acquisition terminal uses the allocated uplink sub-channel to transmit the compressed video to the edge server of the video acquisition terminal that manages the video analysis task, so as to obtain the transmission time of the edge server for the video analysis task. The edge server that manages the video acquisition terminal for the video analysis task analyzes the compressed video using the corresponding computing resources based on the value of the computing resource allocation decision variable and the edge server video analysis task model. This results in the edge server analysis time for the video analysis task, and the analysis results are then fed back to the video acquisition terminal for the video analysis task.
8. The wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration as described in claim 7, characterized in that, The global video acquisition terminals, the K edge servers, and the cloud server collaboratively execute the value selection of the decision variable corresponding to the t-th sample time slot, and also include: For any video capture terminal in the global scope, the value of the offload mode decision variable issued by the edge server that manages the video capture terminal represents: when offloaded to the cloud server, after the video capture terminal uses the allocated uplink sub-channel to transmit the compressed video to the edge server that manages the video capture terminal for the video analysis task, the edge server that manages the video capture terminal for the video analysis task transmits the compressed video to the cloud server to obtain the cloud server transmission time of the video analysis task. The cloud server analyzes the compressed video using the cloud server video analysis task model, and feeds back the analysis results to the video acquisition terminal that performs the video analysis task via the edge server that manages the video acquisition terminal.
9. A wide-area video offloading, compression, and resource allocation system based on multi-agent reinforcement learning under cloud-edge-device collaboration, characterized in that, The system includes: The information acquisition module is used by the k-th edge server among K edge servers to obtain its own server information in the t-th time slot, and to obtain the video analysis task information of each video acquisition terminal within its jurisdiction in the t-th time slot, as local observation information of the k-th edge server in the t-th time slot; the server information includes: the computing resources and uplink spectrum resources of the edge server; the video analysis task information includes: the data volume of the video analysis task and the computing resources required for the video analysis task; K is an integer greater than 1; t is an integer greater than 0; The distributed decision execution module is used by K edge servers to execute distributed decisions in parallel based on their local observation information in the t-th time slot and using the decision network deployed on themselves. The module obtains the values of the decision variables for the video analysis task of each video acquisition terminal within the jurisdiction of each of the K edge servers in the t-th time slot. The decision variables include: video compression rate decision variables, offload mode decision variables, computing resource allocation decision variables, and uplink subchannel allocation decision variables. The training and determination module aims to maximize the global analysis accuracy of the t-th sample time slot and minimize the global analysis time of the t-th sample time slot. It trains the decision networks of K edge servers through multi-agent reinforcement learning, determines the global analysis accuracy of the t-th sample time slot based on the analysis accuracy of the video analysis task of all video acquisition terminals in the global scope in the t-th sample time slot, and determines the global analysis time of the t-th sample time slot based on the analysis time of the video analysis task of all video acquisition terminals in the global scope in the t-th sample time slot.
10. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein when the program or instructions are executed by the processor, they implement the steps of the wide-area video offloading, compression, and resource allocation method based on multi-agent reinforcement learning under cloud-edge-device collaboration as described in any one of claims 1-8.
