Illegal behavior monitoring equipment and method based on dual prevention

By introducing high-definition cameras and machine learning algorithms into the violation monitoring system, the risk level of violations can be identified and assessed in real time, and potential risks can be predicted. This solves the problem that existing technologies cannot provide early warnings and prevention, and achieves effective violation monitoring.

CN122002001APending Publication Date: 2026-05-08PETROCHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PETROCHINA CO LTD
Filing Date
2024-11-08
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing methods for monitoring violations lack predictive analysis and risk control mechanisms, resulting in limited early warning capabilities and control effectiveness of monitoring systems. Moreover, most of them adopt a passive response mode, which cannot provide early warning and prevent violations.

Method used

The system employs dual-prevention-based monitoring equipment and methods for violations. It collects video image data in real time through high-definition cameras, performs grayscale conversion, noise reduction, and enhancement preprocessing, extracts edge, texture, and shape features, uses machine learning algorithms to identify and assess the risk level of violations, and predicts potential risks through machine learning algorithms to formulate advance prevention and control measures.

Benefits of technology

It enables early warning and prevention of violations, reduces the occurrence of violations and the accumulation of potential risks, and improves the early warning capability and prevention and control effectiveness of the monitoring system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122002001A_ABST
    Figure CN122002001A_ABST
Patent Text Reader

Abstract

The invention relates to the field of violation monitoring, in particular to violation behavior monitoring equipment and method based on dual prevention. The technical problems that in the prior art, a violation behavior monitoring method lacks a prediction analysis and risk prevention and control mechanism, so that the early warning capability and the prevention and control effect of a monitoring system are limited, and a passive response mode is mostly adopted, that is, the violation behavior can be found and recorded only after the violation behavior occurs, and early warning and prevention cannot be performed in advance are solved; according to the technical scheme, the violation behavior monitoring equipment based on dual prevention comprises a high-definition camera, a mounting rack and a central processing unit; according to the invention, by introducing a risk assessment mechanism, quantitative assessment is carried out on the properties and consequences of the violation behaviors, the hazard level of the violation behaviors is determined, a scientific basis is provided for subsequent treatment measures, potential risk behaviors are predicted through a machine learning algorithm, early warning and prevention and control are realized, and occurrence of the violation behaviors and accumulation of potential risks are effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of violation monitoring, and more particularly to violation monitoring equipment and methods based on dual prevention. Background Technology

[0002] Current methods for monitoring traffic violations mainly rely on video detection technology to achieve real-time monitoring and recording of violations. By analyzing continuous video images, the process of violations is tracked, and violations are captured by taking photos based on the analysis. However, current methods for monitoring traffic violations lack predictive analysis and risk prevention mechanisms, resulting in limited early warning capabilities and prevention effects of the monitoring system. Moreover, most of them adopt a passive response mode, meaning that violations can only be detected and recorded after they occur, failing to provide early warnings and prevention. Summary of the Invention

[0003] In order to overcome the problem that existing methods for monitoring violations lack predictive analysis and risk prevention mechanisms, resulting in limited early warning capabilities and prevention effects of monitoring systems, and that most of them adopt a passive response mode, that is, they can only be discovered and recorded after the violation occurs, and cannot provide early warning and prevention.

[0004] The technical solution of the present invention is as follows: a violation monitoring device based on dual prevention, comprising a high-definition camera, a mounting bracket, and a central processing unit; a mounting bracket is provided on one side of the high-definition camera, and a central processing unit is provided on the inner side of the high-definition camera; the mounting bracket is used to install the high-definition camera at key locations that need to be monitored; the high-definition camera is used to capture high-definition image and video information; and the central processing unit is used to analyze and identify violations in the video and images in real time using image processing and machine learning algorithms.

[0005] The method for monitoring violations based on dual prevention is characterized by: S1: Pre-set behavioral characteristics and risk levels, and classify risk levels according to different categories of behavioral characteristics; S2: Real-time acquisition of high-definition video image data via a high-definition camera; S3: Performs grayscale conversion, noise reduction, and enhancement preprocessing on video image data captured by high-definition cameras; S4: Extract feature information such as edges, textures, and shapes from the preprocessed image; S5: Classify and identify the extracted static behavioral features; S6: Classify and identify the extracted dynamic behavioral features; S7: Based on the nature and consequences of the violation, conduct a risk assessment to determine its hazard level; output the identification results to relevant personnel in the form of images, videos or alarm information, and take corresponding remedial measures for the identified hazards; S8: For static and dynamic behavioral characteristics that are not identified as risky behaviors, predict whether their behavioral characteristics may generate risks after a period of time through machine learning algorithms. S9: Output the prediction results to relevant personnel and formulate risk prevention and control measures in advance for the predicted risk behaviors.

[0006] The behavioral characteristics and risk levels are pre-defined. Risk levels are then categorized based on different behavioral characteristic types to determine the categories of behavioral characteristics that need to be monitored. Based on the potential severity of consequences for each behavioral characteristic, different risk levels are assigned, and a mapping relationship between behavioral characteristics and risk levels is established. The specific steps are as follows: S101: Define the goals and scope of monitoring, i.e., determine which types of behavioral characteristics need to be monitored; S102: Use industry standards and norms as the basis for defining behavioral characteristics and classifying risk levels; S103: Create a detailed list of all behavioral characteristic categories that need to be monitored; further refine complex behavioral characteristics into subcategories; S104: Based on the analysis of relevant laws and regulations, industry standards, and historical accident cases, develop standards for risk level classification; the standards involve the severity, frequency, and scope of consequences that may result from behavioral characteristics. S105: Based on the established standards, behavioral characteristics are classified into different risk levels; S106: Provide a clear description for each risk level, including its potential consequences and corresponding countermeasures; S107: Establish a mapping table between behavioral characteristics and risk levels; S108: Enter the defined behavioral characteristics and risk levels into the mapping table, with each behavioral characteristic associated with a specific risk level; S109: Validate the mapping table to ensure that all behavioral characteristics have been correctly classified and assigned the corresponding risk level.

