Risk event sensing method based on leakage detection

By using the FRCNN model based on light -flow -based characteristics in the leak detection technology, the problem of poor detection effects in existing technology in special environments is solved, and efficient identification and real -time monitoring of liquid and gas leakage are realized.

CN119360276APending Publication Date: 2025-01-24辛博
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411452292.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing leakage detection technology has poor detection effect at night or under strong light, and the leakage detection effect of liquids and gases is uneven, and the reaction speed is slow, making it difficult to achieve real-time detection.

Method used

The FRCNN model based on optical flow feature fusion is used to perform feature extraction and target positioning on two consecutive frames of pictures by calculating optical flow, fuse optical flow features and image features, adjust the size of the target frame, accurately calculate the target position, and filter out effective results through the threshold formula area.

Benefits of technology

The accuracy of detection in special environments has been improved, the response time is shortened, and efficient identification of liquid and gas leakage is achieved, especially at night and strong light irradiation environment can still maintain a high accuracy rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119360276A_ABST
    Figure CN119360276A_ABST
Patent Text Reader

Abstract

The invention provides a risk event sensing method based on leakage detection, which relates to the technical field of information security, and comprises the steps of optical flow calculation, feature extraction, RPN part, Propodal Layer part, fusion of optical flow features and original image features calculated based on a front frame and a rear frame, extraction of a target to be used for classification from a feature map by using an accurate position, and detection of the target to be used for classification. And the data are pooled into data with fixed length. Through testing, the overall recognition accuracy rate of the risk event sensing prevention and control system is 87%, the liquid leakage recognition accuracy rate is 88.46%, and the gas leakage recognition accuracy rate is 85.55%. The average response time of the risk event sensing prevention and control system is 0.6 second, and the longest response time is 1.3 seconds. According to the method, the recognition accuracy rate under a normal picture is 85.32%, the recognition accuracy rate under a picture with a complex background is 80.2%, the recognition accuracy rate under a picture at night is 83.5%, and the recognition accuracy rate under a picture with headlight illumination is 72.1%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to a risk event perception method based on leakage detection. Background Art

[0002] A risk event perception method based on leak detection mainly uses an improved FRCNN model based on optical flow feature fusion to improve detection accuracy and response speed. However, most of the current traditional leak detection methods still rely on traditional sensor equipment for monitoring. This approach is not only highly dependent on environmental conditions (for example, in poor lighting conditions, such as at night or in an environment with strong direct light, their detection accuracy may drop significantly), but also has uneven detection effects on different types of substances (such as between liquid and gas leaks). Especially for more invisible gases, this detection method is even weaker However, existing leak detection technology mainly relies on traditional sensor equipment for monitoring. This method can achieve leak detection to a certain extent, but there are some obvious problems. First, this method has poor adaptability to the environment. For example, at night or in an environment with strong light, its detection effect will be greatly reduced. Secondly, the leakage detection effect of traditional sensor equipment for liquids and gases is quite different, and the detection effect for gases is poor. Finally, this method has a slow response speed in some scenarios and cannot achieve real-time leak detection. Summary of the invention

[0003] 1. Technical issues to be resolved In view of the shortcomings of the prior art, the present invention provides a risk event perception method based on leak detection, which solves the problem that the detection effect is greatly reduced at night or in an environment with strong light. Secondly, the traditional sensor equipment has a large difference in the leakage detection effect for liquids and gases, and the detection effect for gases is poor.

[0004] (II) Technical solution To achieve the above objectives, the present invention provides the following technical solution: a risk event perception method based on leakage detection, comprising: Calculate the optical flow for two consecutive frames and combine them with the second frame to construct the model input; Feature extraction, using a series of convolution + pooling to extract feature maps from the original image; The RPN part obtains the approximate location of the target from the feature map by means of network training; In the Proposal Layer part, the approximate position obtained by the RPN is used to continue training to obtain a more accurate position; Based on the fusion of the optical flow features calculated from the previous and next two frames and the original image features, the target to be classified is cut out from the feature map using the precise position and pooled into data of a fixed length.

