Traffic optimization system and method for cloud-edge collaborative mobile target detection task based on adaptive coding

By employing an adaptive coding strategy that works collaboratively at the edge and in the cloud, prioritizing high-quality encoding of regions of interest, the problem of video quality and target detection accuracy in bandwidth-constrained environments is solved, achieving efficient mobile target detection and resource conservation.

CN120017839BActive Publication Date: 2026-04-28NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING UNIV
Filing Date
2025-01-14
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In environments with limited bandwidth, high network latency, and frequent network fluctuations, existing video coding methods struggle to distinguish between critical and non-critical regions, leading to a decline in video quality and target detection accuracy. Furthermore, deep learning-based methods have high computational complexity, making it difficult to meet real-time requirements.

Method used

An adaptive coding strategy is adopted, which works collaboratively at the edge and in the cloud. Through video frame acquisition, network status awareness, foreground detection, region of interest integration, and quantization parameter adjustment, high-quality coding is prioritized for regions of interest, while low-quality coding is performed for regions of non-interest. The coding parameters are dynamically adjusted based on historical inference results and real-time network status.

Benefits of technology

It improves the accuracy and real-time performance of moving target detection, reduces data traffic, lowers the computational burden, enhances the system's adaptability in complex network environments, and saves resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017839B_ABST
    Figure CN120017839B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on adaptive coding's cloud edge collaborative mobile target detection task's traffic optimization system and method, comprising: video frame acquisition;Metric network state;Foreground detection identifies region of interest;Collect historical inference result to obtain current data packet region of interest;Region of interest integration;According to video frame content complexity, region of interest content complexity and current network state, calculate global quantization parameter and region of interest quantization parameter offset;Encoding and transmission are carried out to data packet.The application can effectively maintain the quality of target area while reducing cloud edge collaborative traffic, thereby improving the accuracy of target detection.In addition, the method of the application effectively reduces the computational burden, and provides higher performance in real-time video processing scenarios such as edge computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of edge computing real-time video stream analysis, specifically relating to a traffic optimization system and method for cloud-edge collaborative moving target detection tasks based on adaptive coding. Background Technology

[0002] With the rapid development of the Internet of Things (IoT), video surveillance, and edge computing, real-time video transmission plays a crucial role in key areas such as autonomous driving, security monitoring, and telemedicine. In moving target detection tasks, such as identifying pedestrians and vehicles in dynamic traffic scenes or analyzing abnormal activity in security scenarios, real-time transmitted video data needs to balance high quality and low latency to ensure the accuracy of detection results and the real-time response of the system. However, in environments with limited bandwidth, high network latency, and frequent network fluctuations, real-time video transmission faces challenges such as high latency, low video quality, and high packet loss rates, directly impacting the accuracy of target detection and the real-time response capability of the system.

[0003] Against this backdrop, optimizing real-time video traffic, reducing network transmission burden, and ensuring the accuracy and timeliness of moving target detection have become urgent problems to be solved. Video coding technology, as a core means of solving traffic optimization problems, especially adaptive coding strategies for bandwidth-constrained environments, has received considerable attention in recent years. However, current mainstream video coding methods still have the following significant limitations:

[0004] (1) Traditional video coding methods (such as H.264, H.265, and AV1) reduce transmission traffic by dynamically adjusting the quantization parameters (QP) of video frames and changing the compression ratio when network bandwidth fluctuates. Traditional methods are based on a global QP adjustment mechanism, which applies a consistent quantization standard to all regions of the image frame. Although this approach can effectively reduce bandwidth usage, it fails to distinguish the priority of critical and non-critical regions, which may lead to over-compression of key details in the video, such as license plates, faces, and pedestrians, thus affecting the accuracy of subsequent object detection.

[0005] (2) Deep learning-based video coding methods utilize deep learning models such as convolutional neural networks to model the semantic features of video content, identify regions of interest, and encode them with high quality, while using low-quality compression for other regions. This method has high computational complexity and requires running deep learning models on edge devices, which places high demands on the computing power and memory capacity of these devices. However, edge devices are usually resource-constrained, and running deep learning models will significantly increase the device's computational latency and energy consumption, making it difficult to meet the real-time requirements of scenarios such as autonomous driving and security monitoring. Summary of the Invention