[0007] Ensure the camera installation location fully covers the monitored area and is adjusted to the optimal shooting angle. Use the high-definition camera to capture high-definition video image data in real time and transmit it to the monitoring center. The specific steps are as follows: S201: Clearly define the specific area that needs to be monitored, and determine the required number of cameras and their installation locations based on the monitoring objectives; S202: Install a camera and adjust its angle so that it can clearly capture details of people, vehicles, and objects in the target area; S203: Adjust parameters such as focus, brightness, and contrast to achieve the best image effect; S204: Connect the camera directly to the monitoring center using wired methods such as network cables; S205: The raw video data captured by the camera needs to be encoded. S206: Select the TCP / IP transmission protocol based on the network environment and monitoring requirements; S207: The camera transmits the encoded and compressed video data to the monitoring center in real time.

[0008] The video image data captured by the high-definition camera undergoes preprocessing including grayscale conversion, noise reduction, and enhancement. Grayscale conversion transforms color video images into grayscale images, reducing computational load. Noise reduction removes image noise, and enhancement techniques improve image quality, facilitating subsequent feature extraction. The specific steps are as follows: S301: Read a frame of color image from the video stream. The image consists of three color channels: red (R), green (G), and blue (B). S302: Based on the human eye's sensitivity to different colors, assign different weights to R, G, and B (R: 0.299, G: 0.587, B: 0.114), and calculate the weighted average as the grayscale value; S303: Calculate the gray value of each pixel using the weighted average method; S304: Assign the calculated grayscale value to each pixel to generate a grayscale image; S305: Uses a Gaussian function to perform a weighted average on the image, smoothing the image and removing noise; S306: Check the denoised image to ensure that noise is effectively suppressed while image details are not excessively blurred. S307: By adjusting the histogram distribution of the image, the pixel value distribution of the image is made more uniform, thereby improving the contrast of the image. S308: By stretching the contrast range of an image, it makes the dark areas of the image darker and the bright areas brighter, thus improving the visual effect of the image.

[0009] The preprocessed image extracts features such as edges, textures, and shapes. Edge detection algorithms are used to extract edge information, texture analysis methods are used to extract texture features, and contour detection algorithms are used to identify shape features. The specific steps are as follows: S401: Select the Canny edge detection algorithm according to application requirements; S402: Calculate the magnitude and direction of the image gradient; S403: Apply nonmaximum suppression to refine edges; S404: Uses a dual threshold algorithm to detect and connect edges; S405: Select the Gray-Level Co-occurrence Matrix (GLCM) texture analysis method according to application requirements; S406: Define a distance d and a direction θ; S407: For each pixel in the image, count the frequency of the joint distribution of gray levels among its neighboring pixels at a distance of d and in the direction of θ; S408: Construct a gray-level co-occurrence matrix, where each element reflects the frequency of two pixels' gray levels occurring simultaneously at a specific distance and direction; S409: Extract useful texture features from the gray-level co-occurrence matrix, and analyze the texture information in the image based on the extracted texture features; S410: Use the Hough transform contour detection algorithm to detect contours in an image; S411: Extract the coordinate information of the contour to form the contour curve; S412: Match the detected contours with predefined standard shape templates; S413: Use shape descriptors to calculate similarity; determine whether the shapes in the image match predefined standard shapes based on the similarity results; S414: If the shape match is successful, record and trigger the next processing step; if the shape does not match or cannot be recognized, continue analyzing other features or images.

[0010] The extracted static behavioral features are classified and identified, and the extracted dynamic behavioral features are also classified and identified; the specific steps are as follows: S501: Extract features that do not change over time, such as the position, shape, size, and color of objects in the video; analyze features that change over time, such as the motion trajectory, speed, acceleration, and direction of the objects; use the Euclidean distance similarity measurement method to calculate the similarity between the extracted features and each template in the template library, set a similarity threshold, and when the calculated similarity exceeds the threshold, it is considered a successful match, that is, a violation may have occurred. S502: Select the Convolutional Neural Network (CNN) classification algorithm based on actual needs and data characteristics; S503: Train the classification model using a dataset containing known characteristics of violations, so that the model can learn and identify different types of violations; S504: Input the features to be identified into the trained classification model, and the model outputs the prediction result, i.e. the specific type of the violation. S505: Mark the identified violations, including the time, location, and type of violation; S506: Store the recognition results in the database.

[0011] Based on the nature and consequences of the violation, a risk assessment is conducted to determine its hazard level. The identification results are then output to relevant personnel in the form of images, videos, or alarm messages. Corresponding remedial measures are then implemented for the identified hazards. The specific steps are as follows: S601: Calculate a risk value for each identified behavioral feature based on its risk level and corresponding weight; the risk value calculation formula is: Risk Value = Risk Level × Weight; S602: Summarize the risk values ​​of all identified behavioral characteristics to obtain the overall risk assessment result; S603: Based on the overall risk assessment results, the risks are divided into different levels, and clear thresholds are set for each risk level; S604: Select the output format of the evaluation results based on the actual situation, including images, videos, and alarm information; S605: Code the identification results and risk assessment results; S606: Develop a template for the output content, including key information such as behavioral characteristic description, risk assessment results, risk level, location of occurrence, and timestamp; S607: Send the pre-defined output content to the relevant personnel in the selected format; S608: Based on the risk assessment results, relevant personnel shall select appropriate governance measures from the measures library and make recommendations.