[0005] Preferably, based on the fusion of the optical flow features calculated from the previous and next two frames and the original image features, the target to be used for classification is cut out from the feature map using the precise position, and pooled into data of a fixed length, including: Fusion calculation of optical flow features and image features to form a comprehensive feature matrix C; Based on the information contained in C, adjust the target box size; Perform precise calculations on the adjusted position; By accurately locating the position and cutting out the target from the feature map; A threshold formula is introduced in the target positioning process, and the judgment condition is that "A" is greater than or equal to "B" and less than "T" for screening the effective area box, where "A" represents the maximum correlation value obtained based on the feature matching, "B" is the lower limit of the preset correlation threshold, and "T" is the preset upper limit threshold.

[0006] Preferably, the fusion process based on the optical flow feature and the image feature specifically includes the following four steps: The convolutional neural network is used to model and analyze the dynamics of the optical flow in the two frames of images to obtain the dynamic matrix "D", which reflects the possible change trend of the target object; Match the image "I" with the previous frame image through feature matching to get the corresponding matching score, marked as "S"; Combine the dynamic matrix "D" and the score "S" to generate the feature vector "V" as the initial feature of the fusion. In this step, the size of the matrix must be consistent; Applying a predefined relationship so that the value of "C" is considered as a reasonable target area if it is within a predetermined value range ["L", "H"], that is, when "L" is less than or equal to "C" and "C" is less than "H"; Among them, the matrix "D" represents the potential motion intensity information of the target object, and "S" represents the credibility level of the target position.

[0007] Preferably, the specific operation method of adjusting the target frame also includes the following four steps: Calculate the comprehensive score "X" between the dynamic and image characteristics in each proposal area; Based on “X”, use the predefined scaling factor “K” to shrink or expand the proposal boundary; When determining whether to retain the final target box, it is necessary to satisfy that "Y" is not less than a fixed positive value "G", where "Y" is the comprehensive score of the part corresponding to the proposal in "C". Here, "X" represents the influence weight of the changing information in the target area on the overall feature, and "Y" is used to quantify the importance of the target section; Here, "G" is determined by the experimental results, and the minimum threshold when achieving the best effect in the training set is set to "G = 50".

[0008] Preferably, the further fine-tuning of the precise target position further includes four specific steps: First, based on the initially estimated area size, a preliminary range "M" is determined; After that, based on this range, the proposal area is precisely adjusted according to a specific formula "P = 5*(X + Z)", where "X" represents the original target width, "Z" represents the expected width of the target after adjustment, and "P" determines the actual boundary after the final width adjustment; If "W" falls within the set error tolerance range, this fine-tuning is accepted. "W" is the actual width deviation index of the target box after preliminary processing, and the tolerance range is set to plus or minus N (unit: px); Among them, the selection of the error range should be based on a large number of experimental verifications to ensure the rationality of "N".

[0009] Preferably, the strategy of using a fixed-size pooling layer in the target recognition stage includes the following four refinement operations: Pool the feature area according to the importance difference coefficient ratio between "A" and the background feature. Among them, the importance "A" is defined as the sum of the foreground features, "Q" represents the sum of the background features, and "R = A / Q" is a ratio used for evaluation, which is used to guide the target cropping; Only when "R" is higher than the predetermined standard "B (0 < R < B)" is this area allowed to enter the classification; "B" is the standard value determined by the test, and the best effect is achieved when "R = B = 5", ensuring that the foreground is sufficiently prominent; The size of the target cropping area "C=(a*b)" follows a rule: only when it satisfies.

[0010] (III) Beneficial effects The present invention provides a risk event perception method based on leakage detection. It has the following beneficial effects: 1. The present invention has been tested and the overall recognition accuracy of the risk event perception and prevention system is 87%, of which the recognition accuracy of liquid leakage is 88.46% and the recognition accuracy of gas leakage is 85.55%. The average response time of the risk event perception and prevention system is 0.6 seconds, and the longest response time is 1.3 seconds. The recognition accuracy in normal photos is 85.32%, the recognition accuracy in photos with complex backgrounds is 80.2%, the recognition accuracy in night photos is 83.5%, and the recognition accuracy in photos with headlights is 72.1%.

