Perimeter intrusion alarm method and system for periphery of dam area

By deploying a lightweight YOLO model and a collaborative alarm mechanism within the front-end camera, the latency and environmental interference issues of the dam area perimeter security system were resolved, achieving efficient and accurate intrusion detection and immediate response.

CN120997955APending Publication Date: 2025-11-21THREE GORGES JINSHAJIANG CHUANYUN HYDROPOWER DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511274357.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

The existing perimeter security system for dam areas suffers from problems such as video data transmission delays, image quality interference from the natural environment, and insufficient front-end computing power, leading to frequent false alarms and missed alarms. High-precision models cannot be directly deployed on edge devices.

Method used

A lightweight intrusion detection model is deployed within the front-end camera. The YOLO model is optimized through transfer learning, progressive structured pruning, and linear integer quantization. Combined with collaborative alarm and linkage response mechanisms, localized analysis and decision-making are achieved.

Benefits of technology

It improves the real-time performance and accuracy of intrusion alerts, reduces network latency and computing resource requirements, and enhances the system's adaptability to harsh environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997955A_ABST
    Figure CN120997955A_ABST
Patent Text Reader

Abstract

The invention discloses a perimeter intrusion alarm method and system for the periphery of a dam area. The method comprises the following steps: collecting video images through a front-end camera deployed at the periphery of the dam area; the front-end camera preprocesses the video image to obtain a standardized input image; inputting the standardized input image into a lightweight intrusion detection model preset in a front-end camera, and carrying out intrusion target detection; and according to an intrusion target detection result, when an intrusion behavior is detected, a front-end camera directly triggers collaborative alarm and linkage response to form a complete end-side decision and execution closed loop. A closed-loop system for carrying out localized analysis and decision-making at a data source is constructed, so that network delay and bandwidth pressure caused by remotely transmitting video data to a back-end server for analysis in a traditional scheme are avoided, and the time from discovery of an intrusion behavior to triggering of a physical response is shortened; and the real-time performance of the whole perimeter intrusion alarm system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of security technology, specifically to a perimeter intrusion alarm method and system for the area surrounding a dam. Background Technology

[0002] As a vital infrastructure project affecting people's livelihoods, perimeter security in dam areas is a crucial component of the overall security management system. Existing perimeter security technologies for dam areas typically utilize a combination of physical barriers, sensor alarms, and video surveillance. In these solutions, sensors such as electronic fences and infrared beam detectors are used to detect intrusions into the physical boundaries. Video surveillance systems, through front-end cameras deployed along the perimeter, continuously record and monitor the monitored area, serving as the primary tool for post-incident tracing and real-time review. Some more intelligent systems will aggregate the video streams collected from the front-end cameras to a central server at the back end, where the server will run image analysis algorithms to automatically identify intrusion events.

[0003] Existing technologies still face several challenges in practical applications. This architecture, reliant on centralized backend analysis, inherently introduces time delays. Video data undergoes multiple stages, including encoding, network transmission, server-side decoding, and analysis. From the occurrence of an intrusion to the backend system's judgment and issuance of instructions, the entire process is significantly delayed, weakening the immediacy of alarms and responses. Simultaneously, the unique natural environment of the dam area poses a severe test to the reliability of the algorithms. Strong reflections from the vast water surface, reduced visibility due to morning fog, rain, or snow, and dramatic changes in lighting caused by day-night cycles all severely interfere with image quality. Conventional image analysis algorithms struggle to adapt effectively to these dynamic changes, leading to frequent false alarms and missed alarms. Furthermore, although deep learning technology has brought performance breakthroughs to object detection, these high-precision models are often complex in structure and have a large number of parameters. Frontend cameras, as edge devices, have their built-in computing units severely limited in processing power and storage space, making it impossible to directly deploy such large models. This hinders the technical path to achieve high-level intelligent analysis at the data acquisition source. Summary of the Invention

[0004] The purpose of this invention is to provide a perimeter intrusion alarm method and system for areas surrounding dams, addressing the aforementioned problems. The technical solution of the present invention is as follows: A method for perimeter intrusion alarm around a dam area includes the following steps: Video images are collected by front-end cameras deployed around the dam area; The front-end camera preprocesses the video images to obtain standardized input images; The standardized input image is fed into a lightweight intrusion detection model pre-installed in the front-end camera to detect intrusion targets. Based on the results of intrusion target detection, when an intrusion behavior is detected, the front-end camera directly triggers a coordinated alarm and linkage response, forming a complete closed loop of end-side decision-making and execution.

[0005] Furthermore, the lightweight intrusion detection model is an improved YOLO model; the construction process of the improved YOLO model includes: A transfer learning strategy is adopted. The model is first pre-trained on a general dataset to learn the ability to extract universal image features, and then fine-tuned on a dataset for the dam area perimeter scene. During the fine-tuning phase, progressive structured pruning based on the L1 norm is introduced; After progressive structured pruning, the model is further subjected to linear integer quantization, which converts the 32-bit floating-point weights and activation values ​​in the model into 8-bit integers.

[0006] Furthermore, the more specific construction process of the improved YOLO model is as follows: The model is trained using a transfer learning strategy and pre-trained on a large-scale, general, publicly available image dataset. The pre-trained model is then loaded with its weights and fine-tuned on a dataset constructed for the actual application scenario of the dam area perimeter. In the fine-tuning phase, progressive structured pruning based on the L1 norm is introduced, which is achieved by adjusting the model's optimization objective, i.e., the loss function. Add a factor to the network weights The L1 regularization term guides the model to automatically sparsify during training; the modified total loss function It can be represented as: ; in, This is the regularization coefficient, used to balance the weights of the original loss and the regularization term; During training, the entire structure containing weight parameters that have become close to zero is removed periodically in a progressive manner, and the "pruned" network is trained again to restore its performance; this process is repeated until the model reaches the preset compression target. Linear integer quantization is performed on the pruned model to convert the original 32-bit floating-point format weight parameters and activation values ​​of intermediate layers into 8-bit integer format. This conversion is achieved through a linear mapping relationship, allowing for the transformation of any floating-point value. Its corresponding quantization value It is calculated using the following formula: ; in, Scaling factor It is zero point.