[0012] For static and dynamic behavioral characteristics that are not identified as risky behaviors, machine learning algorithms are used to predict whether these behavioral characteristics may pose a risk after a period of time; the specific steps are as follows: S701: Filter static and dynamic feature data from data sources that have not been identified as risky behaviors by existing monitoring systems; S702: Preprocess the collected data, including removing duplicate data, handling missing values, and detecting and correcting outliers; S703: Extract possible features from the cleaned data, including image features, time series features, and statistical features; S704: Use correlation analysis to assess the impact of each feature on the prediction results; S705: Based on the feature importance assessment results, select the feature subset that has a significant impact on the prediction results; S706: Select the appropriate machine learning algorithm based on the characteristics of the problem and the data; for data with time series characteristics, choose time series analysis; for processing multi-feature, high-dimensional data, choose the random forest algorithm. S707: Divide the labeled data into training set, validation set and test set according to a certain ratio; S708: Build a predictive model using the selected machine learning algorithm, including model initialization and parameter settings; S709: Use training set data to train the model, and adjust the model parameters through gradient descent iterative optimization algorithm so that the model can accurately predict potential risk behaviors; S710: Use validation and test set data to evaluate the performance of the trained model. Evaluation metrics include accuracy, recall, F1 score, and area under the ROC curve (AUC). S711: Conduct in-depth analysis of model prediction errors to identify the causes of the errors and possible directions for improvement; S712: Based on performance evaluation results and error analysis, adjust model parameters or improve model structure to enhance the model's predictive performance; S713: Repeat the above process of model building, training, and evaluation; S714: Input real-time image data into the model to predict risky behaviors.

[0013] The prediction results are then distributed to relevant personnel to develop risk prevention and control measures in advance for any potentially risky behaviors identified. The specific steps are as follows: S801: Organize the behavioral characteristics that may pose risks and their related prediction results predicted by the machine learning model, format the output data to ensure that the data is clear, easy to understand, and suitable for the needs of different recipients; S802: Based on the organizational structure and allocation of responsibilities, determine the specific relevant personnel to whom the forecast results should be sent; S803: Select the appropriate output method based on the receiver's preferences and actual situation; S804: Send the compiled forecast results to the relevant personnel through the selected method; confirm that the recipients have received the forecast results and understand their contents; S805: Analyze the behavioral characteristics that may pose risks in the prediction results and their potential impact; S806: Assess the severity, likelihood, and urgency of risks, and determine the priority of prevention and control measures; S807: Develop specific prevention and control measures for the predicted potential risks; S808: Allocate corresponding human, material, and financial resources according to the needs of prevention and control measures; S809: Implement the established prevention and control measures plan; S810: Regularly monitor the accuracy of the forecast results and analyze the differences and causes between the forecast results and the actual situation; S811: Evaluate the machine learning prediction model based on monitoring results; adjust the model's parameters and structure based on the evaluation results to improve prediction accuracy; S812: Evaluate the implemented prevention and control measures, and analyze their actual effectiveness and existing problems; S813: Establish a continuous monitoring and iteration mechanism to continuously collect new data, update predictive models and prevention and control measures, and continuously improve and perfect the entire dual prevention and monitoring system.

[0014] The beneficial effects of this invention are: 1. Compared with existing methods for monitoring violations, which lack predictive analysis and risk control mechanisms, resulting in limited early warning capabilities and control effectiveness, this method introduces a risk assessment mechanism to quantitatively evaluate the nature and consequences of violations, determine their severity level, and provide a scientific basis for subsequent governance measures. By using machine learning algorithms to predict potential risk behaviors, it achieves early warning and control, effectively reducing the occurrence of violations and the accumulation of potential risks. 2. The process involves: filtering static and dynamic feature data from data sources that are not identified as risky behaviors by existing monitoring systems; preprocessing the collected data, including removing duplicates, handling missing values, and detecting and correcting outliers; extracting potential features from the cleaned data, including image features, time-series features, and statistical features; using correlation analysis to evaluate the impact of each feature on the prediction results; selecting a subset of features that significantly affect the prediction results based on the feature importance evaluation results; selecting appropriate machine learning algorithms based on the problem characteristics and data properties; using time-series analysis for data with time-series characteristics; and using the random forest algorithm for processing multi-feature, high-dimensional data; dividing the labeled data into training, validation, and test sets according to a certain ratio; and applying the selected machine learning algorithm. The algorithm constructs a predictive model, including model initialization and parameter setting; it trains the model using training set data, and adjusts the model parameters through gradient descent iterative optimization to enable the model to accurately predict potential risky behaviors; it evaluates the performance of the trained model using validation and test set data, with evaluation metrics including accuracy, recall, F1 score, and area under the ROC curve (AUC); it conducts in-depth analysis of model prediction errors to identify the causes of errors and possible improvement directions; based on the performance evaluation results and error analysis, it adjusts model parameters or improves the model structure to enhance predictive performance; it inputs real-time image data into the model to predict risky behaviors; thus, it uses machine learning algorithms to predict potential risky behaviors, achieving early warning and prevention, effectively reducing the occurrence of violations and the accumulation of potential risks. 3. High-definition camera-captured video image data undergoes preprocessing including grayscale conversion, noise reduction, and enhancement. Grayscale conversion converts color video images to grayscale, reducing computational load. Noise reduction removes image noise, and enhancement techniques improve image quality. Edge, texture, and shape features are extracted from the preprocessed images. Edge detection algorithms extract edge information, texture analysis extracts texture features, and contour detection identifies shape features. Features that do not change over time, such as the position, shape, size, and color of objects in the video, are extracted. Features that change over time, such as the object's trajectory, speed, acceleration, and direction, are analyzed. Euclidean distance similarity is used to calculate the similarity between the extracted features and templates in a template library. A similarity threshold is set; when the calculated similarity exceeds this threshold, a successful match is considered, indicating a potential violation. A risk assessment is conducted based on the nature and consequences of the violation to determine its severity level. This risk assessment mechanism quantifies the nature and consequences of violations, determining their severity level and providing a scientific basis for subsequent governance measures. Attached Figure Description