[0011] 2. The present invention provides an effective solution to the problems existing in the prior art, such as improving the detection accuracy in special environments, improving the reaction speed, etc. The core technology of this patent solution is the FRCNN model that integrates the optical flow algorithm. This model can effectively identify gas and liquid leaks, especially in special environments, such as at night and under headlights, and can still maintain a high recognition accuracy. In addition, the average response time of the model is short, and the longest response time is also within an acceptable range, meeting the needs of real-time monitoring. Therefore, the key technical features and protection points of this patent solution mainly include the FRCNN model that integrates the optical flow algorithm, as well as its stability and rapid responsiveness in special environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a flow chart of a risk event perception method based on leakage detection; Figure 2 It is a flowchart that is based on the fusion of the optical flow features calculated from the previous and next frames and the original image features, uses the precise position to cut out the target to be classified from the feature map, and pools it into fixed-length data; Figure 3 It is a flowchart based on the fusion process of optical flow features and image features, which specifically includes the following four steps: Figure 4 The specific operation method of adjusting the target frame also includes the following four-step flow chart; Figure 5 It is a flowchart that also includes four specific steps for further fine-tuning of the precise target position; Figure 6 The strategy of using a specific pooling layer to fix the size in the target recognition stage includes the following four-step refinement operation flow chart. DETAILED DESCRIPTION

[0013] The embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings. The following describes the embodiments of the present disclosure through specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and the features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0014] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0015] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. The type, quantity and proportion of each component in actual implementation may be changed at will, and the component layout type may also be more complicated. In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the aspects described can be practiced without these specific details.

[0016] Example Reference Figure 1 -Attached Figure 6, describes a risk event perception method based on leak detection of the present invention, including multiple key technical steps, which solve the problems of poor environmental adaptability, inaccurate gas detection and slow response in traditional technologies. First, the first step of the method involves calculating the optical flow, which means estimating the optical flow features between two consecutive frames of images in order to capture the pattern of object movement. This step not only helps the model understand the changes in the video scene, but also effectively improves the tracking performance of dynamic targets in an environment with large light changes. For example, in a practical application, the system compares the video images of a chemical plant between two adjacent frames to quickly determine whether there are signs of abnormal movement caused by leaks, such as liquid flowing or gas escaping. The two frames are then combined together as input data for the subsequent processing stage to ensure that even minor changes can be captured and used for subsequent recognition work.

[0017] When it comes to feature extraction, a series of convolution operations are used in conjunction with maximum pooling or average pooling techniques to extract useful visual information from each frame of the input image. These are called feature maps, which represent some of the most discriminative features in the source image, such as texture, contour edges, and color distribution details. In this process, the system will gradually remove the interference of background information and focus on suspicious areas where leaks are suspected to have occurred. In a specific example, the model may focus on dark spots or color inconsistencies around a storage tank as evidence of possible leaks, and further examine them in detail.

[0018] Next comes the RPN step. This network architecture, designed specifically for feature maps, is trained to automatically learn and locate possible problem locations, instead of manually specifying regions of interest. This bottom-up strategy improves accuracy within the search range while reducing the chance of false positives. For example, RPN can detect shapes in an image that resemble features from previous leaks and pass them on as high-priority targets to lower-level analysis units for further verification.

[0019] Next is the Proposal Layer part, which refines the selection of bounding boxes based on the target area proposal list generated by the previous RPN, ensuring that the candidate boxes retained in the end contain the most likely real threat signals and minimize the attention to irrelevant interference items. This step-by-step screening method enables the system to focus on the most critical object detection tasks under a large amount of noise background conditions.

[0020] The last core technical step is called ROI pooling. It uses the best region proposal that has been carefully selected to crop standard blocks of corresponding size and shape in the original image for use by the classifier before classifying. This mechanism overcomes the difficulties brought by input scale changes to deep model training, and ensures that information of different sizes and shapes is properly represented to facilitate efficient classification decision-making. Specifically, if the model suspects that a storage facility is suffering from a leak, it will be segmented and converted into a fixed size before being sent to a higher level for further identification. This series of innovative methods not only greatly improves recognition accuracy and real-time feedback capabilities, but also ensures high performance under any time conditions.

[0021] Next, the present invention describes the fusion of the optical flow features calculated based on the previous and next frames and the original image features, using the precise position to cut out the target to be used for classification from the feature map, and pooling it into fixed-length data. The process first inputs the images of the previous and next frames into the algorithm, calculates the optical flow features based on the difference between the two frames, and then fuses it with the original image features of the first frame to generate a comprehensive feature matrix C. The comprehensive feature matrix contains the motion information between the two frames and the static feature information of the image itself.

