Prison abnormal behavior identification method and system based on edge intelligent analysis

By deploying edge nodes at prison monitoring points, enhancing images using illumination assessment and an improved Retinex algorithm, and combining a lightweight CNN model with a multimodal evidence chain, the inefficiency and misjudgment problems of prison abnormal behavior identification are solved, achieving real-time, accurate prison abnormal behavior identification and continuous adaptation.

CN121963319AInactive Publication Date: 2026-05-01GUIZHOU CIYU ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610417402.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-01
Publication Date
2026-05-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing prison abnormal behavior identification technologies are inefficient, slow to respond, and have a high rate of missed and false judgments, making it difficult to meet the real-time prevention and control needs of high-density supervision scenarios. Furthermore, they suffer from insufficient image quality, inadequate feature extraction accuracy, and poor model adaptability in low-light environments.

Method used

Edge nodes are deployed at various monitoring points in the prison. Low-light environment images are identified through illumination assessment and the images are enhanced using an improved Retinex algorithm. A lightweight CNN model and an embedded behavior classification engine are combined to perform multi-dimensional matching, forming a multi-modal alarm evidence chain. The model is then incrementally learned through data feedback from the edge nodes.

Benefits of technology

It improves image quality and feature discrimination in low-light environments, reduces the false positive rate, achieves real-time and accurate abnormal behavior recognition, constructs a closed loop for security and prevention, and adapts to the long-term changes in prison scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121963319A_ABST
    Figure CN121963319A_ABST
Patent Text Reader

Abstract

The invention discloses a prison abnormal behavior recognition method and system based on edge intelligent analysis, and belongs to the technical field of intelligent security protection, and the method comprises the steps: deploying edge nodes at each monitoring point of a prison, collecting a synchronous monitoring image flow, recognizing a low-light environment image frame through illumination evaluation, and storing the low-light environment image frame in a database; enhancing the image by using an improved Retinex algorithm optimized by a prison scene noise sample library; inputting the clear enhanced image into a lightweight CNN model, performing multi-dimensional matching with a prison abnormal behavior category knowledge base of a three-layer structure through an embedded behavior classification engine, and outputting a classification result of calibrated confidence; when the confidence exceeds a threshold value, triggering graded early warning, and associating the monitoring platform with peripheral sensor synchronous data to form a multi-mode alarm evidence chain; the edge node regularly encrypts and summarizes the early warning data packet and the negative sample data, and feeds back to the training end to realize model incremental learning; according to the method, the low-light environment adaptability and the feature discrimination capability are improved, and the recognition accuracy and the real-time performance are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

A method and system for identifying abnormal behavior in prisons based on edge intelligence analysis Technical Field

[0001] This invention belongs to the field of intelligent security technology, specifically a method and system for identifying abnormal behavior in prisons based on edge intelligence analysis. Background Technology

[0002] Current methods for identifying abnormal behavior in prisons largely rely on traditional monitoring systems and manual patrols, resulting in inefficiency, delayed response times, and high rates of missed and false positives, failing to meet the real-time control requirements of high-density surveillance scenarios. Existing technologies, particularly computer vision-based solutions, often employ centralized data processing architectures, requiring the transmission of massive amounts of raw surveillance images to the cloud or central servers. This not only consumes significant bandwidth resources but also suffers from network latency, leading to delayed response times. Furthermore, prison environments present challenges such as low light at night and complex environmental noise, making it difficult for conventional image enhancement algorithms to effectively improve image quality in low-light conditions, resulting in insufficient feature extraction accuracy. In addition, existing identification models often lack targeted behavioral feature optimization and spatiotemporal context analysis, exhibiting weak feature discrimination capabilities and failing to establish a multimodal data linkage evidence chain, impacting the credibility of abnormal behavior assessments. Moreover, the difficulty in dynamically iterating models based on actual scenario data after training leads to a gradual decline in adaptability over long-term use, making it impossible to continuously adapt to the complex changes in prison scenarios. Therefore, a more efficient, accurate, and adaptable abnormal behavior identification technology is urgently needed. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention proposes a method and system for identifying abnormal behavior in prisons based on edge intelligent analysis. Edge nodes are deployed at various monitoring points within the prison to collect synchronous monitoring image streams. Low-light environment image frames are identified through illumination assessment, and the images are enhanced using an improved Retinex algorithm optimized with a prison scene noise sample library. The enhanced images are then input into a lightweight CNN model, which performs multi-dimensional matching with an embedded behavior classification engine and a three-layer prison abnormal behavior category knowledge base, outputting a calibrated classification result with confidence. When the confidence exceeds a threshold, a tiered warning is triggered, and the monitoring platform correlates with synchronous data from surrounding sensors to form a multimodal alarm evidence chain. Edge nodes periodically encrypt and summarize warning data packets and negative sample data, feeding them back to the training end for incremental model learning. This method improves adaptability to low-light environments and feature discrimination power, ensuring accuracy and real-time performance in identification.

[0004] To achieve the above objectives, the present invention provides the following technical solution:

[0005] A method for identifying abnormal behavior in prisons based on edge intelligence analysis includes:

[0006] Edge nodes are deployed at various monitoring points in the prison to collect raw monitoring images of the corresponding areas in real time and aggregate them into a synchronous monitoring image stream.

[0007] Illumination assessment is performed on the synchronous monitoring image stream to identify low-light environment image frames. An improved Retinex algorithm optimized with a prison scene noise sample library is then used to enhance these frames, resulting in a clear and enhanced image.

[0008] The enhanced image is input into a lightweight CNN model deployed on edge nodes to filter out suspected abnormal behavior feature vectors. The suspected abnormal behavior feature vectors are then input into an embedded behavior classification engine to perform multi-dimensional matching with a preset prison abnormal behavior category knowledge base, and output the classification result of abnormal behavior with calibrated confidence values.

[0009] If the confidence level of the classified abnormal behavior result exceeds the preset multi-level dangerous behavior threshold, a graded warning is triggered. The warning information, the corresponding clear enhanced image and the suspected abnormal behavior feature vector are packaged into a warning data package and pushed to the monitoring platform. The monitoring platform automatically associates and retrieves the synchronous data of the sensors around the warning point to form a multimodal alarm evidence chain.

[0010] Edge nodes periodically encrypt and aggregate warning data packets and negative sample data with confidence levels below the multi-level dangerous behavior threshold into historical identification data, which is then fed back to the lightweight CNN model training end.

[0011] Specifically, the step of performing illumination assessment on the synchronous monitoring image stream and identifying image frames in low-light environments includes:

[0012] Extract the global brightness features and local contrast features of the current image frame in the synchronous monitoring image stream;

[0013] The global brightness feature and the local contrast feature are concatenated and input into a pre-trained illumination classification model. The illumination classification model performs the following steps in sequence: the input features are processed through a first convolutional layer to output a basic edge feature map, and max pooling downsampling is performed on the basic edge feature map; the downsampled basic edge feature map is processed through a second convolutional layer to output a texture feature map; after max pooling downsampling again, the features are reduced in dimensionality and fused through a third convolutional layer to output a high-level fused feature; the high-level fused feature is mapped to an illumination category probability distribution vector through a fully connected layer.

[0014] The obtained illumination category probability distribution vector is read, and the probability values ​​of the low light and night light categories in the distribution are compared with the preset probability thresholds. If the probability value of either category exceeds the probability threshold, the current image frame is determined and marked as a low light environment image frame.

[0015] Specifically, the process of using an improved Retinex algorithm optimized with a prison scene noise sample library to enhance the image and output a clearer, enhanced image includes:

[0016] The low-light environment image frame is input into the improved Retinex enhancement model, which first decomposes the input image into an illumination component representing ambient lighting and a reflection component representing the object's own properties.

[0017] The obtained reflection component is input into a deep denoising sub-network. The encoder of the deep denoising sub-network extracts and compresses the reflection component through multiple downsampling convolutional layers and outputs encoded features containing noise distribution information. At the same time, the decoder of the deep denoising sub-network upsamples and reconstructs the encoded features and outputs a denoised reflection component that suppresses the inherent noise of the prison scene.

[0018] Perform gamma correction on the illumination component to generate a corrected illumination component;

[0019] The denoised reflection component is fused with the corrected illumination component to generate a clear and enhanced image.

[0020] Specifically, the encoder and decoder of the deep denoising sub-network adopt a skip connection method;

[0021] During the encoding process of the deep denoising sub-network, the intermediate feature maps output by each convolutional layer in the encoder are recorded. During the decoding process, the intermediate feature maps output by each level of the encoder are passed to the corresponding deconvolutional layers of the same spatial size in the decoder through skip connections, and used as the same-scale encoded features.

[0022] At the decoder, the upsampled feature map output by the deconvolution layer is concatenated with the corresponding coded features of the same scale received from the encoder in the channel dimension to form a fused feature map. A convolution operation is then performed on the fused feature map to output the reconstructed feature map of the current layer.

[0023] Specifically, the step of inputting the enhanced image into a lightweight CNN model deployed on edge nodes and filtering out highly discriminative suspected abnormal behavior feature vectors includes:

[0024] The enhanced image is input into a lightweight CNN model and processed through its MobileNetV3-Small backbone network to output an initial feature map.

[0025] The initial feature map is input into a channel attention module to generate a channel weight vector. The initial feature map and the channel weight vector are then multiplied channel by channel to output a channel-weighted feature map.

[0026] The channel-weighted feature map is input into the spatial attention module to generate a spatial weight matrix. The channel-weighted feature map is then multiplied pixel by pixel with the spatial weight matrix to output a spatial weighted feature map.

[0027] The spatially weighted feature map is processed sequentially through a global average pooling layer and a fully connected layer to output a feature vector of suspected abnormal behavior.

[0028] Specifically, the operations of the channel attention module and the spatial attention module include:

[0029] The channel attention module receives the initial feature map, performs global average pooling and global max pooling on the initial feature map to obtain the first pooling feature and the second pooling feature, and inputs the first pooling feature and the second pooling feature into a multilayer perceptron with shared weights. The two feature vectors output by the multilayer perceptron are added together and then passed through the sigmoid function to generate the channel weight vector. The generated channel weight vector is then multiplied with the initial feature map to output the channel weighted feature map.