[0006] To address the shortcomings of the existing technologies, the present invention aims to provide a traffic optimization system and method for cloud-edge collaborative moving target detection tasks based on adaptive coding. This invention effectively maintains the quality of the moving target region while reducing cloud-edge collaborative traffic, thereby improving the accuracy of target detection. Furthermore, by reducing the coding quality of the background region, the method of this invention effectively alleviates the computational burden, providing higher performance in real-time video processing scenarios such as edge computing.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0008] This invention discloses a traffic optimization system for cloud-edge collaborative moving target detection based on adaptive coding, applicable to both the edge and cloud environments. The edge system includes: a video frame acquisition module, a network status awareness module, a historical data packet inference result collection module, a foreground detection module, a region of interest integration module, a quantization parameter adjustment module, and an encoding module; the cloud system includes a moving target detection module.

[0009] The video frame acquisition module is used to acquire continuous frame data from a real-time video stream, and to process the acquired data in batches of a size of [missing value]. The video frames are packaged into a single data packet;

[0010] The network status awareness module is used to monitor network bandwidth in real time. Network latency and packet loss rate Measure the current network state ;

[0011] The historical data packet inference result collection module is used to obtain the inference results of historical data packets from the cloud. And based on the motion vectors of historical targets, the inference results are analyzed. Perform calibration to obtain the region of interest set for each frame of the current data packet. ;

[0012] The foreground detection module is used to perform foreground detection on the acquired video frames, separate foreground information, and identify dynamically changing regions of interest. ;

[0013] The region of interest integration module is used to integrate all regions of interest sets. and The data was consolidated and divided into sets. and set ;

[0014] The quantization parameter adjustment module is used to calculate the complexity of video frame content. and sets and Content complexity of each region of interest Based on the current network status Calculate the global quantization parameters for video coding and the quantization parameter offset of the region of interest ;

[0015] The encoding module is used to quantize non-interest regions in the video using global quantization parameters. Perform low-quality encoding, and use the region of interest as... Perform high-quality coding;

[0016] The moving target detection module is used to detect moving targets in the data transmitted from the edge, package the detection results into data packets, and send the inference results of historical data packets to the edge.

[0017] The present invention provides a traffic optimization method for cloud-edge collaborative moving target detection tasks based on adaptive coding. Based on the aforementioned system, the steps are as follows:

[0018] 1) Acquire continuous frame data from the real-time video stream, and set the batch size of the acquired data to be [size missing]. The video frames are packaged into a single data packet;

[0019] 2) Real-time monitoring of network bandwidth Network latency and packet loss rate Measure the current network state ;

[0020] 3) Perform foreground detection on the video frames from step 1) to separate foreground information in order to identify dynamically changing regions of interest. ;

[0021] 4) Inference results obtained from historical data packets in the cloud Based on the motion vectors of historical targets, the inference results Calibration yields the set of regions of interest for each frame of the current data packet. ;

[0022] 5) Set of all regions of interest and The data was integrated and divided into sets. and set ;

[0023] 6) Calculate the content complexity of video frames. and sets and Content complexity of each region of interest Based on the current network status Calculate the global quantization parameters for video coding and the quantization parameter offset of the region of interest ;

[0024] 7) Apply global quantization parameters to non-interesting regions in the video. Perform low-quality encoding on the set and Each region of interest in Perform high-quality encoding and transmit the encoded video stream to the cloud.

[0025] Furthermore, step 1) specifically includes: acquiring continuous frame data from the real-time video stream. And store it in a buffer; set a fixed batch size. When collected When processing one video frame, the batch size will be [size missing]. The video frames are packaged into a single data packet.

[0026] Further, step 2) specifically includes:

[0027] 21) Real-time monitoring of network bandwidth Network latency and packet loss rate ;

[0028] 22) Based on network bandwidth Network latency and packet loss rate Perform network state measurement, represented as , ,in , These are weighting coefficients used to adjust the degree of influence of each indicator on the network state.

[0029] Furthermore, step 3) specifically includes:

[0030] 31) Model the video background to obtain the background model. , used to indicate at a given time Next pixel probability distribution belonging to the background , ,in Let be the conditional probability, representing the probability given background parameters. Below, pixels The probability of belonging to the background;

[0031] 32) Pixels in each video frame With background model Compare and determine pixels Does it belong to the background? If the background model closely matches the current pixel value, then the pixel belongs to the background. , Indicates the background region in the current frame; if If the background model has a low fit to the current pixel value, then the pixel does not belong to the background. , The current foreground region is represented; the fit between pixels and the background model is measured by significance. To indicate: ,in It is a metric function used to measure pixels. With background model The difference between them, when Greater than the preset threshold hour, It was judged as a prospect; ;

