Partition detection method and apparatus, device, and storage medium

By using the Yolov5 model for detection and frequency adjustment, the problems of resource waste and low response efficiency of GPIO detection units were solved, enabling collaborative linkage between partitions and improving the overall performance of the security system.

CN121033385BActive Publication Date: 2026-05-12SHENZHEN CETC CHENGAN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN CETC CHENGAN TECH CO LTD
Filing Date
2025-08-18
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

The existing GPIO detection units cannot dynamically adjust according to the actual threat situation, resulting in wasted system resources and low response efficiency. There is a lack of effective coordination mechanisms between different zones, making it difficult to quickly identify high-risk areas and make targeted deployment adjustments, thus affecting the security effect.

Method used

The first detection data of the GPIO detection unit is detected by the preset YOLOv5 model to obtain the behavioral characteristic parameters of the preset target in each partition. The detection frequency is adjusted according to these parameters to generate the second detection data. The second detection is performed by the YOLOv5 model to determine the configuration of high-risk partitions and associated defense zones, and to generate the arming adjustment command to control the GPIO detection unit and the warning unit.

Benefits of technology

It achieves accurate identification of preset targets and extraction of behavioral feature parameters, avoids resource waste caused by fixed-frequency detection, improves system response efficiency and detection accuracy, realizes collaborative linkage between multiple partitions, and enhances the system's ability to respond to complex threats.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121033385B_ABST
    Figure CN121033385B_ABST
Patent Text Reader

Abstract

The application provides a partition detection method, device and equipment and a storage medium. The method comprises the following steps: detecting first detection data of a GPIO detection unit by a preset Yolov5 model to obtain behavior characteristic parameters of a preset target in each partition; adjusting the detection frequency of the GPIO detection unit according to the behavior characteristic parameters to obtain second detection data; detecting the second detection data by the preset Yolov5 model to obtain a partition detection result; determining a high-risk partition and a corresponding associated defense zone configuration according to the partition detection result; determining a defense adjustment instruction according to the high-risk partition and the associated defense zone configuration; and controlling the GPIO detection unit and the warning unit based on the defense adjustment instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of multi-zone detection technology, and in particular to a zone detection method, apparatus, equipment and storage medium. Background Technology

[0002] Existing GPIO detection units typically employ a fixed-frequency detection mode, failing to dynamically adjust based on actual threat conditions. This results in significant waste of system resources and low response efficiency. In implementing partitioned detection using GPIO detection units, there are clear shortcomings in threat propagation path prediction and partition-based coordinated control. The lack of effective coordination mechanisms between partitions prevents the formation of a unified threat assessment and coordinated response system. When facing complex security threats, it is difficult to quickly identify high-risk areas and make targeted deployment adjustments, severely impacting overall security effectiveness. Summary of the Invention

[0003] This application provides a zone detection method, apparatus, device, and storage medium to improve the linkage effect of multi-zone detection, thereby enhancing security.

[0004] In a first aspect, embodiments of this application provide a partition detection method applied to a partition detection device, the partition detection device comprising: a GPIO detection unit and an alert unit, the method comprising:

[0005] The first detection data of the GPIO detection unit is detected by the preset Yolov5 model to obtain the behavioral feature parameters of the preset target in each partition;

[0006] The detection frequency of the GPIO detection unit is adjusted according to the behavioral feature parameters to obtain second detection data. The second detection data is then detected by a preset Yolov5 model to obtain the partition detection result.

[0007] Based on the partition detection results, determine the high-risk partitions and their corresponding associated defense zone configurations;

[0008] Based on the configuration of the high-risk zone and the associated defense zone, a deployment adjustment command is determined, and the GPIO detection unit and the warning unit are controlled based on the deployment adjustment command.

[0009] Secondly, embodiments of this application provide a partition detection device, the partition detection device comprising: a GPIO detection unit and an alarm unit, the partition detection device comprising:

[0010] The first detection module is used to detect the first detection data of the GPIO detection unit through a preset Yolov5 model to obtain the behavioral feature parameters of the preset target in each partition.

[0011] The second detection module is used to adjust the detection frequency of the GPIO detection unit according to the behavioral feature parameters to obtain second detection data, and to detect the second detection data through a preset Yolov5 model to obtain the partition detection result;

[0012] The risk analysis module is used to determine high-risk zones and their corresponding associated defense zone configurations based on the partition detection results.

[0013] The detection management module is used to determine the arming adjustment command based on the configuration of the high-risk zone and the associated defense zone, and to control the GPIO detection unit and the warning unit based on the arming adjustment command.

[0014] Thirdly, embodiments of this application provide an electronic device, which includes a memory and a processor;

[0015] The memory is used to store computer programs;

[0016] The processor is configured to execute the computer program and, when executing the computer program, implement the partition detection method as described in any of the embodiments of this application.

[0017] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement any of the partition detection methods described in the embodiments of this application.

[0018] This application provides a partition detection method applied to a partition detection device, which includes a GPIO detection unit and an alert unit. The method includes: detecting first detection data of the GPIO detection unit using a preset YOLOv5 model to obtain behavioral characteristic parameters of a preset target in each partition; adjusting the detection frequency of the GPIO detection unit according to the behavioral characteristic parameters to obtain second detection data; detecting the second detection data using a preset YOLOv5 model to obtain a partition detection result; determining high-risk partitions and corresponding associated defense zone configurations based on the partition detection result; determining a deployment adjustment command based on the high-risk partitions and associated defense zone configurations; and controlling the GPIO detection unit and the alert unit based on the deployment adjustment command. In the above method, the first detection data of the GPIO detection unit is intelligently detected by a pre-set Yolov5 model, which realizes accurate identification of preset targets and extraction of behavioral feature parameters. The detection frequency of the GPIO detection unit is adjusted in stages according to the behavioral feature parameters, and then a second detection is performed. This avoids the waste of resources caused by fixed frequency detection and improves the system's response efficiency and detection accuracy. Threat propagation paths are analyzed by partition detection results and partition linkage priority is allocated to realize collaborative linkage between multiple partitions. Based on the configuration of high-risk partitions and associated defense zones, deployment adjustment instructions are generated for targeted dynamic deployment, which improves the system's ability to respond to complex threats. This solves the problem of independent operation and lack of coordination of each partition in traditional systems and significantly improves the overall performance of the security system. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A schematic flowchart illustrating a partition detection method provided in an embodiment of this application;