[0030] The spatial attention module receives the output channel-weighted feature map, performs average pooling and max pooling on the channel-dimension feature map respectively, concatenates the pooling results and passes them through a convolutional layer and the sigmoid function to generate a spatial weight matrix, and then multiplies the generated spatial weight matrix with the channel-weighted feature map to output the feature map after dual attention weighting, i.e., the spatial weighted feature map.

[0031] Specifically, the step of inputting the suspected abnormal behavior feature vector into the embedded behavior classification engine, performing multi-dimensional matching with a preset prison abnormal behavior category knowledge base, and outputting a classified abnormal behavior result with a calibrated confidence value includes:

[0032] The embedded behavior classification engine receives the suspected abnormal behavior feature vector and calculates its cosine similarity with each composite behavior feature template in the internally stored prison abnormal behavior category knowledge base, generating a preliminary confidence score for each behavior category; the prison abnormal behavior category knowledge base is organized in a three-layer graph structure, the first layer stores basic action unit feature templates, the second layer stores composite behavior feature templates composed of basic action units, and the third layer stores spatiotemporal context rules related to the behavior;

[0033] The embedded behavior classification engine generates spatiotemporal context information based on the timestamp of the enhanced image and the geographical location information of the edge nodes;

[0034] The embedded behavior classification engine calls the spatiotemporal context rules associated with the spatiotemporal context information in the prison abnormal behavior category knowledge base to correct the initial confidence score and output the corrected confidence score.

[0035] The embedded behavior classification engine inputs the corrected confidence score and the spatiotemporal context information into the online confidence calibration module. The online confidence calibration module outputs the calibrated confidence value corresponding to the classification result of abnormal behavior through its built-in lightweight Bayesian neural network.

[0036] Specifically, the monitoring platform automatically associates and retrieves synchronous data from sensors surrounding the warning points to form a multimodal alarm evidence chain, including:

[0037] The monitoring platform parses the geographic location information in the early warning data packet, and uses the location indicated by the geographic location information as the center to query the auxiliary sensors within a preset range. Based on the timestamp in the early warning data packet, it obtains the synchronous data stream within the corresponding time window from the auxiliary sensors.

[0038] The acquired synchronous data stream is time-aligned to generate multimodal data with a unified timeline;

[0039] Behavioral targets are labeled in the video stream of the unified multimodal data of the time axis to generate video evidence, and abnormal sounds are detected and located in the audio stream of the unified multimodal data of the time axis to generate audio evidence. Then, the access control status records and infrared alarm signals in the synchronous data stream are marked with events to generate sensor event evidence.

[0040] The generated video evidence, audio evidence, and sensor event evidence are logically linked based on their timestamps and spatial locations to generate a structured multimodal alarm evidence chain report.

[0041] Specifically, the edge nodes periodically encrypt and aggregate warning data packets and negative sample data with confidence levels below the multi-level dangerous behavior threshold into historical identification data, which is then fed back to the lightweight CNN model training end, including:

[0042] Edge nodes store early warning data packets, classification results of abnormal behaviors with confidence levels below a preset threshold, and corresponding clear and enhanced images in their local cache.

[0043] The data in the cache is encrypted using the AES-256 algorithm and a digital signature is attached to generate an encrypted feedback data packet, which is then uploaded to the model training server via the corresponding link.

[0044] After the model training server decrypts and verifies the encrypted feedback data packet, it uses the data in the packet to perform incremental learning on the lightweight CNN model.

[0045] A prison abnormal behavior recognition system based on edge intelligent analysis includes: an edge image acquisition module, an illumination assessment module, an abnormal behavior recognition module, a graded early warning module, and a feedback optimization module;

[0046] The edge image acquisition module deploys smart cameras and edge computing nodes at various monitoring points in the prison to collect the original video streams of the corresponding monitoring areas in real time, and performs time synchronization based on the NTP protocol to aggregate and generate a globally synchronized monitoring image stream.

[0047] The illumination evaluation module performs frame-by-frame illumination quality evaluation on the synchronous monitoring image stream, identifies image frames under low illumination conditions, and calls the improved Retinex algorithm optimized by the prison scene noise sample library to enhance the low-light image and output a clear enhanced image.

[0048] The abnormal behavior recognition module inputs the clear enhanced image into a lightweight CNN model deployed on the edge node for feature extraction, obtains a suspected abnormal behavior feature vector, and performs multi-dimensional matching with a preset abnormal behavior knowledge base through an embedded behavior classification engine, outputting a classification result with calibrated confidence.

[0049] The graded early warning module compares the confidence level of the classification result with the preset multi-level dangerous behavior threshold. It immediately triggers graded early warning for behaviors with abnormal confidence levels and packages and uploads the early warning information, clear enhanced image and suspected abnormal behavior feature vector to the monitoring platform. The platform automatically associates and retrieves the synchronous data of the corresponding device at the early warning point to generate a multimodal alarm evidence chain.

[0050] The feedback optimization module periodically encrypts the warning data packets and low-confidence negative sample data and feeds them back to the cloud training server for incremental learning and optimization of the lightweight CNN model.

[0051] Compared with the prior art, the beneficial effects of the present invention are:

[0052] 1. Improved accuracy and environmental adaptability in prison abnormal behavior identification. Based on an improved Retinex algorithm optimized with a prison scene noise sample database, it effectively solves the problems of image blurring and noise interference in low-light environments, providing a clear foundation for subsequent identification. Combined with a lightweight CNN model with dual attention modules, it can accurately extract high-discrimination feature vectors. Coupled with a three-layer prison abnormal behavior category knowledge base and confidence calibration mechanism, it significantly reduces the probability of false positives and false negatives. Simultaneously, edge nodes process data locally in real time, avoiding delays in the transmission of large amounts of raw data and ensuring timely identification response.

[0053] 2. A complete closed loop for security control and model optimization has been constructed, demonstrating outstanding practicality and sustainability. A tiered early warning mechanism, coupled with a multimodal alarm evidence chain, integrates video, audio, and sensor data to provide sufficient evidence for handling abnormal behavior, thereby improving prison security efficiency. Edge nodes feed back early warning data and negative samples through encrypted links, ensuring data transmission security while providing incremental learning material for lightweight CNN models. This enables dynamic model optimization, continuous adaptation to changes in prison scenarios, and provides stable and reliable technical support for prison security control in the long term, reducing the burden of manual monitoring. Attached Figure Description

[0054] Figure 1 is a schematic diagram of a prison abnormal behavior identification method based on edge intelligence analysis according to the present invention;

[0055] Figure 2 is a flowchart illustrating the principle of a prison abnormal behavior identification method based on edge intelligence analysis according to the present invention.

[0056] Figure 3 is an architecture diagram of a prison abnormal behavior recognition system based on edge intelligence analysis according to the present invention. Detailed Implementation

[0057] Example 1:

[0058] Please refer to Figures 1 and 2. One embodiment of the present invention provides a method for identifying abnormal behavior in prisons based on edge intelligence analysis. The method includes steps S1-S5:

[0059] S1: Deploy edge nodes at various monitoring points in the prison to collect raw monitoring images of the corresponding areas in real time and aggregate them into a synchronous monitoring image stream;

[0060] Furthermore, the specific process of deploying edge nodes at various monitoring points in the prison to collect original monitoring images of the corresponding areas in real time and aggregate them into a synchronous monitoring image stream includes: deploying intelligent edge nodes with computing capabilities at fixed indoor and outdoor monitoring points and mobile patrol equipment in the prison; each node is connected through a dedicated prison network and uses a time synchronization mechanism based on the IEEE 1588v2 protocol to synchronize the local clock of each node to microsecond-level precision; each edge node synchronously collects original monitoring images of its area at a preset frame rate within a specified time window, forming image data units containing geographic location tags and timestamps; transmitting the image data units collected by each node on the dedicated prison network through a dynamic bandwidth allocation method, and performing timestamp alignment and image frame rate synchronization processing at a designated aggregation node, ultimately generating a jitter-free, time-continuous synchronous monitoring image stream covering the entire area. The bandwidth allocation method is existing technology in this field and is not an inventive solution of this application, and will not be elaborated upon here.

[0061] Furthermore, this embodiment takes a typical area, a prison cell corridor, as an example. At key points in the corridor, such as corridor corners and areas with concentrated cell doors, edge node devices with computing capabilities are deployed. These edge node devices, through their connected cameras, acquire raw surveillance video in real time at a rate of 25 frames per second and process it into a timestamp-synchronized image stream, i.e., a synchronized surveillance image stream.

[0062] S2: Perform illumination assessment on the synchronous monitoring image stream, identify low-light environment image frames, and use the improved Retinex algorithm optimized with a prison scene noise sample library to enhance them, outputting a clear enhanced image;

[0063] Furthermore, the global brightness feature and local contrast feature of the current image frame in the synchronous monitoring image stream are extracted. The global brightness feature is the average pixel value of the entire frame, and the local contrast feature is the average value after dividing the image into an 8×8 grid and calculating the standard deviation of each grid. The two features are concatenated and input into a pre-trained illumination classification model. The illumination classification model performs the following steps in sequence: the input features are processed through the first convolutional layer to output a basic edge feature map, and then immediately subjected to 2×2 max pooling downsampling; the downsampled feature map is processed through the second convolutional layer to output a texture feature map; after another 2×2 max pooling downsampling, the features are reduced in dimensionality and fused through the third convolutional layer to output a high-level fused feature. The first and second convolutional layers have 3×3 convolutional kernels with a stride of 1, and the third convolutional layer has a 1×1 convolutional kernel with a stride of 1; finally, the high-level fused feature is mapped to a 3-dimensional illumination category probability distribution vector [low light probability, normal light probability, night light probability] through a fully connected layer. For example, the probability distribution vectors for low light probability, normal light probability, and night light probability are [0.92, 0.05, 0.03]. The obtained illumination category probability distribution vector is read. If the probability of low light (e.g., 0.92) or the probability of nighttime lighting exceeds a preset threshold of 0.85, the current image frame is identified and marked as a low-light environment image frame. Subsequently, an improved Retinex algorithm is used to enhance the identified low-light image frame. The improved Retinex algorithm first decomposes the input image into illumination and reflection components. Crucially, the reflection component is input into a deep denoising sub-network with a skip connection structure. At the encoder, features are progressively extracted and compressed through three downsampling convolutional layers with a stride of 2, and the intermediate feature maps output from each layer are recorded. At the decoder, upsampling is performed through deconvolutional layers. At each layer, the upsampling feature map received by the decoder is concatenated with the intermediate feature map of the same spatial size passed from the encoder through skip connections in the channel dimension to form a fused feature map. This fused feature map is then output through a convolution operation to produce the reconstructed features of the current layer. This structure effectively suppresses inherent noise in prison scenes, such as raster shadows, while preserving details. After gamma correction of the illumination component, it is fused with the denoised reflection component to generate a clear and enhanced image. After this processing, the originally dark and blurry outlines and movements of people become clear and distinguishable.