[0032] 33) Regarding the current foreground area Noise points are removed using dilation, and gaps in the foreground region are filled using erosion. The foreground region after dilation is... The foreground area after the etching operation is ,in , , The structuring element determines the shape and size of the dilation and erosion operations; contour extraction is performed on the foreground image after dilation and erosion to obtain the boundary of the foreground region, represented as... ,in ,in This is a contour extraction function used to extract region boundaries; after contour extraction, the boundaries are then analyzed. The system filters and selects valid target regions that meet certain criteria as the set of regions of interest. , ,in These are the criteria used to filter valid target regions, where , This indicates the first result obtained through foreground detection. The set of regions of interest in a frame;

[0033] 34) Update the background model to adapt to changes in lighting and slow object movement; the background model update expression is: ,in For the update function, based on pixels Background model parameters Update.

[0034] Further, step 4) specifically includes:

[0035] 41) Obtain the inference results of historical data packets inferred by the object detection model in the cloud. , Batch size is The inference results for each frame, the inference results for each frame. The expression is as follows:

[0036] ;

[0037] in, , indicating the first in the data packet frame, For the first Number of regions of interest in a frame; This represents the set of all regions of interest (ROIs) in a frame, where each ROI includes the coordinates of its top-left corner bounding box. Width of the region of interest ,high and confidence level ;

[0038] 42) Setting the first The first frame bounding boxes In the In frame The location has changed, from Move to The motion vector is , ,in ;

[0039] 43) Based on the motion vector and time offset, the bounding boxes in each historical frame are offset to align the inference results in the historical data packets to the current data packet to be encoded; the offset of each bounding box is calculated as follows:

[0040] For the first in the historical data packet The first frame bounding boxes The current frame bounding box after offset Adjust using the following formula: ,in In the obtained reasoning result, the first The first frame The coordinates of the top left corner of the bounding box. For the first The first frame The motion vectors of the bounding box have x and y axis components. This is the time offset, representing the difference between the frame's time and the current time. The first The width and height of each bounding box. This refers to the attenuation rate; for historical data packets... The region of interest (ROI) of a frame, and the set of ROIs after offset, are represented as follows: , ,in Indicates the first The set of regions of interest in a frame. , For the first The number of regions of interest in a frame.

[0041] Furthermore, step 5) specifically includes:

[0042] 51) The set of regions of interest obtained from the foreground detection in step 3). and the set of regions of interest obtained in step 4) based on the historical reasoning results. The union of the two is considered as the candidate region, and all candidate regions are integrated and divided; specifically: the first region obtained from foreground detection... The set of bounding boxes of the frame is The historical inference results were obtained after motion vector calibration. The set of frame bounding boxes is ,in This indicates the number of foreground bounding boxes in the current frame. The number of bounding boxes representing the results of historical inference; each bounding box consists of one The feature vector is composed of 3D features. The 3D feature vector includes the coordinates of the top-left corner of the bounding box. Width of the bounding box and height and confidence level ;

[0043] 52) Calculate the intersection-union ratio (IoU) of the bounding boxes for each pair of bounding boxes obtained from foreground detection. Bounding boxes obtained from historical data packets Calculate their IoU values ​​to determine the degree of overlap, where ;

[0044] 53) Set an IoU threshold. When the IoU value is greater than the IoU threshold, and The detection results are for the same target. and To merge, represented as Add to the set of regions of interest Among them For the counting sequence number, , , This is a region merging function, including taking the intersection and union of two regions; when the IoU value is less than the IoU threshold, and These are detection results for different targets; skip the current match; wait for each pair... and After all comparisons are completed, and Not added to the set Add the region of interest to the set middle.

[0045] Furthermore, step 6) specifically includes:

[0046] 61) Calculate the content complexity of video frames. , of which The formula for calculating the content complexity of a video frame is as follows: , For data packets No. Frame video frame; The content complexity calculation function uses a texture complexity metric or pixel change rate based on discrete cosine transform; the batch size is... The video frame content complexity is , ;

[0047] 62) Based on the current network status and the complexity of video frame content Calculate and obtain global quantization parameters , ,in This represents a multivariate regression function, fitted using linear regression or neural network regression models;