[0021] Figure 2 A schematic diagram of the interface circuit of the first type of GPIO detection unit provided in the embodiments of this application;

[0022] Figure 3 A schematic diagram of the interface circuit for the second type of GPIO detection unit provided in an embodiment of this application;

[0023] Figure 4 This is a schematic block diagram of a partition detection device provided in an embodiment of this application. Detailed Implementation

[0024] 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 some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0026] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0027] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0028] Please see Figure 1 , Figure 1 This is a schematic flowchart illustrating a partition detection method provided in an embodiment of this application. Figure 1 As shown, the specific steps of this partition detection method include: S101-S104.

[0029] S101. The first detection data of the GPIO detection unit is detected by the preset Yolov5 model to obtain the behavioral characteristic parameters of the preset target in each partition.

[0030] For example, after receiving the first detection data transmitted by the GPIO detection unit, the RGA hardware unit is activated to preprocess the raw detection data. The RGA hardware unit resizes the received video stream data according to a preset resolution standard, and performs color space conversion, converting the YUV format to RGB format to generate standardized video frame data. The video frame data is then normalized, adjusting the pixel value range to the 0-1 interval, preparing for subsequent deep learning inference.

[0031] Please see Figure 2 , Figure 2 This is a schematic diagram of the interface circuit of the first type of GPIO detection unit provided in the embodiments of this application. Figure 2The interface circuit shown is the connection circuit for the network port module, used to connect to GPIO detection units such as camera equipment.

[0032] After the pre-installed Yolov5 model is loaded, standardized video frame data is input into the model's input layer. The CBS module in the Backbone layer performs convolution, batch normalization, and SiLU activation on the input data to extract basic feature information. The CBAM module weights the feature maps using channel attention and spatial attention mechanisms to enhance the expressive power of important features. The E-ELAN module further extracts multi-level features using an efficient layer aggregation network structure, while the MP-CBS module reduces the feature map resolution through max pooling and convolution operations.

[0033] The RFB module in the Neck layer expands the receptive field of the multi-scale features output by the Backbone layer, enhancing the model's ability to detect targets of different sizes. The ASFF module implements adaptive feature fusion, assigning different fusion weights based on feature importance. The Head layer utilizes a multi-threaded parallel detection mechanism to simultaneously process six detection instances: human detection, emergency supplies detection, safety helmet detection, electric vehicle detection, flame and smoke detection, and smoking behavior detection.

[0034] The detection results are processed using a non-maximum suppression algorithm to remove duplicate detection boxes, and confidence level filtering is used to retain high-quality detection results. The target center point is calculated based on the detection box coordinates, and the preset partition boundary information is used to determine the partition to which the target belongs. A motion trajectory tracking algorithm associates the same target in consecutive frames, calculating the target's movement speed, direction, and dwell time. The threat level assessment module determines the threat level based on target type and behavior pattern, a behavior type classifier identifies the target's specific behavior pattern, and a duration statistics module records the target's activity duration in the current partition, generating complete behavioral feature parameters including threat level, behavior type, and duration.

[0035] S102. Adjust the detection frequency of the GPIO detection unit according to the behavioral feature parameters to obtain the second detection data. Detect the second detection data using the preset Yolov5 model to obtain the partition detection result.

[0036] Please see Figure 3 , Figure 3 This is a schematic diagram of the interface circuit of the second type of GPIO detection unit provided in an embodiment of this application. Figure 3 The interface circuit shown is a LoRaWan circuit, used to connect to GPIO detection units such as devices without power, such as power-off buttons, power-off water intrusion detectors, power-off smoke detectors, and power-off environment detectors.

[0037] For example, behavioral characteristic parameters are parsed to extract threat level values, behavior type identifiers, and duration data. Threat levels are quantified using a numerical range of 1-10, with higher values ​​indicating a more severe threat. Behavior types are categorized into several types based on preset classification standards, such as normal patrols, abnormal loitering, rapid movement, and gathering behavior. Duration records the duration of a target's activity within a specific area, expressed in seconds.

[0038] The priority sequence generation algorithm sorts all GPIO detection units according to threat level, with higher threat level partitions receiving higher detection priority. The detection type sequence determines the corresponding detection mode based on behavior type; abnormal dwell behavior triggers a high-frequency detection mode, while normal inspection behavior uses a standard detection mode. The time slice allocation mechanism divides the total detection time according to the priority sequence, with higher priority partitions receiving more time slice resources. During the GPIO detection frequency allocation calibration process, the base detection frequency for each partition is calculated, and the detection frequency for high-priority events is amplified using a weighting coefficient. The weighting coefficient is determined based on the combination of threat level and behavior type: emergency events with a threat level of 8-10 receive a 3x weighting, important events with a threat level of 5-7 receive a 2x weighting, and general events with a threat level of 1-4 maintain the base frequency. Security level parameter data is retrieved from storage units, including the importance of each partition, historical event statistics, and security policy settings. A secondary adjustment is made to the first detection frequency based on the partition security level: the detection frequency for important partitions is increased by 20%, the detection frequency for general partitions remains unchanged, and the detection frequency for low-importance partitions is reduced by 10% to conserve resources.

[0039] The adjusted first detection frequency is distributed to the corresponding GPIO detection units, and each detection unit begins data acquisition according to the new frequency parameters. The second detection data is generated under the new detection strategy, resulting in significantly improved data quality and targeting. This second detection data is then re-input into a pre-set Yolov5 model for detection and analysis, yielding more accurate target calibration data and updated behavioral feature parameters, forming a complete partitioned detection result.

[0040] S103. Determine the configuration of high-risk zones and corresponding associated defense zones based on the partition detection results.