[0064] S3: Input the enhanced image into a lightweight CNN model deployed on edge nodes, filter out suspected abnormal behavior feature vectors, and input the suspected abnormal behavior feature vectors into an embedded behavior classification engine, perform multi-dimensional matching with a preset prison abnormal behavior category knowledge base, and output a classification result of abnormal behavior with a calibrated confidence value.

[0065] In this embodiment, the identification of abnormal behavior such as prolonged lingering and peering at the cell entrance is taken as an example. The enhanced image is input into a lightweight CNN model based on the MobileNetV3-Small backbone network and embedded with a dual-attention mechanism. The lightweight CNN model first extracts an initial feature map. The channel attention module strengthens its focus on clothing, while the spatial attention module focuses on the key area of ​​the cell entrance, ultimately outputting a 512-dimensional feature vector of suspected abnormal behavior. This feature vector is input into an embedded behavior classification engine. The engine first calculates its cosine similarity to the lingering and peering behavior template in the knowledge base, obtaining a preliminary confidence score, for example, 0.75. The knowledge base adopts a three-layer graph structure. The first layer contains basic action units such as walking, lingering, and peering; the second layer's lingering and peering behavior template is composed of lingering and peering units; the third layer contains rules, such as increasing the risk weight of this behavior in the cell entrance area. The engine then combines the image's timestamp, such as 2:30 AM, and geographical location, such as the cell block, to invoke the third-layer spatiotemporal context rules. For example, it considers the increased risk of staying in the cell block at night, thus correcting the initial confidence score to 0.82. Finally, the corrected score is input into an online confidence calibration module. After further considering the model's inherent uncertainties, the module outputs a calibrated final confidence value of 0.80.

[0066] S4: Determine whether the confidence level of the classified abnormal behavior result exceeds the preset multi-level dangerous behavior threshold. If so, trigger a graded warning, package the warning information, the corresponding clear enhanced image and the suspected abnormal behavior feature vector into a warning data packet and push it to the monitoring platform. The monitoring platform automatically associates and retrieves the synchronous data of the sensors around the warning point to form a multimodal alarm evidence chain.

[0067] Furthermore, the system's preset multi-level dangerous behavior thresholds are divided into four levels—low risk, medium risk, high risk, and extremely high risk—based on the actual threat level of abnormal behavior to prison security and personnel safety. Each level corresponds to a different confidence threshold. Low-risk behaviors refer to minor abnormal behaviors such as loitering alone without a legitimate reason, brief stays in non-designated areas, and slight movement of items, which pose no direct threat but have the potential to escalate. The corresponding low-level warning threshold is set at 0.55. Loitering and looking around belongs to the medium-risk level. Medium-risk behaviors also include behaviors that deviate from normal supervision and have a clear tendency to escalate, such as gathering in groups, deliberately obstructing surveillance, and climbing over low fences. Loitering and looking around corresponds to... The intermediate warning threshold is 0.75; fighting and other malicious behaviors are classified as high-risk behaviors, which also include highly abnormal behaviors that directly threaten personnel safety and prison order, such as gathering in large groups, damaging supervision facilities, attempting to climb walls, and forcibly breaking through access control. The corresponding high-risk warning threshold is set at 0.90; extremely high-risk behaviors refer to extreme abnormal behaviors that directly break through prison supervision defenses and seriously threaten prison security, such as armed fighting, collectively breaking through prison gates, and climbing over walls. The corresponding warning threshold is set at 0.95. The threshold classification of different risk levels fully combines the characteristic identification of various abnormal behaviors in prison scenarios, the speed of harm spread, and actual supervision and prevention needs. The identified behavior of lingering and looking around at the cell entrance had a confidence level of 0.80 after calibration by the online confidence level calibration module, which exceeded the 0.75 intermediate warning threshold corresponding to medium risk. Therefore, the system immediately triggered an intermediate warning. The system packaged the warning information, the corresponding clear enhanced image, and the 512-dimensional feature vector into a warning data package and immediately pushed it to the monitoring center platform. The warning information included time, location, behavior type, and confidence level.

[0068] Furthermore, after receiving the alert, the monitoring platform identified the alert location as the east side of the corridor of cell number 3. The platform automatically used this location as the center to query auxiliary sensors within a preset 20-meter range: a microphone and a door magnetic sensor for the cell door. Based on the alert timestamp, the platform retrieved synchronized data within a 10-second time window before and after the alert: the audio stream from the microphone detected continuous whispering; records from the access control system showed that the cell door was closed during the alert period. The platform time-aligned and logically correlated this evidence with the alert video stream, generating a structured report: At 2:30:15 AM, a person was found lingering at the entrance of cell number 103 for an extended period, exhibiting peering behavior, while continuous whispering was detected. The cell door was closed. This was determined to be a suspicious pre-gathering indicator, thus forming a multimodal alarm evidence chain.

[0069] S5: Edge nodes periodically encrypt and aggregate warning data packets and negative sample data with confidence levels below the multi-level dangerous behavior threshold into historical identification data, which is then fed back to the lightweight CNN model training end.

[0070] Furthermore, the edge nodes perform data feedback every 24 hours, packaging together all early warning data packets generated that day, as well as identification results with low confidence levels that were not alerted (such as normal walking being misjudged as minor anomalies). These data packets are encrypted using the AES-256 algorithm and digitally signed before being uploaded to the model training server in the cloud via a dedicated link within the prison's intranet. After the server decrypts and verifies the data, it uses this new field data to incrementally learn the lightweight CNN model, enabling the model to continuously adapt to changes in the prison environment and constantly improve its recognition accuracy. The AES-256 algorithm is existing technology in this field and is not an inventive solution of this application; therefore, it will not be elaborated upon here.

[0071] The step of performing illumination assessment on the synchronous monitoring image stream to identify image frames in low-light environments includes:

[0072] A1: Extract the global brightness features and local contrast features of the current image frame in the synchronous monitoring image stream;

[0073] Furthermore, the calculation process for global brightness features and local contrast features includes:

[0074] (1) Obtain the current image frame from the synchronous monitoring image stream and convert the color image frame into a grayscale image frame;

[0075] (2) Calculate the arithmetic mean of the gray values ​​of all pixels in the obtained grayscale image frame, and use this mean as the global brightness feature;

[0076] (3) Divide the obtained grayscale image frame into multiple non-overlapping local image blocks, calculate the standard deviation of the pixel grayscale value in each local image block, and combine the standard deviation values ​​of all local image blocks in order to form local contrast features.

[0077] A2: The global brightness feature and local contrast feature are concatenated and input into a pre-trained illumination classification model. The illumination classification model performs the following operations in sequence: the input features are processed through a first convolutional layer to output a basic edge feature map, and max pooling downsampling is performed on the basic edge feature map; the downsampled basic edge feature map is processed through a second convolutional layer to output a texture feature map; after max pooling downsampling again, the features are reduced in dimensionality and fused through a third convolutional layer to output a high-level fused feature; the high-level fused feature is mapped to an illumination category probability distribution vector through a fully connected layer.

[0078] Furthermore, the output basic edge feature map is calculated through its internal convolutional kernels. Specifically, each weight value in the convolutional kernel is multiplied by the corresponding value of the input feature. All these products are then summed, and a bias term is added to calculate a single numerical value. This value represents the degree of matching between that local region of the input feature and the pattern detected by the current convolutional kernel; the higher the value, the higher the matching degree. After calculating a local region, the convolutional kernel slides across the input feature to the next adjacent local region with a preset stride, repeating the convolution operation to generate the next response value. This process systematically traverses all possible regions of the entire input feature in a sliding window manner. Each convolutional kernel, through this traversal, generates a complete two-dimensional array composed of all local response values, called a feature map. Each point in the feature map corresponds to evidence of whether the pattern detected by the convolutional kernel exists at a location in the input feature. Since the first convolutional layer is the bottom layer of the network, its convolutional kernels typically learn the most basic spatial features such as edges and corners; therefore, its output feature map is the basic edge feature map.

[0079] Furthermore, the process of outputting the texture feature map includes:

[0080] (1) The second convolutional layer receives the downsampled basic edge feature map; the second convolutional layer has a new set of convolutional kernels pre-set inside, which are trained to identify more complex textures and structural patterns formed by the combination of basic edges in a specific way, such as stripes, grids or speckled textures in a specific direction;

[0081] (2) Each convolution kernel of the second convolutional layer performs convolution operation in the local region of its corresponding input feature map: the weight of the convolution kernel is multiplied point by point with the activation value of the corresponding position of the input feature and summed, and then a bias term is added to generate a single scalar output. This output value quantifies the degree of matching between the feature pattern of the current local region and the complex texture template represented by the convolution kernel.

[0082] (3) After completing the calculation of a local region, the convolution kernel slides systematically on the entire basic edge feature map according to the preset stride, and repeatedly performs the depth convolution operation. Each slide and calculation generates a new point in the output. When the convolution kernel has traversed all the effective positions of the basic edge feature map, all the output points together form a complete two-dimensional array, namely the texture feature map. Each pixel in the texture feature map corresponds to the evidence strength of a specific complex texture at a position in the original input.

[0083] Furthermore, the pooling layer also uses a sliding window, for example, 2×2 in size, which slides on the feature map, moving one step at a time. For each local region covered by the window, the pooling layer finds the maximum value among all values ​​in that region and outputs this maximum value.

[0084] Further, the specific steps of A2 can be summarized as follows: the global brightness feature and the local contrast feature are concatenated to form a combined feature vector; the combined feature vector is input into the illumination classification model, and the following operations are performed in sequence: the first convolutional layer processes and outputs the feature, followed by max pooling downsampling; the second convolutional layer processes the downsampled feature and outputs a new feature, followed by max pooling downsampling again; finally, the third convolutional layer processes the downsampled feature and outputs a high-level fusion feature; the high-level fusion feature is processed by a fully connected layer to output the illumination category probability distribution vector.