[0048] 63) Calculate the set of regions of interest. and Content complexity , ,in For batch size, , For set The Middle Number of regions of interest in a frame For set The Middle Number of regions of interest in a frame Used to calculate the content complexity of the region of interest. for In the collection The corresponding image region; based on the set of regions of interest. and Content complexity and the complexity of video frame content Calculate the quantization parameter offset of the region of interest. , The change in motion of the target within the region of interest; Given a multivariate mapping function, a weighted linear model or a neural network model can be used. The implementation of the weighted linear model is as follows:

[0049] ;

[0050] in, As weight, This is the offset. The indicator function takes a value of 1 when the condition is true and 0 otherwise. This represents the confidence level for the region.

[0051] Furthermore, in step 7), the multimedia API is used to globally quantize non-interest areas in the video. Perform low-quality encoding, and use the region of interest as... Perform high-quality coding.

[0052] The beneficial effects of this invention are:

[0053] 1. This invention improves the accuracy and real-time performance of target detection under bandwidth-constrained conditions. Through an adaptive coding strategy, it prioritizes high-quality coding with low quantization parameters for regions of interest, effectively ensuring the accuracy of target detection in key regions. At the same time, it reduces the coding quality for regions of non-interest, thereby reducing the overall amount of coded data and ensuring real-time performance and detection effectiveness under limited bandwidth.

[0054] 2. The dynamic adaptive mechanism of this invention enhances the robustness and flexibility of the system. It adjusts the coding parameters by utilizing real-time bandwidth and network conditions, and dynamically optimizes the coding strategy by combining foreground detection and historical inference results. This enables the system to flexibly cope with network fluctuations and improves its adaptability to complex network environments.

[0055] 3. This invention optimizes the collaborative traffic between the cloud and edge in mobile target detection tasks, effectively reducing data transmission traffic and saving system resources; it can flexibly adjust the encoding strategy under different network environments. High-quantization parameter encoding is used for non-interest areas, significantly reducing video encoding and transmission data traffic while ensuring target detection accuracy. This alleviates the processing pressure on the edge computing end and the cloud, saving valuable computing and communication resources for applications such as video surveillance and intelligent transportation. Attached Figure Description

[0056] Figure 1 This is a schematic diagram of the system of the present invention.

[0057] Figure 2 This is a flowchart of the method of the present invention.

[0058] Figure 3 This is a schematic diagram of the method of the present invention. Detailed Implementation

[0059] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to embodiments and accompanying drawings. The content mentioned in the embodiments is not intended to limit the present invention.

[0060] Reference Figure 1 As shown, the present invention discloses a traffic optimization system for cloud-edge collaborative moving target detection based on adaptive coding, which is applied in both the edge and cloud environments. The edge environment includes: a video frame acquisition module, a network status awareness module, a historical data packet inference result collection module, a foreground detection module, a region of interest integration module, a quantization parameter adjustment module, and an encoding module; the cloud environment includes a moving target detection module.

[0061] The video frame acquisition module is used to acquire continuous frame data from a real-time video stream, and to process the acquired data in batches of a size of [missing value]. The video frames are packaged into a single data packet;

[0062] The network status awareness module is used to monitor network bandwidth in real time. Network latency and packet loss rate Measure the current network state ;

[0063] The historical data packet inference result collection module is used to obtain the inference results of historical data packets from the cloud. And based on the motion vectors of historical targets, the inference results are analyzed. Perform calibration to obtain the region of interest set for each frame of the current data packet. ;

[0064] The foreground detection module is used to perform foreground detection on the acquired video frames, separate foreground information, and identify dynamically changing regions of interest. ;

[0065] The region of interest integration module is used to integrate all regions of interest sets. and The data was consolidated and divided into sets. and set ;

[0066] The quantization parameter adjustment module is used to calculate the complexity of video frame content. and sets and Content complexity of each region of interest Based on the current network status Calculate the global quantization parameters for video coding and the quantization parameter offset of the region of interest ;

[0067] The encoding module is used to quantize non-interest regions in the video using global quantization parameters. Perform low-quality encoding, and use the region of interest as... Perform high-quality coding;

[0068] The moving target detection module is used to perform moving target detection on the data transmitted from the edge using a deep learning-based target detection algorithm, package the detection results into data packets, and send the inference results of historical data packets to the edge.

