An edge supervision method and system based on space-time multi-level filtering
By employing a spatiotemporal multi-level filtering method and differentiated coding technology, the problems of false alarms and network bottlenecks in construction site monitoring equipment under complex environments were solved, enabling highly reliable identification of violations and evidence collection, and improving the stability of remote control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- POWERCHINA ZHONGNAN ENG
- Filing Date
- 2026-04-21
- Publication Date
- 2026-07-21
Smart Images

Figure CN122067076B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent monitoring technology for smart construction sites, specifically to an edge monitoring method and system based on spatiotemporal multi-level filtering. Background Technology
[0002] With the development of artificial intelligence technology, deep learning-based computer vision recognition algorithms have achieved significant results in target detection, behavior analysis, and hazard warning, and have been gradually applied in fields such as security monitoring, smart construction sites, and traffic management. By collecting video data through cameras and combining it with AI algorithms for analysis, it is possible to automatically identify safety helmet wearing status, intrusion into dangerous areas, and the operating status of mechanical equipment, thereby assisting in on-site management and safety supervision. Currently, to achieve flexible deployment, some monitoring equipment has begun to adopt an edge computing architecture, offloading AI inference tasks to front-end devices for execution. However, in actual construction site applications, existing portable monitoring equipment based on edge computing still suffers from the following systemic technical deficiencies: First, the reliability is low in complex environments: Construction sites are subject to a variety of complex interference factors, such as rapid changes in lighting, shadow interference, animals accidentally entering the site, and people momentarily obstructing the view, leading to a large number of false alarms in AI recognition based on single-frame images. Existing alarm mechanisms lack relevant logical analysis, and invalid alarms frequently overwhelm real safety events, causing management personnel to become fatigued and seriously affecting regulatory efficiency and reliability.
[0003] Secondly, achieving both high-definition evidence collection and real-time interaction is challenging under limited network bandwidth. Construction sites present complex network environments with limited bandwidth resources, creating technical bottlenecks for real-time transmission of full HD video streams. However, in the event of a violation, high-definition image quality of crucial details such as faces, employee IDs, and violations is essential to form valid evidence; simultaneously, remotely controlling portable monitoring equipment requires extremely low-latency visual feedback to ensure accurate operation. Existing technologies cannot simultaneously meet these dual requirements under limited bandwidth conditions.
[0004] Third, the reliability of remote hardware control in weak network environments is insufficient. In complex or network-constrained construction site environments, when the business platform directly issues control commands to the underlying hardware, it is highly susceptible to command loss and device unresponsiveness due to network fluctuations, delays, or interruptions. Existing solutions lack effective command relay, protocol conversion, and status feedback mechanisms, making it difficult to achieve stable, secure, and closed-loop remote hardware management. Summary of the Invention
[0005] The main objective of this invention is to provide an edge monitoring method and system based on spatiotemporal multi-level filtering to solve the technical problem of low reliability of existing construction site monitoring schemes in complex environments.
[0006] To achieve the above objectives, this invention provides an edge monitoring method based on spatiotemporal multi-level filtering, applied to edge computing devices, comprising the following steps: S1. Obtain the pre-set algorithm configuration instructions and category-parameter mapping matrix; wherein, the algorithm configuration instructions include algorithm scenario and running mode parameter thresholds; the category-parameter mapping matrix configures a set of discrimination parameters for each type of violation, and the set of discrimination parameters includes at least the detection threshold, the duration of the first statistical window, the duration of the second statistical window, and the frame percentage threshold; S2. Acquire video frame data, select the enabled algorithm model group according to the algorithm configuration instruction, allocate an independent inference thread pool to each enabled algorithm model group, process the video frame data in parallel, and obtain the original detection tensor. S3. Based on the detection threshold, perform single-frame probability space filtering on the original detection tensor to filter out suspected violation frames; perform time-dimensional anti-shake filtering on the suspected violation frames according to the duration of the first statistical window to determine the proportion of suspected violation frames. S4. Determine whether the proportion of suspected violation frames exceeds the frame proportion threshold. If so, trigger a local warning and start local recording of the duration of the second statistical window to obtain the recorded video of the duration of the second statistical window. S5. Filter out suspected violation frames from the recorded video, and determine whether the proportion of suspected violation frames in the recorded video exceeds the frame proportion threshold; if so, confirm that a valid violation event has occurred, and output the video frame data during the period of the valid violation event as evidence data to improve the credibility of edge supervision in complex environments.
[0007] Preferably, the following steps are further included between steps S2 and S3: Obtain a preset synchronization tolerance, monitor the real-time inference time of each inference thread pool in real time, and calculate the maximum difference in real-time time between each algorithm model; if the maximum difference exceeds the preset synchronization tolerance, dynamically adjust the thread quota of each inference thread pool to make the inference cycle of each algorithm model consistent.
[0008] More preferably, the dynamic adjustment of the thread quota for each inference thread pool specifically includes the following steps: Obtain the average time of single-frame inference for each inference thread pool, compare the real-time time with the average time, mark the algorithm model group whose real-time time is greater than the average time as the slow model group, and mark the algorithm model group whose real-time time is less than the average time as the fast model group. Thread quotas are reclaimed from the inference thread pool of the fast model group, and the reclaimed thread quotas are allocated to the inference thread pool of the slow model according to a preset allocation ratio; wherein the allocation ratio is proportional to the deviation between the real-time consumption and the average consumption of each slow model.
[0009] More preferably, step S3 specifically includes the following steps: S31. Obtain the category label and confidence score of each detected target in the current video frame of the original detection tensor; S32. Based on the category label of the detected target in the current video frame, read the detection threshold corresponding to the category label from the category-parameter mapping matrix; S33. Determine whether the confidence score is greater than or equal to the detection threshold; if yes, retain the detection target and mark the current video frame as a suspected violation frame; if no, discard the detection target. S34. Construct a sliding time window based on the duration of the first statistical window, wherein the sliding time window covers consecutive video frames within the most recent duration of the first statistical window. S35. Within the sliding time window, count the number of video frames marked as suspected violation frames, and record it as the suspected violation frame count. S36. Obtain the total number of video frames within the sliding time window, calculate the ratio of the suspected violation frame count to the total number of video frames, and obtain the proportion of suspected violation frames.
[0010] More preferably, after step S5, the following steps are also included: S6. When a valid violation event is detected, the region where the detection target is located is obtained, the region where the detection target is located is marked as a region of interest, the region of interest is maintained at a first bitrate encoding, the region outside the region of interest is compressed and encoded at a second bitrate, a differentiated encoded video stream is generated, and the evidence data and the differentiated encoded video stream are output.
[0011] This invention also provides an edge monitoring system based on spatiotemporal multi-level filtering, applying the edge monitoring method based on spatiotemporal multi-level filtering as described above, including an edge computing device deployed at a construction site; wherein, the edge computing device includes: The storage module is used to store algorithm configuration instructions and category-parameter mapping matrices, as well as video frame data; A visual acquisition module, connected to the storage module, is used to acquire video frame data for local recording; A multi-algorithm inference module is connected to the visual acquisition module. The multi-algorithm inference module includes multiple parallel inference thread pools, each corresponding to an active algorithm model. It is used to select the active algorithm model according to the algorithm configuration instructions, process the video frame data in parallel, and output the raw detection tensor. The raw detection tensor contains at least the category label and confidence score of each detected target. The latency monitoring module is connected to the multi-algorithm inference module and is used to monitor the real-time inference time of each inference thread pool in a single frame. The computing power scheduling module is connected to the multi-algorithm inference module and the latency monitoring module, and is used to dynamically adjust the thread quota of each inference thread pool; The spatiotemporal multi-level alarm filtering module is connected to the visual acquisition module, the storage module and the multi-algorithm inference module respectively, and is used to execute steps S3 to S5 and output evidence data; The differential encoding module, connected to the spatiotemporal multi-level alarm filtering module, is used to generate differentially encoded video streams; The local early warning module is connected to the spatiotemporal multi-level alarm filtering module and is used to play on-site voice alarm information; Furthermore, it also includes a cloud server cluster and a business platform connected to the edge computing device; wherein the cloud server cluster includes: A remote management server is used for issuing commands and transmitting status updates. A streaming media server is used to receive and distribute the differentiated encoded video stream in real time and provide a preview of the differentiated encoded video stream; A database server is used to receive and store the evidence data and the differentially encoded video stream; The business platform is connected to the cloud server cluster and is used to view monitoring screens in real time, receive violation alarms, and issue remote control commands.
[0012] More preferably, the edge computing device further includes a hardware driver module. The business platform issues control commands, the remote management server has a built-in preset Internet of Things (IoT) protocol, the remote management server receives the control commands, and transmits the control commands to the hardware driver module according to the IoT protocol. The edge computing device parses and converts them into hardware driver signals, drives the various modules of the edge computing device to perform actions, and sends the execution results and real-time collected hardware status parameters back to the remote management server.
[0013] More preferably, the edge computing device further includes a positioning module for collecting latitude and longitude coordinate data of the location of the edge computing device; after confirming the occurrence of a valid violation event and outputting evidence data in step S5, the following steps are also included: The remote management server periodically issues location trigger commands and sends the location trigger commands to the location module; the location module responds to the location trigger commands and collects the latitude and longitude coordinate data of the current location of the edge computing device; The latitude and longitude coordinate data are spatiotemporally bound to the evidence data corresponding to the valid violation event to generate structured evidence data containing category labels, event timestamps, and event location coordinates; The structured evidence data is transmitted to the cloud server cluster, and the database server stores the structured evidence data as a traceable and complete chain of evidence.
[0014] More preferably, the edge computing device further includes an interconnected battery pack and a power management module, the power management process including the following steps: The power management module collects the status parameters of the battery pack in real time; wherein, the status parameters include at least the remaining power data, the internal temperature data of the battery pack, and the voltage difference data between individual cells. The power management module obtains preset low battery threshold, high temperature threshold, and high voltage difference threshold. It compares the remaining battery data with the low battery threshold, the internal temperature data of the battery pack with the high temperature threshold, and the voltage difference data between individual cells with the high voltage difference threshold. If the remaining power data is lower than the low power threshold, and / or the internal temperature data of the battery pack is higher than the high temperature threshold, and / or the voltage difference data between individual cells is higher than the high voltage difference threshold, then the edge computing device is determined to be in an abnormal state, and a risk warning command is generated. The risk warning instruction is sent to the remote management server, which then generates device health alarm information and pushes it to the business platform. And / or, send the risk warning instruction to the local warning module to drive the local warning module to play a preset device health warning voice message; And / or, obtain a preset computing power management strategy, adjust the current operating mode according to the computing power management strategy, and switch the current operating mode to a battery life priority mode.
[0015] Compared with the prior art, the present invention has the following beneficial effects: This invention performs single-frame probability spatial filtering on the original detection tensor based on a detection threshold to screen out suspected violation frames, eliminating low-quality detection results at the single-frame level. Based on the duration of a first statistical window, it performs temporal anti-shake filtering on suspected violation frames, calculates the proportion of suspected violation frames, and continuously filters out false detections caused by instantaneous interference factors. When the proportion of suspected violation frames exceeds a frame proportion threshold, a local alert is triggered, and local recording for the duration of a second statistical window is initiated, achieving simultaneous initiation of alerts and evidence collection. After recording, suspected violation frames are screened again from the recorded video, and their proportion is calculated. The persistence of the violation is confirmed through validity verification using the second statistical window. Only when the second statistical verification still exceeds the threshold is it confirmed as a valid violation event, and evidence data is output. This three-level spatiotemporal progressive filtering mechanism, consisting of single-frame probability filtering, first-window anti-shake filtering, and second-window validity verification, ensures that the final output evidence data undergoes dual verification of spatial accuracy and temporal persistence, significantly improving the credibility of edge monitoring in complex environments. Attached Figure Description
[0016] 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 the structures shown in these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating an embodiment of the edge monitoring method based on spatiotemporal multi-level filtering according to the present invention. Figure 2 This is a simplified schematic diagram illustrating the principle of an edge monitoring system based on spatiotemporal multi-level filtering in one embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the principle of a three-level spatiotemporal progressive filtering mechanism in one embodiment of the present invention.
[0018] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0019] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0021] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0022] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this invention.
[0023] The following embodiment takes a construction site as an example. Edge computing devices are deployed on key work surfaces of the site. Video streams are collected in real time through cameras, and speakers are used as local early warning modules to monitor the safety of personnel on site.
[0024] Please see Figures 1 to 3 This embodiment provides an edge monitoring method based on spatiotemporal multi-level filtering, applied to edge computing devices, including the following steps: S1. Obtain the pre-set algorithm configuration instructions and category-parameter mapping matrix; wherein, the algorithm configuration instructions include algorithm scenario and running mode parameter thresholds; the category-parameter mapping matrix configures a set of discrimination parameters for each type of violation, and the set of discrimination parameters includes at least the detection threshold, the duration of the first statistical window, the duration of the second statistical window, and the frame percentage threshold; S2. Acquire video frame data, select the enabled algorithm model group according to the algorithm configuration instruction, allocate an independent inference thread pool to each enabled algorithm model group, process the video frame data in parallel, and obtain the original detection tensor. Specifically, in this embodiment, the edge computing device pulls video streams from the camera in real time via the RTSP protocol, uses hardware decoding to convert the video streams into a sequence of image frames that can be processed by the computer, and then assigns a unique frame number to each image frame to ensure that the data is not messed up.
[0025] According to the algorithm configuration instructions, the algorithm model groups to be activated are selected. In this embodiment, the "Red Line Area Intrusion Recognition Model Group," the "No Helmet Recognition Model Group," and the "Random Material Stacking Recognition Model Group" are activated simultaneously, and an independent inference thread pool is allocated to each activated algorithm model group. Each inference thread pool processes the input video frame data in parallel, and each algorithm model group independently completes the inference for each frame of image, outputting the raw detection tensor. The raw detection tensor is a multi-dimensional data structure directly output by the algorithm model group after completing the inference for a single frame of image. This multi-dimensional data structure has not undergone post-processing operations such as threshold filtering and non-maximum suppression, and retains all the raw detection information output by the algorithm.
[0026] This embodiment allocates an independent inference thread pool to each algorithm model group, and the computing resources of each algorithm model group are isolated from each other to avoid mutual interference, thereby ensuring that the system can still operate efficiently even when multiple recognition scenarios are started at the same time.
[0027] S3. Based on the detection threshold, perform single-frame probability space filtering on the original detection tensor to filter out suspected violation frames; perform time-dimensional anti-shake filtering on the suspected violation frames according to the duration of the first statistical window to determine the proportion of suspected violation frames. S4. Determine whether the proportion of suspected violation frames exceeds the frame proportion threshold. If so, trigger a local warning and start local recording of the duration of the second statistical window to obtain the recorded video of the duration of the second statistical window. S5. Filter out suspected violation frames from the recorded video, and determine whether the proportion of suspected violation frames in the recorded video exceeds the frame proportion threshold; if so, confirm that a valid violation event has occurred, and output the video frame data during the period of the valid violation event as evidence data to improve the credibility of edge supervision in complex environments.
[0028] Specifically, in step S1, during initialization, the edge computing device reads pre-set algorithm configuration instructions and a category-parameter mapping matrix stored locally. The algorithm configuration instructions include algorithm scenarios and operating mode parameter thresholds. For example, in this embodiment, algorithm scenarios include "intrusion into red-line areas," "not wearing a safety helmet," and "disorderly material stacking," etc.; the operating mode parameter thresholds are used for subsequent computing power scheduling. The category-parameter mapping matrix independently configures a set of discrimination parameters for each type of violation. The discrimination parameter set includes at least a detection threshold τ, a first statistical window duration t1, a second statistical window duration t2, and a frame percentage threshold K%.
[0029] This embodiment configures a set of discrimination parameters based on the linkage strategy between risk level and algorithm scenario, as shown in the table below: By configuring independent parameter sets for violations of different risk levels, differentiated alarm strategies can be implemented within the same framework. For high-risk behaviors such as red-line intrusion, a low threshold, short window, and low percentage configuration is used to ensure immediate response upon occurrence; for low-risk behaviors such as material stockpiling, a high threshold, long window, and high percentage configuration is used to ensure that the judgment result reflects the true ongoing status. This category-parameter mapping matrix design achieves a high degree of decoupling between algorithm logic and business scenarios, providing accurate judgment criteria for subsequent multi-level filtering.
[0030] This embodiment performs single-frame probability spatial filtering on the original detection tensor based on a detection threshold to screen out suspected violation frames, eliminating low-quality detection results at the single-frame level. Based on the duration of the first statistical window, temporal anti-shake filtering is applied to suspected violation frames, calculating the proportion of suspected violation frames and continuously filtering out false detections caused by instantaneous interference factors. When the proportion of suspected violation frames exceeds the frame proportion threshold, a local alert is triggered, and local recording for the duration of the second statistical window is initiated, achieving simultaneous initiation of alerts and evidence collection. After recording, suspected violation frames are screened again from the recorded video, and their proportion is calculated. The persistence of the violation is confirmed through validity verification using the second statistical window. Only when the second statistical verification still exceeds the threshold is it confirmed as a valid violation event, and evidence data is output. This three-level spatiotemporal progressive filtering mechanism, consisting of single-frame probability filtering, first-window anti-shake filtering, and second-window validity verification, ensures that the final output evidence data undergoes dual verification of spatial accuracy and temporal persistence, significantly improving the credibility of edge monitoring in complex environments.
[0031] In a preferred embodiment, the following steps are further included between steps S2 and S3: Obtain a preset synchronization tolerance, monitor the real-time inference time of each inference thread pool in real time, and calculate the maximum difference in real-time time between each algorithm model; if the maximum difference exceeds the preset synchronization tolerance, dynamically adjust the thread quota of each inference thread pool to make the inference cycle of each algorithm model consistent.
[0032] As a further preferred embodiment, the dynamic adjustment of the thread quota for each inference thread pool specifically includes the following steps: Obtain the average time of single-frame inference for each inference thread pool, compare the real-time time with the average time, mark the algorithm model group whose real-time time is greater than the average time as the slow model group, and mark the algorithm model group whose real-time time is less than the average time as the fast model group. Thread quotas are reclaimed from the inference thread pool of the fast model group, and the reclaimed thread quotas are allocated to the inference thread pool of the slow model according to a preset allocation ratio; wherein the allocation ratio is proportional to the deviation between the real-time consumption and the average consumption of each slow model.
[0033] In this embodiment, thread quotas are added to the algorithm model group with long real-time inference time for single-frame inference, and redundant thread quotas are reclaimed for the algorithm model group with long real-time inference time for single-frame inference, so that the inference cycle of each algorithm model group tends to be consistent, and the time synchronization waiting delay caused by uneven distribution of computing power is eliminated.
[0034] In a more preferred embodiment, step S3 specifically includes the following steps: S31. Obtain the category label and confidence score of each detected target in the current video frame of the original detection tensor; S32. Based on the category label of the detected target in the current video frame, read the detection threshold corresponding to the category label from the category-parameter mapping matrix; S33. Determine whether the confidence score is greater than or equal to the detection threshold; if yes, retain the detection target and mark the current video frame as a suspected violation frame; if no, discard the detection target. S34. Construct a sliding time window based on the duration of the first statistical window, wherein the sliding time window covers consecutive video frames within the most recent duration of the first statistical window. S35. Within the sliding time window, count the number of video frames marked as suspected violation frames, and record it as the suspected violation frame count. S36. Obtain the total number of video frames within the sliding time window, calculate the ratio of the suspected violation frame count to the total number of video frames, and obtain the proportion of suspected violation frames.
[0035] For example, for the category "not wearing a helmet", the detection threshold τ = 0.6. The confidence scores of all targets labeled "not wearing a helmet" in the original detection tensor are checked one by one: If the confidence score of the detected target A is 0.85, which is greater than or equal to the threshold of 0.6, then the detected target is retained. If the confidence score of the detected target B is 0.45, which is less than the threshold of 0.6, then the detected target is discarded.
[0036] After processing all detected targets in the current video frame, if at least one detected target is retained in the current video frame, the system marks the current video frame as a "suspected violation frame". If no detected target is retained in the current video frame, the frame result is discarded directly and not proceeded to subsequent processing.
[0037] This embodiment uses single-frame probability space filtering to select detection targets with sufficient confidence from the original detection tensor, and removes low-quality detection results at the single-frame level, providing high-quality input data for subsequent time-dimensional statistics.
[0038] A sliding time window is constructed based on the duration of the first statistical window. Taking "not wearing a safety helmet" as an example, the duration of the first statistical window is t1 = 3.0 seconds. Assuming the video frame rate is 25 frames / second, the sliding time window covers 75 frames of images within the most recent 3.0 seconds.
[0039] The system dynamically maintains a counter within a sliding time window to count the number of video frames marked as "suspected violations." Whenever a new video frame arrives, the system adds that frame to the window, removes the oldest frame that has exceeded the window's duration, and updates the suspected violation frame count. This sliding window mechanism ensures that the statistical results at any given time are based on the latest historical data, enabling rapid response to environmental changes.
[0040] Calculate the proportion K of suspected violation frames within the sliding time window. 违规 : K 违规 =(Number of suspected violation frames in the window) / (Total frames in the window) × 100%; For example, within the most recent 3.0-second window, if 60 out of 75 frames are marked as suspected violations, then K 违规 =60 / 75×100%=80%.
[0041] By using time-dimensional anti-shake filtering in the first statistical window, the single-frame detection result is transformed into continuous statistics over a time period, effectively filtering out false single-frame detections caused by instantaneous interference factors such as a person quickly looking down, turning around, or sudden changes in lighting. For example, if a worker briefly looks down for 0.2 seconds while organizing tools, it may cause 5 consecutive frames to be falsely judged as "not wearing a safety helmet." However, since these 5 frames account for only 6.7% of the total within the 3-second window, far below the 80% threshold, no warning will be triggered, thus avoiding invalid alarms.
[0042] The threshold for frames showing "not wearing a helmet" is 80%.
[0043] If K 违规 If the percentage is ≤80%, it is determined that there is no continuous violation within the current sliding time window, and the process returns to step S3 to continue processing the next frame.
[0044] If K 违规 If the violation rate is >80%, it is determined that there is a persistent violation within the current sliding time window, and an early warning trigger instruction is immediately generated. This instruction includes the category label of the violation and the trigger timestamp.
[0045] The warning trigger command is sent in parallel to the local warning module and the local recording module: Upon receiving a warning trigger command, the local early warning module drives the speaker to play a preset on-site voice alarm message, such as "Warning: Please wear a safety helmet." This real-time on-site broadcast can immediately remind violators to correct their behavior, providing an immediate and effective warning.
[0046] Local recording module: Upon receiving the warning trigger command, it immediately starts from the current video frame and continuously captures a video stream for a duration of the second statistical window, t2. In this embodiment, t2 = 5.0 seconds, and the 5.0 seconds of video captured from the trigger moment is used as the recorded video. This recorded video preserves key evidence of the entire process of the violation, providing material for subsequent validity review.
[0047] This embodiment employs a parallel triggering mechanism for warnings and recording to ensure zero-delay synchronous activation of warning broadcasts and evidence collection, preventing the loss of any crucial evidence. Simultaneously, the recording duration parameter is strictly bound to the second statistical window, ensuring that the recorded video length precisely meets the requirements for subsequent validity review, avoiding the problems of excessively long recordings wasting storage resources or excessively short recordings leading to insufficient evidence.
[0048] This embodiment reuses the single-frame probability space filtering method, filtering each frame in the recorded video based on a detection threshold to identify suspected violation frames. By reusing the same set of detection thresholds, consistency in the filtering standards is ensured.
[0049] Secondly, the percentage K of suspected illegal frames in the recorded video is statistically analyzed. 复核 : K 复核 =(Number of suspected violation frames in the recorded video) / (Total frames in the recorded video) × 100%; Then, K 复核 Compare with the frame percentage threshold; if K 复核 If the percentage of non-violation frames is ≤80%, the system classifies the event as "non-persistent anomaly" or "self-corrected." For example, if a worker immediately puts on their safety helmet after hearing a warning, the percentage of violation frames in subsequent videos decreases. In this case, the system marks the locally recorded video as "invalid" and does not upload it to the cloud, thus avoiding unnecessary data interference with management.
[0050] If K 复核 If the percentage is greater than 80%, the event is confirmed as a valid violation event. The video frame data during the period of the valid violation event is output as evidence data and reported.
[0051] This embodiment adds a secondary confirmation step to the early warning process through a validity review mechanism using a second statistical window. For example, if a worker fails to wear a safety helmet for an extended period (more than 5 seconds) while organizing tools and does not correct this behavior after an early warning, then K... 复核If the violation rate remains above 80%, the system confirms it as a valid violation and reports it. Conversely, if the worker corrects the violation immediately after hearing the warning, then K... 复核 If the rate is below 80%, the locally recorded data will be discarded and not reported. This mechanism fundamentally solves the problem of alarm fatigue, ensuring that the events ultimately reported to the cloud are highly continuous and authentic.
[0052] In one embodiment, the following steps are included after step S5: S6. When a valid violation event is detected, the region where the detection target is located is obtained, the region where the detection target is located is marked as a region of interest, the region of interest is maintained at a first bitrate encoding, the region outside the region of interest is compressed and encoded at a second bitrate, a differentiated encoded video stream is generated, and the evidence data and the differentiated encoded video stream are output.
[0053] Specifically, in order to achieve high-definition forensics under limited mobile network bandwidth, this embodiment integrates a set of ROI (Region of Interest) dynamic compression algorithms that can be customized by technicians: Technical personnel can specify specific algorithm categories (such as not wearing a safety helmet) as ROI trigger sources in the configuration interface according to actual business needs; When a valid violation is detected, the rectangular area containing the detected target is marked as a region of interest. In this embodiment, a hardware decoder is configured to perform high-bitrate decoding on this region of interest, ensuring that faces, employee IDs, or violation details are clearly identifiable. For "non-interested areas" such as the background, high-rate compression is performed. This technology significantly reduces the size of video files and reporting bandwidth without sacrificing the quality of key evidence, ensuring a high data transmission success rate in weak network environments.
[0054] This embodiment also uses a hardware decoder to encapsulate the differentiated video stream in real time. Compared with software encoding, hardware encoding can significantly reduce processing latency.
[0055] This embodiment also provides an edge monitoring system based on spatiotemporal multi-level filtering, applying the edge monitoring method based on spatiotemporal multi-level filtering as described above, including edge computing devices deployed at the construction site; wherein, the edge computing devices include: The storage module is used to store algorithm configuration instructions and category-parameter mapping matrices, as well as video frame data; A visual acquisition module, connected to the storage module, is used to acquire video frame data for local recording; A multi-algorithm inference module is connected to the visual acquisition module. The multi-algorithm inference module includes multiple parallel inference thread pools, each corresponding to an active algorithm model. It is used to select the active algorithm model according to the algorithm configuration instructions, process the video frame data in parallel, and output the raw detection tensor. The raw detection tensor contains at least the category label and confidence score of each detected target. The latency monitoring module is connected to the multi-algorithm inference module and is used to monitor the real-time inference time of each inference thread pool in a single frame. The computing power scheduling module is connected to the multi-algorithm inference module and the latency monitoring module, and is used to dynamically adjust the thread quota of each inference thread pool; The spatiotemporal multi-level alarm filtering module is connected to the visual acquisition module, the storage module and the multi-algorithm inference module respectively, and is used to execute steps S3 to S5 and output evidence data; The differential encoding module, connected to the spatiotemporal multi-level alarm filtering module, is used to generate differentially encoded video streams; The local early warning module is connected to the spatiotemporal multi-level alarm filtering module and is used to play on-site voice alarm information; This embodiment further includes a cloud server cluster and a business platform connected to the edge computing device; wherein the cloud server cluster includes: A remote management server is used for issuing commands and transmitting status updates. A streaming media server is used to receive and distribute the differentiated encoded video stream in real time and provide a preview of the differentiated encoded video stream; A database server is used to receive and store the evidence data and the differentially encoded video stream; The business platform is connected to the cloud server cluster and is used to view monitoring screens in real time, receive violation alarms, and issue remote control commands.
[0056] The hardware-encoded, differentiated video stream is pushed to the streaming media server in real time. Due to the extremely fast streaming process, the footage viewed by technicians through the business platform has very low latency. This real-time capability ensures that technicians can obtain instant visual feedback when remotely adjusting the camera pan-tilt unit, solving the pain point of asynchronous operation and feedback in traditional remote monitoring.
[0057] In this embodiment, the database server serves as the evidence center, specifically responsible for receiving and centrally storing data on valid violations determined by edge computing devices. The stored content includes high-definition snapshots of the violation, evidence videos processed with ROI, and related structured information (such as violation category, serial number, location coordinates, etc.), providing a complete chain of evidence for subsequent quality tracing.
[0058] As the core of API access, the remote service manager establishes stable heartbeat communication with edge computing devices to obtain the real-time operating status of edge computing devices, such as computing load, battery level, and network strength.
[0059] The streaming media server is responsible for distributing high-concurrency video streams and supports simultaneous access from multiple business platforms (such as mobile phones, computers, and large screens) to enable real-time preview and playback monitoring of the construction site.
[0060] As a further preferred embodiment, the edge computing device further includes a hardware driver module. The business platform issues control commands, and the remote management server has a built-in preset Internet of Things (IoT) protocol. The remote management server receives the control commands and transmits them to the hardware driver module according to the IoT protocol. The edge computing device parses and converts the commands into hardware driver signals. In this embodiment, a computing power motherboard is used as the hardware driver module to drive the various modules of the edge computing device to perform actions and transmit the execution results and real-time collected hardware status parameters back to the remote management server.
[0061] Specifically, the IoT protocol includes low-power, high-reliability communication protocols such as MQTT. Edge computing devices act as local proxy execution terminals, forming an indirect control mechanism that effectively isolates cloud business logic from physical hardware drivers, thereby improving the system's control stability and security in extreme network environments.
[0062] As a further preferred embodiment, the edge computing device further includes a positioning module for collecting latitude and longitude coordinate data of the location of the edge computing device; after confirming the occurrence of a valid violation event and outputting evidence data in step S5, the following steps are also included: The remote management server periodically issues location trigger commands and sends the location trigger commands to the location module; the location module responds to the location trigger commands and collects the latitude and longitude coordinate data of the current location of the edge computing device; The latitude and longitude coordinate data are spatiotemporally bound to the evidence data corresponding to the valid violation event to generate structured evidence data containing category labels, event timestamps, and event location coordinates; The structured evidence data is transmitted to the cloud server cluster, and the database server stores the structured evidence data as a traceable and complete chain of evidence.
[0063] In this embodiment, obtaining the location trigger command issued by the remote management server includes: The remote management server periodically generates and issues the location trigger command according to a preset timing strategy; or the remote management server generates and issues the location trigger command in real time in response to a location query operation triggered by a technician on the business platform.
[0064] After spatiotemporally binding the latitude and longitude coordinate data with the evidence data corresponding to the valid violation event, the method further includes synchronously pushing the structured evidence data to the business platform. When the business platform displays the alarm information of the valid violation event, it also displays the location coordinates of the event corresponding to the alarm information and marks them on the electronic map.
[0065] More preferably, the edge computing device further includes an interconnected battery pack and a power management module, the power management process including the following steps: The power management module collects the status parameters of the battery pack in real time; wherein, the status parameters include at least the remaining power data, the internal temperature data of the battery pack, and the voltage difference data between individual cells. The power management module obtains preset low battery threshold, high temperature threshold, and high voltage difference threshold. It compares the remaining battery data with the low battery threshold, the internal temperature data of the battery pack with the high temperature threshold, and the voltage difference data between individual cells with the high voltage difference threshold. If the remaining power data is lower than the low power threshold, and / or the internal temperature data of the battery pack is higher than the high temperature threshold, and / or the voltage difference data between individual cells is higher than the high voltage difference threshold, then the edge computing device is determined to be in an abnormal state, and a risk warning command is generated. The risk warning instruction is sent to the remote management server, which then generates device health alarm information and pushes it to the business platform. And / or, send the risk warning instruction to the local warning module to drive the local warning module to play a preset device health warning voice message; And / or, obtain a preset computing power management strategy, adjust the current operating mode according to the computing power management strategy, and switch the current operating mode to a battery life priority mode.
[0066] In one embodiment, a monitoring method for adaptive computing power scheduling is also included, comprising the following steps: The hardware status parameters of the edge computing device are collected in real time, and the algorithm configuration instructions are obtained locally and pre-stored. The hardware status parameters include at least the remaining power data, temperature data, and charging / discharging status data. The algorithm configuration instructions include the algorithm scenario, algorithm priority, operating mode parameter threshold, and hardware linkage rules. The operating mode parameter threshold refers to the pre-set critical value for different operating modes to limit the utilization rate of global computing resources (CPU / GPU / NPU), i.e., the upper limit of the utilization rate threshold.
[0067] A preset operating mode is obtained, and the corresponding operating mode is matched as the current operating mode according to the hardware status parameters and the algorithm configuration instructions; wherein, each of the operating modes is set with a corresponding upper limit of the global computing power resource utilization threshold; the operating modes include real-time mode, energy efficiency balance mode and battery life priority mode; Multiple algorithm models are obtained, and the multiple algorithm models are classified to obtain multiple algorithm model groups. The algorithm model group to be enabled is selected according to the algorithm configuration instructions, and an independent inference thread pool is matched for each enabled algorithm model group to process video frame data in parallel. For example, the first inference thread pool is allocated an algorithm model group consisting of multiple general safety identification models, the second inference thread pool is allocated an algorithm model group consisting of multiple closed safety inspection models, the third inference thread pool is allocated an algorithm model group consisting of multiple high-altitude operation risk identification models, and so on, forming several algorithm model groups.
[0068] In practical applications, edge computing devices, acting as edge terminals, don't handle everything indiscriminately. Instead, technicians select application scenarios based on the actual needs of the construction site, flexibly activating the necessary algorithm model groups for computation. This enables site monitoring tasks such as "personnel entry prohibition, helmet absence, and fire detection." Edge computing devices distribute tasks to different inference thread pools. For example, a group of algorithm models composed of general security identification models specifically monitors violations, while a group of algorithm models composed of closed-loop security inspection models specifically manages environmental safety. This decoupled design ensures that edge computing devices maintain high efficiency even when multiple scenarios are activated simultaneously.
[0069] The real-time time taken by each inference thread pool to complete a single frame of inference is obtained in real time, and the maximum difference in real-time time between each algorithm model group is calculated. Obtain the preset hardware linkage rules, and perform hardware status compliance verification based on the maximum difference and the hardware status parameters, and determine whether the maximum difference is within the preset synchronization tolerance; if the verification passes and the maximum difference exceeds the preset synchronization tolerance, dynamically adjust the thread quota of each inference thread pool to make the inference cycle of each algorithm model consistent. The hardware linkage rule in this embodiment is a pre-defined criterion for judging the health of the hardware itself. For example: Temperature rule: If the chip temperature is >85℃, thread quota increases are prohibited, and frequency reduction protection is activated.
[0070] Battery rule: If the battery level is less than 20% and the system is powered by battery, new algorithm models are prohibited from being started, and the thread quota of non-core inference thread pools will be reduced.
[0071] Power supply rules: If powered by battery and the battery level is below the preset threshold, the thread quota adjustment range must be halved.
[0072] In this embodiment, if the hardware status compliance check passes, it indicates that the hardware status is good, and dynamic adjustment of the thread quota can be performed. If the check fails, it indicates that the hardware status is critical. In this case, it is not advisable to push the hardware to its limits in order to pursue algorithm timing synchronization, so dynamic adjustment of the thread quota of each inference thread pool is prohibited. Instead, the thread quota of each inference thread pool should be reduced synchronously.
[0073] Determine whether the total computing power utilization rate of each inference thread pool after adjustment exceeds the upper limit of the utilization rate threshold of the current running mode; if yes, readjust the thread quota; if no, maintain the current thread quota of each inference thread pool and complete the adaptive scheduling of computing power.
[0074] In this embodiment, hardware status parameters and algorithm configuration instructions provide real-time hardware health data and preset control basis for subsequent scheduling decisions; the corresponding real-time mode, energy efficiency balance mode, or battery life priority mode is matched according to the hardware status parameters as the current operating mode, so that the edge computing device operation strategy is dynamically aligned with the current power supply status and health level of the hardware; an independent inference thread pool is allocated to each activated algorithm model group to process video frame data in parallel, and the real-time inference time of each thread pool is monitored in real time and the maximum difference is calculated, thereby quantifying the timing synchronization deviation of multiple concurrent algorithms; hardware status compliance is verified in combination with hardware linkage rules, and the hardware status compliance is verified when the verification is passed and the maximum value is obtained. When the difference exceeds the preset synchronization tolerance, the thread quota of each inference thread pool is dynamically adjusted to ensure that the inference cycle of each algorithm model is consistent, thus achieving multi-algorithm timing synchronization within the hardware safety boundary. It is determined whether the adjusted total computing power utilization rate exceeds the upper limit of the utilization rate threshold of the current operating mode. If it does, the thread quota is readjusted until the constraint is met, thereby ensuring that the computing power resource utilization is always controlled within the preset threshold range of the current operating mode. Ultimately, it realizes real-time linkage scheduling between hardware status and computing power demand, enabling the device to maintain a balance between computing power and power consumption through mode switching and dynamic adjustment of thread quota in battery-powered mode, effectively extending the continuous working time.
[0075] As a further embodiment, the dynamic adjustment of the thread quota of each inference thread pool specifically includes the following steps: The direction of thread quota adjustment is determined based on the charge / discharge status data in the hardware status parameters. The thread quota adjustment coefficient is calculated based on the remaining power data and the temperature data. The thread quota adjustment coefficient is negatively correlated with the remaining power and the temperature. Based on the thread quota adjustment direction and the thread quota adjustment coefficient, the thread quota adjustment amount for each inference thread pool is generated; Wherein; when the charge / discharge status data is "external power supply", the thread quota adjustment coefficient ; When the charge / discharge status data is "battery powered", the thread quota adjustment coefficient Determined according to the following formula: Where P represents the current remaining battery power. The rated power is T, and the current temperature is T. To ensure the upper limit of safe operating temperature, This is the lower limit of the normal operating temperature.
[0076] In this embodiment, the direction of thread quota adjustment is determined based on charge / discharge status data. This allows edge computing devices to adjust thread quotas with performance priority when powered by external power and with battery life priority when powered by battery, achieving dynamic adaptation between power supply mode and computing power scheduling intent. A thread quota adjustment coefficient negatively correlated with remaining power and temperature is calculated based on remaining power and temperature data. This coefficient automatically decreases when battery power is supplied and remaining power decreases or temperature increases, thus constraining the increment of thread quotas. The thread quota adjustment amount for each inference thread pool is generated based on the adjustment direction and adjustment coefficient, ensuring that the expansion of thread quotas in battery-powered mode is suppressed by both remaining power and temperature levels. The thread quota adjustment coefficient is adjusted when the charge / discharge status data indicates external power supply. This allows for sufficient adjustment of thread quotas to achieve consistency in algorithm inference cycles; the thread quota adjustment factor is adjusted when the charge / discharge state data is battery powered. Based on the quantitative formula of power and temperature, the adjustment coefficient is smaller when the power is lower and the temperature is higher, and the adjustment range of thread quota is more limited. Thus, when the battery is powered and the power is insufficient or the temperature is too high, the expansion of computing power is actively suppressed, and the total computing power utilization rate is controlled within the threshold of the current operating mode, maintaining the device's continuous operation capability under limited power and preventing overheating.
[0077] In another embodiment, the dynamic adjustment of thread quotas for each inference thread pool specifically includes the following steps: Obtain the average time taken for each inference thread pool to complete a single frame of inference, and determine whether the real-time time is greater than the average time. If yes, mark the algorithm model group in the inference thread pool where the real-time time is greater than the average time as a slow model. If no, mark the algorithm model group in the inference thread pool where the real-time time is less than the average time as a fast model. Reclaim a first number of thread quotas from the inference thread pool of the fast model; Obtain a preset allocation ratio, and allocate the reclaimed thread quota to the inference thread pool of the slow model according to the preset allocation ratio; wherein, the preset allocation ratio is proportional to the deviation between the real-time consumption time and the average consumption time of each slow model.
[0078] This embodiment achieves accurate identification of the differences in computing power requirements during concurrent operation of multiple algorithms by marking slow and fast models. A first number of thread quotas are reclaimed from the inference thread pool of the fast model, releasing idle or redundant computing resources from the faster algorithms. A preset allocation ratio is obtained, and the reclaimed thread quotas are allocated to the inference thread pool of the slow model according to this ratio. The preset allocation ratio is proportional to the deviation between the real-time latency and the average latency of each slow model, so that the slower the processing speed and the larger the latency deviation, the more additional thread quotas the algorithm model receives. This ensures that limited computing resources are precisely allocated to the most scarce algorithm stages. Through this differentiated allocation mechanism based on latency deviation, the inference speed of each slow model is specifically improved, ultimately achieving consistency in the inference cycle of all algorithm models. This achieves temporal synchronization of concurrent inference of multiple algorithms without increasing the total computing power occupancy rate, avoiding overall waiting delays caused by the lag in processing individual algorithms, and improving the parallel processing efficiency of edge computing devices.
[0079] As a further preferred embodiment, the readjustment of thread quotas includes: When the total computing power utilization rate of each inference thread pool after adjustment exceeds the upper limit of the utilization rate threshold of the current running mode, the thread quota of the inference thread pool corresponding to the algorithm model with lower algorithm priority will be reduced first.
[0080] One embodiment further includes the following steps: Execute the corresponding computing power management strategy according to the current operating mode; where; If the current operating mode is real-time mode, then the thread rate limiting is cancelled, and the inference thread pool is allowed to expand as needed until the computing power utilization rate reaches the upper limit of the utilization rate threshold of real-time mode; If the current operating mode is the energy efficiency balance mode, then the total number of concurrent threads will be limited while maintaining the consistency of the inference cycle of each algorithm model, and the total computing power utilization rate will be controlled within the upper limit of the utilization rate threshold of the energy efficiency balance mode. If the current operating mode is the battery life priority mode, then the frame skipping sampling strategy is executed to obtain the non-core algorithm model, reduce the thread quota of the inference thread pool of the non-core algorithm model, and control the total computing power utilization rate within the upper limit of the utilization rate threshold of the battery life priority mode.
[0081] In this embodiment, the upper bound of the global computing power resource occupancy threshold corresponding to the real-time mode is set to >90%; The energy efficiency balance mode, also known as the high-speed mode, has a global computing power resource utilization threshold upper limit set at 40%-60%. The aforementioned battery life priority mode, also known as low power mode, has a global computing resource utilization threshold set at 5%-20%. This embodiment achieves deep binding between the operating mode and the underlying computing power scheduling logic by executing corresponding computing power management strategies according to the current operating mode. If the current operating mode is real-time mode, thread rate limiting is lifted and the inference thread pool is allowed to expand as needed until the computing power utilization rate reaches the upper limit of the real-time mode's utilization rate threshold. This allows the edge computing device to operate at full load in scenarios with external power supply or extremely high response speed requirements, minimizing recognition latency. If the current operating mode is energy efficiency balance mode, the total number of concurrent threads is limited while maintaining the consistency of the inference cycle of each algorithm model. This controls the total computing power utilization rate within the upper limit of the energy efficiency balance mode's utilization rate threshold, ensuring that the edge computing device can guarantee the operation of multiple algorithms. While synchronizing timing, the system avoids prolonged full-load operation of the hardware, effectively suppressing device heat generation and maintaining a stable energy efficiency ratio. If the current operating mode is battery-priority mode, a frame skipping sampling strategy is executed to obtain non-core algorithm models. The thread quota of the inference thread pool of the non-core algorithm models is reduced, and the total computing power utilization rate is controlled within the upper limit of the utilization rate threshold of the battery-priority mode. This allows the edge computing device to significantly reduce computing power consumption by reducing the sampling frequency and shutting down non-core algorithms when powered by battery and with limited power. The limited power is prioritized to ensure the continuous operation of the core monitoring algorithm, thereby achieving a dynamic balance between hardware status and business needs. This ensures that the device can maintain stable operation with the optimal computing power-power ratio under different operating conditions.
[0082] In one embodiment, based on the current operating mode, the corresponding computing power management strategy is executed, and a computing power-power balance operating state matching the operating mode is output; if the computing power-power balance operating state is detected to deviate from the preset range, the dynamic adjustment logic is re-triggered to enable the edge computing device to maintain a stable operating state that is strongly consistent with the hardware state and the preset operating mode.
[0083] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. An edge monitoring method based on spatiotemporal multi-level filtering, applied to edge computing devices, characterized in that, Includes the following steps: S1. Obtain the pre-set algorithm configuration instructions and category-parameter mapping matrix; wherein, the algorithm configuration instructions include algorithm scenario and running mode parameter thresholds; the category-parameter mapping matrix configures a set of discrimination parameters for each type of violation, and the set of discrimination parameters includes at least the detection threshold, the duration of the first statistical window, the duration of the second statistical window, and the frame percentage threshold; S2. Acquire video frame data, select the enabled algorithm model group according to the algorithm configuration instruction, allocate an independent inference thread pool to each enabled algorithm model group, process the video frame data in parallel, and obtain the original detection tensor. S3. Based on the detection threshold, perform single-frame probability space filtering on the original detection tensor to filter out suspected violation frames; perform time-dimensional anti-shake filtering on the suspected violation frames according to the duration of the first statistical window to determine the proportion of suspected violation frames. S4. Determine whether the proportion of suspected violation frames exceeds the frame proportion threshold. If so, trigger a local warning and start local recording of the duration of the second statistical window to obtain the recorded video of the duration of the second statistical window. S5. Filter out suspected violation frames from the recorded video, and determine whether the proportion of suspected violation frames in the recorded video exceeds the frame proportion threshold; if so, confirm that a valid violation event has occurred, and output the video frame data during the period of the valid violation event as evidence data to improve the credibility of edge supervision in complex environments. Specifically, step S3 includes the following steps: S31. Obtain the category label and confidence score of each detected target in the current video frame of the original detection tensor; S32. Based on the category label of the detected target in the current video frame, read the detection threshold corresponding to the category label from the category-parameter mapping matrix; S33. Determine whether the confidence score is greater than or equal to the detection threshold; if yes, retain the detection target and mark the current video frame as a suspected violation frame; if no, discard the detection target. S34. Construct a sliding time window based on the duration of the first statistical window, wherein the sliding time window covers consecutive video frames within the most recent duration of the first statistical window. S35. Within the sliding time window, count the number of video frames marked as suspected violation frames, and record it as the suspected violation frame count. S36. Obtain the total number of video frames within the sliding time window, calculate the ratio of the suspected violation frame count to the total number of video frames, and obtain the proportion of suspected violation frames.
2. The edge monitoring method based on spatiotemporal multi-level filtering according to claim 1, characterized in that, The steps between S2 and S3 also include the following: Obtain a preset synchronization tolerance, monitor the real-time inference time of each inference thread pool in real time, and calculate the maximum difference in real-time time between each algorithm model; if the maximum difference exceeds the preset synchronization tolerance, dynamically adjust the thread quota of each inference thread pool to make the inference cycle of each algorithm model consistent.
3. The edge monitoring method based on spatiotemporal multi-level filtering according to claim 2, characterized in that, The dynamic adjustment of thread quotas for each inference thread pool specifically includes the following steps: Obtain the average time of single-frame inference for each inference thread pool, compare the real-time time with the average time, mark the algorithm model group whose real-time time is greater than the average time as the slow model group, and mark the algorithm model group whose real-time time is less than the average time as the fast model group. Thread quotas are reclaimed from the inference thread pool of the fast model group, and the reclaimed thread quotas are allocated to the inference thread pool of the slow model according to a preset allocation ratio; wherein the allocation ratio is proportional to the deviation between the real-time consumption and the average consumption of each slow model.
4. The edge monitoring method based on spatiotemporal multi-level filtering according to claim 1, characterized in that, Step S5 is followed by the following steps: S6. When a valid violation event is detected, the region where the detection target is located is obtained, the region where the detection target is located is marked as a region of interest, the region of interest is maintained at a first bitrate encoding, the region outside the region of interest is compressed and encoded at a second bitrate, a differentiated encoded video stream is generated, and the evidence data and the differentiated encoded video stream are output.
5. An edge surveillance system based on spatiotemporal multi-level filtering, employing the edge surveillance method based on spatiotemporal multi-level filtering as described in any one of claims 1-4, characterized in that, This includes edge computing devices deployed at the construction site; wherein the edge computing devices include: The storage module is used to store algorithm configuration instructions and category-parameter mapping matrices, as well as video frame data; A visual acquisition module, connected to the storage module, is used to acquire video frame data for local recording; A multi-algorithm inference module is connected to the visual acquisition module. The multi-algorithm inference module includes multiple parallel inference thread pools, each corresponding to an active algorithm model. It is used to select the active algorithm model according to the algorithm configuration instructions, process the video frame data in parallel, and output the raw detection tensor. The raw detection tensor contains at least the category label and confidence score of each detected target. The latency monitoring module is connected to the multi-algorithm inference module and is used to monitor the real-time inference time of each inference thread pool in a single frame. The computing power scheduling module is connected to the multi-algorithm inference module and the latency monitoring module, and is used to dynamically adjust the thread quota of each inference thread pool; The spatiotemporal multi-level alarm filtering module is connected to the visual acquisition module, the storage module and the multi-algorithm inference module respectively, and is used to execute steps S3 to S5 and output evidence data; The differential encoding module, connected to the spatiotemporal multi-level alarm filtering module, is used to generate differentially encoded video streams; The local early warning module is connected to the spatiotemporal multi-level alarm filtering module and is used to play on-site voice alarm information.
6. The edge monitoring system based on spatiotemporal multi-level filtering according to claim 5, characterized in that, It also includes a cloud server cluster and a business platform connected to the edge computing device; wherein the cloud server cluster includes: A remote management server is used for issuing commands and transmitting status updates. A streaming media server is used to receive and distribute the differentiated encoded video stream in real time and provide a preview of the differentiated encoded video stream; A database server is used to receive and store the evidence data and the differentially encoded video stream; The business platform is connected to the cloud server cluster and is used to view monitoring screens in real time, receive violation alarms, and issue remote control commands.
7. The edge monitoring system based on spatiotemporal multi-level filtering according to claim 6, characterized in that, The edge computing device also includes a hardware driver module. The business platform issues control commands, and the remote management server has a built-in preset Internet of Things (IoT) protocol. The remote management server receives the control commands and transmits them to the hardware driver module according to the IoT protocol. The edge computing device parses and converts the commands into hardware driver signals, which drive the various modules of the edge computing device to perform actions. The execution results and real-time collected hardware status parameters are then transmitted back to the remote management server.
8. The edge monitoring system based on spatiotemporal multi-level filtering according to claim 6, characterized in that, The edge computing device also includes a positioning module for collecting latitude and longitude coordinate data of the location of the edge computing device; after confirming the occurrence of a valid violation event and outputting evidence data in step S5, the following steps are also included: The remote management server periodically issues location trigger commands and sends the location trigger commands to the location module; the location module responds to the location trigger commands and collects the latitude and longitude coordinate data of the current location of the edge computing device; The latitude and longitude coordinate data are spatiotemporally bound to the evidence data corresponding to the valid violation event to generate structured evidence data containing category labels, event timestamps, and event location coordinates; The structured evidence data is transmitted to the cloud server cluster, and the database server stores the structured evidence data as a traceable and complete chain of evidence.
9. The edge monitoring system based on spatiotemporal multi-level filtering according to claim 8, characterized in that, The edge computing device also includes interconnected battery packs and a power management module. The power management process includes the following steps: The power management module collects the status parameters of the battery pack in real time; wherein, the status parameters include at least the remaining power data, the internal temperature data of the battery pack, and the voltage difference data between individual cells. The power management module obtains preset low battery threshold, high temperature threshold, and high voltage difference threshold. It compares the remaining battery data with the low battery threshold, the internal temperature data of the battery pack with the high temperature threshold, and the voltage difference data between individual cells with the high voltage difference threshold. If the remaining power data is lower than the low power threshold, and / or the internal temperature data of the battery pack is higher than the high temperature threshold, and / or the voltage difference data between individual cells is higher than the high voltage difference threshold, then the edge computing device is determined to be in an abnormal state, and a risk warning command is generated. The risk warning instruction is sent to the remote management server, which then generates device health alarm information and pushes it to the business platform. And / or, send the risk warning instruction to the local warning module to drive the local warning module to play a preset device health warning voice message; And / or, obtain a preset computing power management strategy, adjust the current operating mode according to the computing power management strategy, and switch the current operating mode to a battery life priority mode.