[0085] A3: Read the obtained illumination category probability distribution vector, compare the probability values ​​of the low light and night light categories in the distribution with the preset probability thresholds respectively. If the probability value of either category exceeds the probability threshold, the current image frame is determined and marked as a low light environment image frame.

[0086] Furthermore, the specific steps in A3 include:

[0087] (1) Extract the generated illumination category probability distribution vector from the output of the fully connected layer of the illumination classification model. The illumination category probability distribution vector is a three-dimensional numerical combination of the three illumination conditions of low light, normal light and night light in the current image frame. Extract the low light category probability value and the night light category probability value from the illumination category probability distribution vector and retain the original accuracy of the two categories of values.

[0088] (2) Retrieve the fixed probability threshold set in advance during the training and deployment phase of the illumination classification model from the system parameter library. In this embodiment, the probability threshold is set to 0.85.

[0089] (3) Compare the low light category probability value obtained by decomposition with the probability threshold. If the low light category probability value exceeds 0.85, the current image frame is directly determined to be a low light environment image frame. If it does not exceed 0.85, the current image frame is a normal lighting environment image frame.

[0090] (4) If the current image frame is determined to be a normal lighting environment image frame, the original state of the metadata information of the normal lighting environment image frame is maintained, and no special mark is added, and the lighting evaluation and marking operation of the current image frame is completed.

[0091] (5) If the current image frame is determined to be a low-light environment image frame, add a low-light environment exclusive mark to the metadata information of the low-light environment image frame. The mark is bound to the metadata such as the timestamp and geographical location information of the image frame and is transmitted synchronously with the image frame to complete the illumination assessment and marking operation of the current image frame.

[0092] The improved Retinex algorithm, optimized using a prison scene noise sample library, is used to enhance the image, outputting a clearer, enhanced image, including:

[0093] B1: Input the low-light environment image frame into the improved Retinex enhancement model, which first decomposes the input image into an illumination component representing ambient lighting and a reflection component representing the object's own properties;

[0094] Furthermore, the specific steps for B1 include:

[0095] (1) Convert the identified and marked low-light environment color image frames from the red-green-blue color space to the hue-saturation-brightness color space, that is, from RGB to HSV. After the conversion is completed, extract the brightness component separately from the image frame, and keep the hue component and saturation component for later use.

[0096] (2) Perform an operation of adding one to each pixel value in the extracted lightness component and then taking the natural logarithm to convert the linear domain lightness component into a logarithmic domain lightness image. The logarithmic domain lightness image is used as the input data for the subsequent convolution operation.

[0097] (3) Select a Gaussian kernel function with a preset standard deviation of 1.5, and perform a two-dimensional convolution operation between the Gaussian kernel function and the logarithmic domain brightness image. Keep the image size unchanged during the convolution operation. Obtain a smooth brightness distribution field by convolutioning pixel by pixel. This brightness distribution field is the logarithmic domain illumination component.

[0098] (4) Perform pixel-by-pixel subtraction between the logarithmic domain luminance image and the logarithmic domain illumination component, strictly corresponding to the pixel position of the image to complete the numerical operation, and obtain the logarithmic domain reflectance component.

[0099] (5) Perform an exponential operation on the logarithmic domain illumination component to transform it back from the logarithmic domain to the linear domain, and obtain the linear illumination component that characterizes the distribution of ambient lighting.

[0100] (6) Perform an exponential operation on the logarithmic domain reflection component to convert it back to the linear domain, and obtain the linear reflection component that represents the object's own properties. This completes the component decomposition of the low-light environment image frame by the improved Retinex enhancement model, and outputs the linear illumination component and linear reflection component that can be used for image enhancement processing.

[0101] Furthermore, the structural settings of the improved Retinex enhancement model:

[0102] The improved Retinex enhancement model employs a hybrid architecture combining algorithm modules and deep sub-networks. It is divided into three functional modules: an image component decomposition module, used to separate the illumination and reflection components of low-light environment image frames, outputting a logarithmic domain illumination component and a logarithmic domain reflection component containing prison scene noise. The reflection component is fed into a deep denoising sub-network, while the illumination component is fed into a component fusion correction module; a deep denoising sub-network, using a lightweight U-Net structure with skip connections, designed for the inherent noise of prison scenes, receives the logarithmic domain reflection component output from the component decomposition module, and after encoding, decoding, and feature fusion, outputs a logarithmic domain reflection component suppressing prison scene noise, which is then fed into the component fusion correction module; and a component fusion correction module, which receives the denoised reflection component output from the deep denoising sub-network and the original illumination component output from the component decomposition module. It first performs gamma correction on the illumination component, then performs linear domain restoration and fusion on the corrected illumination component and the denoised reflection component, ultimately outputting a clear enhanced image that meets the requirements for edge node recognition.

[0103] Furthermore, the parameter configuration of the improved Retinex augmentation model is as follows:

[0104] (1) The image component decomposition module implements component decomposition based on Retinex theory. It optimizes color space transformation and convolution kernel parameters for the brightness features of low-light prison images. There is no training layer, and all algorithm parameters are fixed. Specific settings and parameters are as follows:

[0105] The color space conversion setting is used to convert the input prison low-light color image frame from the red-green-blue color space to the hue-saturation-lightness color space. Only the lightness component is extracted for subsequent decomposition, while the hue and saturation components are temporarily stored for final image fusion. The conversion process uses a linear mapping algorithm without additional parameters.

[0106] The logarithmic domain transformation setting is used to perform an operation of adding one to each pixel value in the extracted luminance component and then taking the natural logarithm, converting the linear domain luminance image into a logarithmic domain luminance image, eliminating the nonlinear difference in light intensity in the prison low-light image. The operation parameter is a fixed value of 1, with no adjustment space.

[0107] The illumination component estimation settings employ two-dimensional convolution operations to achieve smooth estimation of the illumination components in the numerical domain. The convolution kernel is a Gaussian kernel function, with the core parameter set to a standard deviation of 1.5 and a convolution stride of 1. The image size remains unchanged during the convolution process. A smooth brightness distribution field is generated through pixel-by-pixel convolution. The size of the Gaussian kernel is adaptively matched according to the resolution of the input image. The 1920×1080 and 1280×720 resolution images commonly used in prison surveillance are both suitable for this standard deviation parameter.

[0108] The reflection component calculation setting is used to perform a pixel-by-pixel subtraction operation between the logarithmic domain luminance image and the logarithmic domain illumination component. It strictly corresponds to the pixel position, has no additional parameters, and the subtraction result is the logarithmic domain reflection component containing prison scene noise, which preserves key recognition details such as people, facilities, and actions in the image.

[0109] (2) The deep denoising sub-network is the only trainable module of the improved Retinex enhancement model. It adopts a lightweight U-Net structure. Both the encoder and decoder are set with 3 convolutional layers. Skip connections are introduced to preserve detailed features. All network layer parameters are optimized for lightweighting based on the computational power of edge nodes. At the same time, for prison scene noise, such as grid shadows, wall stains, nighttime light noise, and monitoring equipment noise, the convolutional kernel and number of channels are optimized. The specific parameter configuration is as follows: a lightweight U-Net structure with 3 encoder layers, 3 decoder layers, and skip connections is adopted. There are no pooling layers. Downsampling / upsampling is achieved through convolution stride. The encoder is responsible for feature extraction and compression, and the decoder is responsible for feature reconstruction and denoising. Skip connections realize the fusion of features of the same scale between the encoder and decoder to avoid loss of details.

[0110] The encoder parameters are configured with a total of 3 downsampling convolutional layers. Each layer consists of a convolutional layer, a batch normalization layer, and a ReLU activation layer. The core parameters are uniformly set as follows: convolutional kernel size 3×3, stride 2, and number of channels 16, 32, and 64 respectively. The feature map size is halved after each convolutional layer. The final output is encoded features containing noise distribution information of the prison scene. The initial value of the bias term of all convolutional layers is 0, and the initial value of the weights is initialized using He normality.

[0111] Decoder parameter configuration: There are 3 upsampling deconvolution layers in total. Each layer consists of a deconvolution layer, a batch normalization layer, and a ReLU activation layer. The core parameters are uniformly set as follows: deconvolution kernel size 3×3, stride 2, and number of channels 32, 16, and 1 respectively. The feature map size is doubled after each deconvolution layer. The final output is a denoised reflection component with the same size as the input reflection component. The initial value of the bias term of the deconvolution layer is 0, and the initial value of the weight is initialized using Xavier normality.

[0112] Skip connection setup: The intermediate feature maps output by each layer of the encoder are passed to the deconvolution layer of the same spatial size level of the decoder through direct connection. The features are then concatenated in the channel dimension without feature compression or weighting. After concatenation, the features are directly input into the convolution layer for feature fusion, ensuring that the low-level detailed features extracted by the encoder are passed to the decoder.

[0113] Output layer settings: After the last deconvolution layer of the decoder, the Sigmoid activation function is used to map the output value to the 0-1 interval, generating the denoised logarithmic domain reflection component. The activation layer has no additional parameters.

[0114] (3) Component fusion correction module: adaptive gamma correction parameters are set for the brightness characteristics of different low-light scenes in the prison. The fusion process adopts fixed linear operation parameters. Among them, the illumination component gamma correction setting is: adaptive gamma correction is performed on the linear illumination component to improve the overall brightness of the low-light image of the prison. The gamma value is less than 1. The specific value is adaptively adjusted according to the global brightness characteristics of the input image. The gamma value range of the low-light image of the prison is 0.4-0.8. The value range of pure low-light scene at night is 0.4-0.6. The value range of low-light scene with lights at night is 0.6-0.8. The correction process adopts power function operation without additional parameters.

[0115] Furthermore, the training process for the improved Retinex augmentation model includes:

[0116] Low-light samples: Original prison surveillance images in low-light environments such as no light at night, nighttime lighting, and rainy days, with resolutions mainly at 1920×1080 and 1280×720, and a number of no less than 100,000 images.

[0117] Normal light samples: Prison surveillance images under normal daylight conditions, paired with low light samples from the same surveillance point, with the number matching the low light samples;