[0041] For example, key information such as detection box coordinates, threat level, behavior type, and duration are extracted from the partition detection results. The threat source identification algorithm traverses the detection data of all partitions, determines the threat type based on the detected target category, calculates the threat intensity using the threat level value and the number of targets, and determines the threat range boundary based on the detection box coordinates and target movement trajectory. The partition threat distribution map stores the threat type, threat intensity, and threat range information for each partition in the form of a data structure. During the path prediction parameter calculation, the temporal changes of the detection box coordinates are analyzed, and the threat spread direction is calculated by subtracting the previous moment's position coordinates from the current position coordinates. The propagation speed is obtained based on the ratio of the position change distance to the time interval. The movement trajectory prediction algorithm estimates the partition location that the target may reach in the future based on historical movement data and the current speed direction. The inter-partition threat propagation probability is calculated using a distance decay model, with the propagation probability between adjacent partitions set to 0.8 and the propagation probability between partitions separated by one partition set to 0.5. The impact assessment considers the importance level, personnel density, and facility value of the target partition, and obtains the value through weighted summation. The threat association matrix is ​​constructed in the form of a two-dimensional array, where the matrix element values ​​represent the threat association strength between two partitions. The priority sequence for linkage between zones is sorted according to the numerical value in the threat correlation matrix. The urgency assessment comprehensively considers the threat level, propagation speed, and impact range to calculate the response requirement for each zone. A threat level threshold of 6 is set for high-risk zone screening; zones exceeding this threshold are extracted and designated as high-risk zones. Zone management policies are retrieved from the configuration database, allocating GPIO detection devices, alarm devices, and linkage control devices to each high-risk zone, generating associated zone configurations.

[0042] S104. Determine the arming adjustment command based on the high-risk zone and associated defense zone configuration, and control the GPIO detection unit and warning unit based on the arming adjustment command.

[0043] For example, the threat level data in high-risk zones and the device allocation information in the associated zone configurations are parsed. The detection parameter dynamic adjustment algorithm calculates control parameters based on the threat level. The detection frequency adjustment formula is the base frequency multiplied by a threat level coefficient; the coefficient is 2.5 for threat levels 8-10 and 1.8 for threat levels 6-7. The trigger threshold is set according to preset target types: 0.7 for personnel intrusion, 0.8 for vehicle anomalies, and 0.9 for fire / smoke. The response time requirement for high-threat-level zones is within 200 milliseconds. Device control parameters encapsulate three core parameters: detection frequency, trigger threshold, and response time. During alarm strategy level matching, the alarm coverage is determined based on the threat propagation probability; adjacent zones with a propagation probability greater than 0.6 activate the warning mode. Audible and visual alarm intensity is divided into three levels according to threat level, and the alarm duration is determined according to the threat type: 5 minutes for personnel intrusion and until the threat is resolved for fire. Warning control parameters store three configurations: audible and visual alarm intensity, alarm duration, and alarm range. Device control parameters and warning control parameters are encapsulated according to a communication protocol format, with each high-risk zone corresponding to an independent instruction packet. Arming adjustment commands are sent to the corresponding partition control nodes via a dedicated communication channel. Upon receiving the commands, the GPIO detection unit and alert unit update the control parameters and execute the commands as expected.

[0044] This application provides a partition detection method applied to a partition detection device, which includes a GPIO detection unit and an alert unit. The method includes: detecting first detection data of the GPIO detection unit using a preset Yolov5 model to obtain behavioral characteristic parameters of a preset target in each partition; adjusting the detection frequency of the GPIO detection unit according to the behavioral characteristic parameters to obtain second detection data; detecting the second detection data using a preset Yolov5 model to obtain a partition detection result; determining high-risk partitions and corresponding associated defense zone configurations based on the partition detection result; determining a deployment adjustment command based on the high-risk partitions and associated defense zone configurations; and controlling the GPIO detection unit and the alert unit based on the deployment adjustment command. In the above method, the first detection data of the GPIO detection unit is intelligently detected by a pre-set Yolov5 model, which realizes accurate identification of preset targets and extraction of behavioral feature parameters. The detection frequency of the GPIO detection unit is adjusted in stages according to the behavioral feature parameters, and then a second detection is performed. This avoids the waste of resources caused by fixed frequency detection and improves the system's response efficiency and detection accuracy. Threat propagation paths are analyzed by partition detection results and partition linkage priority is allocated to realize collaborative linkage between multiple partitions. Based on the configuration of high-risk partitions and associated defense zones, deployment adjustment instructions are generated for targeted dynamic deployment, which improves the system's ability to respond to complex threats. This solves the problem of independent operation and lack of coordination of each partition in traditional systems and significantly improves the overall performance of the security system.

[0045] To more clearly illustrate the technical solution of this application, the technical solution of this application will be described below through specific embodiments. It should be noted that the specific embodiments are used to expand the description of the technical solution of this application, and are not intended to limit this application.

[0046] In some embodiments, the partition detection device further includes: an RGA hardware unit, which detects the first detection data from the GPIO detection unit using a preset Yolov5 model to obtain behavioral characteristic parameters of a preset target in each partition, including: converting the first detection data into video frame data using the RGA hardware unit; analyzing the video frame data using a preset Yolov5 model to obtain target calibration data, which includes: detection box coordinates, confidence level, and category label; performing IoU threshold filtering and target category classification on the target calibration data to obtain classification calibration data; calculating the positional state information of the preset target based on the classification calibration data; and performing trajectory analysis on the preset target based on the positional state information to obtain behavioral characteristic parameters, which include: threat level, behavior type, and duration.

[0047] For example, upon receiving the first detection data transmitted by the GPIO detection unit and starting the RGA hardware unit, during the process of converting the original YUV420 format to RGB format, the Y, U, and V values ​​of each pixel are converted into corresponding R, G, and B values ​​through a preset matrix operation formula. Simultaneously, a bilinear interpolation algorithm is called to scale the image to match standard resolution requirements. The normalization processor maps the pixel value range from 0-255 to a floating-point range of 0-1, completing the generation of standardized video frame data. The standardized video frame data is loaded into the GPU memory and an input buffer is established. A preset Yolov5 model performs convolution operations and nonlinear activation transformations through weight parameters, outputting target calibration data containing detection box coordinates, confidence scores, and class labels. The detection box coordinates use a representation of the center point plus width and height to record the spatial location information of the target.