[0022] Based on the information contained in C, the process of adjusting the size of the target frame refers to re-determining the change in the position and size of the object in the monitoring area based on the above fused features. This step can ensure that the final locked area fits the moving object more accurately.

[0023] Accurately calculating the adjusted position means further refining the predicted coordinates through mathematical models to reduce detection errors and improve accuracy.

[0024] Precise positioning and cutting out the target from the feature map means that, after the calculations after the above position adjustment, the specific coordinate information obtained is used to identify the target object to be analyzed in the corresponding area in the feature map, and then cut it out and separate it.

[0025] In the process of target positioning, a threshold formula is introduced to screen the valid area frame. The judgment condition of this formula is that if the maximum correlation value of a certain area "A" is greater than or equal to the preset lower limit "B" and less than the upper limit value "T", then the area is considered a valid area. Here "A" refers to the score of the most similar part between the target object and the original image obtained by matching; "B" represents a minimum score threshold set to prevent excessive relaxation of matching conditions. In the leakage detection system, this value is recommended to be no less than 0.5; at the same time, the upper limit threshold "T" is set (for example, the value can be set to 0.9) to exclude the interference of outliers that cause non-target objects to be misjudged and enter the subsequent processing process, ensuring that the system focuses on processing actual threats or matters of concern rather than background noise. This step effectively filters meaningless or low-value data segments, reduces the processing burden and improves recognition efficiency.

[0026] For example, in an actual application case for leak detection in oil and water pipelines, the system needs to continuously capture visual information near the pipeline and respond immediately to potential risks. The time interval between each frame sets sufficient resolution to capture any subtle flow or change phenomena. If liquid leakage occurs in the pipeline area for a period of time, the comparison between the previous and next frame images will change significantly. By analyzing these two images, the calculated optical flow field provides information about the dynamic direction and speed of the leak; coupled with the color texture details of the image itself as an auxiliary confirmation basis. These together constitute the matrix C, which is used in the subsequent process to adjust the size and position of the original monitoring frame, and more accurately delineate the pipe section where the accident may occur, rather than blindly searching over a large area. Through the preset threshold mechanism, some interference such as false signals caused by swaying branches are eliminated, and the interval where the real leak point is located is locked, and these features are extracted for further research and processing or timely remedial actions.

[0027] Next, the fusion process based on the optical flow features and image features of the present invention is described, which specifically includes the following four steps: using a convolutional neural network to model and analyze the optical flow dynamics in the previous and next frames of the picture to obtain a dynamic matrix "D", "D" reflects the possible change trend of the target object; the image "I" and the previous frame of the image are matched by features to obtain a corresponding matching score, marked as "S"; the dynamic matrix "D" is combined with the score "S" to generate a feature vector "V" as the initial feature of the fusion, and this step requires that the size of the matrix be consistent; applying a predefined relationship, so that if the value of "C" is within the predetermined value range ["L", "H"], that is, when "L" is less than or equal to "C" and "C" is less than "H", it is regarded as a reasonable target area; wherein, the matrix "D" represents the potential motion intensity information of the target object, and "S" represents the credibility level of the target position.

[0028] First, the convolutional neural network (CNN) technology is used to model and analyze the pixel movement in the two consecutive video frames to be analyzed. By quantifying the position difference of each pixel between the two frames, the relative optical flow information between the two frames is obtained, and the generated two-dimensional dynamic change quantization result matrix is ​​represented as "D". The dynamic matrix reflects the changes and movement trends of potential target objects between the two frames in the time series.

[0029] Next, after obtaining the current frame image "I", the corresponding image feature extraction technology such as SIFT or ORB algorithm is used to extract feature points and construct descriptors, and a local correspondence test is performed with the previous reference frame to calculate the corresponding degree of coincidence matching, thereby obtaining feature pairs between each image and their corresponding confidence score tags, that is, a matching score set, here called "S". This value represents the quality of the matching of corresponding points of the target object between different images or the reliability level of the target position estimation.

[0030] Then, after the above two representation methods are extracted, all the dynamically changing quantitative data "D" and matching evaluation scores "S" obtained previously are integrated through appropriate mathematical models such as matrix superposition or weighted summation to form a single new array "V" that can fully reflect the image feature vector representation under comprehensive considerations. It is used for subsequent analysis preparation and requires that the various source data involved in the merging operation have the same number of dimensions.