[0118] Noise samples from prison scenes: Inherent noises from prison scenes were collected separately, including grid shadows, wall stains, nighttime light noise, electronic noise from monitoring equipment, rain and fog noise, etc., and noise labels were created for sample augmentation.

[0119] The sample library annotates all images, including low light level, noise type, and average brightness. The samples are normalized to map pixel values ​​to the 0-1 range, which is used as input for model training. The ratio of training set to validation set is set to 8:2.

[0120] Loss function settings: To address the enhancement requirements of low-light prison images, a combined loss function of mean squared error loss and structural similarity loss is adopted, which balances pixel-level error reduction with preservation of image structure details. The mean squared error loss has a weight of 0.7, the structural similarity loss has a weight of 0.3, and the loss function calculates the logarithmic domain reflectance component and the label logarithmic domain reflectance component output by the deep denoising sub-network.

[0121] Training parameter configuration: The Adam optimizer is used for training, the learning rate is set to 0.001, the learning rate decays with the number of training rounds, and the learning rate is multiplied by 0.9 every 10 rounds. The batch size is set to 32 to adapt to the computing power of the cloud training server. The number of training rounds is set to 50 rounds. The early stopping mechanism is set to stop training if the validation set loss does not decrease for 5 consecutive rounds to avoid overfitting.

[0122] B2: The obtained reflection component is input into the deep denoising sub-network. The encoder of the deep denoising sub-network extracts and compresses the reflection component through multiple downsampling convolutional layers and outputs encoded features containing noise distribution information. At the same time, the decoder of the deep denoising sub-network upsamples and reconstructs the encoded features and outputs the denoised reflection component that suppresses the inherent noise of the prison scene.

[0123] B3: Perform gamma correction on the illumination component to generate a corrected illumination component;

[0124] B4: The denoised reflection component is fused with the corrected illumination component to generate a clear and enhanced image.

[0125] Furthermore, the process of generating a sharper, enhanced image includes:

[0126] (1) Obtain a color image marked as a low-light environment image frame and convert it from the red-green-blue color space to the hue-saturation-brightness color space. The system extracts the brightness component of the image separately and performs an operation of adding one and taking the natural logarithm of each pixel value in the brightness component, thereby converting the linear domain brightness image into a logarithmic domain brightness image. The pixel space conversion method is the prior art in this field and is not an inventive solution of this application, so it will not be described in detail here.

[0127] (2) A Gaussian kernel function with a preset standard deviation is used to perform a two-dimensional convolution operation with the obtained logarithmic domain luminance image. After the convolution calculation, a smooth luminance distribution field is obtained. This luminance distribution field is the illumination component estimated in the logarithmic domain, i.e., the logarithmic domain illumination component. The Gaussian kernel function is the prior art in this field and is not an inventive solution of this application. It will not be described in detail here.

[0128] (3) Subtract the obtained logarithmic domain luminance image from the logarithmic domain illumination component pixel by pixel. The image obtained after the subtraction is the reflection component calculated in the logarithmic domain.

[0129] (4) Input the calculated noisy logarithmic domain reflection component into a pre-trained deep denoising subnetwork, which outputs a logarithmic domain reflection component that has been noise-suppressed and detail-enhanced.

[0130] (5) Perform exponential operation on the estimated logarithmic domain illumination component to transform it back to the linear domain and obtain the linear illumination component. Then, the system performs gamma correction on the linear illumination component with a gamma value less than one to obtain the corrected linear illumination component. The exponential operation is the prior art in this field and is not an inventive solution of this application. It will not be described in detail here.

[0131] (6) Perform an exponential operation on the denoised logarithmic domain reflection component to transform it back to the linear domain, and obtain the enhanced linear reflection component;

[0132] (7) Multiply the corrected linear illumination component and the enhanced linear reflection component pixel by pixel to generate a preliminary enhanced linear brightness image;

[0133] (8) The system merges the generated preliminary enhanced linear brightness image with the hue and saturation components extracted from the original low-light environment image frame, converts it back to the red-green-blue color space, and performs contrast stretching to finally output a clear enhanced image with natural colors.

[0134] The encoder and decoder of the deep denoising subnetwork adopt a skip connection method;

[0135] C1: During the encoding process of the deep denoising sub-network, the intermediate feature map output by each convolutional layer in the encoder is recorded. During the decoding process, the intermediate feature map output by each level of the encoder is passed to the corresponding deconvolutional layer of the same spatial size level of the decoder through skip connections, and used as the same scale encoded feature.

[0136] C2: At the decoder, the upsampled feature map output by the deconvolution layer is concatenated with the corresponding coded features of the same scale received from the encoder in the channel dimension to form a fused feature map. A convolution operation is then performed on the fused feature map to output the reconstructed feature map of the current layer.

[0137] The step of inputting the enhanced image into a lightweight CNN model deployed on edge nodes to filter out high-discrimination suspected abnormal behavior feature vectors includes:

[0138] D1: Input the enhanced image into the lightweight CNN model, process it through its MobileNetV3-Small backbone network, and output an initial feature map;

[0139] Furthermore, the specific steps of D1 include:

[0140] (1) Obtain a clear enhanced image, adjust its spatial size to a preset width and a preset height, and normalize the pixel values ​​of the clear enhanced image by subtracting the preset mean from the pixel values ​​of each channel and dividing by the preset standard deviation to obtain a standardized input image.

[0141] (2) Input the standardized input image into the first convolutional layer. The first convolutional layer uses a 3×3 convolutional kernel and performs convolution operation with a stride of 2 to generate the first layer feature map. This operation reduces the spatial size of the first layer feature map to half that of the input image.

[0142] (3) Input the first layer feature map into the network backbone composed of multiple bottleneck structures connected in sequence. Each bottleneck structure performs the following operations in sequence: First, perform depth convolution, then perform spatial convolution independently on each channel of the input feature, then perform pointwise convolution, and then perform linear combination of all channels output by depth convolution to change the channel dimension. Then, embed a hard switching activation function between convolution operations to introduce nonlinearity.

[0143] Furthermore, the HardTanh activation function is a non-linear activation function that restricts the input to the interval [-1, 1]. When the input is less than -1, the output value will be fixed at -1, and when the input is greater than 1, the output value will be fixed at 1. Specifically, the HardTanh activation function is prior art in this field and is not an inventive solution of this application, so it will not be described in detail here.

[0144] (4) In the specified bottleneck structure, the feature map output by it is squeezed and stimulated. This operation first compresses the feature map of each channel into a channel descriptor through global average pooling, then learns the channel weights through two fully connected layers, and finally normalizes the weights using the Sigmoid function. The weights are then applied to the original feature map through channel-wise multiplication to obtain the recalibrated feature map. The Sigmoid function is a prior art in this field and is not an inventive solution of this application. It will not be described in detail here.

[0145] (5) The feature maps output from the deep layers of the network, i.e. the last series of bottleneck structures, in (3) and (4) are called deep feature maps;

[0146] (6) Upsample the deep feature map, such as by bilinear interpolation, so that its size in width and height matches the feature map output from the middle layer of the network, i.e., the specific bottleneck structure located in the middle of the backbone. The feature map output from the specific bottleneck structure located in the middle of the backbone is called the middle layer feature map.

[0147] (7) The upsampled deep feature map and the mid-level feature map are added element by element at the corresponding spatial positions and channels to achieve multi-scale feature fusion and generate a fused feature map;

[0148] (6) Input the fused feature map into the last 1×1 convolutional layer of the MobileNetV3-Small backbone network. This convolutional layer compresses the number of channels of the fused feature map to the preset target number of channels and outputs the final initial feature map.

[0149] D2: Input the initial feature map into a channel attention module to generate a channel weight vector, and perform channel-by-channel multiplication operation between the initial feature map and the channel weight vector to output a channel-weighted feature map;

[0150] Furthermore, the process of generating the channel weight vector includes:

[0151] (1) Perform global average pooling and global max pooling operations on the initial feature map respectively. For each channel of the initial feature map, global average pooling calculates the arithmetic mean of all spatial location feature values ​​to generate the first pooling feature. For each channel of the initial feature map, global max pooling extracts the maximum value of all spatial location feature values ​​to generate the second pooling feature. The first pooling feature and the second pooling feature are both one-dimensional vectors with the same length as the number of channels in the initial feature map.

[0152] (2) The first pooling feature and the second pooling feature are respectively input into a two-layer fully connected network with shared parameters. The first layer of the shared fully connected network is a dimension reduction layer, which is used to compress the dimension of the input vector; the second layer is a dimension increase layer, which is used to restore the vector dimension to the initial number of channels. After the first pooling feature and the second pooling feature are respectively processed by the shared fully connected network, the transformed average feature vector and the transformed maximum feature vector are output.

[0153] (3) The transformed average eigenvector and the transformed maximum eigenvector are added element by element to generate a preliminary weight vector, which reflects the preliminary importance assessment based on the nonlinear interaction relationship between channels;

[0154] (4) Input the preliminary weight vector into the Sigmoid function for nonlinear transformation, and map the value of each element in the vector to between zero and one to generate the final channel weight vector.

[0155] D3: Input the channel-weighted feature map into the spatial attention module to generate a spatial weight matrix, and multiply the channel-weighted feature map with the spatial weight matrix pixel by pixel to output a spatial weighted feature map;

[0156] Furthermore, the process of generating the spatial weight matrix includes:

[0157] (1) Perform global average pooling and global max pooling on the channel weighted feature map along the channel dimension respectively. The global average pooling generates an average pooling feature map, and the global max pooling generates a max pooling feature map. Both the average pooling feature map and the max pooling feature map are two-dimensional matrices with the same spatial size as the height and width of the channel weighted feature map.

[0158] (2) The average pooling feature map and the max pooling feature map are concatenated along the channel dimension to generate a dual-channel concatenated feature map. The first channel of the dual-channel concatenated feature map is the average pooling feature map, and the second channel is the max pooling feature map.

[0159] (3) Input the dual-channel stitched feature map into a two-dimensional convolutional layer. The two-dimensional convolutional layer performs convolution operation using a convolutional kernel of a preset size and outputs a single-channel initial weight response map. The value of each position in the initial weight response map reflects the contextual importance of the corresponding spatial region.

