A Cloud-Edge Collaborative Method and System for Edge Resource Allocation in Surveillance Video
By constructing a cloud-edge collaborative framework model and using the DDPG algorithm to optimize edge resource allocation, the problems of wasted computing resources and insufficient real-time response at the edge layer are solved, achieving efficient utilization of computing resources and real-time intelligent processing at the edge layer.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG UNIV OF TECH
- Filing Date
- 2024-12-11
- Publication Date
- 2026-05-05
AI Technical Summary
Existing cloud-edge collaboration frameworks fail to effectively utilize edge layer computing resources and neglect the collaborative task processing capabilities between edge nodes, resulting in wasted computing resources and insufficient real-time response capabilities for intelligent processing.
A cloud-edge collaborative framework model is constructed. By acquiring the security level and node status information of the monitoring area in the edge layer, an optimization problem is established and transformed into a Markov decision problem. The DDPG algorithm is used to generate the optimal task collaborative allocation strategy and optimize the allocation of computing resources in the edge layer.
It enables the effective utilization of edge layer computing resources, improves the real-time intelligent processing capability of surveillance video, reduces computing latency and bandwidth usage loss, and ensures real-time response in key areas and real-time processing in idle areas.
Smart Images

Figure CN119603727B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile communication technology, and in particular to a method and system for edge resource allocation of surveillance video based on cloud-edge collaboration. Background Technology
[0002] Intelligent video surveillance plays a crucial role in security systems. Taking construction sites as an example, when workers inadvertently approach dangerous high-voltage equipment, intelligent video surveillance systems can respond quickly, issuing alarms or directly activating the equipment's shutdown mechanism, thus ensuring personnel safety. Currently, artificial intelligence models based on neural networks are one of the most efficient means of processing surveillance videos; however, these models often require substantial parameter support and computational power. Traditional intelligent monitoring methods typically transmit surveillance video to cloud servers for intelligent analysis, then return the analysis results to the monitoring terminal. This process causes significant delays and network congestion, rendering the intelligent processing of surveillance video incapable of real-time responsiveness and failing to effectively guarantee production safety. Intelligent processing of surveillance video through edge computing can improve the real-time performance of video transmission and reduce bandwidth consumption. However, traditional edge computing is limited by the computing power of edge devices and servers, and cannot support real-time video processing based on artificial intelligence.
[0003] Cloud-edge collaboration combines the advantages of cloud computing and edge computing. Cloud computing has abundant computing and storage resources, which can support the inference and training of artificial intelligence models, but its real-time performance is limited by various environments. Edge computing has fewer computing and storage resources, but deploying lightweight AI models at the edge can improve real-time performance and reduce network bandwidth usage. However, traditional cloud-edge collaboration frameworks do not fully consider the effective utilization of edge layer computing resources, and also ignore the collaborative task processing capabilities between edge nodes, resulting in a waste of computing resources and affecting the real-time response capability of intelligent processing. Summary of the Invention
[0004] This invention provides a cloud-edge collaborative method and system for allocating edge resources for surveillance videos. It addresses the technical problem that existing cloud-edge collaborative frameworks do not fully consider the effective utilization of computing resources for surveillance videos at the edge layer, and also neglect the collaborative task processing capabilities between edge nodes, thus wasting computing resources and affecting the real-time response capability of intelligent processing.
[0005] The first aspect of this invention provides a method for edge resource allocation of surveillance video based on cloud-edge collaboration, the method comprising:
[0006] A cloud-edge collaborative framework model is constructed, consisting of a cloud layer and an edge layer; the edge layer is divided into k monitoring areas, and each monitoring area is equipped with a corresponding edge node;
[0007] Obtain the security level of the monitored area and the status information of edge nodes in the edge layer;
[0008] Under the condition of satisfying the preset constraints, an optimization problem is established based on the security level of the monitoring area and the status information of the edge nodes, with the goal of minimizing the processing latency and bandwidth usage loss of the monitoring video task at the edge layer;
[0009] The optimization problem is transformed into a Markov decision problem. The Markov decision problem is solved by the DDPG algorithm in the cloud layer to generate the optimal task collaborative allocation strategy in the edge layer.
[0010] More specifically, the edge node status information includes a monitoring video processing task composed of local monitoring video tasks and edge monitoring video tasks, the percentage of computing power allocated to different tasks for each edge node, and the channel transmission rate; the step of establishing an optimization problem based on the security level of the monitoring area and the edge node status information, under the condition of satisfying preset constraints, with the goal of minimizing the processing latency and bandwidth usage loss of the edge layer monitoring video tasks, includes:
[0011] Based on local surveillance video tasks, a local computing model is established according to the percentage of computing power allocated to different tasks for each edge node;
[0012] Based on edge surveillance video tasks, a task offloading model is established according to the percentage of computing power allocated to different tasks for each edge node and the channel transmission rate.
[0013] Under the premise of satisfying the preset constraints, an optimization problem is established based on the security level of the monitoring area, the local computing model, and the task offloading model, with the goal of minimizing the processing latency and bandwidth usage loss of the monitoring video task at the edge layer.
[0014] More specifically, the step of transforming the optimization problem into a Markov decision problem, solving the Markov decision problem using the DDPG algorithm at the cloud layer, and generating the optimal task collaborative allocation strategy at the edge layer includes:
[0015] The optimization problem is transformed into a Markov decision problem, with the state space consisting of the percentage of computing power allocated to different tasks for each edge node, the average latency of the edge node in processing video frames, the channel transmission rate, and the security area level; the action space consisting of the percentage of tasks offloaded from each edge node to other edge nodes; and the reward function set according to minimizing the processing latency and bandwidth usage loss of the monitoring video tasks in the edge layer.
[0016] Based on the DDPG algorithm, a policy network and a value network are deployed in the cloud layer. The policy network learns a deterministic policy based on the state space and action space to output action values in a given state. The value network learns based on the reward function to evaluate the value in a given state and generate the optimal task collaborative allocation policy for the edge layer.
[0017] More specifically,
[0018] The process of establishing the local computing model is represented as follows:
[0019]
[0020] In the formula: This represents the computation latency of the i-th edge node in processing the local surveillance video task. This represents the total number of local video frames that the i-th edge node needs to process, where I represents the number of bytes of image data contained in each video frame. This indicates the amount of computation required to process each byte of image data. This represents the computing power of the i-th edge node. This represents the percentage of computing power used by the i-th edge node when processing local surveillance video tasks.
[0021] More specifically,
[0022] The process of establishing the task unloading model is represented as follows:
[0023]
[0024] In the formula: This represents the total latency per video frame when the j-th edge node transmits a video frame to the i-th edge node for task computation in time slot t. This represents the average computational latency for the i-th edge node to process the video frame sent by the j-th edge node in time slot t. This represents the transmission delay at which the j-th edge node transmits each video frame to the i-th edge node in time slot t;
[0025] in,
[0026]
[0027] In the formula: This represents the ratio of the amount of edge surveillance video tasks to be processed from the j-th edge node to the i-th edge node in time slot t to the current total task volume of the i-th edge node. This represents the total number of local surveillance video frames that the j-th edge node needs to process; This represents the percentage of computing power used when the i-th edge node collaboratively processes the monitoring video task transmitted by the j-th edge node in time slot t.
[0028] in,
[0029]
[0030] In the formula: This represents the total number of edge nodes in the edge layer. This represents the information transmission rate between the j-th edge node and the i-th edge node in time slot t.
[0031] More specifically,
[0032] The processing latency of the monitoring video task for each edge node in the edge layer is expressed as follows:
[0033]
[0034] In the formula: This represents the average latency for processing surveillance video tasks at the edge node i of time slot t.
[0035] More specifically,
[0036] The optimization problem is expressed as:
[0037]
[0038] In the formula: Let represent a binary variable, where This is used to indicate whether the i-th monitored area is a key area or an idle area in time slot t; This indicates the weight value of the surveillance video processing task for key areas. This indicates the weight value of the surveillance video processing task in the idle area; This indicates the proportion of video frame transmission bandwidth to the total channel bandwidth; This represents the ratio of the amount of tasks to be processed from the i-th edge node to the j-th edge node in time slot t to the current total amount of tasks at the i-th edge node.
[0039] The preset constraints specifically include:
[0040]
[0041] In the formula: C1 represents the constraint on the proportion of monitoring video task transmission performed by the edge node; C2 represents the constraint that the tasks allocated to the edge node cannot exceed its computing power; C3 represents the constraint on the real-time processing latency of the edge node for monitoring video tasks; C4 represents the constraint that the computing resources used by the edge layer for monitoring video task processing cannot exceed the total computing power of the edge layer.
[0042] A second aspect of the present invention also provides an edge resource allocation system for surveillance video based on cloud-edge collaboration, the system comprising:
[0043] The framework model building unit is used to build a cloud-edge collaborative framework model consisting of a cloud layer and an edge layer; the edge layer is divided into k monitoring areas, and each monitoring area is equipped with a corresponding edge node;
[0044] The acquisition unit is used to acquire the security level of the monitoring area at the edge layer and the status information of the edge nodes.
[0045] The optimization problem establishment unit is used to establish an optimization problem with the goal of minimizing the processing latency and bandwidth usage loss of the monitoring video task at the edge layer, based on the security level of the monitoring area and the status information of the edge nodes, under the condition of satisfying preset constraints.
[0046] The allocation strategy generation unit is used to transform the optimization problem into a Markov decision problem, solve the Markov decision problem using the DDPG algorithm at the cloud layer, and generate the optimal task collaborative allocation strategy at the edge layer.
[0047] A third aspect of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the edge resource allocation method for surveillance video as described above.
[0048] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the edge resource allocation method for surveillance video as described above.
[0049] As can be seen from the above technical solutions, the present invention has the following advantages:
[0050] This invention provides a method and system for edge resource allocation in surveillance video based on cloud-edge collaboration. The method includes: constructing a cloud-edge collaboration framework model consisting of a cloud layer and an edge layer; wherein the edge layer is divided into k monitoring areas, and each monitoring area is equipped with corresponding edge nodes; obtaining the security level of the monitoring areas and the status information of the edge nodes in the edge layer; under preset constraints, establishing an optimization problem based on the security level of the monitoring areas and the status information of the edge nodes, with the goal of minimizing the processing latency and bandwidth usage loss of surveillance video tasks in the edge layer; transforming the optimization problem into a Markov decision problem, and solving the Markov decision problem using the DDPG algorithm in the cloud layer to generate the optimal task collaboration allocation strategy for the edge layer.
[0051] In this invention, edge nodes of the edge layer are used to realize real-time intelligent inference of surveillance video. In order to effectively utilize the computing resources of the edge layer, a joint model is performed to address the complex environment of the monitoring area, combining the time-varying nature of the monitoring area with the latency and bandwidth usage of monitoring video task processing. An optimization problem is established with the goal of minimizing the latency and bandwidth usage loss of monitoring video task processing in the edge layer, and the optimization problem is transformed into a Markov decision problem. The Markov decision problem is solved through the cloud layer to realize non-real-time task processing such as edge resource allocation model training, thereby generating the optimal task collaborative allocation strategy of the edge layer. This allows the edge computing resources to be adjusted according to the location and number of key areas, while maintaining the real-time response processing of idle areas. This achieves the effective utilization of the computing resources of the edge layer, thus solving the technical problem that the existing cloud-edge collaborative framework does not fully consider the effective utilization of the computing resources of the edge layer for monitoring video, and also ignores the collaborative task processing capabilities between edge nodes, resulting in the waste of computing resources and affecting the real-time response capability of intelligent processing. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 A flowchart illustrating the steps of an edge resource allocation method for surveillance video based on cloud-edge collaboration, provided in an embodiment of the present invention;
[0054] Figure 2 This is an architecture diagram of the cloud-edge collaboration framework model provided in an embodiment of the present invention;
[0055] Figure 3 This is a structural block diagram of an edge resource allocation system for surveillance video based on cloud-edge collaboration, provided as an embodiment of the present invention. Detailed Implementation
[0056] This invention provides a cloud-edge collaborative method and system for allocating edge resources for surveillance videos. It addresses the technical problem that existing cloud-edge collaborative frameworks do not fully consider the effective utilization of computing resources for surveillance videos at the edge layer, and also neglect the collaborative task processing capabilities between edge nodes, thus wasting computing resources and affecting the real-time response capability of intelligent processing.
[0057] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0058] Please see Figure 1 The first aspect of this invention provides a method for edge resource allocation of surveillance video based on cloud-edge collaboration, the method comprising:
[0059] Step 101: Construct a cloud-edge collaborative framework model consisting of a cloud layer and an edge layer.
[0060] Please see Figure 2 The cloud-edge collaborative framework model comprises a cloud layer and an edge layer. The cloud server in the cloud layer handles non-real-time tasks, such as training intelligent models like video inference models and edge resource allocation models. The trained models are then transmitted to edge devices via the industrial core network. The edge layer, through the core network, transmits the state and policy sets observed from interactions with the environment, along with video training data, to the cloud layer. The edge layer is also primarily responsible for real-time processing of surveillance video and includes two types of nodes: management nodes and edge nodes. Management nodes allocate edge resources using the edge resource allocation model. Edge nodes are responsible for collecting and analyzing video data from cameras.
[0061] Step 102: Obtain the security level of the monitoring area and the status information of the edge nodes in the edge layer.
[0062] Based on the time-varying nature of the complex environment in the edge layer monitoring area, the monitoring area is pre-divided into "key" areas and "idle" areas according to the density of personnel. Subsequently, the cooperation mode between edge nodes is adjusted according to the complexity of different monitoring areas, so that edge computing resources are adjusted according to the location and number of "key" areas, while maintaining the real-time processing of "idle" areas. In other words, when the computing power of the edge nodes in the "key" area is insufficient to meet the real-time requirements, the part of the video that the edge nodes in the "key" area cannot process in time can be transmitted to the edge nodes in the "idle" area through industrial Ethernet, thereby avoiding the waste of computing resources and improving the real-time response and processing capabilities of the edge nodes.
[0063] Assume there are k monitoring areas in the edge layer, each monitored and processed by an edge node. Therefore, the total number of edge nodes in the edge layer is also k. Each monitoring area will generate corresponding monitoring video tasks that need to be processed by the edge node. That is, each monitoring area will have corresponding local monitoring video tasks and edge monitoring video tasks. For example, the monitoring video analysis task generated by the i-th monitoring area in time slot t can be divided into two parts. The first part is processed by the local edge node (i.e., the local monitoring video task). When the local edge node's computing power is insufficient, the remaining part (i.e., the edge monitoring video task) will be processed collaboratively by other edge nodes.
[0064] Then, in the monitoring video task transmission matrix at the edge layer of time slot t... It can be represented as:
[0065]
[0066] In the formula: It is expressed as the ratio (percentage) of the amount of tasks to be processed from the i-th edge node to the j-th edge node in time slot t to the current total amount of tasks at the i-th edge node.
[0067] It should be noted that binary variables are used in this invention. This indicates the different security levels of the monitored area, that is, whether the i-th area is a key area or an idle area in time slot t. This indicates that the i-th region is the key region. This indicates that the i-th region in time slot t is an idle region. It is important to note that... The time variable refers to the fact that the i-th region may switch between a key area and an idle area in different time slots due to uncontrollable factors, such as a sudden gathering of people or changes in engineering tasks.
[0068] It is understandable that the edge node status information includes the monitoring video processing task, which consists of local monitoring video tasks and edge monitoring video tasks, and the percentage of computing power allocated to different tasks for each edge node. and channel transmission rate .
[0069] Specifically, the distribution matrix can be defined for calculation. The ratio (computing power percentage) allocated to each edge node for video analytics tasks to the node's total computing power is represented as follows:
[0070]
[0071] In the formula: This represents the percentage of computing power used by the i-th edge node when processing local surveillance video tasks. This represents the percentage of computing power used by the i-th edge node when collaboratively processing the edge surveillance video task transmitted by the j-th edge node.
[0072] Meanwhile, the information transmission methods between edge nodes can include wireless transmission and wired transmission. Therefore, the transmission rate dynamically changes with different time slots t under different transmission methods without loss of generality. Thus, the transmission rate matrix can be written. for:
[0073]
[0074] Step 103: Under the condition of satisfying the preset constraints, establish an optimization problem with the goal of minimizing the processing latency and bandwidth usage loss of the monitoring video task at the edge layer, based on the security level of the monitoring area and the status information of the edge nodes.
[0075] Specifically, this step includes the following sub-steps:
[0076] Sub-step 1031: Based on the local monitoring video task, establish a local computing model according to the percentage of computing power allocated to different tasks for each edge node.
[0077] The process of establishing the local computing model is represented as follows:
[0078]
[0079] In the formula: This represents the computation latency of the i-th edge node in processing the local surveillance video task. This represents the total number of local surveillance video frames that the i-th edge node needs to process, where I represents the number of bytes of image data contained in each video frame. This indicates the amount of computation required to process each byte of image data. This represents the computing power of the i-th edge node. This represents the percentage of computing power used by the i-th edge node when processing local surveillance video tasks.
[0080] Sub-step 1032: Based on the edge monitoring video task, establish a task offloading model according to the percentage of computing power allocated to different tasks for each edge node and the channel transmission rate.
[0081] It should be noted that when transmitting video frames to other nodes for intelligent inference, not only network transmission latency and computation latency must be considered, but also the computational tasks of the load node itself. Regardless of whether there are people in the area monitored by the load node, the node needs to perform computational processing on the local monitoring video and the edge monitoring video offloaded from other nodes.
[0082] Therefore, when processing video frames sent by other nodes, edge nodes must first process the video frames that need to be analyzed, and cross-process the local monitoring video frames with other video frames in a certain proportion. This can ensure the real-time processing of both local and unloaded video.
[0083] use Let j represent the total number of surveillance video frames that the j-th edge node needs to process. Then, we can calculate the average computation latency for the i-th edge node to process the video frames sent by the j-th edge node. for:
[0084]
[0085] In the formula: This represents the ratio of the amount of edge surveillance video tasks to be processed from the j-th edge node to the ith edge node in time slot t to the current total task volume of the ith edge node.
[0086] As shown above, the transmission delay for the j-th edge node to transmit each video frame to the i-th edge node in time slot t is... It can be represented as:
[0087]
[0088] In the formula: This represents the information transmission rate between the j-th edge node and the i-th edge node in time slot t.
[0089] So, in time slot t, when the j-th edge node transmits a video frame to the i-th edge node for computation, what is the total latency generated per video frame? for:
[0090]
[0091] For edge node j, when its own computing power cannot meet the real-time requirements of local video analysis, a portion of the video in its monitored area is analyzed and processed locally, while the remaining portion needs to be transmitted to other edge nodes for processing.
[0092] Therefore, each edge node needs to process local monitoring video frames and monitoring video frames transmitted from other nodes. The average latency for edge node i to process video frames in time slot t is:
[0093]
[0094] Therefore, for the entire edge layer, the total delay state can be expressed as:
[0095]
[0096] Sub-step 1033: Under the condition of satisfying the preset constraints, establish an optimization problem with the goal of minimizing the processing latency and bandwidth usage loss of the monitoring video task at the edge layer, based on the security level of the monitoring area, the local calculation model and the task offloading model.
[0097] This invention coordinates the real-time processing of surveillance video from "key" and "idle" areas across various edge nodes. For "key" areas, ensuring the real-time processing of surveillance video is paramount to guarantee personnel safety. Therefore, edge layer resources can be prioritized for analysis and processing of surveillance video in these areas based on edge node status and network environment. Simultaneously, a certain level of real-time processing must also be maintained for surveillance video from "idle" areas to ensure these areas can respond to emergencies.
[0098] Considering the limited computing power of the edge layer, in order to achieve lower computational latency, processing weights are assigned to the latency of surveillance video tasks in "key" and "idle" areas, with higher weights assigned to video processing tasks in key areas. Set lower weights for video processing tasks in the "idle" area. .in, This represents the maximum latency limit for processing a single video task in the i-th region when the i-th region is a key region; This represents the maximum latency limit for processing a single video task in the i-th region when the region is idle. Furthermore, to conserve communication resources, it is also necessary to minimize the number of video frames transmitted.
[0099] Therefore, in time slot t, the resource allocation problem for edge nodes can be described as an optimization problem that jointly minimizes latency and bandwidth usage loss, as follows:
[0100]
[0101] In the formula: This indicates the proportion of video frame transmission bandwidth to the total channel bandwidth;
[0102] The preset constraints specifically include:
[0103]
[0104] In the formula: C1 represents the constraint on the proportion of monitoring video task transmission performed by the edge node; C2 represents the constraint that the tasks allocated to the edge node cannot exceed its computing power; C3 represents the constraint on the real-time processing latency of the edge node for monitoring video tasks; C4 represents the constraint that the computing resources used by the edge layer for monitoring video task processing cannot exceed the total computing power of the edge layer.
[0105] Step 104: The optimization problem is transformed into a Markov decision problem. The Markov decision problem is solved by using the DDPG algorithm in the cloud layer to generate the optimal task collaborative allocation strategy in the edge layer.
[0106] Understandably, edge nodes need to determine the percentage of tasks to be offloaded based on their own computing power, channel transmission rate, security zone level, and other status information, while minimizing task processing latency and communication resource loss, thereby achieving optimal edge resource scheduling and allocation.
[0107] This step specifically includes the following sub-steps:
[0108] Sub-step 1041 transforms the optimization problem into a Markov decision problem (MDP problem), with the state space consisting of the percentage of computing power allocated to different tasks by each edge node, the average latency of edge nodes processing video frames, the channel transmission rate, and the security area level; the action space consisting of the percentage of tasks offloaded from each edge node to other edge nodes; and the reward function set according to minimizing the processing latency and bandwidth usage loss of the monitoring video tasks in the edge layer.
[0109] It should be noted that the offloading of surveillance video tasks by edge nodes affects the environmental state, and the total overhead of the framework model is determined by the current state of the framework model and the joint actions of all edge nodes. Furthermore, the previous state and action of the framework model transform the environmental state into a new state.
[0110] In this case, the optimization problem can be transformed into a multi-agent Markov decision process. S is the set of all states, A is the action space, and P represents the state transition probability. This is the current reward. This represents the discount factor.
[0111] 1): State Space For the given cloud-edge collaborative framework model, the state space of each time slot is determined by the percentage of computing power allocated to different tasks by each edge node. Average latency of edge nodes processing video frames Channel transmission rate and security zone level Composition, that is
[0112] 2) Action Space The action space is the percentage of tasks that each edge node unloads to other nodes, so... .
[0113] 3) Reward function Reward function To solve the above optimization problem, and to minimize the total latency and bandwidth loss under certain constraints, we can obtain:
[0114]
[0115] If the constraints are not satisfied, then .
[0116] Sub-step 1042 involves deploying a policy network and a value network in the cloud layer based on the DDPG algorithm. The policy network learns a deterministic policy based on the state space and action space to output action values in a given state. The value network learns based on the reward function to evaluate the value in a given state and generate the optimal task collaborative allocation policy for the edge layer.
[0117] To address the aforementioned MDP problem, considering the high-dimensional continuous action space of the task unloading optimization problem, the Deep Deterministic Policy Gradient Algorithm (DDPG algorithm) is adopted. In the cloud layer, a policy network, a value network, a target policy network, a target value network, and an experience revisit cache are deployed on a cloud server.
[0118] On the cloud server, through the Actor-Critic architecture, the policy network learns a deterministic policy based on the state-policy set formed by the state space and action space transmitted from the edge layer. That is, it outputs the action value in a given state and transmits the action value to the edge layer through the core network. The value network is responsible for learning the value function and evaluating the value of the current state.
[0119] To address the issues of sample correlation and stability, the edge layer transmits experience data obtained from interactions with the environment to the cloud server. The cloud server stores this data in an experience replay cache and then randomly samples it for edge resource allocation model training. Furthermore, the DDPG algorithm employs a target policy network and a target value network to improve learning stability. After each iteration, the algorithm's cache space is updated based on the optimal strategy and cache update mechanism, thereby generating an optimal task collaborative allocation strategy. This achieves the optimal percentage of tasks offloaded from each edge node to other nodes, minimizing latency and bandwidth loss. Edge computing resources are adjusted according to the location and number of key areas while maintaining real-time response processing in idle areas. This enables effective utilization of edge layer computing resources in complex monitoring environments and improves the collaborative task processing capabilities among edge nodes.
[0120] Please see Figure 3 The second aspect of the present invention also provides an edge resource allocation system for surveillance video based on cloud-edge collaboration, the system comprising:
[0121] The framework model building unit 201 is used to build a cloud-edge collaborative framework model consisting of a cloud layer and an edge layer; wherein, the edge layer is divided into k monitoring areas, and each monitoring area is equipped with a corresponding edge node;
[0122] Acquisition unit 202 is used to acquire the security level of the monitoring area of the edge layer and the status information of the edge nodes;
[0123] The optimization problem establishment unit 203 is used to establish an optimization problem with the goal of minimizing the processing latency and bandwidth usage loss of the monitoring video task at the edge layer, based on the security level of the monitoring area and the status information of the edge nodes, under the condition of satisfying preset constraints.
[0124] The allocation strategy generation unit 204 is used to transform the optimization problem into a Markov decision problem, and solve the Markov decision problem by using the DDPG algorithm in the cloud layer to generate the optimal task collaborative allocation strategy in the edge layer.
[0125] A third aspect of the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above-mentioned edge resource allocation methods for surveillance video.
[0126] A fourth aspect of the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above-described edge resource allocation methods for surveillance video.
[0127] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0128] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0129] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0130] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0131] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0132] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for edge resource allocation of surveillance video based on cloud-edge collaboration, characterized in that, The method includes: A cloud-edge collaborative framework model is constructed, consisting of a cloud layer and an edge layer; the edge layer is divided into k monitoring areas, and each monitoring area is equipped with a corresponding edge node; Obtain the security level of the monitored area and the status information of edge nodes in the edge layer; Under the condition of satisfying the preset constraints, an optimization problem is established based on the security level of the monitoring area and the status information of the edge nodes, with the goal of minimizing the processing latency and bandwidth usage loss of the monitoring video task at the edge layer; The optimization problem is transformed into a Markov decision problem, and the Markov decision problem is solved by the DDPG algorithm in the cloud layer to generate the optimal task collaborative allocation strategy in the edge layer. The edge node status information includes local monitoring video tasks and edge monitoring video tasks; monitoring video processing tasks, the percentage of computing power allocated to different tasks for each edge node, and the channel transmission rate; the steps of establishing an optimization problem with the goal of minimizing the processing latency and bandwidth usage loss of edge layer monitoring video tasks based on the security level of the monitoring area and the edge node status information under preset constraints include: Based on local surveillance video tasks, a local computing model is established according to the percentage of computing power allocated to different tasks for each edge node; Based on edge surveillance video tasks, a task offloading model is established according to the percentage of computing power allocated to different tasks for each edge node and the channel transmission rate. Under the premise of satisfying the preset constraints, an optimization problem is established based on the security level of the monitoring area, the local computing model, and the task offloading model, with the goal of minimizing the processing latency and bandwidth usage loss of the monitoring video task at the edge layer.
2. The edge resource allocation method for surveillance video according to claim 1, characterized in that, The steps of transforming the optimization problem into a Markov decision problem, solving the Markov decision problem using the DDPG algorithm at the cloud layer, and generating the optimal task collaborative allocation strategy at the edge layer include: The optimization problem is transformed into a Markov decision problem, with the state space consisting of the percentage of computing power allocated to different tasks for each edge node, the average latency of the edge node in processing video frames, the channel transmission rate, and the security area level; the action space consisting of the percentage of tasks offloaded from each edge node to other edge nodes; and the reward function set according to minimizing the processing latency and bandwidth usage loss of the monitoring video tasks in the edge layer. Based on the DDPG algorithm, a policy network and a value network are deployed in the cloud layer. The policy network learns a deterministic policy based on the state space and action space to output action values in a given state. The value network learns based on the reward function to evaluate the value in a given state and generate the optimal task collaborative allocation policy for the edge layer.
3. The edge resource allocation method for surveillance video according to claim 1, characterized in that, The process of establishing the local computing model is represented as follows: ; In the formula: This represents the computation latency for processing the local surveillance video task at the i-th edge node in time slot t. This represents the total number of local video frames that the i-th edge node needs to process, where I represents the number of bytes of image data contained in each video frame. This indicates the amount of computation required to process each byte of image data. This represents the computing power of the i-th edge node. This represents the percentage of computing power used when the i-th edge node in time slot t processes local surveillance video tasks.
4. The edge resource allocation method for surveillance video according to claim 3, characterized in that, The process of establishing the task unloading model is represented as follows: ; In the formula: This represents the total latency per video frame when the j-th edge node transmits a video frame to the i-th edge node for task computation in time slot t. This represents the average computational latency for the i-th edge node to process the video frame sent by the j-th edge node in time slot t. This represents the transmission delay at which the j-th edge node transmits each video frame to the i-th edge node in time slot t; in, ; In the formula: This represents the ratio of the amount of edge surveillance video tasks to be processed from the j-th edge node to the i-th edge node in time slot t to the current total task volume of the i-th edge node. This represents the total number of local surveillance video frames that the j-th edge node needs to process; This represents the percentage of computing power used when the i-th edge node collaboratively processes the monitoring video task transmitted by the j-th edge node in time slot t. in, ; In the formula: This represents the total number of edge nodes in the edge layer. This represents the information transmission rate between the j-th edge node and the i-th edge node in time slot t.
5. The edge resource allocation method for surveillance video according to claim 4, characterized in that, The processing latency of the monitoring video task for each edge node in the edge layer is expressed as follows: ; In the formula: This represents the average latency for processing surveillance video tasks at the edge node i of time slot t.
6. The edge resource allocation method for surveillance video according to claim 5, characterized in that, The optimization problem is expressed as: ; In the formula: Let represent a binary variable, where This is used to indicate whether the i-th monitored area is a key area or an idle area in time slot t; This indicates the weight value of the surveillance video processing task for key areas. This indicates the weight value of the surveillance video processing task in the idle area; This indicates the proportion of video frame transmission bandwidth to the total channel bandwidth; This represents the ratio of the amount of tasks to be processed from the i-th edge node to the j-th edge node in time slot t to the current total amount of tasks at the i-th edge node. The preset constraints specifically include: ; In the formula: C1 represents the constraint on the proportion of monitoring video task transmission performed by the edge node; C2 represents the constraint that the tasks allocated to the edge node cannot exceed its computing power; C3 represents the constraint on the real-time processing latency of the edge node for monitoring video tasks; C4 represents the constraint that the computing resources used by the edge layer for monitoring video task processing cannot exceed the total computing power of the edge layer.
7. An edge resource allocation system for surveillance video based on cloud-edge collaboration, characterized in that, The system includes: The framework model building unit is used to build a cloud-edge collaborative framework model consisting of a cloud layer and an edge layer; the edge layer is divided into k monitoring areas, and each monitoring area is equipped with a corresponding edge node; The acquisition unit is used to acquire the security level of the monitoring area at the edge layer and the status information of the edge nodes. The optimization problem establishment unit is used to establish an optimization problem with the goal of minimizing the processing latency and bandwidth usage loss of the monitoring video task at the edge layer, based on the security level of the monitoring area and the status information of the edge nodes, under the condition of satisfying preset constraints. The allocation strategy generation unit is used to transform the optimization problem into a Markov decision problem, solve the Markov decision problem using the DDPG algorithm in the cloud layer, and generate the optimal task collaborative allocation strategy in the edge layer. The edge node status information includes local monitoring video tasks and edge monitoring video tasks; monitoring video processing tasks; the percentage of computing power allocated to different tasks for each edge node; and channel transmission rate. The optimization problem establishment unit is specifically used for, Based on local surveillance video tasks, a local computing model is established according to the percentage of computing power allocated to different tasks for each edge node; Based on edge surveillance video tasks, a task offloading model is established according to the percentage of computing power allocated to different tasks for each edge node and the channel transmission rate. Under the premise of satisfying the preset constraints, an optimization problem is established based on the security level of the monitoring area, the local computing model, and the task offloading model, with the goal of minimizing the processing latency and bandwidth usage loss of the monitoring video task at the edge layer.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the edge resource allocation method for surveillance video as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the edge resource allocation method for surveillance video as described in any one of claims 1-6.
Citation Information
Patent Citations
Calculation task unloading method and device with optimized time delay under cloud edge cooperation
CN112996056A
Satellite-ground collaborative edge network resource allocation method based on depth deterministic strategy gradient
CN119109504A