[0015] Figure 1 The diagram shown is a three-dimensional structural schematic of the violation monitoring device based on dual prevention according to the present invention. Figure 2 The diagram shown is a flowchart illustrating the steps of the violation monitoring method based on dual prevention according to the present invention. Explanation of reference numerals in the attached diagram: 1. High-definition camera; 2. Mounting bracket; 3. Central processing unit. Detailed Implementation

[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0017] Please see Figure 1-2 This invention provides an embodiment of a violation monitoring device based on dual prevention, comprising a high-definition camera 1, a mounting bracket 2, and a central processing unit 3; the mounting bracket 2 is provided on one side of the high-definition camera 1, and the central processing unit 3 is provided on the inner side of the high-definition camera 1; the mounting bracket 2 is used to install the high-definition camera 1 at key locations that need to be monitored; the high-definition camera 1 is used to capture high-definition image and video information; and the central processing unit 3 is used to analyze and identify violations in the video and images in real time using image processing and machine learning algorithms.

[0018] The method for monitoring violations based on dual prevention is characterized by: S1: Pre-set behavioral characteristics and risk levels, and classify risk levels according to different categories of behavioral characteristics; S2: Real-time acquisition of high-definition video image data via high-definition camera 1; S3: Perform grayscale conversion, noise reduction, and enhancement preprocessing on the video image data captured by HD camera 1; S4: Extract feature information such as edges, textures, and shapes from the preprocessed image; S5: Classify and identify the extracted static behavioral features; S6: Classify and identify the extracted dynamic behavioral features; S7: Based on the nature and consequences of the violation, conduct a risk assessment to determine its hazard level; output the identification results to relevant personnel in the form of images, videos or alarm information, and take corresponding remedial measures for the identified hazards; S8: For static and dynamic behavioral characteristics that are not identified as risky behaviors, predict whether their behavioral characteristics may generate risks after a period of time through machine learning algorithms. S9: Output the prediction results to relevant personnel and formulate risk prevention and control measures in advance for the predicted risk behaviors.

[0019] The behavioral characteristics and risk levels are pre-defined. Risk levels are then categorized based on different behavioral characteristic types to determine the categories of behavioral characteristics that need to be monitored. Based on the potential severity of consequences for each behavioral characteristic, different risk levels are assigned, and a mapping relationship between behavioral characteristics and risk levels is established. The specific steps are as follows: S101: Define the goals and scope of monitoring, i.e., determine which types of behavioral characteristics need to be monitored; S102: Use industry standards and norms as the basis for defining behavioral characteristics and classifying risk levels; S103: Create a detailed list of all behavioral characteristic categories that need to be monitored; further refine complex behavioral characteristics into subcategories; S104: Based on the analysis of relevant laws and regulations, industry standards, and historical accident cases, develop standards for risk level classification; the standards involve the severity, frequency, and scope of consequences that may result from behavioral characteristics. S105: Based on the established standards, behavioral characteristics are classified into different risk levels; S106: Provide a clear description for each risk level, including its potential consequences and corresponding countermeasures; S107: Establish a mapping table between behavioral characteristics and risk levels; S108: Enter the defined behavioral characteristics and risk levels into the mapping table, with each behavioral characteristic associated with a specific risk level; S109: Validate the mapping table to ensure that all behavioral characteristics have been correctly classified and assigned the corresponding risk level.

[0020] Ensure the camera installation location fully covers the monitored area and is adjusted to the optimal shooting angle. Use HD camera 1 to acquire high-definition video image data in real time and transmit it to the monitoring center. The specific steps are as follows: S201: Clearly define the specific area that needs to be monitored, and determine the required number of cameras and their installation locations based on the monitoring objectives; S202: Install a camera and adjust its angle so that it can clearly capture details of people, vehicles, and objects in the target area; S203: Adjust parameters such as focus, brightness, and contrast to achieve the best image effect; S204: Connect the camera directly to the monitoring center using wired methods such as network cables; S205: The raw video data captured by the camera needs to be encoded. S206: Select the TCP / IP transmission protocol based on the network environment and monitoring requirements; S207: The camera transmits the encoded and compressed video data to the monitoring center in real time.

[0021] The video image data captured by HD camera 1 undergoes grayscale conversion, noise reduction, and enhancement preprocessing. Grayscale conversion converts color video images to grayscale images, reducing computational load. Noise reduction removes image noise, and enhancement techniques improve image quality, facilitating subsequent feature extraction. The specific steps are as follows: S301: Read a frame of color image from the video stream. The image consists of three color channels: red (R), green (G), and blue (B). S302: Based on the human eye's sensitivity to different colors, assign different weights to R, G, and B (R: 0.299, G: 0.587, B: 0.114), and calculate the weighted average as the grayscale value; S303: Calculate the gray value of each pixel using the weighted average method; S304: Assign the calculated grayscale value to each pixel to generate a grayscale image; S305: Uses a Gaussian function to perform a weighted average on the image, smoothing the image and removing noise; S306: Check the denoised image to ensure that noise is effectively suppressed while image details are not excessively blurred. S307: By adjusting the histogram distribution of the image, the pixel value distribution of the image is made more uniform, thereby improving the contrast of the image. S308: By stretching the contrast range of an image, it makes the dark areas of the image darker and the bright areas brighter, thus improving the visual effect of the image.