[0160] (4) Input the initial weight response map into the Sigmoid function. The Sigmoid function maps the value of each position in the initial weight response map to a value between zero and one, generating the final spatial weight matrix. The magnitude of the values ​​in the spatial weight matrix represents the importance of the corresponding spatial position.

[0161] D4: The spatially weighted feature map is processed sequentially through a global average pooling layer and a fully connected layer to output a feature vector of suspected abnormal behavior.

[0162] Furthermore, the specific steps of D4 include:

[0163] (1) The spatial weighted feature map is directly input into the global average pooling layer. The spatial weighted feature map is a three-dimensional feature matrix that retains high discriminative behavioral feature information. When inputting, its original size and number of channels remain unchanged.

[0164] (2) Perform channel-wise global average pooling operation on the input spatial weighted feature map. The height and width of the pooling kernel are consistent with the spatial size of the spatial weighted feature map. The pooling step size is set to one. Calculate the arithmetic mean of the pixel values ​​of all spatial locations for each channel of the feature map. Compress the two-dimensional spatial features of each channel into a one-dimensional scalar value. If the number of channels of the spatial weighted feature map is 512, generate a one-dimensional feature vector containing 512 scalar values ​​to achieve complete compression of the spatial dimension.

[0165] (3) The 512-dimensional one-dimensional feature vector output by the global average pooling layer is directly input into the fully connected layer. The number of input neurons in the fully connected layer is preset to 512, which perfectly matches the dimension of the one-dimensional feature vector, ensuring that the two can complete normal matrix operations.

[0166] (4) The number of output neurons of the fully connected layer is set to 512, the weight matrix size is 512×512, the bias term dimension is 512, the initial value of the weight matrix is ​​initialized with He normality, and the initial value of the bias term is zero. The input one-dimensional feature vector is multiplied by the weight matrix of the fully connected layer, and the result is added element by element to the bias term to obtain the inactive feature vector.

[0167] (5) Input the unactivated feature vector output by the fully connected layer into the linear activation function, keep the numerical features of each dimension of the feature vector unchanged, and perform L2 normalization on the feature vector after activation to map the value of each element in the vector to the interval between zero and one, thereby eliminating the dimensional differences of feature values ​​in different dimensions.

[0168] (6) The 512-dimensional feature vector after activation and normalization is used as the final suspected abnormal behavior feature vector output, which is directly passed to the embedded behavior classification engine.

[0169] The specific operations of the channel attention module and the spatial attention module include:

[0170] E1: The channel attention module receives the initial feature map, performs global average pooling and global max pooling on the initial feature map to obtain the first pooling feature and the second pooling feature, and inputs the first pooling feature and the second pooling feature into a multilayer perceptron with shared weights. The two feature vectors output by the multilayer perceptron are added together and then passed through the Sigmoid function to generate the channel weight vector. The generated channel weight vector is then multiplied with the initial feature map to output the channel weighted feature map.

[0171] E2: The spatial attention module receives the output channel-weighted feature map, performs average pooling and max pooling on the channel-dimension of the channel-weighted feature map respectively, and concatenates the pooling results and passes them through a convolutional layer and the Sigmoid function to generate a spatial weight matrix. Then, the generated spatial weight matrix is ​​multiplied with the channel-weighted feature map to output the feature map after dual attention weighting, i.e., the spatial weighted feature map.

[0172] The process of inputting suspected abnormal behavior feature vectors into an embedded behavior classification engine, performing multi-dimensional matching with a pre-defined prison abnormal behavior category knowledge base, and outputting a classified abnormal behavior result with calibrated confidence values ​​includes:

[0173] F1: The embedded behavior classification engine receives the suspected abnormal behavior feature vector and calculates its cosine similarity with each composite behavior feature template in the internally stored prison abnormal behavior category knowledge base, generating a preliminary confidence score for each behavior category; the prison abnormal behavior category knowledge base is organized in a three-layer graph structure, the first layer stores basic action unit feature templates, the second layer stores composite behavior feature templates composed of basic action units, and the third layer stores spatiotemporal context rules related to behavior. The cosine similarity calculation formula is existing technology in this field and is not an inventive solution of this application, so it will not be elaborated here.

[0174] F2: The embedded behavior classification engine generates spatiotemporal context information based on the timestamp of the enhanced image and the geographical location information of the edge nodes;

[0175] Furthermore, the specific steps of F2 include:

[0176] (1) Extract the image acquisition timestamp from the metadata of the enhanced image and obtain the geographic location coordinates of the edge node from the system configuration;

[0177] (2) Based on the extracted image acquisition timestamp, query the preset time rule library, map the timestamp to a standardized time segment identifier with behavioral significance, and determine whether it is a weekday or a holiday to generate structured time context information;

[0178] (3) Based on the obtained geographical coordinates, query the preset electronic map database, calculate the prison functional area to which the coordinates belong through spatial relationship calculation, and generate structured spatial context information;

[0179] (4) Using the generated structured temporal context information and the generated structured spatial context information as input, query the preset spatiotemporal context rule base and match to obtain the applicable set of behavioral risk correction rules;

[0180] (5) Combine and encapsulate the generated structured temporal context information, structured spatial context information, and the matched behavioral risk correction rule set into comprehensive spatiotemporal context information and output it.

[0181] F3: The embedded behavior classification engine calls the spatiotemporal context rules associated with the spatiotemporal context information in the prison abnormal behavior category knowledge base to correct the initial confidence score and output the corrected confidence score;

[0182] Furthermore, the specific steps for F3 include:

[0183] (1) Extract the spatial location key, time segment key and date type key from the spatiotemporal context information as key inputs for rule matching;

[0184] (2) The extracted spatial location key, time segment key and date type key are matched with the spatiotemporal context rule condition part in the prison abnormal behavior category knowledge base to obtain the initial rule set that is successfully matched;

[0185] (3) Conflict detection is performed on the rules in the initial rule set. When multiple rules match at the same time but the correction actions are inconsistent, arbitration is performed according to the preset priority rules, the rule with the highest priority is retained, and an effective rule set is generated.

[0186] (4) Parse the correction action of each rule from the set of effective rules to obtain the correction direction and correction amount parameters;

[0187] (5) Based on the corrected direction and corrected amount parameters, perform numerical correction calculation on the preliminary confidence score, and limit the calculation result to the confidence interval of zero to one to obtain the corrected confidence score.

[0188] F4: The embedded behavior classification engine inputs the corrected confidence score and the spatiotemporal context information into the online confidence calibration module. The online confidence calibration module outputs the calibrated confidence value corresponding to the classification result of abnormal behavior through its built-in lightweight Bayesian neural network.

[0189] Furthermore, lightweight Bayesian neural networks improve the robustness and generalization ability of the model by introducing uncertainty in the weights, making them suitable for resource-constrained environments. In this application, lightweight Bayesian neural networks are prior art in this field and are not an inventive solution of this application, so they will not be described in detail here.

[0190] The monitoring platform automatically associates and retrieves synchronous data from sensors surrounding the warning points to form a multimodal alarm evidence chain, including:

[0191] G1: The monitoring platform parses the geographic location information in the early warning data packet, and uses the location indicated by the geographic location information as the center to query the auxiliary sensors within a preset range. Based on the timestamp in the early warning data packet, it obtains the synchronous data stream within the corresponding time window from the auxiliary sensors.

[0192] G2: Time-align the acquired synchronous data stream to generate multimodal data with a unified timeline;

[0193] G3: Perform behavioral target annotation on the video stream in the unified multimodal data of the time axis to generate video evidence, and perform abnormal sound detection and localization on the audio stream in the unified multimodal data of the time axis to generate audio evidence. Then, perform event marking on the access control status record and infrared alarm signal in the synchronous data stream to generate sensor event evidence.

[0194] Furthermore, the specific steps of G3 include:

[0195] (1) Processing video streams in multimodal data with unified time axis: First, use object detection model to identify people targets in each frame of the video stream and mark bounding boxes, and assign a unique identifier to each detected target; then, use object tracking algorithm to associate the bounding boxes of the same target in consecutive video frames into target trajectories based on the appearance features and motion trajectories of the target; finally, record the continuous behavior category, position coordinates and detection confidence of each target according to the target trajectory, and generate video behavior evidence by combining the timestamp. The object detection model and object tracking algorithm are conventional means that can be understood and implemented by those skilled in the art, and this application is not limited to specific partitioning methods.

[0196] (2) Processing audio streams in multimodal data with unified time axis: First, the audio stream is divided into continuous short audio frames; second, the acoustic features of each audio frame are extracted and input into the abnormal sound classification model for identification to determine whether it contains a predefined abnormal sound category; for audio frames identified as abnormal, the sound source is located by analyzing the signal differences reaching different microphones; finally, the type, start and end time, sound source location and detection confidence of the abnormal sound are integrated and combined with the timestamp to generate audio abnormal evidence. The abnormal sound classification model is a dedicated classifier trained on a prison scene-specific sound dataset and automatically learns and identifies predefined abnormal categories from the Mel spectrum using a one-dimensional convolutional neural network. Specifically, the Mel spectrum and the convolutional neural network are conventional means that can be understood and implemented by those skilled in the art. This application is not limited to specific partitioning methods.

[0197] (3) Process the access control status record and infrared alarm signal in the synchronous data stream: For the access control status record, monitor its status change, record each opening or closing event and its precise timestamp; for the infrared alarm signal, monitor its signal strength, and when the strength continuously exceeds the preset threshold, record it as an alarm event and its start and end timestamps; based on the recorded event type and timestamp, generate sensor event evidence.

[0198] (4) The generated video behavioral evidence, audio abnormality evidence, and sensor event evidence are formatted and packaged according to a unified evidence template; the evidence template includes evidence type, timestamp, event description, spatial location or signal source, and confidence level field;

[0199] (5) After formatting, output video behavioral evidence, audio abnormality evidence and sensor event evidence.

[0200] G4: Logically associates the generated video evidence, audio evidence, and sensor event evidence based on their timestamps and spatial locations to generate a structured multimodal alarm evidence chain report.