[0031] Finally, on the basis of obtaining the fusion feature vector, in order to more objectively and fairly distinguish the differences in the background changes under normal operation from the environmental changes caused by specific risk behaviors, it is necessary to artificially set some judgment conditions to identify the target. Here, the comprehensive evaluation coefficient "C" can be compared to see whether it meets a set of pre-established boundary standards for screening. Assuming that the upper and lower limits of the threshold are set to "H" and "L" respectively (where 0≤"L"<"H"≤1), any "C" value that meets the expectations within the above range is considered to be an object movement phenomenon or state within the scope of the effectively monitored safety or unsafe events. The specific value needs to be tested by multiple experiments in the early stage to ensure its scientificity and rationality.

[0032] For example, in one embodiment, if you want to monitor whether the liquid inside the oil storage tank will cause a safety hazard due to leakage, you can use the above algorithm to automatically detect abnormal fluctuations in the oil level, so as to detect and take emergency measures as early as possible to avoid the expansion of serious consequences such as environmental pollution.

[0033] In summary, the above four key actions realize a complete closed-loop calculation path from optical flow image to spatial coordinate transformation, which not only improves the recognition accuracy and reduces the false positive rate, but also takes into account the flexibility and robustness requirements, and can be widely used in industrial monitoring and other fields.

[0034] Next, the specific operation method of the target frame adjustment of the present invention is described, which also includes the following four steps: calculating the comprehensive score "X" between the dynamic and image characteristics in each proposal area; based on "X", using a predefined scale factor "K" to reduce or expand the proposal boundary; determining whether the final target frame is retained requires that "Y" is not less than a fixed positive value "G", where "Y" is the comprehensive score of the part corresponding to the proposal in "C"; here "X" represents the influence weight of the change information in the target area on the overall characteristics, and "Y" is used to quantify the importance of the target segment; here "G" is determined by the experimental results, and the minimum threshold for achieving the best effect in the training set is set to "G=50".

[0035] First, calculate the comprehensive score "X" between the dynamic and image characteristics in each proposal area. "X" is the result of combining the degree of dynamic change in the area with the static features, reflecting the importance of the information of the change in the area to the frame or context. The higher the value, the more significant the effect of the change in the area on target positioning. In one embodiment, the dynamic feature map (such as motion vector map, etc.) and the static feature map (RGB value distribution, texture, etc.) in each candidate area are obtained through a deep learning network, and the two features are weighted and added to obtain the comprehensive score "X" to implement this process.

[0036] Next, based on the previously obtained "X" value, the candidate bounding box size is adjusted by applying a predetermined scaling factor "K". "K" can be set to a value greater than 1 and less than 10. In a specific example, if the activity intensity of a candidate object is very high, resulting in a higher rating "X", the candidate box can be appropriately enlarged by multiplying it by a value close to the upper limit (such as "K" = 7). On the contrary, for areas with less changes, a smaller scaling factor (for example, "K" ≈ 2) is selected. This adjustment helps ensure that the focus is always on the target location of real interest, rather than the less active surrounding parts, making the prediction more accurate and focused on key areas.

[0037] Next, we need to determine whether the proposal can be retained in the final output frame set based on the final calculation results. For each adjusted bounding box, check whether the comprehensive score "Y" in the corresponding "C" feature space exceeds the threshold "G". Here, "C" refers to the complex model output vector field formed by the understanding of the entire input video. "Y" is a measure of the effective information about a specific roi part extracted from this field. For example, when analyzing a series of continuous video screenshots, if a specific pattern continues to repeat with a high probability (such as liquid continuing to spill out), the corresponding "Y" value will be large and show sufficient importance when comparing the baseline for further analysis or alerting users to potential leakage risks.

[0038] Finally, the importance and significance of the parameter "G" setting are pointed out. The selection of this threshold "G" depends on the actual test results. Through trial and error, the point in the training set that achieves the highest performance (maximum accuracy or other preset optimization goals) is selected. In particular, in a certain attempt, it was found that the minimum acceptable score should be "G = 50". This means that any target obtained below this score will be considered unreliable and will not be included in the final consideration. This setting ensures the effectiveness of screening and prevents over-cropping of useful detection areas.

[0039] In general, the above four steps work together to ensure the accuracy and efficiency of the target adjustment algorithm in complex dynamic backgrounds.