[0022] The preprocessed image extracts features such as edges, textures, and shapes. Edge detection algorithms are used to extract edge information, texture analysis methods are used to extract texture features, and contour detection algorithms are used to identify shape features. The specific steps are as follows: S401: Select the Canny edge detection algorithm according to application requirements; S402: Calculate the magnitude and direction of the image gradient; S403: Apply nonmaximum suppression to refine edges; S404: Uses a dual threshold algorithm to detect and connect edges; S405: Select the Gray-Level Co-occurrence Matrix (GLCM) texture analysis method according to application requirements; S406: Define a distance d and a direction θ; S407: For each pixel in the image, count the frequency of the joint distribution of gray levels among its neighboring pixels at a distance of d and in the direction of θ; S408: Construct a gray-level co-occurrence matrix, where each element reflects the frequency of two pixels' gray levels occurring simultaneously at a specific distance and direction; S409: Extract useful texture features from the gray-level co-occurrence matrix, and analyze the texture information in the image based on the extracted texture features; S410: Use the Hough transform contour detection algorithm to detect contours in an image; S411: Extract the coordinate information of the contour to form the contour curve; S412: Match the detected contours with predefined standard shape templates; S413: Use shape descriptors to calculate similarity; determine whether the shapes in the image match predefined standard shapes based on the similarity results; S414: If the shape match is successful, record and trigger the next processing step; if the shape does not match or cannot be recognized, continue analyzing other features or images.

[0023] The extracted static behavioral features are classified and identified, and the extracted dynamic behavioral features are also classified and identified; the specific steps are as follows: S501: Extract features that do not change over time, such as the position, shape, size, and color of objects in the video; analyze features that change over time, such as the motion trajectory, speed, acceleration, and direction of the objects; use the Euclidean distance similarity measurement method to calculate the similarity between the extracted features and each template in the template library, set a similarity threshold, and when the calculated similarity exceeds the threshold, it is considered a successful match, that is, a violation may have occurred. S502: Select the Convolutional Neural Network (CNN) classification algorithm based on actual needs and data characteristics; S503: Train the classification model using a dataset containing known characteristics of violations, so that the model can learn and identify different types of violations; S504: Input the features to be identified into the trained classification model, and the model outputs the prediction result, i.e. the specific type of the violation. S505: Mark the identified violations, including the time, location, and type of violation; S506: Store the recognition results in the database.

[0024] Based on the nature and consequences of the violation, a risk assessment is conducted to determine its hazard level. The identification results are then output to relevant personnel in the form of images, videos, or alarm messages. Corresponding remedial measures are then implemented for the identified hazards. The specific steps are as follows: S601: Calculate a risk value for each identified behavioral feature based on its risk level and corresponding weight; the risk value calculation formula is: Risk Value = Risk Level × Weight; S602: Summarize the risk values ​​of all identified behavioral characteristics to obtain the overall risk assessment result; S603: Based on the overall risk assessment results, the risks are divided into different levels, and clear thresholds are set for each risk level; S604: Select the output format of the evaluation results based on the actual situation, including images, videos, and alarm information; S605: Code the identification results and risk assessment results; S606: Develop a template for the output content, including key information such as behavioral characteristic description, risk assessment results, risk level, location of occurrence, and timestamp; S607: Send the pre-defined output content to the relevant personnel in the selected format; S608: Based on the risk assessment results, relevant personnel shall select appropriate governance measures from the measures library and make recommendations.

[0025] For static and dynamic behavioral characteristics that are not identified as risky behaviors, machine learning algorithms are used to predict whether these behavioral characteristics may pose a risk after a period of time; the specific steps are as follows: S701: Filter static and dynamic feature data from data sources that have not been identified as risky behaviors by existing monitoring systems; S702: Preprocess the collected data, including removing duplicate data, handling missing values, and detecting and correcting outliers; S703: Extract possible features from the cleaned data, including image features, time series features, and statistical features; S704: Use correlation analysis to assess the impact of each feature on the prediction results; S705: Based on the feature importance assessment results, select the feature subset that has a significant impact on the prediction results; S706: Select the appropriate machine learning algorithm based on the characteristics of the problem and the data; for data with time series characteristics, choose time series analysis; for processing multi-feature, high-dimensional data, choose the random forest algorithm. S707: Divide the labeled data into training set, validation set and test set according to a certain ratio; S708: Build a predictive model using the selected machine learning algorithm, including model initialization and parameter settings; S709: Use training set data to train the model, and adjust the model parameters through gradient descent iterative optimization algorithm so that the model can accurately predict potential risk behaviors; S710: Use validation and test set data to evaluate the performance of the trained model. Evaluation metrics include accuracy, recall, F1 score, and area under the ROC curve (AUC). S711: Conduct in-depth analysis of model prediction errors to identify the causes of the errors and possible directions for improvement; S712: Based on performance evaluation results and error analysis, adjust model parameters or improve model structure to enhance the model's predictive performance; S713: Repeat the above process of model building, training, and evaluation; S714: Input real-time image data into the model to predict risky behaviors.