[0007] By optimizing the network structure of the intrusion detection model using the above method, introducing a depthwise separable convolutional layer, and then employing a systematic model compression strategy including progressive structured pruning and linear integer quantization, the number of model parameters, storage volume, and computational complexity are reduced. This makes it possible to deploy efficient and reliable deep learning intrusion detection algorithms on embedded hardware of front-end cameras with limited computing power and storage space, solving the deployment problem of existing high-performance models that are difficult to apply directly at the edge.

[0008] Furthermore, the mechanism for collaborative alarm and linkage response includes: The linkage electronic fence emits a high-voltage pulse: The linkage control unit sends a command to the electronic fence controller located in the same defense zone as the front-end camera, causing it to activate the high-voltage pulse mode, forming an effective physical barrier and deterrence against intruders; Implement localized intelligent responses: Automatic tracking: The linkage control unit controls the pan-tilt system of the front-end camera itself, so that its lens automatically turns to the location of the intrusion target, and performs zoom and continuous tracking to obtain clear and continuous images of the intrusion process as evidence. Audible and visual warning: The linkage control unit sends instructions to the audible and visual alarms in the same protection zone, causing them to emit a high-decibel alarm sound and a high-intensity flashing light to warn intruders on site and alert nearby security personnel; Reporting to the backend: The linkage control unit reports the detailed information of the alarm event, including alarm type, time, zone location, captured images and short video clips, to the backend central management platform via the network for managers to review and process.

[0009] Furthermore, the mechanism for collaborative alarm and linkage response specifically includes: An intrusion event The triggering condition can be determined by the following logical function. definition: ; in, Represents a single detection result output by a lightweight intrusion detection model, including the category. Bounding box and confidence score , These are one or more virtual alarm zones pre-defined within the camera's monitoring feed. It is a predefined set of intrusion target categories. This is a confidence threshold set to filter out low-confidence detection results; If and only if a detection result simultaneously satisfies its category belong Its bounding box With any alarm area There exists a spatial intersection, and its confidence level is... Not less than Under these three conditions, If the output is true, then the intrusion is determined to have occurred. Once an intrusion is confirmed, the linkage control unit is immediately activated and sends control commands in parallel to multiple associated external devices and the camera's own functional modules, forming a three-dimensional collaborative alarm and linkage response network. The coordinated response in this network includes the following aspects: First, the electronic fence within the protected area where the front-end camera is located is activated. The control unit sends a high-level trigger signal or command code to the controller of the electronic fence through a preset communication interface, causing it to immediately start the high-voltage pulse mode. Secondly, the linkage control unit sends a drive command to the audible and visual alarms in the same defense zone, so that they immediately emit a high-decibel alarm sound and a high-frequency flash. At the same time, the linkage control unit also controls the pan-tilt system of the front-end camera to automatically track the intrusion target. The linkage control unit outputs the center coordinates of the target bounding box from the lightweight intrusion detection model. As input, and with the center coordinates of the image frame Compare and calculate the pixel coordinate deviation. This deviation is used as the basis for controlling the rotation of the gimbal motor, and its control quantity can be described by the following proportional control model: ; in, and These represent the incremental angles required for the gimbal to rotate horizontally and vertically, respectively. and The camera uses a preset proportional control coefficient to drive the pan-tilt unit to rotate, ensuring that the intruding target remains centered in the field of view, thereby acquiring continuous and clear images of the target's movement. The linkage control unit also packages alarm events into structured data packets and reports them to the central management platform at the back end via the network.

[0010] The above methods provide comprehensive data for remote verification and post-event traceability by security personnel.

[0011] Furthermore, the preprocessing of the video images includes: The contrast-limited adaptive histogram equalization method is used to enhance video images. The specific principle is as follows: Each input frame image is divided into several non-overlapping rectangular sub-regions; For each sub-region, calculate its gray-level histogram independently; Set a "cropping threshold" to crop the height of each gray level in the histogram of the sub-region, and cut off the part that exceeds the threshold. The total number of pixels to be truncated is evenly redistributed to the various gray levels of the histogram of the sub-region to obtain a new, constrained histogram. Based on this new histogram, the cumulative distribution function of the sub-region is calculated, and a gray-level mapping relationship is generated. Histogram equalization is then performed on the pixels within the sub-region. The final gray value of any pixel in the image is determined by bilinear interpolation of the gray-level mapping relationship of the four sub-regions surrounding its location. The resolution of the image after image enhancement is uniformly adjusted to the preset size using a bicubic interpolation algorithm.

[0012] Furthermore, the preprocessing steps more specifically include: The input single-frame image is divided into multiple non-overlapping rectangular sub-regions; For each independent sub-region, calculate its grayscale histogram, set a "cropping threshold", and trim the histogram of the sub-region. If the number of pixels at a certain gray level in the histogram exceeds the threshold, the excess part will be truncated. The total number of truncated pixels is evenly redistributed to the various gray levels of the histogram of that sub-region. For each gray level... Its mapped gray level Determined by the cumulative distribution function: ; in, It outputs grayscale levels. It represents the total number of gray levels. The new normalized histogram obtained after cropping and redistribution is in grayscale. The probability at that location. For transformation function, It is the largest gray level value; The final output grayscale value of any pixel in the image is obtained by bilinear interpolation using the transformation function of the centers of the four nearest sub-regions around it. The enhanced image resolution is uniformly adjusted to the preset size using a bicubic interpolation algorithm. The gray value of the target pixel is calculated by weighted averaging the gray values ​​of 16 pixels in a 4x4 neighborhood around its corresponding position in the original image. The weighting process is performed by a cubic polynomial interpolation kernel function. Defined as: ; in, The parameter represents the normalized distance between the point to be interpolated and its neighboring sampling points. It is an adjustable parameter, usually with a value of -0.5.