[0069] Reference Figure 2 , Figure 3 As shown, the present invention provides a traffic optimization method for cloud-edge collaborative moving target detection based on adaptive coding. Based on the above system, the steps are as follows:

[0070] 1) Acquire continuous frame data from the real-time video stream, and set the batch size of the acquired data to be [size missing]. The video frames are packaged into a single data packet; specifically, this includes: acquiring continuous frame data from the real-time video stream. And store it in a buffer; set a fixed batch size. When collected When processing one video frame, the batch size will be [size missing]. The video frames are packaged into a data packet, which is used as input for foreground detection in step 3) to reduce the collaborative traffic between the cloud and the edge. The video frames in each batch are represented as follows: .

[0071] 2) Real-time monitoring of network bandwidth Network latency and packet loss rate Measure the current network state Specifically, it includes:

[0072] 21) Real-time monitoring of network bandwidth Network latency and packet loss rate ;

[0073] 22) Based on network bandwidth Network latency and packet loss rate Perform network state measurement, represented as , ,in , These are weighting coefficients used to adjust the degree of influence of each indicator on the network state.

[0074] 3) Perform foreground detection on the video frames from step 1) to separate foreground information in order to identify dynamically changing regions of interest. Step 3) specifically includes:

[0075] 31) Model the video background to obtain the background model. , used to indicate at a given time Next pixel probability distribution belonging to the background , ,in Let be the conditional probability, representing the probability given background parameters. Below, pixels The probability of belonging to the background;

[0076] 32) Pixels in each video frame With background model Compare and determine pixels Does it belong to the background? If the background model closely matches the current pixel value, then the pixel belongs to the background. , Indicates the background region in the current frame; if If the background model has a low fit to the current pixel value, then the pixel does not belong to the background. , The current foreground region is represented; the fit between pixels and the background model is measured by significance. To indicate: ,in It is a metric function used to measure pixels. With background model The difference between them, when Greater than the preset threshold hour, It was judged as a prospect; ;

[0077] 33) Regarding the current foreground area Noise points are removed using dilation, and gaps in the foreground region are filled using erosion. The foreground region after dilation is... The foreground area after the etching operation is ,in , , The structuring element determines the shape and size of the dilation and erosion operations; contour extraction is performed on the foreground image after dilation and erosion to obtain the boundary of the foreground region, represented as... ,in ,in This is a contour extraction function used to extract region boundaries; after contour extraction, the boundaries are then analyzed. The selection process involves filtering and choosing valid target regions that meet certain criteria (determining whether a contour belongs to a valid region of interest, typically including area thresholds, shape, and location) as the set of regions of interest. , ,in These are the criteria used to filter valid target regions, where , This indicates the first result obtained through foreground detection. The set of regions of interest in a frame;

[0078] 34) Update the background model to adapt to changes in lighting and slow object movement; the background model update expression is: ,in For the update function, based on pixels Background model parameters Update.

[0079] 4) Inference results obtained from historical data packets in the cloud Based on the motion vectors of historical targets, the inference results Calibration yields the set of regions of interest for each frame of the current data packet. Specifically, it includes:

[0080] 41) Obtain the inference results of historical data packets inferred by the object detection model in the cloud. , Batch size is The inference results for each frame, the inference results for each frame. The expression is as follows:

[0081] ;

[0082] in, , indicating the first in the data packet frame, For the first Number of regions of interest in a frame; This represents the set of all regions of interest (ROIs) in a frame, where each ROI includes the coordinates of its top-left corner bounding box. Width of the region of interest ,high and confidence level ;

[0083] 42) Setting the first The first frame bounding boxes In the In frame The location has changed, from Move to The motion vector is , ,in ;

[0084] 43) Based on the motion vector and time offset, the bounding boxes in each historical frame are offset to align the inference results in the historical data packets to the current data packet to be encoded; the offset of each bounding box is calculated as follows:

[0085] For the first in the historical data packet The first frame bounding boxes The current frame bounding box after offset Adjust using the following formula: ,in In the obtained reasoning result, the first The first frame The coordinates of the top left corner of the bounding box. For the first The first frame The motion vectors of the bounding box have x and y axis components. This is the time offset, representing the difference between the frame's time and the current time. The first The width and height of each bounding box. This refers to the attenuation rate; for historical data packets... The region of interest (ROI) of a frame, and the set of ROIs after offset, are represented as follows: , ,in Indicates the first The set of regions of interest in a frame. , For the first The number of regions of interest in a frame.