[0048] An IoU threshold filtering algorithm is activated to calculate the intersection-union ratio (IoU) of overlapping detection boxes. When the IoU value of two detection boxes exceeds a preset threshold, the detection box with higher confidence is retained, and duplicate detections are deleted. The detection results are then categorized into different groups such as people, vehicles, and objects based on category labels, resulting in classification and labeling data. This data is stored in a structured format, containing the target ID, category code, bounding box coordinates, and confidence score for each record. In the image coordinate system, the bounding box coordinates of the classification and labeling data are converted to coordinates in actual physical space. This conversion process requires retrieving camera calibration parameters and installation height configuration data. For partition location constraint determination, a ray-mapping method is used to determine points within polygons. Rays are emitted from the target location in any direction, and the number of intersections with the partition boundary is counted to determine the partition to which the target belongs. Position status information records the target's current partition number, precise coordinate position, distance from the boundary, and current movement status.

[0049] Each preset target is assigned a unique tracking ID and a trajectory record is established. A feature matching algorithm is used to associate the same target across different time frames. Feature descriptors extract the target's color histogram, texture features, and shape descriptors for subsequent matching comparisons. Motion trajectory data is stored as a time-series linked list, containing historical location information for each node, including timestamp, spatial coordinates, direction of movement, and instantaneous velocity. A Kalman filter smooths the trajectory data to eliminate positional jitter caused by detection errors. Time-series analysis processes the trajectory data and calculates the target's average movement speed, maximum dwell time, and activity area range. Threat assessment calculates the threat level based on target type, behavior pattern, and activity characteristics. Behavior type identification determines the specific behavior category through motion pattern matching. Duration statistics record the target's cumulative activity time in the current partition. Behavioral feature parameters integrate the three core elements of threat level, behavior type, and duration to form a standardized data structure.

[0050] In some embodiments, adjusting the detection frequency of the GPIO detection unit according to behavioral characteristic parameters to obtain second detection data includes: determining the priority sequence and detection type sequence corresponding to the GPIO detection unit based on threat level, behavior type, and duration; allocating time slices to the GPIO detection unit according to the priority sequence and detection type sequence to obtain a frequency allocation calibration of the GPIO detection unit; weighting the detection frequency of high-priority events in the frequency allocation calibration to obtain a first detection frequency; retrieving the security level parameters of the GPIO detection unit, and obtaining a second detection frequency based on the security level parameters and the first detection frequency; and controlling the GPIO detection unit to perform detection according to the adjusted second detection frequency to obtain second detection data.

[0051] For example, the threat level, behavior type classification code, and duration data are extracted from the behavioral feature parameters. The threat level is converted into a corresponding priority weight coefficient through a mapping table. The behavior type code determines the specific execution mode of the detection strategy. Intrusion behavior triggers a continuous detection mode, while patrol behavior uses an intermittent detection mode. Abnormal loitering behavior enables a focused detection mode to improve detection accuracy. A fast sorting algorithm is executed on all GPIO detection units according to the threat level weight. Detection units with high threat levels are placed at the front of the priority sequence to receive priority processing. The detection type sequence determines the specific working mode of each detection unit based on different behavior types. Personnel intrusion detection focuses on human target recognition, while vehicle anomaly detection mainly monitors vehicle behavior. A weighted round-robin scheduling method is used to allocate time slice resources to the GPIO detection units. High-priority detection units receive longer time slices to ensure the detection quality of important areas. Simultaneously, it should be ensured that each detection unit receives a basic execution opportunity to avoid long waiting times for low-priority tasks. The frequency allocation calibration of the GPIO detection units records the events, time slice length, execution order, and scheduling cycle parameters of each detection unit in detail, providing basic data support for subsequent frequency adjustments. High-priority events in the frequency allocation calibration are subjected to frequency weighting processing to obtain the first detection frequency. The weighting coefficient is dynamically calculated based on the threat level. The first detection frequency is stored in array form as the weighted frequency configuration of each detection unit.

[0052] The security level parameter data of the GPIO detection unit is retrieved. The configuration content includes the importance level classification of each partition, historical event statistics, and current security policy settings. Based on the partition security level, the first detection frequency is adjusted and optimized a second time to obtain the second detection frequency. The detection frequency of important partitions is increased with a safety margin to ensure detection reliability. The frequency settings of general partitions are maintained at the calculated values, while the detection frequency of edge partitions is appropriately reduced to save computing resources and power consumption. The second detection frequency is sent to the corresponding GPIO detection unit via control commands. After receiving the new frequency parameters, the detection unit updates the configuration parameters of its internal sampling clock divider. The timer adjusts the data acquisition period interval according to the new frequency settings to ensure that the detection work is executed accurately at the predetermined frequency. The second detection data is generated under the drive of the new detection strategy, and data quality monitoring checks the integrity and accuracy of the collected data in real time.

[0053] In some embodiments, the pre-built YOLOv5 model includes a BackBone layer, a Neck layer, and a Head layer. The BackBone layer includes a CBS module, a CBAM module, an E-ELAN module, and an MP-CBS module. The Neck layer includes an RFB module and an ASFF module. Video frame data is analyzed using the pre-built YOLOv5 model to obtain target calibration data, which includes bounding box coordinates, confidence scores, and class labels. This includes inputting video frame data into the pre-built YOLOv5 model and creating various detection instances within it. These detection instances include: human detection, emergency supplies detection, safety helmet detection, electric vehicle detection, flame and smoke detection, and smoking behavior detection. In the BackBone layer, [the following is a continuation of the previous sentence, likely due to an error in the original text]. Video frame data undergoes feature extraction according to a preset module order to obtain feature images. The preset module order is: CBS module, CBAM module, E-ELAN module, and MP-CBS module. In the Neck layer, the RFB module expands the feature images from different receptive fields to obtain contextual feature information, and the ASFF module performs adaptive weight allocation and feature fusion on the feature images to obtain labeled images. In the Head layer, multiple detection instances are simultaneously detected based on the contextual feature information and labeled images to obtain first prediction data. Non-maximum suppression and confidence filtering are applied to the first prediction data to obtain second prediction data. Based on the second prediction data, the center point of the detection box is calculated and the spatial position is analyzed to obtain target calibration data of the preset target in different partitions.

[0054] For example, after inputting standardized video frame data into a pre-built Yolov5 model, parallel processing channels for multiple detection instances are activated. Human detection instances specifically identify personnel targets, emergency supplies detection instances monitor rescue equipment, safety helmet detection instances check protective gear, electric vehicle detection instances identify vehicle targets, flame and smoke detection instances detect signs of fire, and smoking behavior detection instances identify violations. Each detection instance is configured with an independent classifier and detection threshold to ensure detection accuracy for different target types.