[0026] The prediction results are then distributed to relevant personnel to develop risk prevention and control measures in advance for any potentially risky behaviors identified. The specific steps are as follows: S801: Organize the behavioral characteristics that may pose risks and their related prediction results predicted by the machine learning model, format the output data to ensure that the data is clear, easy to understand, and suitable for the needs of different recipients; S802: Based on the organizational structure and allocation of responsibilities, determine the specific relevant personnel to whom the forecast results should be sent; S803: Select the appropriate output method based on the receiver's preferences and actual situation; S804: Send the compiled forecast results to the relevant personnel through the selected method; confirm that the recipients have received the forecast results and understand their contents; S805: Analyze the behavioral characteristics that may pose risks in the prediction results and their potential impact; S806: Assess the severity, likelihood, and urgency of risks, and determine the priority of prevention and control measures; S807: Develop specific prevention and control measures for the predicted potential risks; S808: Allocate corresponding human, material, and financial resources according to the needs of prevention and control measures; S809: Implement the established prevention and control measures plan; S810: Regularly monitor the accuracy of the forecast results and analyze the differences and causes between the forecast results and the actual situation; S811: Evaluate the machine learning prediction model based on monitoring results; adjust the model's parameters and structure based on the evaluation results to improve prediction accuracy; S812: Evaluate the implemented prevention and control measures, and analyze their actual effectiveness and existing problems; S813: Establish a continuous monitoring and iteration mechanism to continuously collect new data, update predictive models and prevention and control measures, and continuously improve and perfect the entire dual prevention and monitoring system.

[0027] Example 1 Optionally, when setting monitoring objectives and scope, the monitoring objectives are set to ensure production safety, environmental protection, improve production efficiency, and prevent resource waste; the monitoring scope covers all aspects of exploration, drilling, oil production, gathering and transportation, processing, storage, and waste disposal; specific behavioral characteristics include, but are not limited to, equipment operation compliance, work permit execution, chemical use management, personnel safety behavior, and emergency response capabilities; the "Oil and Gas Industry Health, Safety and Environmental Management System" (HSE) standard, API (American Petroleum Institute) specifications, and national safety production laws are adopted as the core basis for defining behavioral characteristics and classifying risk levels; these standards specify in detail the safe operation requirements, environmental management regulations, and accident prevention measures in oil and gas field operations.

[0028] Example 2 Optionally, when creating a detailed list of behavioral feature categories, list all behavioral feature categories that need to be monitored; for complex behavioral features, further refine them into subcategories; the feature categories and subcategories are as follows: Equipment operation: including drilling equipment operation, oil and gas pipeline inspection, pressure vessel management, etc. Subcategories: Improper start / stop, overload operation, lack of regular maintenance, etc. Work permits: Application and execution of permits for high-risk operations (such as hot work and work at heights); Subcategories: unlicensed operation, expired license, license scope not in compliance with regulations, etc. Chemicals management: storage, transportation, use, and disposal of hazardous chemicals; Subcategories: leakage, illegal dumping, incorrect mixing, etc.; Personnel safety: wearing personal protective equipment, safety training, emergency drills, etc.; Subcategories: failure to wear PPE, working without certification, inappropriate emergency response, etc. Environmental protection: Waste gas, wastewater, solid waste treatment and ecological protection measures; Subcategories: illegal discharge, ecological damage, malfunction of environmental protection facilities, etc.

[0029] Example 3 Optionally, when formulating risk level classification standards, the severity of consequences can be classified into minor injury, loss, serious injury or death, and major environmental pollution; the frequency of occurrence can be classified into low frequency to high frequency; and the scope of impact can be classified into local to entire area. When classifying risk levels according to standards, those with minor consequences, low frequency, and small impact are classified as low risk; those with relatively serious consequences, moderate frequency, and limited impact are classified as medium risk; and those with serious consequences, high frequency, and wide impact are classified as high risk.

[0030] Example 4 Optionally, descriptions and response measures for each risk level are provided; for low risk, the response measures are: strengthen daily inspections and provide regular training and reminders; for medium risk, the response measures are: implement special inspections, develop emergency plans, and conduct regular training and drills; for high risk, the response measures are: set up warning signs, install monitoring equipment, strictly implement approval processes, and equip a professional emergency response team. Establish and input a mapping table between behavioral characteristics and risk levels. Create a spreadsheet listing behavioral characteristics (including subcategories) and their corresponding risk levels. Set a category such as "not wearing PPE (personal protective equipment)" to "personnel safety" and assign it a risk level of "medium risk". Review the mapping table to ensure that all behavioral characteristics are accurately classified and assigned appropriate risk levels.

[0031] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.

Claims

1. A violation monitoring device based on dual prevention, comprising a high-definition camera (1); characterized in that: It also includes a mounting bracket (2) and a central processing unit (3); the mounting bracket (2) is provided on one side of the high-definition camera (1), and the central processing unit (3) is provided on the inside of the high-definition camera (1); the mounting bracket (2) is used to install the high-definition camera (1) at key locations that need to be monitored, the high-definition camera (1) is used to capture high-definition images and video information, and the central processing unit (3) is used to analyze and identify violations in the video and images in real time using image processing and machine learning algorithms.