[0040] Next, the further fine-tuning of the precise target position described in the present invention also includes four specific steps: first, based on the preliminary estimated area size, a preliminary range "M" is determined; then, based on this range, the proposal area is precisely adjusted according to a specific formula "P=5*(X+Z)", where "X" represents the original target width, "Z" represents the expected width of the adjusted target, and "P" determines the actual boundary after the final width adjustment; if "W" falls within the set error tolerance range, the fine-tuning is accepted, and "W" is the actual width deviation index of the target frame after preliminary processing, and the tolerance range is set to plus or minus N (unit: px); the selection of the error range should be based on a large number of experimental verifications to ensure the rationality of "N".

[0041] The first step is to preliminarily determine the range "M" based on the estimated area size. In this process, the preliminary location information of the target identified by the previous algorithm is used as a reference to define the preliminary identified target range or size as the initial basis of "M". This preliminary estimate helps to narrow the calculation space for subsequent more precise adjustments, improve calculation efficiency and positioning accuracy. In one embodiment, for example, when the detection system first identifies a potential data leakage activity area (for example, suspected illegal copying of documents), the search area is defined as the preliminary range "M" based on the preliminary estimated data volume and storage address information.

[0042] After entering the second step, the specific formula "P=5*(X+Z)" is applied according to the determined range "M" to accurately modify the boundaries of the target area, that is, adjust the position of the proposal box. Here, the parameter "X" refers to the original width size of the target object detected or predicted in the initial processing, and "Z" represents the new expected width to be adjusted. The final adjusted width value is "P". The coefficient 5 is selected to balance the needs of fast response speed and accuracy. This coefficient has been optimized through multiple experiments and found to be effective in balancing efficiency and accuracy, especially for moving objects (such as sudden changes in user behavior data). Taking leakage detection as an example, assuming that the width of the object with suspected behavior identified for the first time is about 5 pixels, and it is expected that the detection margin will be increased by 3 pixels through adjustment, then according to the above formula "P", the width of the new boundary can be calculated to be adjusted to "P=5*(5+3)=40px".

[0043] The third step is to verify whether the result of this fine-tuning meets the preset standards. If after actual processing, the size change index "W" of the box selection meets the set allowable error band (±N), then the fine-tuning is considered successful and can be formally adopted; otherwise, the change is rejected, and the previous position is retained or a new correction attempt is made. The key here lies in the choice of error range. For example, the allowable deviation is set to ±5 pixel units. In specific practice, it means that even if the boundary after fine-tuning changes, but the change does not exceed 5 unit pixels, it is considered reasonable. This not only takes into account the inherent error factors of visual detection, but also takes into account the complexity and variability in the actual environment, ensuring that target tracking and area demarcation are more accurate and effective.

[0044] The last mentioned is crucial for the selection of the "N" value and requires a large number of tests to determine a reasonable and appropriate "N" value, ensuring that the adjustment is sensitive enough without being overly sensitive to cause frequent false alarms, and ensuring high reliability in the field of risk prevention and adapting to the evolving security environment. This experimental verification helps to find the optimal error threshold, so as to accurately and reliably lock the specific focus of attention in various operating situations and ensure that any suspicious movement is under the continuous monitoring of the system, improving the overall early warning efficiency. Through a series of experimental data and statistical analysis, it can be confirmed that the range of ±10 to ±20 pixels is the best choice in most cases. Therefore, through careful proofreading and optimization, this fine-tuning step can better cooperate with the overall system operation, providing a solid guarantee for the effective prevention of data risks.

[0045] Next, the strategy of adopting a fixed-size pooling layer in the target recognition stage of the present invention includes the following four refined operations: Pool the feature regions according to the importance difference coefficient ratio of "A" to the background feature, where the importance "A" is defined as the sum of the foreground features, "Q" represents the sum of the background features, and "R = A / Q" is a ratio used for evaluation to guide target cropping; here, "A" calculates the cumulative value of the significant feature points or feature pixel intensities directly related to the recognition target within a given feature region, and "Q" calculates the sum of the intensities of the part in the same feature map that does not belong to the target but provides important background information. By calculating the ratio "R = A / Q" of the two, it is judged how prominent the foreground target of concern is compared to the background. This setting enables the algorithm to focus on those objects with sufficient saliency and avoid the non-critical regions from affecting the accuracy of recognition.