[0055] The feature extraction process of the Backbone layer is executed in a pre-defined module order. The CBS module receives input video frame data, performs feature extraction on the image using convolutional kernels, stabilizes the training process using batch normalization layers, and enhances the non-linear expressive power of the model using the SiLU activation function. The CBAM module identifies important feature channels through a channel attention mechanism, locates key spatial positions through a spatial attention mechanism, and multiplies the attention weights with the original feature map to obtain the enhanced feature representation. The E-ELAN module adopts an efficient layer aggregation network structure, extracting multi-level feature information through residual connections and dense connections. The MP-CBS module combines max pooling and convolution operations to reduce the resolution of the feature map while preserving important feature information, resulting in multi-scale feature images.

[0056] The feature fusion process in the Neck layer utilizes the collaborative work of the RFB and ASFF modules. The RFB module incorporates multiple convolutional kernels of varying sizes to capture contextual information at different scales. Dilated convolutions increase the receptive field, enabling the model to capture a wider range of spatial relationships. The expanded feature map contains rich contextual information, providing a more comprehensive semantic understanding for subsequent object detection. The ASFF module adaptively assigns weights to the multi-scale feature images; the learned weights reflect the contribution of features at different scales to the final detection result. The feature fusion process integrates feature information from multiple scales into a unified labeled image through weighted summation.

[0057] The detection process in the Head layer employs a multi-threaded parallel mechanism to improve computational efficiency. Multiple worker threads are created in the thread pool manager, each responsible for handling a specific type of detection task. Contextual feature information and labeled images are distributed as input data to each detection instance. Synchronous detection ensures that all detection instances process the current frame data simultaneously, avoiding detection errors caused by temporal inconsistencies. The first prediction data contains all possible target candidate boxes and their related attribute information. A non-maximum suppression algorithm removes candidate boxes with excessive overlap, preventing the same target from being detected repeatedly. A confidence filtering process retains detection results with confidence scores exceeding a threshold, filtering out uncertain detection boxes. The second prediction data, after filtering, contains high-quality target detection candidates.

[0058] The geometric center of the target is determined based on the bounding box coordinates. The center point coordinates are calculated by averaging the coordinates of the top-left and bottom-right corners of the bounding box. The spatial position analyzer combines the center point coordinates with camera calibration parameters to convert them into actual physical space location information. The zoning mapping algorithm determines the zoning number to which each target belongs based on preset zoning boundary data. The positional relationship describes the relative position and distance information between the target and the zoning boundary. The target calibration data is output in a structured data format, containing complete information such as target category, location coordinates, confidence score, and zoning, providing a reliable data foundation for subsequent behavior analysis and decision-making.

[0059] In some embodiments, determining the configuration of high-risk zones and corresponding associated defense zones based on the zone detection results includes: identifying threat sources for each zone based on the detection frame coordinates, threat level, behavior type, and duration in the zone detection results to obtain a zone threat distribution map, which includes threat type, threat intensity, and threat range; calculating the threat propagation direction and propagation speed based on the detection frame coordinates and behavior type to obtain path prediction parameters; calculating the threat propagation probability and impact degree between zones based on the path prediction parameters to construct a threat correlation matrix; determining the priority order of zone linkage responses using the threat correlation matrix, and determining the linkage priority sequence between zones based on the priority order; filtering and marking zones with threat levels exceeding a preset threshold in the linkage priority sequence to obtain high-risk zones; and matching the high-risk zones with a preset defense zone management strategy to allocate corresponding GPIO detection units, alarm devices, and linkage control devices to each high-risk zone to obtain the associated defense zone configuration.

[0060] For example, key data such as detection box coordinates, threat level, behavior type, and duration are extracted from the partition detection results. The detection records of all partitions are traversed, and threat sources are identified based on the detected target categories. Personnel-related threats are identified as intrusion threats based on human detection results; flame and smoke-related threats are identified as fire threats based on combustion signs; and vehicle-related threats are judged as traffic threats or equipment threats based on behavior patterns. Threat intensity is calculated using a formula that multiplies the threat level value by the number of detected targets. The threat intensity of a single high-threat-level target is higher than the combined threat intensity of multiple low-threat-level targets. The threat range is determined based on the detection box coordinates and historical data of target movement trajectories, defining its potential impact area boundary. Targets with faster movement speeds have a larger threat range, while the threat range of stationary targets is mainly concentrated around their current location. The partition threat distribution map stores the threat information of each partition using a hash table data structure. The key is the partition number, and the corresponding value includes a threat type identifier, a threat intensity value, and a set of threat range coordinates, providing basic data support for subsequent path prediction and priority allocation.

[0061] The threat propagation direction is calculated based on the positional changes of the detection box coordinates over time. This is achieved by subtracting the target's position coordinates from the previous moment's coordinates at the current moment, resulting in a direction vector. The vector's magnitude reflects the target's movement distance, while its angle represents the threat's propagation direction. Propagation speed is calculated by dividing the distance of positional change between two consecutive detection moments by the time interval. High-speed moving threats have stronger propagation capabilities and a wider impact range, while stationary or low-speed moving threats have a relatively limited propagation range but may cause sustained impact in localized areas. Behavioral type significantly influences propagation patterns. Intrusion behavior typically exhibits unidirectional rapid propagation, inspection behavior shows a round-trip propagation pattern, aggregation behavior displays multi-point propagation characteristics, and equipment failure behavior mainly produces localized propagation impacts. Path prediction parameters include the threat propagation direction angle, propagation speed value, expected propagation distance, and possible traversal sequence. These parameters, combined with the geographical layout information of the traversals, are used to predict the threat's propagation trajectory and impact range over future time periods.

[0062] Threat propagation probability is calculated based on path prediction parameters and spatial topology relationships between partitions. The propagation probability between adjacent partitions is set to a higher value, while the propagation probability between partitions at intervals is calculated using a distance attenuation model, with the probability decreasing as the distance increases. Impact assessment comprehensively considers multiple factors, including personnel density, facility importance, historical event frequency, and current security status of the target partition. A weighted summation method is used to calculate the severity of the threat impact on each partition, with partitions densely populated with important facilities receiving higher impact weights. The threat association matrix is ​​constructed as a two-dimensional array, with row and column indices representing different partition numbers. The values ​​of the matrix elements represent the threat association strength between two partitions, calculated by combining propagation probability and impact severity. The diagonal elements of the matrix represent the threat level of each partition itself, while the off-diagonal elements reflect the threat transmission relationship between partitions.