2. The method for monitoring violations based on dual prevention as described in claim 1, characterized in that: S1: Pre-set behavioral characteristics and risk levels, and classify risk levels according to different categories of behavioral characteristics; S2: Real-time acquisition of high-definition video image data via a high-definition camera (1); S3: Perform grayscale conversion, noise reduction, and enhancement preprocessing on the video image data captured by the high-definition camera (1); S4: Extract feature information such as edges, textures, and shapes from the preprocessed image; S5: Classify and identify the extracted static behavioral features; S6: Classify and identify the extracted dynamic behavioral features; S7: Based on the nature and consequences of the violation, conduct a risk assessment to determine its hazard level; The identification results will be output to relevant personnel in the form of images, videos or alarm information, and corresponding remedial measures will be taken for the identified hazards. S8: For static and dynamic behavioral characteristics that are not identified as risky behaviors, predict whether their behavioral characteristics may generate risks after a period of time through machine learning algorithms. S9: Output the prediction results to relevant personnel and formulate risk prevention and control measures in advance for the predicted risk behaviors.

3. The method for monitoring violations based on dual prevention according to claim 2, characterized in that: The behavioral characteristics and risk levels are pre-defined. Risk levels are then categorized based on different behavioral characteristic types to determine the categories of behavioral characteristics that need to be monitored. Based on the potential severity of consequences for each behavioral characteristic, different risk levels are assigned, and a mapping relationship between behavioral characteristics and risk levels is established. The specific steps are as follows: S101: Define the goals and scope of monitoring, i.e., determine which types of behavioral characteristics need to be monitored; S102: Use industry standards and norms as the basis for defining behavioral characteristics and classifying risk levels; S103: Create a detailed list of all behavioral characteristic categories that need to be monitored; Complex behavioral characteristics are further refined into subcategories; S104: Based on the analysis of relevant laws and regulations, industry standards, and historical accident cases, develop standards for risk level classification; the standards involve the severity, frequency, and scope of consequences that may result from behavioral characteristics. S105: Based on the established standards, behavioral characteristics are classified into different risk levels; S106: Provide a clear description for each risk level, including its potential consequences and corresponding countermeasures; S107: Establish a mapping table between behavioral characteristics and risk levels; S108: Enter the defined behavioral characteristics and risk levels into the mapping table, with each behavioral characteristic associated with a specific risk level; S109: Validate the mapping table to ensure that all behavioral characteristics have been correctly classified and assigned the corresponding risk level.

4. The method for monitoring violations based on dual prevention according to claim 3, characterized in that: Ensure that the camera installation location can fully cover the monitoring area and adjust it to the best shooting angle. High-definition video image data is collected in real time through the high-definition camera (1) and transmitted to the monitoring center. The specific steps are as follows: S201: Clearly define the specific area that needs to be monitored, and determine the required number of cameras and their installation locations based on the monitoring objectives; S202: Install a camera and adjust its angle so that it can clearly capture details of people, vehicles, and objects in the target area; S203: Adjust parameters such as focus, brightness, and contrast to achieve the best image effect; S204: Connect the camera directly to the monitoring center using wired methods such as network cables; S205: The raw video data captured by the camera needs to be encoded. S206: Select the TCP / IP transmission protocol based on the network environment and monitoring requirements; S207: The camera transmits the encoded and compressed video data to the monitoring center in real time.

5. The method for monitoring violations based on dual prevention according to claim 4, characterized in that: The video image data captured by the high-definition camera (1) is preprocessed by grayscale conversion, noise reduction, and enhancement. Grayscale conversion converts the color video image into a grayscale image to reduce the amount of computation. Noise reduction removes image noise. Enhancement technology is used to improve image quality, which facilitates subsequent feature extraction. The specific steps are as follows: S301: Read a frame of color image from the video stream. The image consists of three color channels: red (R), green (G), and blue (B). S302: Based on the human eye's sensitivity to different colors, assign different weights to R, G, and B (R: 0.299, G: 0.587, B: 0.114), and calculate the weighted average as the grayscale value; S303: Calculate the gray value of each pixel using the weighted average method; S304: Assign the calculated grayscale value to each pixel to generate a grayscale image; S305: Uses a Gaussian function to perform a weighted average on the image, smoothing the image and removing noise; S306: Check the denoised image to ensure that noise is effectively suppressed while image details are not excessively blurred. S307: By adjusting the histogram distribution of the image, the pixel value distribution of the image is made more uniform, thereby improving the contrast of the image. S308: By stretching the contrast range of an image, it makes the dark areas darker and the bright areas brighter, thus improving the visual effect of the image.

6. The method for monitoring violations based on dual prevention according to claim 5, characterized in that: The image extracts features such as edges, textures, and shapes from the preprocessed image. Edge information is extracted using an edge detection algorithm, texture features are extracted using a texture analysis method, and shape features are identified using a contour detection algorithm. The specific steps are as follows: S401: Select the Canny edge detection algorithm according to application requirements; S402: Calculate the magnitude and direction of the image gradient; S403: Apply nonmaximum suppression to refine edges; S404: Uses a dual threshold algorithm to detect and connect edges; S405: Select the Gray-Level Co-occurrence Matrix (GLCM) texture analysis method according to application requirements; S406: Define a distance d and a direction θ; S407: For each pixel in the image, count the frequency of the joint distribution of gray levels among its neighboring pixels at a distance of d and in the direction of θ; S408: Construct a gray-level co-occurrence matrix, where each element reflects the frequency of two pixels' gray levels occurring simultaneously at a specific distance and direction; S409: Extract useful texture features from the gray-level co-occurrence matrix, and analyze the texture information in the image based on the extracted texture features; S410: Use the Hough transform contour detection algorithm to detect contours in an image; S411: Extract the coordinate information of the contour to form the contour curve; S412: Match the detected contours with predefined standard shape templates; S413: Use shape descriptors to calculate similarity; determine whether the shapes in the image match predefined standard shapes based on the similarity results; S414: If the shape match is successful, record and trigger the next processing step; if the shape does not match or cannot be recognized, continue analyzing other features or images.