[0013] By employing the contrast-limited adaptive histogram equalization method in the preprocessing step and combining it with a transfer learning strategy to fine-tune the model on a dataset for specific scenarios around the dam area, the image quality degradation caused by water surface reflection and fog lighting conditions can be effectively improved. At the same time, the detection model has a higher ability to identify intrusion targets in specific scenarios, thereby enhancing the adaptability and detection performance of the method and system in the variable and harsh outdoor environment of the dam area.

[0014] By performing the image enhancement and resolution adjustment operations described above, a standardized image with higher clarity and contrast and a size that meets the model input requirements is finally output, laying a solid data foundation for the efficient and accurate detection of subsequent intrusion targets.

[0015] Furthermore, the acquisition of video images by the front-end camera includes: deploying one or more front-end cameras at predetermined monitoring locations around the dam area, and continuously acquiring video data streams within their monitoring range. The video data streams include real-time dynamic images of the electronic fence, water area, shoreline, and areas where intrusion targets may occur.

[0016] Furthermore, the video image acquisition by the front-end camera specifically includes: During the deployment phase, based on the overall perimeter length of the dam area, topography, and security level requirements of different areas, the entire perimeter intrusion alarm system is divided into multiple continuous or independent defense zones in physical space. Each designated defense zone is equipped with a front-end camera and a section of electronic fence; The front-end camera performs video image acquisition. Based on the photoelectric conversion principle of the image sensor, it converts the light signal in the monitored scene into a digital video signal stream, and any pixel in the digital image... Intensity value It can be approximated by the following model: ; in, For the sensor gain, For the exposure time, The scene radiance incident on the sensor pixels. Let be the spectral response function of the sensor. For pixels Spatial response function to light, The photosensitive area of ​​a single pixel. This is dark current noise; The video image acquisition process follows a geometric imaging model, which establishes a mapping relationship between three-dimensional world coordinates and two-dimensional image coordinates. Using a pinhole camera model to describe this process, the projection relationship can be expressed by the following formula: ; in, These are the coordinates of the pixel in the image coordinate system. The coordinates of a point in the scene in the world coordinate system. Let the depth of this point in the camera coordinate system be the matrix. This is the camera intrinsic parameter matrix, including focal length. and principal point coordinates Internal parameters Let be the camera extrinsic parameter matrix, describing the camera's rotation in the world coordinate system. Peaceful relocation .

[0017] Using the above method, the front-end camera continuously performs acquisition operations at a preset frame rate (e.g., 25 frames per second), generating a time-continuous digital video sequence. Each frame of this video sequence truly records all visual information within the monitored area at the time of acquisition and is transmitted in real time as raw data stream to the image preprocessing unit inside the front-end camera for subsequent processing.

[0018] This application also includes a perimeter intrusion alarm system around a dam area, which uses a perimeter intrusion alarm method around a dam area, including multiple defense zones divided according to the perimeter length and security requirements of the dam area. Each defense zone is equipped with: Electronic fence; Front-end camera; The front-end camera integrates: The image acquisition unit is used to perform the function of acquiring video images; An image preprocessing unit is used to preprocess the video images to obtain standardized input images; An intrusion detection unit, which internally contains the aforementioned lightweight intrusion detection model, is used to perform intrusion target detection on the standardized input image; The linkage control unit is used to trigger a coordinated alarm and linkage response with the electronic fence and other alarm devices when an intrusion is detected, based on the detection results of the intrusion detection unit.

[0019] Compared with existing technologies, the advantages of this invention are: 1. By integrating the entire process of video image acquisition, preprocessing, intrusion target detection based on a lightweight model, and collaborative alarm and linkage response into the front-end cameras around the dam area, a closed-loop system for localized analysis and decision-making at the data source is constructed. This architecture avoids the network latency and bandwidth pressure caused by the long-distance transmission of video data to the back-end server for analysis in traditional solutions, shortens the time from the detection of intrusion behavior to the triggering of physical response, and improves the real-time performance of the entire perimeter intrusion alarm system. Attached Figure Description

[0020] Figure 1 This is a flowchart of the method described in this application.

[0021] Figure 2 This is a flowchart of the video image acquisition step in the method of this application.

[0022] Figure 3 This is a flowchart of the preprocessing steps in the method of this application.

[0023] Figure 4 Flowchart of the intrusion detection model in this application. Figure 5 This is a flowchart of the collaborative alarm and linkage response in this application.

[0024] Figure 6 This is a flowchart of the system in this application. Detailed Implementation

[0025] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0026] The features and performance of the present invention will be further described in detail below with reference to embodiments.

[0027] Please see Figure 1-6 A method and system for perimeter intrusion alarm around a dam area, such as Figure 1 As shown, it includes the following steps: Video images are captured by front-end cameras deployed around the dam area; The front-end camera preprocesses the video images to obtain standardized input images; The standardized input image is fed into a lightweight intrusion detection model pre-installed in the front-end camera to detect intrusion targets. Based on the results of intrusion target detection, when intrusion behavior is detected, a coordinated alarm and linkage response are triggered.

[0028] The following is a detailed explanation of each step: like Figure 2 As shown, the front-end camera collects video images: First, one or more front-end cameras are deployed at predetermined monitoring locations around the dam area, such as the slope of the dam, along the perimeter fence, or key entrances and exits. The front-end cameras continuously collect video data streams within their monitoring range. These video data streams contain real-time dynamic images of the electronic fence, water area, shoreline, and areas where intrusion targets may occur.