[0046] Only when "R" is higher than the predetermined standard "B (0 < R < B)" is this region allowed to enter the classification; the threshold "B" is set as the standard to distinguish whether to further process this feature region. If "R" meets the requirement of "B", it indicates that there are highly significant recognition objects in this region, otherwise it is considered that there are no clear features in the current region for in-depth processing.

[0047] "B" is a standard value determined by testing, and it has the best effect when "R = B = 5", ensuring that the foreground is prominent enough; this means that when the ratio of the target's saliency to the background is at least 5 to 1, the detection accuracy of the system reaches the highest state, which helps to filter out a large number of unnecessary detections, improve the model efficiency and reduce the false alarm rate.

[0048] The size of the target cropping area "C=(a*b)" follows a rule: the target cropping operation can only be performed after the predetermined conditions are met; here "C" refers to the effective image size that is finally used for further analysis, that is, the length and width are "a" and "b" respectively. This cropping ensures that each input image contains enough details to perform tasks in subsequent processing stages such as category determination.

[0049] For example, in the implementation of a safety system for monitoring a pipeline network, if a suspected liquid leak is captured in a video frame, the significant features of the area (such as color contrast changes or dynamic area flow characteristics) are quantified into the sum of foreground features "A". The normal part of the pipeline contributes to the sum of background features "Q". If it is measured that "R = A / Q > 5" between the two (that is, the leakage feature is at least five times stronger than the background), this area will be marked as a key analysis range and further classified and processed. In addition, for the convenience and accuracy of subsequent identification, the selected part of the image in the key area will be reshaped to a unified standard input scale according to specific cropping rules. These refinement operations ensure that the algorithm can quickly and accurately determine possible risk situations and take appropriate preventive measures to mitigate damage.

[0050] A risk event perception method based on leakage detection of the present invention includes: By integrating the FRCNN model with the optical flow algorithm, gas and liquid leaks can be efficiently identified, solving the technical problems of existing leak detection technology, such as poor adaptability in specific environments (such as at night or under strong light), poor leak detection effect for different media, slow response speed, and difficulty in achieving real-time detection. The overall process is as follows: Calculate optical flow: First, for two consecutive video frames, the optical flow field is calculated by the optical flow algorithm and combined with the second frame image to construct the model input. This approach allows the model to simultaneously utilize the dynamic information and static details between the previous and next frames.

[0051] Feature extraction stage: A series of convolution operations and pooling operations are applied to the original image to extract high-level abstract feature maps. Such multi-layer nonlinear transformations can effectively capture the key features in the target area.

[0052] RPN Region Proposal Network: A new module in the Faster R-CNN architecture for object detection, RPN (Region Proposal Network), is added to automatically generate candidate box location information that may contain objects of interest.

[0053] Proposal Layer: This stage will further accurately locate the object of interest and improve the accuracy of the proposal box, thereby providing more reliable information support for subsequent classification and detection.

[0054] ROI Pooling Region of Interest Pooling: Use the more accurate ROI region generated in the above process to crop the corresponding part from the previously generated feature map and adjust it to a uniform size before entering the next recognition step.

[0055] In order to verify the effectiveness of the method, this scheme used a large number of training data sets containing different types of leakage accident video clips collected from the petrochemical industry for rigorous testing. The results show that compared with traditional methods, the recognition device using this method can achieve nearly instant feedback (less than or equal to 1.3 seconds) while ensuring a high overall missed detection rate (liquid leakage detection rate is about 88.46%, gas is 85.55%), and has good cross-environment compatibility. Even under extreme lighting conditions such as complete darkness (83.5%) and strong light interference (72.1%), its detection accuracy is also good.

[0056] In general, a risk event perception method based on leakage detection, with its unique fusion optical flow analysis + Faster-RCNN technology, has achieved a more accurate and rapid innovation in the supply of risk monitoring services on the basis of solving the difficulty of detection caused by various working conditions in the actual environment. It provides a solid foundation and technical guarantee for the storage and production activities of hazardous chemicals.

[0057] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0058] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0059] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0060] Any process or method description in the flow chart or otherwise described herein can be understood to represent a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.

[0061] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.

[0062] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.

[0063] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.