[0063] Prioritization is achieved using values ​​from the threat correlation matrix. A matrix row summation method is used to calculate the overall correlation score for each partition. Partitions with higher scores are considered critical nodes in the threat propagation network and require priority attention and response. The prioritization process considers factors such as the number of threat sources, threat intensity, propagation impact range, and response urgency. Partitions with high urgency and wide impact are placed at the beginning of the priority sequence. Partitions with moderate threat levels are sorted according to standard priority, while low-risk partitions are placed at the end of the sequence to optimize resource allocation efficiency. The priority sequence of partitions is stored as an ordered list, with each element containing key information such as partition number, overall correlation score, response priority level, and expected response time.

[0064] Threat level thresholds are used to filter the linkage priority sequence, setting these thresholds as the criteria for determining high-risk zones. Each zone record in the priority sequence is traversed, and its threat level is compared to the preset threshold. Zones with threat levels exceeding the threshold are marked as high-risk and added to the filtering results. High-risk zones include detailed information such as zone number, threat level value, main threat type, estimated impact time, and emergency response requirements. The list is sorted from highest to lowest threat level for subsequent resource allocation and response scheduling. High-risk zones are matched against preset zone management strategies. The strategy library contains standard device configuration schemes corresponding to different threat levels and types. Based on the specific threat characteristics of the high-risk zone, the appropriate configuration template is selected. The number and specifications of GPIO detection units that meet the detection requirements are allocated to each high-risk zone. Appropriate alarm devices are configured, including audible and visual alarms, warning lights, and voice broadcasting equipment. Necessary linkage control devices are deployed, including access controllers, camera PTZ controls, and emergency lighting control units. The associated zone configuration records a complete equipment list, installation location coordinates, and control parameter settings for each high-risk zone using structured data.

[0065] In some embodiments, determining the deployment adjustment instructions based on the high-risk partition and associated defense zone configuration includes: dynamically adjusting the detection parameters of the GPIO detection unit according to the threat level in the high-risk partition and the device allocation information in the associated defense zone configuration to obtain device control parameters, which include: detection frequency, trigger threshold, and response time; performing level matching on the alarm strategy of the warning unit based on the device control parameters and the threat propagation probability in the high-risk partition to obtain warning control parameters, which include: audible and visual alarm intensity, alarm duration, and alarm range; and encapsulating the device control parameters and warning control parameters into instructions to generate deployment adjustment instructions for different high-risk partitions.

[0066] For example, the threat level value and threat type identifier of each partition in the high-risk zone are analyzed. Combined with the device allocation information in the associated zone configuration, a list of GPIO detection units requiring parameter adjustments is determined. Partitions with higher threat levels require more frequent detection to improve the timeliness of anomaly detection. Partitions with different threat types require different trigger threshold settings to adapt to specific threat characteristics. Detection frequency adjustment uses a formula of base frequency multiplied by a threat level coefficient. A larger coefficient is set for high-threat-level partitions to ensure detection density, a moderate coefficient is used for medium-threat-level partitions, and the base detection frequency is maintained or appropriately reduced for low-threat-level partitions to conserve system resources. Trigger thresholds are differentiated based on the type and threat characteristics of the preset targets. The trigger threshold for personnel intrusion threats is set to a lower value to improve detection sensitivity, the trigger threshold for equipment failure threats is set to a medium value to balance detection accuracy and false alarm rate, and the trigger threshold for fire and smoke threats is set to a higher value to ensure detection reliability. The response time parameter determines the maximum permissible delay from when the GPIO detection unit detects an anomaly to when it issues an alarm signal, based on the urgency of the threat. Urgent threats require a very short response time, significant threats allow for a moderate response delay, and general threats can tolerate a longer response time to optimize overall system performance. Device control parameters encapsulate three core configuration items—detection frequency, trigger threshold, and response time—in a data packet format. The data packet header contains the device identifier and configuration version information of the target GPIO detection unit.

[0067] Alarm strategy levels are matched based on equipment control parameters and threat propagation probability data in high-risk zones. Zones with higher threat propagation probabilities require wider alarm coverage to ensure personnel in relevant areas receive timely warnings, while zones with lower propagation probabilities can adopt localized alarm strategies to avoid unnecessary disturbances. The intensity of audible and visual alarms is dynamically adjusted according to the threat level and ambient noise level. High-threat emergencies use maximum volume and brightness alarm outputs, medium-threat threats use medium-intensity audible and visual alarms, and low-threat threats use standard-intensity alert alarms. Alarm duration is set according to the characteristics of different threat types. Alarms for personnel intrusion threats need to last longer to ensure relevant personnel are fully aware and can take countermeasures, alarms for equipment malfunction threats can last relatively shorter, and alarms for fire threats need to continue until the threat is completely eliminated. The alarm range is calculated using the threat influence radius and zone boundary information. The influence radius is calculated based on threat intensity and propagation speed. The alarm range needs to cover all potentially affected areas, including adjacent zones and associated passages, and the range boundaries should be consistent with existing zone divisions for ease of management and control. The warning control parameters are stored in a structured data format, including configuration information such as the intensity level of the audible and visual alarm, the duration of the alarm, the coordinate boundaries of the alarm range, and the trigger conditions.

[0068] The device control parameters and alarm control parameters are encapsulated into instructions according to a predetermined communication protocol format. Each high-risk zone corresponds to an independent arming adjustment instruction packet. The header of the instruction packet contains basic information such as the zone number, instruction type identifier, priority level, timestamp, and checksum. The instruction content contains specific GPIO detection unit parameter modification commands and alarm unit control commands. The parameter modification commands specify the detection frequency value to be adjusted, the trigger threshold setting, and the response time requirement. The control commands include the alarm device's activation conditions, audible and visual output intensity, and alarm range configuration. The instruction execution sequence is coordinated using priority level and timestamp information to ensure that high-priority instructions are executed first, and low-priority instructions are executed sequentially. The arming adjustment instructions are sent to the corresponding zone control nodes through a dedicated control network channel. A reliable transmission protocol is used during network transmission to ensure the integrity and timeliness of the instructions. After receiving the instructions, the zone control nodes parse and verify them. Once verification is successful, the specific control commands are distributed to the relevant GPIO detection units and alarm units to perform the actual parameter adjustments and device control operations.