[0201] Furthermore, logical correlation refers to actively exploring the inherent connections and causal sequences between different modalities of evidence, using timestamps as the vertical main line and spatial location as the horizontal constraint, thereby constructing an evidence system that can completely and coherently reconstruct the course of events. Specifically, the system first aligns and sorts all evidence on a unified timeline based on precise timestamps, clarifying the sequence of events. Then, based on spatial location information, such as the location of targets in videos, the direction of sound sources in audio, and the physical location of sensors, it determines whether these temporally close pieces of evidence also have spatial proximity or correlation, thereby confirming whether they point to the same core event or a continuous process of action. For example, the system judges whether the action of a person swinging their arm in a video, the direction of a striking sound collected at the same time, and the signal of a nearby access control being forcibly opened are highly consistent in time and space. Finally, through this cross-modal spatiotemporal correlation analysis, independent pieces of evidence are woven into an evidence chain with clear causal logic and spatiotemporal continuity, and a structured report is generated accordingly. This report not only states when and where what happened, but also explains how different pieces of evidence corroborate each other, jointly supporting a complete conclusion about an unusual event.

[0202] The edge nodes periodically encrypt and aggregate warning data packets and negative sample data with confidence levels below the multi-level dangerous behavior threshold into historical identification data, which is then fed back to the lightweight CNN model training end, including:

[0203] H1: Edge nodes store warning data packets, classification results of abnormal behaviors with confidence levels below a preset threshold, and corresponding clear and enhanced images in their local cache.

[0204] H2: The data in the cache is encrypted using the AES-256 algorithm and a digital signature is attached to generate an encrypted feedback data packet. The encrypted feedback data packet is then uploaded to the model training server via a dedicated link. The digital signature is a conventional method that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method.

[0205] H3: After the model training server decrypts and verifies the encrypted feedback data packet, it uses the data in the packet to perform incremental learning on the lightweight CNN model. Incremental learning is a conventional method that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method.

[0206] Example 2:

[0207] Please refer to Figure 3, another embodiment of the present invention: a prison abnormal behavior recognition system based on edge intelligence analysis, comprising:

[0208] Edge image acquisition module, illumination assessment module, abnormal behavior recognition module, hierarchical early warning module, and feedback optimization module;

[0209] The edge image acquisition module deploys smart cameras and edge computing nodes at various monitoring points in the prison to collect raw video streams of the corresponding monitoring areas in real time, and performs time synchronization based on the NTP protocol to aggregate and generate a globally synchronized monitoring image stream.

[0210] The illumination assessment module performs frame-by-frame illumination quality assessment on the synchronous monitoring image stream, accurately identifies image frames under low illumination conditions, and calls the improved Retinex algorithm optimized by the prison scene noise sample library to enhance the low-light image, outputting a clearer and more detailed enhanced image.

[0211] The abnormal behavior recognition module inputs the clear and enhanced image into a lightweight CNN model deployed on the edge nodes for feature extraction, obtains suspected abnormal behavior feature vectors, and then performs multi-dimensional matching with a preset abnormal behavior knowledge base through an embedded behavior classification engine, outputting a classification result with calibrated confidence.

[0212] The graded early warning module compares the confidence level of the classification results with the preset multi-level dangerous behavior thresholds. It immediately triggers graded early warnings for behaviors with abnormal confidence levels and packages and uploads the early warning information, clear enhanced images, and feature vectors of suspected abnormal behaviors to the monitoring platform. The monitoring platform automatically associates and retrieves synchronous data from devices such as microphones and access control sensors around the early warning point to generate a multimodal alarm evidence chain.

[0213] The feedback optimization module periodically encrypts and feeds back warning data packets and low-confidence negative sample data to the cloud training server for incremental learning and optimization of the lightweight CNN model.

[0214] Furthermore, the illumination evaluation module includes an illumination evaluation unit and an image enhancement unit; the illumination evaluation unit extracts the V component, i.e. the lightness component, in the HSV color space of the current image frame in the synchronous monitoring image stream, calculates its global brightness mean and local contrast features based on local binary variation; the global brightness features and local contrast features are concatenated into a feature vector and then input into a pre-trained illumination classification model for illumination condition classification.

[0215] For example, taking any surveillance video (image frame F1001) of a prison cell corridor at 20:05 at night as an example, the illumination assessment process is illustrated. The resolution of this frame image is 1920×1080, and the illumination assessment unit calculates its global average brightness value to be 35, where the global average brightness value ranges from 0 to 255, and the local contrast feature value is 0.12; the feature vector [35, 0.12] is input into the illumination classification model; the illumination classification model is a lightweight CNN, and its structure is as follows: first convolutional layer (3×3 kernels, stride 1, output 16-channel feature map) - max pooling layer (2×2) - second convolutional layer (3×3 kernels) - max pooling layer (2×2) - second convolutional layer (3×3 kernels) - max pooling layer (2×2) - max pooling layer (2×2 kernels ... ×3, stride 1, output 32-channel feature map) - max pooling layer (2×2) - third convolutional layer (convolutional kernel 3×3, stride 1, output 64-channel feature map) - global average pooling layer - fully connected layer (output nodes are 3, corresponding to the probabilities of normal lighting, low light, and nighttime lighting respectively); through the lighting classification model inference, the lighting category probability distribution vector is obtained as [0.15, 0.80, 0.05]; the preset low light probability threshold is 0.7, and the nighttime lighting probability threshold is 0.6. Since the low light category probability of 0.8 is greater than 0.7, the image frame F1001 is determined and marked as a low light environment image frame.

[0216] Furthermore, the image enhancement unit invokes an improved Retinex algorithm optimized with a prison scene noise sample library to enhance image frames marked as low-light environments. The improved Retinex algorithm first decomposes the input low-light image into illumination and reflection components; then, the reflection component is input into a deep denoising sub-network with skip connections to suppress inherent noise common in prison scenes, such as grid shadows and wall stains; simultaneously, adaptive gamma correction is applied to the illumination component to improve overall brightness; finally, the denoised reflection component and the corrected illumination component are re-fused to generate a clear and enhanced image.

[0217] Furthermore, the deep denoising sub-network adopts a U-Net structure. The encoder part extracts and compresses features of the reflection components through three downsampling convolutional layers, each containing convolution, batch normalization, and ReLU activation. The decoder part reconstructs features through three upsampling deconvolutional layers. Skip connections are used between corresponding layers of the encoder and decoder, that is, the feature map output from each layer of the encoder is concatenated with the feature map of the same scale layer of the decoder in the channel dimension to preserve detailed information and improve gradient flow.

[0218] For example, let's continue with the low-light image frame F1001 as an example to illustrate its enhancement process:

[0219] The improved Retinex algorithm decomposes frame F1001 into an illumination component L and a reflection component R. The reflection component R is fed into a deep denoising sub-network, where the encoder progressively downsamples and extracts features. During decoding, for example, after the second deconvolution operation in the decoder, the feature map output by this layer is concatenated with the same-scale feature map passed from the second layer of the encoder via skip connections, forming a fused feature map that integrates high-level semantic information and low-level detail information. This fused feature map is then processed by a convolutional layer to output the reconstructed features of the current layer. This process effectively filters out noise in the R component caused by low-light amplification while preserving key details such as the character outline and motion edges, outputting the denoised reflection component. Gamma correction is applied to the illumination component L, where the gamma value is... This improves overall brightness and yields corrected illumination components. ; Will and According to the Retinex theoretical formula The images are then fused to generate a final, sharper, enhanced image. Where I represents the observed image; compared with the original image F1001, The screen is moderately bright, and details such as beds and people's activities in the cells are clearly visible.

[0220] Furthermore, the abnormal behavior recognition module will enhance the image. The input is a lightweight CNN model, which employs a MobileNetV3-Small backbone network and embeds a dual-attention mechanism (CBAM). The lightweight CNN model first extracts initial feature maps, then sequentially passes them through channel attention and spatial attention modules, ultimately filtering out high-discrimination suspected anomalous behavior feature vectors. These suspected anomalous behavior feature vectors are input into an embedded behavior classification engine, matched against behavior templates in the knowledge base, such as climbing, fighting, and gathering, and their confidence is calibrated by incorporating spatiotemporal context, such as nighttime or a prison corridor.

[0221] In this embodiment, the image is identified. The system detected two individuals suspected of pushing and shoving. The classification engine output the behavior category as "fighting," with a post-calibration confidence score of 0.92. Since this value exceeds the preset high-risk behavior threshold of 0.9, the system immediately triggered a Level 1 warning.

[0222] Furthermore, the tiered early warning module will integrate fight and brawl warning information and images. The corresponding behavioral feature vectors, timestamps, camera IDs, and other information are packaged into an early warning data packet and pushed to the monitoring platform. The monitoring platform parses the geographical location corresponding to the camera ID, such as the east corridor of the 2nd floor of cell block 3, and automatically retrieves the audio data from directional microphones within a 10-meter radius of that location at the same time, as well as the access control status records for that area. Audio analysis shows the presence of shouting and impact sounds, and the access control records show no door openings during that time period, ruling out the possibility of conflict caused by personnel entering or leaving. The monitoring platform aligns and correlates this information based on the timestamps, generating a multimodal alarm evidence chain report containing video evidence, audio evidence, and sensor event evidence, for on-duty police officers to quickly analyze and handle.

[0223] This invention discloses a prison abnormal behavior recognition method and system based on edge intelligence analysis. Through the core steps of illumination assessment and low-light image enhancement detailed in the embodiments, it effectively solves the problem of decreased recognition rate caused by insufficient light in the complex monitoring environment of prisons. Specifically, it rapidly filters out low-quality images through a precise illumination assessment model; and utilizes an improved Retinex enhancement algorithm that incorporates the noise characteristics of the prison scene, particularly by introducing a deep denoising network with skip connections. This improves image brightness while effectively suppressing inherent scene noise and preserving key details for behavior recognition, thus providing a reliable guarantee for timely detection of high-risk behaviors such as fighting, as shown in the example, and for generating a complete chain of evidence. This invention significantly improves the intelligence level and early warning capabilities of prison security systems and has important practical value for maintaining the safety and stability of detention facilities.

[0224] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments under the guidance of the present invention without departing from the spirit and scope of the present invention. All of these variations are within the protection scope of the present invention.

Claims