[0029] like Figure 3 As shown, video image preprocessing is performed: This step is executed on the processor inside the front-end camera and aims to optimize and standardize the acquired raw video images, providing high-quality and format-uniform data for subsequent intrusion target detection. This step is specifically broken down into two consecutive operations: First, a contrast-limited adaptive histogram equalization method is used to enhance the video image. The purpose of this operation is to solve the problems of low image contrast and unclear details caused by environmental factors such as strong water surface reflection, morning fog, low light at night, or uneven lighting around the dam area. The specific principle is as follows: Each input frame image is divided into several non-overlapping rectangular sub-regions; For each sub-region, calculate its gray-level histogram independently; To avoid over-amplifying noise in local areas of the image (such as bright spots caused by water reflection), a "cropping threshold" is set to crop the height of each gray level in the histogram of the sub-region, and the part that exceeds the threshold is cut off. The total number of pixels to be truncated is evenly redistributed to the various gray levels of the histogram of the sub-region to obtain a new, constrained histogram. Based on this new histogram, the cumulative distribution function of the sub-region is calculated, and a gray-level mapping relationship is generated. Histogram equalization is then performed on the pixels within the sub-region. To eliminate the blocky effect caused by stitching together different sub-regions, the final gray value of any pixel in the image is determined by bilinear interpolation of the gray-level mapping relationship of the four sub-regions surrounding its location, thereby ensuring a smooth transition of the overall image.

[0030] Second, a bicubic interpolation algorithm is used to uniformly adjust the resolution of the image after image enhancement to a preset size. The purpose of this operation is to fix the input dimension of the subsequent neural network model and reduce the amount of data processing while ensuring necessary image features. The preset size can be set according to the model requirements, such as 128×128 pixels. The principle is to obtain the pixel value of the target point by examining the gray values ​​of 16 neighboring pixels in a 4x4 grid around the target pixel and performing weighted calculations based on the distance.

[0031] like Figure 4 As shown, intrusion target detection: a lightweight intrusion detection model pre-installed in the front-end camera is used to perform real-time analysis on the standardized input image output. The model is a deeply optimized improved YOLO model.

[0032] Network structure design of the model: In order to enable it to run efficiently on the embedded hardware of the front-end camera, the core feature of the model network structure is the extensive use of depthwise separable convolution to replace standard convolution. Depthwise separable convolution decomposes the standard convolution operation into two steps: channel-wise convolution (spatial filtering is performed independently on each channel of the input) and pointwise convolution (linear combination of the output of the previous step to integrate channel information). This structure significantly reduces the number of model parameters and computational cost while maintaining effective feature extraction capabilities. In addition, the network structure is further simplified by optimizing the grid density of the detection head and the number of anchor boxes predicted by each grid, thereby reducing computational complexity.

[0033] Model construction process: To obtain a highly efficient, small-sized model with excellent detection performance, the construction process follows a multi-stage optimization workflow: Transfer learning: First, the designed network structure is pre-trained on a large public dataset containing various general objectives, enabling it to learn the ability to extract basic visual features such as edges, textures, and shapes from images. Then, the pre-trained model is fine-tuned on a specially collected and labeled dataset targeting the perimeter scene of the dam area (containing targets such as people and vehicles under different lighting and weather conditions). This strategy leverages existing knowledge to accelerate the training convergence process of the model on specific tasks.

[0034] Progressive structured pruning: In the fine-tuning stage, to further compress the model, progressive structured pruning based on the L1 norm is introduced. Specifically, an L1 regularization term for the network weights is added to the model's loss function. This regularization term will cause the absolute values ​​of the weight parameters that contribute less to the final result in the model to approach zero. During training, weight parameters whose absolute values ​​are below a certain threshold are periodically removed permanently (i.e., pruned), and the sparsed network is trained again to restore performance. This process is carried out iteratively until the model reaches the predetermined sparsity.

[0035] Linear integer quantization: After model training and pruning are completed, linear integer quantization is performed on the model. This process converts the original 32-bit floating-point (FP32) weights and activation values ​​in the model into 8-bit integers (INT8) through a linear mapping relationship (defined by the scaling factor Scale and the zero-point). This conversion significantly reduces the storage size of the model file and allows the model inference process to utilize the fixed-point arithmetic units in the embedded processor, thereby accelerating the computation.