[0086] 5) Set of all regions of interest and The data was integrated and divided into sets. and set Specifically, it includes:

[0087] 51) The set of regions of interest obtained from the foreground detection in step 3). and the set of regions of interest obtained in step 4) based on the historical reasoning results. The union of the two is considered as the candidate region, and all candidate regions are integrated and divided; specifically: the first region obtained from foreground detection... The set of bounding boxes of the frame is The historical inference results were obtained after motion vector calibration. The set of frame bounding boxes is ,in This indicates the number of foreground bounding boxes in the current frame. The number of bounding boxes representing the results of historical inference; each bounding box consists of one The feature vector is composed of 3D features. The 3D feature vector includes the coordinates of the top-left corner of the bounding box. Width of the bounding box and height and confidence level ;

[0088] 52) Calculate the Intersection over Union (IoU) of the bounding boxes. For each pair of bounding boxes obtained from foreground detection... Bounding boxes obtained from historical data packets Calculate their IoU values ​​to determine the degree of overlap, where ;

[0089] 53) Set an IoU threshold. When the IoU value is greater than the IoU threshold, and The detection results are for the same target. and To merge, represented as Add to the set of regions of interest Among them For the counting sequence number, , , This is a region merging function, including taking the intersection and union of two regions; when the IoU value is less than the IoU threshold, and These are detection results for different targets; skip the current match; wait for each pair... and After all comparisons are completed, and Not added to the set Add the region of interest to the set middle.

[0090] 6) Calculate the content complexity of video frames. and sets and Content complexity of each region of interest Based on the current network status Calculate the global quantization parameters for video coding and the quantization parameter offset of the region of interest Specifically, it includes:

[0091] 61) Calculate the content complexity of video frames. , of which The formula for calculating the content complexity of a video frame is as follows: , For data packets No. Frame video frame; The content complexity calculation function uses a texture complexity metric or pixel change rate based on discrete cosine transform; the batch size is... The video frame content complexity is , ;

[0092] 62) Based on the current network status and the complexity of video frame content Calculate and obtain global quantization parameters , ,in This represents a multivariate regression function, fitted using linear regression or neural network regression models;

[0093] 63) Calculate the set of regions of interest. and Content complexity , ,in For batch size, , For set The Middle Number of regions of interest in a frame For set The Middle Number of regions of interest in a frame Used to calculate the content complexity of the region of interest. for In the collection The corresponding image region; based on the set of regions of interest. and Content complexity and the complexity of video frame content Calculate the quantization parameter offset of the region of interest. , The change in motion of the target within the region of interest; Given a multivariate mapping function, a weighted linear model or a neural network model can be used. The implementation of the weighted linear model is as follows:

[0094] ;

[0095] in, As weight, The offsets can all be obtained through regression training. The indicator function takes a value of 1 when the condition is true and 0 otherwise. This represents the confidence level for the region.

[0096] 7) Apply global quantization parameters to non-interesting regions in the video. Perform low-quality encoding, and use the region of interest as... Perform high-quality encoding and transmit the encoded video stream to the cloud;

[0097] This involves using the multimedia API to globally quantize non-interesting regions in the video. Perform low-quality encoding on the set and Each region of interest in Perform high-quality coding.

[0098] This invention has many specific applications. The above description is only a preferred embodiment of this invention. It should be noted that for those skilled in the art, several improvements can be made without departing from the principle of this invention, and these improvements should also be considered within the scope of protection of this invention.

Claims