7. The method for monitoring violations based on dual prevention according to claim 6, characterized in that: The extracted static behavioral features are classified and identified, and the extracted dynamic behavioral features are also classified and identified; the specific steps are as follows: S501: Extract time-invariant features of objects in a video, such as position, shape, size, and color; analyze time-varying features of objects, such as trajectory, speed, acceleration, and direction. The Euclidean distance similarity metric is used to calculate the similarity between the extracted features and each template in the template library. A similarity threshold is set, and when the calculated similarity exceeds the threshold, the match is considered successful, indicating that a violation may have occurred. S502: Select the Convolutional Neural Network (CNN) classification algorithm based on actual needs and data characteristics; S503: Train the classification model using a dataset containing known characteristics of violations, so that the model can learn and identify different types of violations; S504: Input the features to be identified into the trained classification model, and the model outputs the prediction result, i.e. the specific type of the violation. S505: Mark the identified violations, including the time, location, and type of violation; S506: Store the recognition results in the database.

8. The method for monitoring violations based on dual prevention according to claim 7, characterized in that: Based on the nature and consequences of the violation, a risk assessment is conducted to determine its hazard level. The identification results are then output to relevant personnel in the form of images, videos, or alarm messages. Corresponding remedial measures are then implemented for the identified hazards. The specific steps are as follows: S601: Calculate a risk value for each identified behavioral feature based on its risk level and corresponding weight; The formula for calculating the risk value is: Risk Value = Risk Level × Weight; S602: Summarize the risk values ​​of all identified behavioral characteristics to obtain the overall risk assessment result; S603: Based on the overall risk assessment results, the risks are divided into different levels, and clear thresholds are set for each risk level; S604: Select the output format of the evaluation results based on the actual situation, including images, videos, and alarm information; S605: Code the identification results and risk assessment results; S606: Develop a template for the output content, including key information such as behavioral characteristic description, risk assessment results, risk level, location of occurrence, and timestamp; S607: Send the pre-defined output content to the relevant personnel in the selected format; S608: Based on the risk assessment results, relevant personnel shall select appropriate governance measures from the measures library and make recommendations.

9. The method for monitoring violations based on dual prevention according to claim 8, characterized in that: For static and dynamic behavioral characteristics that are not identified as risky behaviors, machine learning algorithms are used to predict whether these behavioral characteristics may pose a risk after a period of time; the specific steps are as follows: S701: Filter static and dynamic feature data from data sources that have not been identified as risky behaviors by existing monitoring systems; S702: Preprocess the collected data, including removing duplicate data, handling missing values, and detecting and correcting outliers; S703: Extract possible features from the cleaned data, including image features, time series features, and statistical features; S704: Use correlation analysis to assess the impact of each feature on the prediction results; S705: Based on the feature importance assessment results, select the feature subset that has a significant impact on the prediction results; S706: Select the appropriate machine learning algorithm based on the characteristics of the problem and the data; for data with time series characteristics, choose time series analysis; for processing multi-feature, high-dimensional data, choose the random forest algorithm. S707: Divide the labeled data into training set, validation set and test set according to a certain ratio; S708: Build a predictive model using the selected machine learning algorithm, including model initialization and parameter settings; S709: Use training set data to train the model, and adjust the model parameters through gradient descent iterative optimization algorithm so that the model can accurately predict potential risk behaviors; S710: Use validation and test set data to evaluate the performance of the trained model. Evaluation metrics include accuracy, recall, F1 score, and area under the ROC curve (AUC). S711: Conduct in-depth analysis of model prediction errors to identify the causes of the errors and possible directions for improvement; S712: Based on performance evaluation results and error analysis, adjust model parameters or improve model structure to enhance the model's predictive performance; S713: Repeat the above process of model building, training, and evaluation; S714: Input real-time image data into the model to predict risky behaviors.

10. The method for monitoring violations based on dual prevention according to claim 9, characterized in that: The prediction results are then distributed to relevant personnel to develop risk prevention and control measures in advance for any potentially risky behaviors identified. The specific steps are as follows: S801: Organize the behavioral characteristics that may pose risks and their related prediction results predicted by the machine learning model, format the output data to ensure that the data is clear, easy to understand, and suitable for the needs of different recipients; S802: Based on the organizational structure and allocation of responsibilities, determine the specific relevant personnel to whom the forecast results should be sent; S803: Select the appropriate output method based on the receiver's preferences and the actual situation; S804: Send the compiled forecast results to the relevant personnel through the selected method; confirm that the recipients have received the forecast results and understand their contents; S805: Analyze the behavioral characteristics that may pose risks in the prediction results and their potential impact; S806: Assess the severity, likelihood, and urgency of risks, and determine the priority of prevention and control measures; S807: Develop specific prevention and control measures for the predicted potential risks; S808: Allocate corresponding human, material, and financial resources according to the needs of prevention and control measures; S809: Implement the established prevention and control measures plan; S810: Regularly monitor the accuracy of the forecast results and analyze the differences and causes between the forecast results and the actual situation; S811: Evaluate the machine learning prediction model based on monitoring results; adjust the model's parameters and structure based on the evaluation results to improve prediction accuracy; S812: Evaluate the implemented prevention and control measures, and analyze their actual effectiveness and existing problems; S813: Establish a continuous monitoring and iteration mechanism to continuously collect new data, update predictive models and prevention and control measures, and continuously improve and perfect the entire dual prevention and monitoring system.