[0036] like Figure 5 As shown, collaborative alarm and linkage response: When the detection results (including the target's category, location coordinates, and confidence level) output by the intrusion detection unit (i.e., the lightweight intrusion detection model) in the front-end camera meet the preset alarm rules (for example, a target of category "human" is detected in a designated restricted area and the confidence level is higher than the threshold), it is determined that an intrusion has occurred. At this time, the linkage control unit in the front-end camera immediately triggers a multi-level collaborative alarm and linkage response mechanism in parallel.

[0037] This mechanism specifically includes: The linkage electronic fence emits a high-voltage pulse: the linkage control unit sends a command to the electronic fence controller located in the same defense zone as the front-end camera, causing it to activate the high-voltage pulse mode, forming an effective physical barrier and deterrence against intruders.

[0038] Implement localized intelligent responses: Automatic tracking: The linkage control unit controls the pan-tilt system of the front-end camera, causing its lens to automatically turn to the location of the intrusion target and perform zoom and continuous tracking to obtain clear and continuous images of the intrusion process as evidence.

[0039] Audible and visual warning: The linkage control unit sends instructions to the audible and visual alarms in the same protection zone, causing them to emit a high-decibel alarm sound and a high-intensity flashing light to warn intruders on site and alert nearby security personnel.

[0040] Reporting to the backend: At the same time, the linkage control unit reports the detailed information of the alarm event, including alarm type, time, zone location, captured images and short video clips, to the backend central management platform via the network for managers to review and process.

[0041] In one specific embodiment, the acquisition of video images by the front-end camera is the starting point of the method of the present invention. Its core lies in obtaining raw visual data that can reflect the real physical environment of the dam area perimeter through reasonably deployed hardware devices.

[0042] Specifically, during the deployment phase, the entire perimeter intrusion alarm system is first divided into multiple continuous or independent defense zones in physical space based on the overall perimeter length of the dam area, topography, and security level requirements of different areas. Preferably, for core areas with high security requirements, a defense zone division of 50-100 meters in length can be used; for areas with medium security requirements, a division of 100-300 meters in length can be used.

[0043] Within each designated defense zone, a front-end camera and a section of electronic fence are configured. The two are deployed in tandem in physical location, enabling the field of view of the front-end camera to completely cover its corresponding electronic fence section and surrounding key areas. The front-end camera serves as the data acquisition subject and processing core of the method of this invention, and it integrates an image sensor, processor, and memory unit.

[0044] Based on this, the front-end camera performs video image acquisition. This process is based on the photoelectric conversion principle of the image sensor, converting the light signals in the monitored scene into a digital video signal stream. To further clarify the physical model of this process, any pixel in the digital image... Intensity value It can be approximated by the following model: ; in, For the sensor gain, For the exposure time, The scene radiance incident on the sensor pixels. Let be the spectral response function of the sensor. For pixels Spatial response function to light, The photosensitive area of ​​a single pixel. This is dark current noise.

[0045] Furthermore, the video image acquisition process follows a specific geometric imaging model, which establishes a mapping relationship between three-dimensional world coordinates and two-dimensional image coordinates. Preferably, a pinhole camera model can be used to describe this process, and its projection relationship can be expressed by the following formula: ; in, These are the coordinates of the pixel in the image coordinate system. The coordinates of a point in the scene in the world coordinate system. Let the depth of this point in the camera coordinate system be the matrix. This is the camera intrinsic parameter matrix, which includes the focal length. and principal point coordinates Internal parameters Here is the camera extrinsic parameter matrix, which describes the camera's rotation in the world coordinate system. Peaceful relocation .

[0046] During the operation of the method, the front-end camera continuously performs acquisition operations at a preset frame rate (e.g., 25 frames per second) to generate a time-continuous digital video sequence. Each frame of the video sequence truly records all visual information within the monitored area at the time of acquisition and is transmitted in real time as raw data stream to the image preprocessing unit inside the front-end camera for preprocessing of the video images.

[0047] In one specific embodiment, video image preprocessing is a key bridge connecting raw data acquisition and intelligent analysis. It is performed on the embedded processing unit inside the front-end camera. Its purpose is to perform a series of deterministic processes on the acquired raw video images that may be affected by complex environmental factors, in order to generate standardized input images with better quality and uniform format, which are suitable for efficient processing by subsequent lightweight intrusion detection models.

[0048] This preprocessing step consists of two core and consecutive operations: first, image enhancement, followed by uniform resolution adjustment.

[0049] To effectively address the common problems in the surrounding environment of the dam area, such as water surface reflection, fog interference, and drastic changes in day and night lighting, which can lead to local overexposure, loss of detail, or insufficient contrast in images, this embodiment preferably employs a contrast-limited adaptive histogram equalization method to enhance video image frames.

[0050] The specific implementation mechanism of this method is as follows: First, the input single-frame image is divided into multiple non-overlapping rectangular sub-regions. Unlike global methods that perform single equalization on the entire image, this adaptive method can better preserve the local details of the image by performing local processing on each sub-region.

[0051] Next, for each independent sub-region, its grayscale histogram is calculated. To prevent noise in the image (such as local bright areas formed by strong reflections from the water surface) from being excessively amplified during the equalization process, a "contrast limitation" mechanism is introduced. Specifically, a "cropping threshold" is preset, and the histogram of the sub-region is cropped. If the number of pixels at a certain gray level in the histogram exceeds the threshold, the excess part is truncated.

[0052] The truncated pixels are not discarded; instead, they are evenly redistributed across the various gray levels of the histogram of that sub-region. This limits the contrast stretching while maintaining the integrity of the overall histogram shape. This process can be understood using the idea of ​​the following transformation function, where for a gray level... Its mapped gray level Determined by the cumulative distribution function: ; in, It outputs grayscale levels. It represents the total number of gray levels. The new normalized histogram obtained after cropping and redistribution is in grayscale. The probability at that location. For transformation function, It is the largest gray level value.

[0053] Finally, to eliminate the blocky effect that may occur at the boundaries of sub-regions due to block processing, the final output gray value of any pixel in the image is not directly determined by the transformation function of its sub-region, but is obtained by bilinear interpolation of the transformation functions of the four nearest sub-region centers. This smooth transition mechanism ensures the natural continuity of the output image visually.

[0054] After image enhancement, in order to meet the requirement of fixed input data dimension for the lightweight intrusion detection model in subsequent intrusion target detection, and to balance the integrity of image information and computational resource consumption, this embodiment continues to use the bicubic interpolation algorithm to uniformly adjust the resolution of the enhanced image to the preset size.

[0055] The reason for prioritizing bicubic interpolation is that, compared to nearest neighbor interpolation or bilinear interpolation, it can better preserve the details and edge information of the image, generating a smoother, less jagged scaling result. Its mathematical principle is that the gray value of the target pixel is calculated by weighted averaging of the gray values ​​of 16 pixels in a 4x4 neighborhood around its corresponding position in the original image.

[0056] The weighting process is performed by a cubic polynomial interpolation kernel function. Defined as: ; in, The parameter represents the normalized distance between the point to be interpolated and its neighboring sampling points. This is an adjustable parameter, typically set to -0.5. This kernel function ensures the continuity of the first derivative of the interpolation result, thus achieving a smooth interpolation effect.

[0057] By performing the image enhancement and resolution adjustment operations described above, the video image is preprocessed and a standardized image with higher clarity and contrast and a size that meets the model input requirements is finally output. This lays a solid data foundation for the efficient and accurate detection of intrusion targets in intrusion target detection.

[0058] In one specific embodiment, intrusion target detection is the core intelligent analysis step of the method of the present invention. It takes a standardized input image that has been preprocessed from video images and uses an embedded computing unit deployed in the front-end camera to perform real-time reasoning on the image content through an efficient and deeply optimized lightweight intrusion detection model to identify and locate potential intrusion targets.

[0059] The lightweight intrusion detection model is essentially a specially designed and optimized deep neural network. The reason for the need for lightweight design is that the front-end camera, as an edge device, has strictly limited internal computing resources and storage space, and cannot directly support standard, large-scale detection models that are usually deployed on servers.

[0060] To achieve efficient operation of the model on resource-constrained platforms, this embodiment preferably adopts an improved YOLO model, which is improved in two aspects: the design of its network structure and the complete process of model construction.

[0061] At the network structure design level, to fundamentally reduce the computational complexity and number of parameters of the model, the core convolutional operation unit of the model preferably adopts depthwise separable convolution. This structure decomposes the traditional standard convolution operation into two independent steps: first, channel-wise convolution is performed, that is, a convolution kernel is used to perform independent spatial convolution on each channel of the input feature map; then, pointwise convolution is performed, that is, a 1x1 convolution kernel is used to linearly combine the output of the previous step to achieve information fusion between channels. Compared with the standard convolution to complete the joint mapping of space and channels in one step, the computational cost and number of parameters of depthwise separable convolution are significantly reduced. In addition, the network structure of the model also optimizes the grid density of the output feature map and the number and size of the preset anchor boxes, reducing the total number of candidate target boxes that the model needs to generate in a single inference, thereby further reducing the computational cost of post-processing.

[0062] At the model building stage, in order to obtain a final model that is both compact and has high detection performance, this embodiment adopts a systematic, multi-stage optimization strategy: First, a transfer learning strategy is employed for model training. The first stage of this strategy involves pre-training on a large-scale, general, publicly available image dataset. The purpose of this stage is to enable the model's underlying network to learn a wide range of universal visual features, such as edges, textures, colors, and basic shapes. Subsequently, in the second stage, the pre-trained model is loaded with its weights and fine-tuned on a dataset specifically designed for the practical application scenario of dam perimeters. This dedicated dataset contains images of typical intrusion targets, including people and vehicles, collected under different lighting, weather, and seasonal conditions. In this way, existing knowledge can be effectively utilized to accelerate the convergence of the model on specific tasks and improve its feature extraction capability for targets in dam area scenes.

[0063] Secondly, to further reduce the model size, progressive structured pruning based on the L1 norm is introduced during the fine-tuning stage. The principle of this technique is to reduce the model size by adjusting the L1 norm-based structured pruning function. Add a factor to the network weights The L1 regularization term is used to guide the model to automatically sparsify during training. The modified total loss function... It can be represented as: ; in, The regularization coefficient is used to balance the weights of the original loss and the regularization term; it is the L1 norm. The characteristics of this will cause the weight parameters in the model that contribute less to the final prediction result to shrink to zero.

[0064] During training, the entire structure (such as the entire convolutional kernel or feature map channel) containing weight parameters whose values ​​have approached zero is removed periodically in a progressive manner, and the "pruned" network is then trained again to restore its performance. This process is repeated iteratively until the model reaches the preset compression target.

[0065] Finally, as the final step in model optimization, linear integer quantization is performed on the pruned model. This operation aims to convert the original 32-bit floating-point (FP32) format weight parameters and activation values ​​of intermediate layers in the model into 8-bit integer (INT8) format. This conversion is achieved through a linear mapping relationship, where for any floating-point value... Its corresponding quantization value It is calculated using the following formula: ; in, Scaling factor The two parameters, zero and zero, are obtained through statistical analysis of the data distribution of weights or activation values. The quantized model not only significantly reduces the file size, but more importantly, its inference process can utilize the efficient fixed-point arithmetic units commonly found in embedded hardware, thereby improving the inference speed.

[0066] In summary, when the standardized input image generated by preprocessing the video image is fed into this lightweight model that has undergone multiple optimizations, the model will perform a forward propagation calculation and finally output a set of structured detection results. These results typically include the bounding box coordinates, the category to which each detected target belongs, and a confidence score that indicates the reliability of the detection result. This information will be passed to subsequent collaborative alarms and linkage responses as the basis for triggering alarms and linkage responses.

[0067] In a specific embodiment, the collaborative alarm and linkage response, as the final execution link of the method of the present invention, is a closed-loop response process based on front-end intelligent decision-making and multi-device collaboration. This step is executed by the linkage control unit pre-installed in the front-end camera. Its core is to transform the raw detection data output by the intrusion target detection into a series of precise and real-time physical security actions.

[0068] Specifically, the output of the intrusion target detection is a set of structured data containing target category, bounding box coordinates and confidence score. The linkage control unit first needs to perform logical analysis on this data according to the preset alarm rules to determine whether it constitutes an "intrusion behavior". This analysis process is not a simple judgment of the existence of the target, but a multi-dimensional condition triggering mechanism.

[0069] Preferably, an intrusion event The triggering condition can be determined by the following logical function. definition: ; in, A single detection result representing the output of the intrusion target detection, including the category. Bounding box and confidence score , These are one or more virtual alarm zones pre-defined within the camera's monitoring feed. It is a predefined set of intrusion target categories. This is a confidence threshold set to filter out low-confidence detection results. A detection result is considered to have confidence if and only if it simultaneously satisfies its category... belong Its bounding box With any alarm area There exists a spatial intersection, and its confidence level is... Not less than Under these three conditions, If the output is true, the intrusion is determined to have occurred.

[0070] Once an intrusion is confirmed, the linkage control unit is immediately activated and sends control commands in parallel to multiple associated external devices and the camera's own functional modules, forming a three-dimensional collaborative alarm and linkage response network.

[0071] The coordinated response in this network includes the following aspects: First, the electronic fence within the defense zone where the front-end camera is located is linked. The linkage control unit sends a high-level trigger signal or a specific command code to the controller of the electronic fence through a preset communication interface, causing it to immediately start the high-voltage pulse mode. This is intended to form the first effective physical barrier and psychological deterrence against the intrusion target.

[0072] Secondly, the linkage with the audible and visual alarms within the same defense zone is similar to the linkage with the electronic fence. The linkage control unit sends a drive command to the audible and visual alarms, causing them to immediately emit a high-decibel alarm sound and a high-frequency flash. This is intended to warn intruders on-site through sound and light, and to alert nearby security personnel.

[0073] At the same time, the linkage control unit also controls the pan-tilt system of the front-end camera to automatically track the intrusion target. This process is a dynamic closed-loop control. The linkage control unit outputs the center coordinates of the target bounding box from the intrusion target detection. As input, and with the center coordinates of the image frame Compare and calculate the pixel coordinate deviation. This deviation is used as the basis for controlling the rotation of the gimbal motor, and its control quantity can be approximately described by the following proportional control model: ; in, and These represent the incremental angles required for the gimbal to rotate horizontally and vertically, respectively. and The camera uses a preset proportional control coefficient to drive the pan-tilt unit to rotate, ensuring that the intruding target remains centered in the field of view, thereby acquiring continuous and clear images of the target's movement.

[0074] While executing all the aforementioned localized and real-time responses, the linkage control unit also packages the alarm event into a structured data packet and reports it to the central management platform at the backend via the network. This data packet contains the alarm timestamp, the zone number, the type of intrusion target, the confidence score, as well as a captured image and a short video recording of the event, providing comprehensive information for security personnel to remotely review and trace the event afterward.

[0075] The perimeter intrusion alarm system around the dam area described below can be referred to in correspondence with the perimeter intrusion alarm method around the dam area described above.

[0076] Please see the appendix Figure 6 A perimeter intrusion alarm system for the area surrounding a dam, applied to the aforementioned perimeter intrusion alarm method for the area surrounding a dam, comprising multiple defense zones divided according to the perimeter length and security requirements of the dam area; Each defense zone includes: Electronic fence; The front-end camera integrates: The image acquisition unit is used to acquire video images; The image preprocessing unit is used to preprocess video images to obtain standardized input images; The intrusion detection unit has a built-in lightweight intrusion detection model for detecting intrusion targets on standardized input images. The linkage control unit is used to trigger a coordinated alarm and linkage response with the electronic fence when an intrusion is detected, based on the results of intrusion target detection.

[0077] The system in this embodiment can be used to execute the above method embodiments, and its principle and technical effect are similar, so they will not be described again here.

[0078] The embodiments described above merely illustrate specific implementation methods of this application, and while the descriptions are detailed and specific, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the technical solution of this application, and these modifications and improvements all fall within the scope of protection of this application.

Claims

1. A method for perimeter intrusion alarm around a dam area, characterized in that, Includes the following steps: Video images are collected by front-end cameras deployed around the dam area; The front-end camera preprocesses the video images to obtain standardized input images; The standardized input image is fed into a lightweight intrusion detection model pre-installed in the front-end camera to detect intrusion targets. Based on the results of intrusion target detection, when an intrusion behavior is detected, the front-end camera directly triggers a coordinated alarm and linkage response, forming a complete closed loop of end-side decision-making and execution.

2. The perimeter intrusion alarm method for a dam area according to claim 1, characterized in that, The lightweight intrusion detection model is an improved YOLO model; the construction process of the improved YOLO model includes: A transfer learning strategy is adopted. The model is first pre-trained on a general dataset to learn the ability to extract universal image features, and then fine-tuned on a dataset for the dam area perimeter scene. During the fine-tuning phase, progressive structured pruning based on the L1 norm is introduced; After progressive structured pruning, the model is further subjected to linear integer quantization, which converts the 32-bit floating-point weights and activation values ​​in the model into 8-bit integers.

3. The perimeter intrusion alarm method for a dam area according to claim 2, characterized in that, The more specific construction process of the improved YOLO model is as follows: The model is trained using a transfer learning strategy and pre-trained on a large-scale, general, publicly available image dataset. The pre-trained model is then loaded with its weights and fine-tuned on a dataset constructed for the actual application scenario of the dam area perimeter. In the fine-tuning phase, progressive structured pruning based on the L1 norm is introduced, which is achieved by adjusting the model's optimization objective, i.e., the loss function. Add a factor to the network weights The L1 regularization term guides the model to automatically sparsify during training; Modified total loss function It can be represented as: ; in, This is the regularization coefficient, used to balance the weights of the original loss and the regularization term; During training, the entire structure containing weight parameters that have become close to zero is removed periodically in a progressive manner, and the "pruned" network is trained again to restore its performance; this process is repeated until the model reaches the preset compression target. Linear integer quantization is performed on the pruned model to convert the original 32-bit floating-point format weight parameters and activation values ​​of intermediate layers into 8-bit integer format. This conversion is achieved through a linear mapping relationship, allowing for the transformation of any floating-point value. Its corresponding quantization value It is calculated using the following formula: ; in, Scaling factor It is zero point.

4. The perimeter intrusion alarm method for a dam area according to claim 1, characterized in that, The mechanism for collaborative alarm and coordinated response includes: The linkage electronic fence emits a high-voltage pulse: The linkage control unit sends a command to the electronic fence controller located in the same defense zone as the front-end camera, causing it to activate the high-voltage pulse mode, forming an effective physical barrier and deterrence against intruders; Implement localized intelligent responses: Automatic tracking: The linkage control unit controls the pan-tilt system of the front-end camera itself, so that its lens automatically turns to the location of the intrusion target, and performs zoom and continuous tracking to obtain clear and continuous images of the intrusion process as evidence. Audible and visual warning: The linkage control unit sends instructions to the audible and visual alarms in the same protection zone, causing them to emit a high-decibel alarm sound and a high-intensity flashing light to warn intruders on site and alert nearby security personnel; Reporting to the backend: The linkage control unit reports the detailed information of the alarm event, including alarm type, time, zone location, captured images and short video clips, to the backend central management platform via the network for managers to review and process.

5. The perimeter intrusion alarm method for a dam area according to claim 4, characterized in that, The mechanism for collaborative alarm and linkage response specifically includes: An intrusion event The triggering condition can be determined by the following logical function. definition: ; in, Represents a single detection result output by a lightweight intrusion detection model, including the category. Bounding box and confidence score , These are one or more virtual alarm zones pre-defined within the camera's monitoring feed. It is a predefined set of intrusion target categories. This is a confidence threshold set to filter out low-confidence detection results; If and only if a detection result simultaneously satisfies its category belong Its bounding box With any alarm area There exists a spatial intersection, and its confidence level is... Not less than Under these three conditions, If the output is true, then the intrusion is determined to have occurred. Once an intrusion is confirmed, the linkage control unit is immediately activated and sends control commands in parallel to multiple associated external devices and the camera's own functional modules, forming a three-dimensional collaborative alarm and linkage response network. The coordinated response in this network includes the following aspects: First, the electronic fence within the protected area where the front-end camera is located is activated. The control unit sends a high-level trigger signal or command code to the controller of the electronic fence through a preset communication interface, causing it to immediately start the high-voltage pulse mode. Secondly, the linkage control unit sends a drive command to the audible and visual alarms in the same defense zone, so that they immediately emit a high-decibel alarm sound and a high-frequency flash. At the same time, the linkage control unit also controls the pan-tilt system of the front-end camera to automatically track the intrusion target. The linkage control unit outputs the center coordinates of the target bounding box from the lightweight intrusion detection model. As input, and with the center coordinates of the image frame Compare and calculate the pixel coordinate deviation. This deviation is used as the basis for controlling the rotation of the gimbal motor, and its control quantity can be described by the following proportional control model: ; in, and These represent the incremental angles required for the gimbal to rotate horizontally and vertically, respectively. and The camera uses a preset proportional control coefficient to drive the pan-tilt unit to rotate, ensuring that the intruding target remains centered in the field of view, thereby acquiring continuous and clear images of the target's movement. The linkage control unit also packages alarm events into structured data packets and reports them to the central management platform at the back end via the network.

6. The perimeter intrusion alarm method for a dam area according to claim 1, characterized in that, The preprocessing of the video images includes: The contrast-limited adaptive histogram equalization method is used to enhance video images. The specific principle is as follows: Each input frame image is divided into several non-overlapping rectangular sub-regions; For each sub-region, calculate its gray-level histogram independently; Set a "cropping threshold" to crop the height of each gray level in the histogram of the sub-region, and cut off the part that exceeds the threshold. The total number of pixels to be truncated is evenly redistributed to the various gray levels of the histogram of the sub-region to obtain a new, constrained histogram. Based on this new histogram, the cumulative distribution function of the sub-region is calculated, and a gray-level mapping relationship is generated. Histogram equalization is then performed on the pixels within the sub-region. The final gray value of any pixel in the image is determined by bilinear interpolation of the gray-level mapping relationship of the four sub-regions surrounding its location. The resolution of the image after image enhancement is uniformly adjusted to the preset size using a bicubic interpolation algorithm.

7. A perimeter intrusion alarm method for a dam area according to claim 6, characterized in that, More specifically, the preprocessing steps include: The input single-frame image is divided into multiple non-overlapping rectangular sub-regions; For each independent sub-region, calculate its grayscale histogram, set a "cropping threshold", and trim the histogram of the sub-region. If the number of pixels at a certain gray level in the histogram exceeds the threshold, the excess part will be truncated. The total number of truncated pixels is evenly redistributed to the various gray levels of the histogram of that sub-region. For each gray level... Its mapped gray level Determined by the cumulative distribution function: ; in, It outputs grayscale levels. It represents the total number of gray levels. The new normalized histogram obtained after cropping and redistribution is in grayscale. The probability at that location. For transformation function, It is the largest gray level value; The final output grayscale value of any pixel in the image is obtained by bilinear interpolation using the transformation function of the centers of the four nearest sub-regions around it. The enhanced image resolution is uniformly adjusted to the preset size using a bicubic interpolation algorithm. The gray value of the target pixel is calculated by weighted averaging the gray values ​​of 16 pixels in a 4x4 neighborhood around its corresponding position in the original image. The weighting process is performed by a cubic polynomial interpolation kernel function. Defined as: ; in, The parameter represents the normalized distance between the point to be interpolated and its neighboring sampling points. It is an adjustable parameter, usually with a value of -0.

5.

8. The perimeter intrusion alarm method for a dam area according to claim 1, characterized in that, The acquisition of video images by the front-end cameras includes: deploying one or more front-end cameras at predetermined monitoring locations around the dam area; the front-end cameras continuously acquire video data streams within their monitoring range; the video data streams include real-time dynamic images of electronic fences, water areas, shorelines, and areas where intrusion targets may occur.

9. A perimeter intrusion alarm method for a dam area according to claim 8, characterized in that, The video images captured by the front-end camera specifically include: During the deployment phase, based on the overall perimeter length of the dam area, topography, and security level requirements of different areas, the entire perimeter intrusion alarm system is divided into multiple continuous or independent defense zones in physical space. Each designated defense zone is equipped with a front-end camera and a section of electronic fence; The front-end camera performs video image acquisition. Based on the photoelectric conversion principle of the image sensor, it converts the light signal in the monitored scene into a digital video signal stream, and any pixel in the digital image... Intensity value It can be approximated by the following model: ; in, For the sensor gain, For the exposure time, The scene radiance incident on the sensor pixels. Let be the spectral response function of the sensor. For pixels Spatial response function to light, The photosensitive area of ​​a single pixel. This is dark current noise; The video image acquisition process follows a geometric imaging model, which establishes a mapping relationship between three-dimensional world coordinates and two-dimensional image coordinates. Using a pinhole camera model to describe this process, the projection relationship can be expressed by the following formula: ; in, These are the coordinates of the pixel in the image coordinate system. The coordinates of a point in the scene in the world coordinate system. Let the depth of this point in the camera coordinate system be the matrix. This is the camera intrinsic parameter matrix, including focal length. and principal point coordinates Internal parameters Let be the camera extrinsic parameter matrix, describing the camera's rotation in the world coordinate system. Peaceful relocation .

10. A perimeter intrusion alarm system for a dam area, characterized in that, The perimeter intrusion alarm method for a dam area as described in any one of claims 1-9 includes multiple defense zones divided according to the perimeter length and security requirements of the dam area. Each defense zone is equipped with: Electronic fence; Front-end camera; The front-end camera integrates: The image acquisition unit is used to perform the function of acquiring video images; An image preprocessing unit is used to preprocess the video images to obtain standardized input images; An intrusion detection unit, which internally contains the aforementioned lightweight intrusion detection model, is used to perform intrusion target detection on the standardized input image; The linkage control unit is used to trigger a coordinated alarm and linkage response with the electronic fence and other alarm devices when an intrusion is detected, based on the detection results of the intrusion detection unit.