1. A traffic optimization system for cloud-edge collaborative moving target detection based on adaptive coding, characterized in that, It is applied in both edge and cloud environments. The edge environment includes: a video frame acquisition module, a network status awareness module, a historical data packet inference result collection module, a foreground detection module, a region of interest integration module, a quantization parameter adjustment module, and an encoding module; the cloud environment includes a moving target detection module. The video frame acquisition module is used to acquire continuous frame data from a real-time video stream, and to process the acquired data in batches of a size of [missing value]. The video frames are packaged into a single data packet; The network status awareness module is used to monitor network bandwidth in real time. Network latency and packet loss rate Measure the current network state ; The historical data packet inference result collection module is used to obtain the inference results of historical data packets from the cloud. And based on the motion vectors of historical targets, the inference results are analyzed. Perform calibration to obtain the region of interest set for each frame of the current data packet. ; The foreground detection module is used to perform foreground detection on the acquired video frames, separate foreground information, and identify dynamically changing regions of interest. ; The region of interest integration module is used to integrate all regions of interest sets. and The data was consolidated and divided into sets. and set ; The quantization parameter adjustment module is used to calculate the complexity of video frame content. and sets and Content complexity of each region of interest Based on the current network status Calculate the global quantization parameters for video coding and the quantization parameter offset of the region of interest ; The encoding module is used to quantize non-interest regions in the video using global quantization parameters. Perform low-quality encoding, and use the region of interest as... Perform high-quality coding; The moving target detection module is used to detect moving targets in the data transmitted from the edge end, package the detection results into data packets, and send the inference results of historical data packets to the edge end. The quantization parameter adjustment module specifically performs the following steps: Calculating the content complexity of video frames , of which The formula for calculating the content complexity of a video frame is as follows: , For data packets No. Frame video frame; The content complexity calculation function uses a texture complexity metric or pixel change rate based on discrete cosine transform; the batch size is... The video frame content complexity is , ; Based on the current network status and the complexity of video frame content Calculate and obtain global quantization parameters , ,in This represents a multivariate regression function, fitted using linear regression or neural network regression models; Calculate the set of regions of interest and Content complexity , ,in For batch size, , For set The Middle Number of regions of interest in a frame For set The Middle Number of regions of interest in a frame Used to calculate the content complexity of the region of interest. for In the collection The corresponding image region; based on the set of regions of interest. and Content complexity and the complexity of video frame content Calculate the quantization parameter offset of the region of interest. , The change in motion of the target within the region of interest; Given a multivariate mapping function, a weighted linear model or a neural network model can be used. The implementation of the weighted linear model is as follows: ; in, As weight, This is the offset. The indicator function takes a value of 1 when the condition is true and 0 otherwise. This represents the confidence level for the region.

2. A traffic optimization method for cloud-edge collaborative moving target detection task based on adaptive coding, based on the system described in claim 1, characterized in that, The steps are as follows: 1) Acquire continuous frame data from the real-time video stream, and set the batch size of the acquired data to be [size missing]. The video frames are packaged into a single data packet; 2) Real-time monitoring of network bandwidth Network latency and packet loss rate Measure the current network state ; 3) Perform foreground detection on the video frames from step 1) to separate foreground information in order to identify dynamically changing regions of interest. ; 4) Inference results obtained from historical data packets in the cloud Based on the motion vectors of historical targets, the inference results Calibration yields the set of regions of interest for each frame of the current data packet. ; 5) Set of all regions of interest and The data was integrated and divided into sets. and set ; 6) Calculate the content complexity of video frames. and sets and Content complexity of each region of interest Based on the current network status Calculate the global quantization parameters for video coding and the quantization parameter offset of the region of interest ; 7) Apply global quantization parameters to non-interesting regions in the video. Perform low-quality encoding on the set and Each region of interest in Perform high-quality encoding and transmit the encoded video stream to the cloud.

3. The traffic optimization method for cloud-edge collaborative moving target detection task based on adaptive coding according to claim 2, characterized in that, Step 1) specifically includes: acquiring continuous frame data from the real-time video stream. And store it in a buffer; set a fixed batch size. When collected When processing one video frame, the batch size will be [size missing]. The video frames are packaged into a single data packet.

4. The traffic optimization method for cloud-edge collaborative moving target detection task based on adaptive coding according to claim 2, characterized in that, Step 2) specifically includes: 21) Real-time monitoring of network bandwidth Network latency and packet loss rate ; 22) Based on network bandwidth Network latency and packet loss rate Perform network state measurement, represented as , ,in , These are weighting coefficients used to adjust the degree of influence of each indicator on the network state.