1. A method for identifying abnormal behavior in prisons based on edge intelligence analysis, characterized in that, include: Edge nodes are deployed at various monitoring points in the prison to collect raw monitoring images of the corresponding areas in real time and aggregate them into a synchronous monitoring image stream. Illumination assessment is performed on the synchronous monitoring image stream to identify low-light environment image frames. An improved Retinex algorithm optimized with a prison scene noise sample library is then used to enhance these frames, resulting in a clear and enhanced image. The clear and enhanced image is then input into a lightweight CNN model deployed on edge nodes to filter out suspected abnormal behavior feature vectors. These suspected abnormal behavior feature vectors are then input into an embedded behavior classification engine for multi-dimensional matching with a preset prison abnormal behavior category knowledge base, resulting in a classification result of abnormal behavior with calibrated confidence values. If the confidence level of the classified abnormal behavior result exceeds the preset multi-level dangerous behavior threshold, a graded warning is triggered. The warning information, the corresponding clear enhanced image and the suspected abnormal behavior feature vector are packaged into a warning data package and pushed to the monitoring platform. The monitoring platform automatically associates and retrieves the synchronous data of the sensors around the warning point to form a multimodal alarm evidence chain. Edge nodes periodically encrypt and aggregate warning data packets and negative sample data with confidence levels below the multi-level dangerous behavior threshold into historical identification data, which is then fed back to the lightweight CNN model training end.

2. The prison abnormal behavior identification method based on edge intelligence analysis as described in claim 1, characterized in that, The process of evaluating illumination in a synchronized monitoring image stream and identifying low-light environment image frames includes: extracting global brightness features and local contrast features of the current image frame in the synchronized monitoring image stream; concatenating the global brightness features and local contrast features and inputting them into a pre-trained illumination classification model; the illumination classification model sequentially performing the following steps: processing the input features through a first convolutional layer to output a basic edge feature map, and performing max pooling downsampling on the basic edge feature map; processing the downsampled basic edge feature map through a second convolutional layer to output a texture feature map; performing max pooling downsampling again, and then performing dimensionality reduction and fusion on the features through a third convolutional layer to output advanced fusion features; mapping the advanced fusion features to an illumination category probability distribution vector through a fully connected layer; reading the obtained illumination category probability distribution vector, comparing the probability values ​​of the low light and night light categories in the distribution with preset probability thresholds respectively; if the probability value of either category exceeds the probability threshold, then the current image frame is determined and marked as a low-light environment image frame.

3. The prison abnormal behavior identification method based on edge intelligence analysis as described in claim 1, characterized in that, The process of enhancing the image using an improved Retinex algorithm optimized with a prison scene noise sample library to output a clear enhanced image includes: inputting the low-light environment image frame into the improved Retinex enhancement model, which first decomposes the input image into an illumination component representing ambient lighting and a reflection component representing the object's own properties; inputting the obtained reflection component into a deep denoising sub-network, where the encoder extracts and compresses features from the reflection component through multiple downsampling convolutional layers, outputting encoded features containing noise distribution information; simultaneously, the decoder upsamples and reconstructs the encoded features, outputting a denoised reflection component that suppresses the inherent noise of the prison scene; performing gamma correction on the illumination component to generate a corrected illumination component; and fusing the denoised reflection component with the corrected illumination component to generate a clear enhanced image.

4. The prison abnormal behavior identification method based on edge intelligence analysis as described in claim 3, characterized in that, The encoder and decoder of the deep denoising sub-network adopt a skip connection method. During the encoding process of the deep denoising sub-network, the intermediate feature map output by each convolutional layer in the encoder is recorded. During the decoding process, the intermediate feature map output by each level of the encoder is passed to the deconvolutional layer of the same spatial size level of the decoder through skip connections as the same scale encoded feature. At the decoder, the upsampled feature map output by the deconvolution layer is concatenated with the corresponding coded features of the same scale received from the encoder in the channel dimension to form a fused feature map. A convolution operation is then performed on the fused feature map to output the reconstructed feature map of the current layer.

5. The prison abnormal behavior identification method based on edge intelligence analysis as described in claim 1, characterized in that, The step of inputting the enhanced image into a lightweight CNN model deployed on edge nodes to filter out highly discriminative suspected anomalous behavior feature vectors includes: inputting the enhanced image into the lightweight CNN model and processing it through its MobileNetV3-Small backbone network to output an initial feature map; inputting the initial feature map into a channel attention module to generate channel weight vectors, and performing channel-wise multiplication operations between the initial feature map and the channel weight vectors to output a channel-weighted feature map; inputting the channel-weighted feature map into a spatial attention module to generate a spatial weight matrix, and performing pixel-wise multiplication between the channel-weighted feature map and the spatial weight matrix to output a spatially weighted feature map; and processing the spatially weighted feature map sequentially through a global average pooling layer and a fully connected layer to output suspected anomalous behavior feature vectors.

6. The prison abnormal behavior identification method based on edge intelligence analysis as described in claim 5, characterized in that, The specific operations of the channel attention module and the spatial attention module include: the channel attention module receives the initial feature map, performs global average pooling and global max pooling on the initial feature map to obtain the first pooling feature and the second pooling feature, and inputs the first pooling feature and the second pooling feature into a multilayer perceptron with shared weights. The two feature vectors output by the multilayer perceptron are added together and then passed through the sigmoid function to generate the channel weight vector. The generated channel weight vector is then multiplied with the initial feature map to output the channel weighted feature map. The spatial attention module receives the output channel weighted feature map, performs average pooling and max pooling on the channel weighted feature map in the channel dimension, and concatenates the pooling results and passes them through a convolutional layer and the sigmoid function to generate the spatial weight matrix. The generated spatial weight matrix is ​​then multiplied with the channel weighted feature map to output the feature map weighted by the dual attention, i.e., the spatial weighted feature map.

7. The prison abnormal behavior identification method based on edge intelligence analysis as described in claim 1, characterized in that, The process of inputting the suspected abnormal behavior feature vector into an embedded behavior classification engine and performing multi-dimensional matching with a pre-stored prison abnormal behavior category knowledge base to output a classified abnormal behavior result with a calibrated confidence value includes: the embedded behavior classification engine receiving the suspected abnormal behavior feature vector and calculating its cosine similarity with each composite behavior feature template in the internally stored prison abnormal behavior category knowledge base to generate a preliminary confidence score for each behavior category; the prison abnormal behavior category knowledge base is organized using a three-layer graph structure, with the first layer storing basic action unit feature templates, the second layer storing composite behavior feature templates composed of basic action units, and the third layer storing behavior-related features. The embedded behavior classification engine generates spatiotemporal context information based on the timestamp of the enhanced image and the geographical location information of the edge nodes. It then calls the spatiotemporal context rules associated with the spatiotemporal context information from the prison abnormal behavior category knowledge base to correct the initial confidence score and output the corrected confidence score. The embedded behavior classification engine inputs the corrected confidence score and the spatiotemporal context information into an online confidence calibration module. The online confidence calibration module, through its built-in lightweight Bayesian neural network, outputs the calibrated confidence value corresponding to the classification result of the abnormal behavior.

8. The prison abnormal behavior identification method based on edge intelligence analysis as described in claim 1, characterized in that, The monitoring platform automatically associates and retrieves synchronous data from sensors surrounding the warning point to form a multimodal alarm evidence chain. This includes: the monitoring platform parses the geographical location information in the warning data packet, and queries auxiliary sensors within a preset range centered on the point indicated by the geographical location information; using the timestamp in the warning data packet as a reference, it obtains synchronous data streams within the corresponding time window from the auxiliary sensors; it performs time alignment on the obtained synchronous data streams to generate time-axis unified multimodal data; it performs behavioral target labeling on the video stream in the time-axis unified multimodal data to generate video evidence, and performs abnormal sound detection and positioning on the audio stream in the time-axis unified multimodal data to generate audio evidence; it then marks the access control status records and infrared alarm signals in the synchronous data stream as events to generate sensor event evidence; and it logically associates the generated video evidence, audio evidence, and sensor event evidence according to their timestamps and spatial locations to generate a structured multimodal alarm evidence chain report.

9. The prison abnormal behavior identification method based on edge intelligence analysis as described in claim 1, characterized in that, The edge nodes periodically encrypt and aggregate warning data packets and negative sample data with confidence levels below the multi-level dangerous behavior threshold into historical identification data, which is then fed back to the lightweight CNN model training end. This includes: the edge nodes storing warning data packets, classification abnormal behavior results with confidence levels below a preset threshold, and corresponding clear enhanced images in a local cache; encrypting the data in the cache using the AES-256 algorithm and attaching a digital signature to generate an encrypted feedback data packet, and uploading the encrypted feedback data packet to the model training server through the corresponding link; after the model training server decrypts and verifies the encrypted feedback data packet, it uses the data in it to perform incremental learning on the lightweight CNN model.

10. A prison abnormal behavior recognition system based on edge intelligence analysis, used to implement the prison abnormal behavior recognition method based on edge intelligence analysis according to any one of claims 1-9, characterized in that, include: Edge image acquisition module, illumination assessment module, abnormal behavior recognition module, hierarchical early warning module, and feedback optimization module; The edge image acquisition module deploys smart cameras and edge computing nodes at various monitoring points in the prison to collect the original video streams of the corresponding monitoring areas in real time, and performs time synchronization based on the NTP protocol to aggregate and generate a globally synchronized monitoring image stream. The illumination assessment module performs frame-by-frame illumination quality assessment on the synchronous monitoring image stream, identifies image frames under low-light conditions, and uses an improved Retinex algorithm optimized with a prison scene noise sample library to enhance the low-light images, outputting clear enhanced images. The abnormal behavior recognition module inputs the clear enhanced images into a lightweight CNN model deployed on edge nodes for feature extraction, obtaining suspected abnormal behavior feature vectors. Through an embedded behavior classification engine, it performs multi-dimensional matching with a preset abnormal behavior knowledge base, outputting classification results with calibrated confidence. The graded early warning module compares the confidence of the classification results with preset multi-level dangerous behavior thresholds, immediately triggering graded early warnings for behaviors with high confidence levels. It packages and uploads the early warning information, clear enhanced images, and suspected abnormal behavior feature vectors to the monitoring platform. The platform automatically associates and retrieves synchronous data from the corresponding devices at the early warning points, generating a multimodal alarm evidence chain. The feedback optimization module periodically encrypts the warning data packets and low-confidence negative sample data and feeds them back to the cloud training server for incremental learning and optimization of the lightweight CNN model.