[0064] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A risk event perception method based on leakage detection, characterized in that: include: Calculate the optical flow for two consecutive frames and combine them with the second frame to construct the model input; Feature extraction, using a series of convolution + pooling to extract feature maps from the original image; The RPN part obtains the approximate location of the target from the feature map by means of network training; In the Proposal Layer part, the approximate position obtained by the RPN is used to continue training to obtain a more accurate position; Based on the fusion of the optical flow features calculated from the previous and next two frames and the original image features, the target to be classified is cut out from the feature map using the precise position and pooled into data of a fixed length.

2. A risk event perception method based on leakage detection according to claim 1, characterized in that: Based on the fusion of the optical flow features calculated from the previous and next two frames and the original image features, the target to be classified is cut out from the feature map using the precise position and pooled into fixed-length data, including: Fusion calculation of optical flow features and image features to form a comprehensive feature matrix C; Based on the information contained in C, adjust the target box size; Perform precise calculations on the adjusted position; By accurately locating the position and cutting out the target from the feature map; A threshold formula is introduced in the target positioning process, and the judgment condition is that "A" is greater than or equal to "B" and less than "T" for screening the valid area box, where "A" represents the maximum correlation value obtained based on the feature matching, "B" is the lower limit of the preset correlation threshold, and "T" is the preset upper limit threshold.

3. The risk event perception method based on leakage detection according to claim 2 is characterized in that: The fusion process based on the optical flow feature and the image feature specifically includes the following four steps: The convolutional neural network is used to model and analyze the dynamics of the optical flow in the two frames of images to obtain the dynamic matrix "D", which reflects the possible change trend of the target object; Match the image "I" with the previous frame image through feature matching to get the corresponding matching score, marked as "S"; Combine the dynamic matrix "D" and the score "S" to generate the feature vector "V" as the initial feature of the fusion. In this step, the size of the matrix must be consistent; Applying a predefined relationship so that the value of "C" is considered as a reasonable target area if it is within a predetermined value range ["L", "H"], that is, when "L" is less than or equal to "C" and "C" is less than "H"; Among them, the matrix "D" represents the potential motion intensity information of the target object, and "S" represents the credibility level of the target position.

4. The risk event perception method based on leakage detection according to claim 3 is characterized by: The specific operation method of adjusting the target frame also includes the following four steps: Calculate the comprehensive score "X" between the dynamic and image characteristics in each proposal area; Based on "X", use the predefined scaling factor "K" to shrink or expand the proposal boundary; To determine whether the final target box is retained, it is necessary to satisfy "Y" not less than a fixed positive value "G", where "Y" is the comprehensive score of the part of "C" corresponding to the proposal; Here "X" represents the weight of the change information in the target area on the overall features, while "Y" is used to quantify the importance of the target segment; Here "G" is determined by the experimental results, and the minimum threshold for achieving the best effect in the training set is set to "G=50".

5. The risk event perception method based on leakage detection according to claim 4 is characterized in that: Further fine-tuning for the exact target location involves four specific steps: First, based on the initially estimated region size, determine a preliminary range "M". After that, based on this range, precisely adjust the proposal region according to a specific formula "P = 5*(X + Z)", where "X" represents the original target width, "Z" represents the expected width of the adjusted target, and "P" determines the actual boundary after the final width adjustment. If "W" falls within the set error tolerance range, accept this fine-tuning. "W" is the actual width deviation index of the target box after preliminary processing, and the tolerance range is set to plus or minus N (unit: px). Among them, the selection of the error range should be based on a large number of experimental verifications to ensure the rationality of "N".

6. A risk event perception method based on leakage detection according to claim 5, characterized in that: The strategy of using a specific pooling layer with a fixed size in the target recognition stage includes the following four refinement operations: Pool the feature region according to the importance difference coefficient ratio of "A" to the background feature. Among them, the importance "A" is defined as the sum of foreground features, "Q" represents the sum of background features, and "R = A / Q" is a ratio used for evaluation to guide target cropping. Only when "R" is higher than the predetermined standard "B (0 < R < B)" is this region allowed to enter the classification. "B" is a standard value determined by testing, and it has the best effect when "R = B = 5", ensuring that the foreground is sufficiently prominent. The size of the target cropping region "C=(a*b)" follows a rule: only when it meets...

Citation Information

Cited By

  • Leakage detection model construction method, leakage detection method and device

    CN121767359A

  • Leakage detection model construction method, leakage detection method and device

    CN121767359B