CN-121982817-A - Community abnormal behavior recognition method and device based on video analysis
Abstract
The embodiment of the application provides a community abnormal behavior recognition method and device based on video analysis, which realize accurate analysis of behaviors through target detection and gesture estimation. And constructing an identification mechanism, combining event rules and a neural network, and establishing a reliable early warning strategy. Self-adaptive optimization is introduced, and continuous improvement of recognition is ensured through sample learning and model updating. The method effectively solves the defects of the traditional technology in the aspects of behavior recognition, early warning strategy, model optimization and the like, and provides technical support for community safety monitoring.
Inventors
- LOU YING
- YAO BAOLIN
Assignees
- 浙江微风智能科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260408
Claims (10)
- 1. A method for identifying abnormal community behavior based on video analysis, the method comprising: After community user authorization is obtained, acquiring a real-time video stream through a community monitoring camera to obtain a video frame sequence, performing preprocessing on the video frame sequence to generate a processing frame group, extracting a moving target from the processing frame group based on a foreground detection algorithm to obtain a target bounding box, inputting the target bounding box into a target classifier to generate a target type label, screening out a human body target according to the target type label to obtain a candidate target set, performing human body posture estimation on the candidate target set to obtain a skeleton key point sequence, and calculating joint angles and relative displacement of the skeleton key point sequence to obtain a feature vector group; Constructing a multi-level event rule base based on the feature vector group, wherein the rule is composed of a triggering condition and a continuous condition, the triggering condition calculates instantaneous features based on key point coordinates to obtain a state judgment result, the continuous condition counts the state judgment result in a time window to obtain an event probability value, the feature vector group is input into a behavior recognition neural network to calculate to obtain a behavior class probability distribution, and confidence degree fusion is carried out on the behavior class probability distribution and the event probability value to generate early warning information; And carrying out hierarchical distribution on the early warning information according to a preset rule to obtain a notification instruction sequence, carrying out multi-channel pushing based on the notification instruction sequence to obtain an execution result set, extracting abnormal event data from the execution result set to obtain a training sample set, updating a behavior recognition neural network based on the training sample set to obtain optimized model parameters, and writing the optimized model parameters into a model library to complete self-adaptive optimization.
- 2. The method for identifying abnormal behaviors of a community based on video analysis according to claim 1, wherein after obtaining authorization of a user of the community, acquiring a real-time video stream through a monitoring camera of the community to obtain a video frame sequence, performing preprocessing on the video frame sequence to generate a processing frame group, extracting a moving object from the processing frame group based on a foreground detection algorithm to obtain a target bounding box, and comprises: obtaining an original video frame by obtaining an image data stream of a monitoring camera according to an access protocol, performing frame rate conversion and resolution scaling on the original video frame to generate a standard frame sequence, performing frame extraction processing on the standard frame sequence according to a preset sampling period to obtain a sampling frame group, and performing Gaussian filtering and brightness normalization processing on the sampling frame group to obtain a preprocessing frame set; And constructing a Gaussian mixture background model based on the preprocessed frame set to obtain a background feature map, performing background difference operation on the background feature map and a current frame to generate a foreground mask map, performing morphological processing and connected domain analysis on the foreground mask map to obtain a motion region set, and calculating target contour features according to the motion region set to generate a target bounding box.
- 3. The method for identifying abnormal community behavior based on video analysis according to claim 1, wherein the inputting the target bounding box into a target classifier to generate a target type label, screening out a human target according to the target type label to obtain a candidate target set, performing human posture estimation on the candidate target set to obtain a skeleton key point sequence, and calculating joint angles and relative displacements of the skeleton key point sequence to obtain a feature vector set comprises: Performing size standardization and pixel normalization processing on a target bounding box to obtain a standard image block, inputting the standard image block into a pre-training target classification network to perform forward reasoning to obtain multi-category confidence coefficient distribution, screening the multi-category confidence coefficient distribution according to a preset threshold to generate a candidate category group, taking a category identifier with highest confidence coefficient in the candidate category group as a target type label, and extracting a human body type target according to the target type label to obtain a target image set; and constructing a key point detection model based on the target image set, inputting to obtain a feature image set, executing a heat map code on the feature image set to obtain a key point coordinate set, generating an articulation graph according to a human skeleton topological structure by the key point coordinate set, and calculating angle change and displacement vectors between adjacent key points based on the articulation graph to obtain a feature vector set.
- 4. The method for identifying abnormal behaviors of a community based on video analysis according to claim 1, wherein the constructing a multi-level event rule base based on the feature vector set, wherein rules are composed of a trigger condition and a continuous condition, the trigger condition calculates an instantaneous feature based on a key point coordinate to obtain a state decision result, and the continuous condition counts the state decision result in a time window to obtain an event probability value, includes: Segmenting a feature vector group according to a preset time window to obtain a time sequence feature matrix, extracting the vertical displacement, the horizontal speed and the joint angle change rate of key points from the time sequence feature matrix to generate feature descriptors, constructing an event triggering rule based on the feature descriptors to obtain a rule condition group, mapping the rule condition group into a Boolean expression to generate an instantaneous state judgment logic, and carrying out threshold comparison on the feature descriptors according to the instantaneous state judgment logic to obtain a state judgment result; And carrying out statistical analysis on the state judgment result in a sliding time window to obtain a trigger frequency sequence, comparing the trigger frequency sequence with a preset duration threshold to generate a duration state identifier, calculating event occurrence probability according to the duration state identifier to obtain an event probability value, and carrying out hierarchical mapping on the event probability value based on a risk level dividing rule to obtain an event level identifier.
- 5. The method for identifying abnormal behaviors of a community based on video analysis according to claim 1, wherein the step of calculating the behavior category probability distribution by inputting the feature vector group into a behavior identification neural network, and performing confidence fusion on the behavior category probability distribution and the event probability value to generate early warning information comprises the following steps: Recombining a feature vector group into a space-time feature tensor according to a time sequence relation, extracting dynamic features from the space-time feature tensor through a time sequence convolution layer to obtain a feature sequence diagram, inputting the feature sequence diagram into a bidirectional long-short-time memory network to perform time sequence modeling to obtain a context feature vector, obtaining a behavior class probability distribution through full-connection layer mapping calculation based on the context feature vector, and extracting a confidence value of an abnormal behavior class according to the behavior class probability distribution to obtain a behavior risk value; And constructing a weighted fusion function based on the behavior risk value and the event probability value to obtain a fusion weight matrix, performing weighted combination on the fusion weight matrix and the behavior category probability distribution to obtain a comprehensive risk score, generating an early warning grade identification and alarm description information according to the comprehensive risk score, and combining and packaging the early warning grade identification and the alarm description information to generate early warning information.
- 6. The method for identifying abnormal community behavior based on video analysis according to claim 1, wherein the step of distributing the early warning information in a hierarchical manner according to a preset rule to obtain a notification instruction sequence, and performing multi-channel pushing based on the notification instruction sequence to obtain an execution result set comprises the steps of: Analyzing early warning information into early warning grade, event type, scene position and target characteristics to obtain an early warning element group, inquiring an early warning distribution rule base based on the early warning element group to obtain a notification grade mapping table, determining notification priorities of different post personnel according to the notification grade mapping table to obtain a receiver list, grouping the receiver list according to a responsibility range and response time limit to obtain a notification instruction sequence, and writing the notification instruction sequence into a message distribution queue to obtain a task group to be pushed; And constructing a multi-channel pushing strategy based on the task group to be pushed to obtain a pushing configuration table, selecting short messages, voices and mobile terminal applications to be pushed in parallel according to the pushing configuration table to obtain a pushing state set, carrying out delivery confirmation and overtime retry on the pushing state set to obtain a feedback data group, and summarizing the feedback data group to generate an execution result set.
- 7. The method for identifying abnormal behaviors of a community based on video analysis according to claim 1, wherein the extracting abnormal event data from the execution result set to obtain a training sample set, updating a behavior identification neural network based on the training sample set to obtain optimized model parameters, writing the optimized model parameters into a model library to complete adaptive optimization, comprises: Analyzing an abnormal event record in an execution result set into a video fragment, an event type and a time stamp to obtain an event data set, manually confirming and marking the event data set to obtain a marked data set, extracting a target track and gesture characteristics based on the marked data set to obtain a training characteristic set, reorganizing the training characteristic set into standard training samples according to a time sequence relationship to obtain a training sample set, and constructing a data enhancement strategy according to the training sample set to obtain a data enhancement matrix; Generating an expansion training set based on the data enhancement matrix to obtain iteration training data, inputting the iteration training data into a behavior recognition neural network to perform incremental training to obtain model parameter gradients, updating the neural network weights according to the model parameter gradients to obtain optimized model parameters, performing model evaluation on the optimized model parameters to obtain a performance index set, and updating the optimized model parameters which pass verification to a model library to complete self-adaptive optimization.
- 8. A community abnormal behavior recognition device based on video analysis, the device comprising: The information acquisition module is used for acquiring a real-time video stream through the community monitoring camera to obtain a video frame sequence after community user authorization is obtained, preprocessing the video frame sequence to generate a processing frame group, extracting a moving target from the processing frame group based on a foreground detection algorithm to obtain a target bounding box, inputting the target bounding box into a target classifier to generate a target type label, screening out a human body target according to the target type label to obtain a candidate target set, performing human body posture estimation on the candidate target set to obtain a skeleton key point sequence, and calculating joint angles and relative displacement of the skeleton key point sequence to obtain a feature vector group; The model construction module is used for constructing a multi-level event rule base based on the feature vector group, wherein the rule is composed of a trigger condition and a continuous condition, the trigger condition calculates instantaneous features based on key point coordinates to obtain a state judgment result, the continuous condition counts the state judgment result in a time window to obtain an event probability value, the feature vector group is input into a behavior recognition neural network to calculate to obtain a behavior class probability distribution, and confidence degree fusion is carried out on the behavior class probability distribution and the event probability value to generate early warning information; the abnormal recognition module is used for carrying out hierarchical distribution on the early warning information according to a preset rule to obtain a notification instruction sequence, carrying out multi-channel pushing based on the notification instruction sequence to obtain an execution result set, extracting abnormal event data from the execution result set to obtain a training sample set, updating a behavior recognition neural network based on the training sample set to obtain optimized model parameters, and writing the optimized model parameters into a model library to complete self-adaptive optimization.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the video analysis based community anomaly behavior recognition method of any one of claims 1 to 7 when the program is executed.
- 10. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor implements the steps of the community anomaly behavior recognition method based on video analysis of any one of claims 1 to 7.
Description
Community abnormal behavior recognition method and device based on video analysis Technical Field The application relates to the field of data processing, in particular to a community abnormal behavior identification method and device based on video analysis. Background The existing community abnormal behavior identification method has obvious defects. The traditional system has poor performance in video processing and target detection, and cannot effectively realize accurate identification of behaviors, so that the monitoring effect is affected. Furthermore, the prior art has bottlenecks in event rules and behavior classification. Most systems lack perfect rule construction mechanisms and confidence fusion strategies, resulting in less than ideal early warning accuracy. Existing systems have technology shortboards in terms of model optimization. The lack of in-depth analysis of abnormal events makes it difficult to realize efficient model updating through adaptive learning, affecting recognition accuracy. The solution of the problems has important significance for improving the community security monitoring capability. Disclosure of Invention Aiming at the problems in the prior art, the application provides a community abnormal behavior identification method and device based on video analysis, which can effectively solve the defects of the traditional technology in the aspects of behavior identification, early warning strategy, model optimization and the like and provide technical guarantee for community safety monitoring. In order to solve at least one of the problems, the application provides the following technical scheme: In a first aspect, the present application provides a method for identifying abnormal behaviors of a community based on video analysis, including: After community user authorization is obtained, acquiring a real-time video stream through a community monitoring camera to obtain a video frame sequence, performing preprocessing on the video frame sequence to generate a processing frame group, extracting a moving target from the processing frame group based on a foreground detection algorithm to obtain a target bounding box, inputting the target bounding box into a target classifier to generate a target type label, screening out a human body target according to the target type label to obtain a candidate target set, performing human body posture estimation on the candidate target set to obtain a skeleton key point sequence, and calculating joint angles and relative displacement of the skeleton key point sequence to obtain a feature vector group; Constructing a multi-level event rule base based on the feature vector group, wherein the rule is composed of a triggering condition and a continuous condition, the triggering condition calculates instantaneous features based on key point coordinates to obtain a state judgment result, the continuous condition counts the state judgment result in a time window to obtain an event probability value, the feature vector group is input into a behavior recognition neural network to calculate to obtain a behavior class probability distribution, and confidence degree fusion is carried out on the behavior class probability distribution and the event probability value to generate early warning information; And carrying out hierarchical distribution on the early warning information according to a preset rule to obtain a notification instruction sequence, carrying out multi-channel pushing based on the notification instruction sequence to obtain an execution result set, extracting abnormal event data from the execution result set to obtain a training sample set, updating a behavior recognition neural network based on the training sample set to obtain optimized model parameters, and writing the optimized model parameters into a model library to complete self-adaptive optimization. Obtaining an original video frame according to an access protocol, performing frame rate conversion and resolution scaling on the original video frame to generate a standard frame sequence, performing frame extraction processing on the standard frame sequence according to a preset sampling period to obtain a sampling frame group, and performing Gaussian filtering and brightness normalization processing on the sampling frame group to obtain a preprocessing frame set; And constructing a Gaussian mixture background model based on the preprocessed frame set to obtain a background feature map, performing background difference operation on the background feature map and a current frame to generate a foreground mask map, performing morphological processing and connected domain analysis on the foreground mask map to obtain a motion region set, and calculating target contour features according to the motion region set to generate a target bounding box. Further, the method further comprises the steps of performing size standardization and pixel normalization processing on a target bounding box t