[0069] In some embodiments, trajectory analysis is performed on a preset target based on location status information to obtain behavioral characteristic parameters, including threat level, behavior type, and duration. This includes: tracking the preset target's trajectory based on location status information to obtain motion trajectory data; analyzing the preset target's movement speed, dwell time, and behavioral patterns to determine the preset target's behavior type, including normal zone behavior, delayed zone behavior, emergency zone behavior, and equipment failure behavior; calculating the preset target's danger level and urgency level based on the behavior type and preset threat assessment rules to obtain the threat level; calculating the preset target's cumulative dwell time in the current zone and predicting its predicted dwell time in the next zone, determining the duration based on the cumulative dwell time and predicted dwell time; and constructing behavioral characteristic parameters based on the threat level, behavior type, and duration.

[0070] For example, an independent trajectory tracking record is established for each preset target based on location status information. The same target in different time frames is accurately associated using the principles of feature similarity and position continuity. Feature descriptors extract the target's appearance feature vector, including color histograms, texture features, and shape descriptors, for cross-frame target matching. A position predictor predicts the possible location range for the next frame based on the target's historical motion trajectory information. The trajectory data stores the target's historical position sequence in a linked list structure. Each data node contains detailed motion information such as precise timestamps, spatial coordinates, direction of movement, and instantaneous velocity. A Kalman filter algorithm smooths the original trajectory data to eliminate trajectory position jitter caused by detection errors and environmental interference.

[0071] Motion feature analysis is performed on trajectory data. The instantaneous movement speed and statistical average speed of the target are calculated based on the spatial distance and corresponding time intervals between consecutive locations. The acceleration or deceleration trend of the target is analyzed through the rate of change of speed; sharp speed changes usually indicate potential abnormal behavior. Dwell time statistics identify the period of time the target remains stationary at a specific location. The dwell time threshold is dynamically set according to different target types to adapt to the detection needs of different scenarios. Combined analysis of movement speed, dwell time, and behavior patterns is used to determine the specific behavior type of the target. Normal inspection mode is characterized by uniform linear movement with a stable and predictable path; abnormal loitering mode is characterized by repeated back-and-forth movement within a small area; rapid traversal mode is characterized by high-speed linear movement, usually indicating an emergency or abnormal state. Clustering behavior is identified through cluster analysis of multiple target locations; when the distance between targets is less than a set threshold, a clustering behavior marker is triggered.

[0072] The identified behavioral patterns are mapped to a predefined behavioral type classification system. Normal zone behaviors correspond to routine and compliant personnel activities, including standard activities such as routine inspections, equipment maintenance, and routine security checks. Delayed zone behaviors indicate suspicious activities requiring further continuous observation, such as prolonged abnormal stays, frequent back-and-forth movements, and deviations from normal paths. Emergency zone behaviors represent dangerous situations requiring immediate response, including high-risk behaviors such as rapid unauthorized intrusion, violent sabotage, and emergency fire escapes. Equipment malfunction behaviors are identified through abnormal operating states of equipment targets, including abnormal equipment location deviations, abnormal equipment vibrations, and abnormal operating procedures. Based on the determined behavioral types and a pre-defined threat assessment rule base, a comprehensive threat level score for the target is calculated by weighted summation, taking into account multiple assessment dimensions such as the degree of danger, potential impact, and urgency of the event.

[0073] The cumulative dwell time of a pre-defined target within the current partition is statistically analyzed using time series analysis, including the sum of the target's movement time and stationary waiting time. The statistical accuracy of activity duration reaches the second level to ensure the accuracy and reliability of the time analysis. The predicted dwell time estimator, based on the target's current movement trend, historical activity data, and environmental constraints, uses time series analysis methods to predict the possible dwell time of the target in the next partition. The prediction algorithm considers the typical movement patterns of the target and the impact of external environmental changes. The duration calculation combines the cumulative dwell time in the current partition and the predicted dwell time in the next partition to obtain the estimated total duration of the target's complete activity cycle. The time weighting coefficient is dynamically adjusted according to the security importance of different time periods, with a higher weighting coefficient given to nighttime periods due to higher security risks. The calculated threat level, identified behavior type, and statistical duration are integrated into a unified data structure of behavioral characteristic parameters.

[0074] Please see Figure 4 , Figure 4 This is a schematic block diagram of a partition detection device 200 provided in an embodiment of this application. The partition detection device 200 is used to perform the aforementioned partition detection method. The partition detection device 200 can be configured in a server.

[0075] The server can be a standalone server, a server cluster, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0076] like Figure 4 As shown, the zone detection device 200 includes: a first detection module 201, a second detection module 202, a risk analysis module 203, and a detection management module 204.

[0077] The first detection module 201 is used to detect the first detection data of the GPIO detection unit through a preset Yolov5 model, and obtain the behavioral characteristic parameters of the preset target in each partition.

[0078] The second detection module 202 is used to adjust the detection frequency of the GPIO detection unit according to the behavioral feature parameters to obtain the second detection data. The second detection data is then detected by a preset Yolov5 model to obtain the partition detection result.

[0079] The risk analysis module 203 is used to determine the configuration of high-risk zones and corresponding associated defense zones based on the zone detection results.

[0080] The detection management module 204 is used to determine the arming adjustment command based on the configuration of high-risk zones and associated defense zones, and to control the GPIO detection unit and the warning unit based on the arming adjustment command.

[0081] This application provides an electronic device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and, when executing the computer program, implements a partition detection method as described in any of the embodiments of this application.

[0082] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it causes the processor to implement any of the partition detection methods described in this application.