5. The traffic optimization method for cloud-edge collaborative moving target detection task based on adaptive coding according to claim 2, characterized in that, Step 3) specifically includes: 31) Model the video background to obtain the background model. , used to indicate at a given time Next pixel probability distribution belonging to the background , ,in Let be the conditional probability, representing the probability given background parameters. Below, pixels The probability of belonging to the background; 32) Pixels in each video frame With background model Compare and determine pixels Does it belong to the background? If the background model closely matches the current pixel value, then the pixel belongs to the background. , Indicates the background region in the current frame; if If the background model has a low fit to the current pixel value, then the pixel does not belong to the background. , The current foreground region is represented; the fit between pixels and the background model is measured by significance. To indicate: ,in It is a metric function used to measure pixels. With background model The difference between them, when Greater than the preset threshold hour, It was judged as a prospect; ; 33) Regarding the current foreground area Noise points are removed using dilation, and gaps in the foreground region are filled using erosion. The foreground region after dilation is... The foreground area after the etching operation is ,in , , The structuring element determines the shape and size of the dilation and erosion operations; contour extraction is performed on the foreground image after dilation and erosion to obtain the boundary of the foreground region, represented as... ,in ,in This is a contour extraction function used to extract region boundaries; after contour extraction, the boundaries are then analyzed. The system filters and selects valid target regions that meet certain criteria as the set of regions of interest. , ,in These are the criteria used to filter valid target regions, where , This indicates the first result obtained through foreground detection. The set of regions of interest in a frame; 34) Update the background model to adapt to changes in lighting and slow object movement; the background model update expression is: ,in For the update function, based on pixels Background model parameters Update.

6. The traffic optimization method for cloud-edge collaborative moving target detection task based on adaptive coding according to claim 2, characterized in that, Step 4) specifically includes: 41) Obtain the inference results of historical data packets inferred by the object detection model in the cloud. , Batch size is The inference results for each frame, the inference results for each frame. The expression is as follows: ; in, , indicating the first in the data packet frame, For the first Number of regions of interest in a frame; This represents the set of all regions of interest (ROIs) in a frame, where each ROI includes the coordinates of its top-left corner bounding box. Width of the region of interest ,high and confidence level ; 42) Setting the first The first frame bounding boxes In the In frame The location has changed, from Move to The motion vector is , ,in ; 43) Based on the motion vector and time offset, the bounding boxes in each historical frame are offset to align the inference results in the historical data packets to the current data packet to be encoded; the offset of each bounding box is calculated as follows: For the first in the historical data packet The first frame bounding boxes The current frame bounding box after offset Adjust using the following formula: ,in In the obtained reasoning result, the first The first frame The coordinates of the top left corner of the bounding box. For the first The first frame The motion vectors of the bounding box have x and y axis components. This is the time offset, representing the difference between the frame's time and the current time. The first The width and height of each bounding box. This refers to the attenuation rate; for historical data packets... The region of interest (ROI) of a frame, and the set of ROIs after offset, are represented as follows: , ,in Indicates the first The set of regions of interest in a frame. , For the first The number of regions of interest in a frame.

7. The traffic optimization method for cloud-edge collaborative moving target detection task based on adaptive coding according to claim 6, characterized in that, Step 5) specifically includes: 51) The set of regions of interest obtained from the foreground detection in step 3). and the set of regions of interest obtained in step 4) based on the historical reasoning results. The union of the two is considered as the candidate region, and all candidate regions are integrated and divided; specifically: the first region obtained from foreground detection... The set of bounding boxes of the frame is The historical inference results were obtained after motion vector calibration. The set of frame bounding boxes is ,in This indicates the number of foreground bounding boxes in the current frame. The number of bounding boxes representing the results of historical inference; each bounding box consists of one The feature vector is composed of 3D features. The 3D feature vector includes the coordinates of the top-left corner of the bounding box. Width of the bounding box and height and confidence level ; 52) Calculate the intersection-union ratio (IoU) of the bounding boxes for each pair of bounding boxes obtained from foreground detection. Bounding boxes obtained from historical data packets Calculate their IoU values ​​to determine the degree of overlap, where ; 53) Set an IoU threshold. When the IoU value is greater than the IoU threshold, and The detection results are for the same target. and To merge, represented as Add to the set of regions of interest Among them For the counting sequence number, , , This is a region merging function, including taking the intersection and union of two regions; when the IoU value is less than the IoU threshold, and These are detection results for different targets; skip the current match; wait for each pair... and After all comparisons are completed, and Not added to the set Add the region of interest to the set middle.

8. The traffic optimization method for cloud-edge collaborative moving target detection task based on adaptive coding according to claim 2, characterized in that, In step 7), the multimedia API is used to globally quantize non-interest areas in the video using parameters. Perform low-quality encoding, and use the region of interest as... Perform high-quality coding.

Citation Information

Patent Citations

  • Video coding method and device, equipment and storage medium

    CN111479112A

  • Video hierarchical coding and decoding system and method based on region perception

    CN119299775A