[0083] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A partition detection method, characterized in that, The partition detection device is applied to a partition detection apparatus, which includes a GPIO detection unit and an alert unit, and the partition detection method includes: The first detection data of the GPIO detection unit is detected by a preset Yolov5 model to obtain the behavioral characteristic parameters of the preset target in each partition. The behavioral characteristic parameters include: threat level, behavior type and duration. The priority sequence and detection type sequence corresponding to the GPIO detection unit are determined based on the threat level, behavior type, and duration. Time slices are allocated to the GPIO detection unit according to the priority sequence and detection type sequence to obtain a frequency allocation calibration for the GPIO detection unit. High-priority events in the frequency allocation calibration are weighted by detection frequency to obtain a first detection frequency. The security level parameters of the GPIO detection unit are retrieved, and a second detection frequency is obtained based on the security level parameters and the first detection frequency. The GPIO detection unit is controlled to perform detection according to the adjusted second detection frequency to obtain second detection data. The second detection data is then detected using a preset Yolov5 model to obtain a partitioned detection result. Based on the detection frame coordinates, threat level, behavior type, and duration in the partition detection results, threat sources are identified for each partition to obtain a partition threat distribution map, which includes threat type, threat intensity, and threat range. Threat propagation direction and speed are calculated based on the detection frame coordinates and behavior type to obtain path prediction parameters. Threat propagation probability and impact between partitions are calculated based on the path prediction parameters to construct a threat correlation matrix. The priority order of partition linkage responses is determined using the threat correlation matrix, and a linkage priority sequence between partitions is determined based on this priority order. Partitions with threat levels exceeding a preset threshold in the linkage priority sequence are filtered and marked to obtain high-risk partitions. A preset zone management strategy is matched to these high-risk partitions, and corresponding GPIO detection units, alarm devices, and linkage control devices are assigned to each high-risk partition to obtain the associated zone configuration. Based on the configuration of the high-risk zone and the associated defense zone, a deployment adjustment command is determined, and the GPIO detection unit and the warning unit are controlled based on the deployment adjustment command.

2. The partition detection method as described in claim 1, characterized in that, The partition detection device further includes: an RGA hardware unit, which detects the first detection data of the GPIO detection unit using a preset Yolov5 model to obtain the behavioral characteristic parameters of the preset target in each partition, including: The RGA hardware unit converts the first detection data into video frame data. The target calibration data is obtained by analyzing the video frame data using a pre-set Yolov5 model. The target calibration data includes: detection box coordinates, confidence score, and class label. The target calibration data is subjected to IoU threshold filtering and target category classification to obtain classification calibration data; Calculate the position and status information of the preset target based on the classification and calibration data; Based on the location status information, the trajectory of the preset target is analyzed to obtain behavioral feature parameters.

3. The partition detection method as described in claim 1, characterized in that, The step of determining the deployment adjustment instruction based on the high-risk zone and the associated defense zone configuration includes: Based on the threat level in the high-risk zone and the device allocation information in the associated defense zone configuration, the detection parameters of the GPIO detection unit are dynamically adjusted to obtain device control parameters, which include: detection frequency, trigger threshold, and response time. Based on the device control parameters and the threat propagation probability in the high-risk zone, the alarm strategy of the warning unit is matched with the level to obtain the warning control parameters, which include: audible and visual alarm intensity, alarm duration and alarm range. The device control parameters and the warning control parameters are encapsulated into instructions to generate arming adjustment instructions for different high-risk zones.

4. The partition detection method as described in claim 2, characterized in that, The trajectory analysis of the preset target based on the location status information is performed to obtain behavioral characteristic parameters, which include: threat level, behavior type, and duration. Based on the location status information, the preset target is tracked to obtain motion trajectory data; Analyze the movement speed, dwell time, and behavior patterns of the preset target to determine the behavior type of the preset target. The behavior type includes: normal zone behavior, delayed zone behavior, emergency zone behavior, and equipment failure behavior. Based on the behavior type and the preset threat assessment rules, the degree of danger and urgency of the preset target are calculated to obtain the threat level; The cumulative dwell time of the preset target in the current partition is calculated, and the predicted dwell time in the next partition is predicted. The duration is determined based on the cumulative dwell time and the predicted dwell time. Behavioral characteristic parameters are constructed based on the threat level, the behavior type, and the duration.

5. A partition detection device, characterized in that, The partition detection device includes: a GPIO detection unit and an alert unit, and the partition detection device is used to execute the partition detection method as described in any one of claims 1-4. The partition detection device includes: The first detection module is used to detect the first detection data of the GPIO detection unit through a preset Yolov5 model to obtain the behavioral characteristic parameters of the preset target in each partition. The behavioral characteristic parameters include: threat level, behavior type and duration. The second detection module is used to determine the priority sequence and detection type sequence corresponding to the GPIO detection unit based on the threat level, the behavior type, and the duration; allocate time slices to the GPIO detection unit according to the priority sequence and the detection type sequence to obtain the frequency allocation calibration of the GPIO detection unit; weight the detection frequency of high-priority events in the frequency allocation calibration to obtain a first detection frequency; retrieve the security level parameter of the GPIO detection unit, and obtain a second detection frequency based on the security level parameter and the first detection frequency; control the GPIO detection unit to perform detection according to the adjusted second detection frequency to obtain second detection data; and detect the second detection data through a preset Yolov5 model to obtain a partition detection result. The risk analysis module is used to identify threat sources in each partition based on the detection frame coordinates, threat level, behavior type, and duration in the partition detection results, and obtain a partition threat distribution map, which includes threat type, threat intensity, and threat range; calculate the threat spread direction and propagation speed based on the detection frame coordinates and behavior type to obtain path prediction parameters; calculate the threat propagation probability and impact degree between partitions based on the path prediction parameters to construct a threat correlation matrix; determine the priority order of partition linkage response using the threat correlation matrix, and determine the linkage priority sequence between partitions based on the priority order; filter and mark partitions with threat levels exceeding a preset threshold in the linkage priority sequence to obtain high-risk partitions; and match the high-risk partitions with a preset zone management strategy to allocate corresponding GPIO detection units, alarm devices, and linkage control devices to each high-risk partition to obtain the associated zone configuration. The detection management module is used to determine the arming adjustment command based on the configuration of the high-risk zone and the associated defense zone, and to control the GPIO detection unit and the warning unit based on the arming adjustment command.

6. An electronic device, characterized in that, The electronic device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and, in executing the computer program, implement the partition detection method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to implement the partition detection method as described in any one of claims 1 to 4.