Gas concentration detection method and device, computer equipment, readable storage medium and program product
By extracting the image in the power operation scene feature and segmenting the gas area, accurate detection and risk assessment of gas concentration are achieved, and the problem of unintelligent gas concentration detection in the existing technology is solved, and the safety in coal mine natural gas power generation process is improved.
Patent Information
- Application Number
- CN202411705274.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, gas concentration detection is not intelligent enough, and it is difficult to accurately and timely monitor gas concentration during complex coal mine natural gas power generation, resulting in safety hazards.
By obtaining the image to be detected taken by the target detection area in the power operation scene, feature extraction is performed, the gas area image is divided, the gas concentration is determined, and a gas concentration detection report is generated, including risk assessment and safety protection measures.
It improves the intelligence of gas concentration detection, can calculate gas concentration more accurately, conduct timely risk assessment and safety protection analysis, and ensure safety in power operation scenarios.
Smart Images

Figure CN119510689A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a gas concentration detection method, device, computer equipment, computer-readable storage medium and computer program product. Background Art
[0002] With the continuous development of science and technology, electricity consumption is getting higher and higher. Correspondingly, more electricity needs to be produced to meet the needs of social production and life. Therefore, in order to produce more electricity, it includes but is not limited to the use of wind power generation, photovoltaic power generation and coal mine natural gas power generation.
[0003] In the process of coal mine natural gas power generation, since the production process is underground operation, the natural conditions are relatively complex and there are various complex situations that are not conducive to mining. And because some mining areas are rich in gas, if the gas concentration in the mining area exceeds 1% during the mining process, it will be extremely harmful. Therefore, in the mining process, timely understanding of the gas concentration in the mining area and issuing safety warnings based on the gas concentration is one of the keys to safe mining in underground coal mines.
[0004] However, the related technology still has the problem that gas concentration detection is not intelligent enough. Summary of the invention
[0005] Based on this, it is necessary to provide a gas concentration detection method, device, computer equipment, computer-readable storage medium and computer program product that can improve the intelligence of gas concentration detection in response to the above-mentioned technical problems.
[0006] In a first aspect, the present application provides a gas concentration detection method, comprising:
[0007] Acquire an image to be detected obtained by photographing a target detection area in an electric power operation scene;
[0008] Extracting features of the image to be detected to obtain features of the image to be detected; the features of the image to be detected include at least one of image line features, image point features, image color features, image texture features, image region shape description features or moment description features;
[0009] Segmenting a gas region image in the image to be detected according to the features of the image to be detected; the gas region image is used to characterize the region corresponding to the leaked gas in the target detection region in the image to be detected;
[0010] Determining the gas concentration corresponding to the target detection area according to the gas area image;
[0011] A gas concentration detection report for the target detection area is generated according to the gas concentration corresponding to the target detection area; the gas concentration detection report includes a risk assessment and safety protection measures for the target detection area.
[0012] In one embodiment, generating a gas concentration detection report for the target detection area according to the gas concentration corresponding to the target detection area includes:
[0013] Obtaining the space type corresponding to the target detection area;
[0014] The gas concentration detection report is generated according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area.
[0015] In one embodiment, obtaining the space type corresponding to the target detection area includes:
[0016] Inputting the image to be detected into a pre-trained object detection model, and outputting background objects detected in the image to be detected;
[0017] According to the background object, identifying a nested scene architecture corresponding to the target detection area;
[0018] According to the nested scene architecture corresponding to the target detection area, a space type corresponding to the target detection area is determined.
[0019] In one of the embodiments, identifying the nested scene architecture corresponding to the target detection area according to the background object includes:
[0020] Identify a target local area of the background object in the image to be detected;
[0021] Clustering the background objects according to the spatial position relationship of the background objects in the image to be detected to obtain a background object group;
[0022] Using the area corresponding to the leaked gas in the image to be detected as the foreground area of the image to be detected;
[0023] The nested scene architecture is determined according to the foreground area, the background object group, the background object and the target local area.
[0024] In one of the embodiments, generating the gas concentration detection report according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area includes:
[0025] Generate detection event description information according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area;
[0026] Generate target prompt word information according to the detection event description information and a preset prompt word template;
[0027] The target prompt word information is input into the pre-trained large model to instruct the pre-trained large model to generate the gas concentration detection report.
[0028] In one embodiment, the step of acquiring an image to be detected obtained by photographing a target detection area in a power operation scene includes:
[0029] Acquire an initial image captured from the target detection area;
[0030] Performing noise reduction processing on the initial image to obtain a noise-reduced image;
[0031] Resampling the denoised image to optimize the image coordinate system of the denoised image to obtain a resampled image;
[0032] Performing contrast enhancement processing on the resampled image to obtain a contrast enhanced image;
[0033] Performing spatial scale representation enhancement processing on the contrast-enhanced image to obtain a spatial scale-enhanced image;
[0034] The image after the spatial scale enhancement is used as the image to be detected.
[0035] In a second aspect, the present application also provides a gas concentration detection device, comprising:
[0036] An acquisition module is used to acquire an image to be detected obtained by photographing a target detection area in a power operation scene;
[0037] An extraction module is used to extract features from the image to be detected to obtain features of the image to be detected; the features of the image to be detected include at least one of image line features, image point features, image color features, image texture features, image region shape description features or moment description features;
[0038] A segmentation module, used to segment a gas region image from the image to be detected according to the features of the image to be detected; the gas region image is used to characterize the region corresponding to the leaked gas in the target detection region in the image to be detected;
[0039] A determination module, used to determine the gas concentration corresponding to the target detection area according to the gas area image;
[0040] A generation module is used to generate a gas concentration detection report for the target detection area according to the gas concentration corresponding to the target detection area; the gas concentration detection report includes a risk assessment and safety protection measures for the target detection area.
[0041] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the above method are implemented.
[0042] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0043] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0044] The above-mentioned gas concentration detection method, device, computer equipment, computer-readable storage medium and computer program product obtain the image to be detected by photographing the target detection area in the power operation scene; extract features of the image to be detected to obtain the features of the image to be detected; the features of the image to be detected include at least one image feature of image line features, image point features, image color features, image texture features, image area shape description features or moment description features; according to the features of the image to be detected, a gas area image is segmented in the image to be detected; the gas area image is used to characterize the area corresponding to the leaked gas in the target detection area in the image to be detected; according to the gas area image, the gas concentration corresponding to the target detection area is determined; according to the gas area image, a gas concentration detection report for the target detection area is generated; the gas concentration detection report includes risk assessment and safety protection measures for the target detection area.
[0045] In this way, by extracting at least one image feature to be detected of the image to be detected, such as at least one image feature of image line features, image point features, image color features, image texture features, image area shape description features or moment description features, the gas area image can be accurately segmented in the image to be detected, so that the gas concentration corresponding to the target detection area can be more accurately calculated based on the segmented gas area image, so that the target detection area can be risk assessed and safety protection analyzed based on the gas concentration corresponding to the target detection area, and a gas concentration detection report for the target detection area can be generated, which is conducive to helping operators work more safely in power operation scenarios and improves the intelligence of gas concentration detection in power operation scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A schematic diagram of a flow chart of a gas concentration detection method in an embodiment;
[0048] Figure 2 A schematic diagram of a flow chart of steps for generating a gas concentration detection report in an embodiment;
[0049] Figure 3 is a schematic flow chart of a gas concentration detection method in another embodiment;
[0050] Figure 4 is a structural block diagram of a gas concentration detection device in an embodiment;
[0051] FIG. 5 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0054] In one embodiment, Figure 1 As shown, a method for detecting gas concentration is provided. This embodiment uses the method applied to a computer device as an example. It can be understood that the computer device can be a terminal or a system including a terminal and a server. In this embodiment, the method includes the following steps:
[0055] Step S110, obtaining an image to be detected by photographing a target detection area in a power operation scene.
[0056] Among them, the power operation scene can be a coal mine operation scene.
[0057] The target detection area may be an area where gas concentration detection is required.
[0058] The image to be detected may be an optical remote sensing image.
[0059] In a specific implementation, the computer device can obtain an image captured by an image acquisition device on a target detection area in a power operation scene as an image to be detected.
[0060] Exemplarily, the image to be detected may be pre-stored in a storage unit of a computer device, and when it is necessary to perform gas concentration detection on a target detection area, the image to be detected corresponding to the target detection area is obtained from the storage unit.
[0061] Step S120, extracting features from the image to be detected to obtain features of the image to be detected.
[0062] In a specific implementation, the computer device may perform feature extraction on the image to be detected, and obtain image features corresponding to the image to be detected as the features of the image to be detected.
[0063] The image features to be detected include at least one of image line features, image point features, image color features, image texture features, image region shape description features or moment description features.
[0064] The image line features may include at least one of boundary features and ridge features.
[0065] The image point features may include at least one of corner point features and spot features.
[0066] The image color feature may include at least one color feature of intensity, non-uniformity, asymmetry, and color histogram.
[0067] The image texture features may include at least one of contrast, uniformity, energy, correlation, entropy, and spectrum.
[0068] Among them, the image region shape description features may include at least one region shape feature of area, center of mass, eccentricity, rectangularity, circularity, sphericity, flatness, fluffiness, density, maximum diameter, main axis direction, inscribed, circumscribed, quadtree, and topology.
[0069] The moment description feature may include at least one of the origin moment, center moment, Hu invariant moment, and Zernike moment.
[0070] Step S130, segmenting a gas region image from the image to be detected according to the features of the image to be detected.
[0071] The gas region image is used to characterize the region corresponding to the leaked gas in the target detection region in the image to be detected.
[0072] The leaked gas may be methane gas. In the coal mine operation scene, there are rock formations containing methane gas, which will release methane gas.
[0073] In a specific implementation, the computer device can segment the gas region image in the image to be detected according to the features of the image to be detected. Specifically, the computer device can detect the region where the gas is located in the image to be detected according to the features of the image to be detected, and segment the region where the gas is located as the gas region image.
[0074] Step S140, determining the gas concentration corresponding to the target detection area according to the gas area image.
[0075] In a specific implementation, the computer device can determine the gas concentration corresponding to the target detection area based on the gas area image.
[0076] Specifically, the gas concentration corresponding to the target detection area can be determined according to the grayscale value of the gas area image.
[0077] Step S150, generating a gas concentration detection report for the target detection area according to the gas concentration corresponding to the target detection area.
[0078] Among them, the gas concentration detection report includes risk assessment and safety protection measures for the target detection area.
[0079] In a specific implementation, the computer equipment can evaluate the impact on coal mine safety based on the gas concentration corresponding to the target detection area, and propose safety protection measures based on the detection results to generate a gas concentration detection report for the target detection area.
[0080] For example, the computer equipment compares the detected gas concentration with the relevant concentration threshold. If the gas concentration is higher than the concentration threshold, a risk assessment is required.
[0081] In the above-mentioned gas concentration detection method, an image to be detected is obtained by photographing a target detection area in an electric power operation scene; feature extraction is performed on the image to be detected to obtain features of the image to be detected; the features of the image to be detected include at least one of image line features, image point features, image color features, image texture features, image area shape description features or moment description features; a gas area image is segmented from the image to be detected according to the features of the image to be detected; the gas area image is used to characterize the area corresponding to the leaked gas in the target detection area in the image to be detected; based on the gas area image, the gas concentration corresponding to the target detection area is determined; based on the gas concentration corresponding to the target detection area, a gas concentration detection report for the target detection area is generated; the gas concentration detection report includes risk assessment and safety protection measures for the target detection area.
[0082] In this way, by extracting at least one image feature to be detected of the image to be detected, such as at least one image feature of image line features, image point features, image color features, image texture features, image area shape description features or moment description features, the gas area image can be accurately segmented in the image to be detected, so that the gas concentration corresponding to the target detection area can be more accurately calculated based on the segmented gas area image, so that the target detection area can be risk assessed and safety protection analyzed based on the gas concentration corresponding to the target detection area, and a gas concentration detection report for the target detection area can be generated, which is conducive to helping operators work more safely in power operation scenarios and improves the intelligence of gas concentration detection in power operation scenarios.
[0083] In one embodiment, Figure 2 As shown, step S150, generating a gas concentration detection report for the target detection area according to the gas concentration corresponding to the target detection area, includes the following steps:
[0084] Step S210, obtaining the space type corresponding to the target detection area.
[0085] In a specific implementation, when the computer device generates a gas concentration detection report for the target detection area according to the gas concentration corresponding to the target detection area, the computer device can obtain the space type corresponding to the target detection area. For example, different space types are divided according to different characteristics such as ventilation conditions, degree of confinement, and flow of workers. For example, the space type can be a narrow and confined space, an open space, etc.
[0086] Step S220, generating a gas concentration detection report according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area.
[0087] In a specific implementation, the computer device can generate a gas concentration detection report based on the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area.
[0088] Specifically, for risk assessment, computer equipment can evaluate the potential threat of gas concentration in different areas to the mining working environment based on the space type. For example, gas may accumulate more easily in a small space, thereby increasing the risk. In a narrow and confined space, when the gas concentration reaches a certain threshold (such as below 1% is safe, 1% to 2% is a warning, and more than 2% requires evacuation), it may lead to an increased risk of suffocation or explosion. Exemplarily, different risk level corresponding assessment standards can be formulated according to different space types. In this way, the computer equipment can obtain the corresponding risk level assessment standard according to the space type corresponding to the target detection area, and determine the risk level corresponding to the target detection area based on the corresponding risk level assessment standard and the gas concentration corresponding to the target detection area.
[0089] For safety protection measures, measures can be formulated according to the risk level, for example:
[0090] Low risk:
[0091] Routine monitoring and regular inspections.
[0092] Medium risk:
[0093] Strengthen ventilation, add monitors, and regularly analyze gas concentration data.
[0094] High risk:
[0095] Establish an emergency response mechanism, set up evacuation procedures, and equip personal protective equipment (such as oxygen cylinders).
[0096] Very high risk:
[0097] Stop operations immediately, implement full evacuation, and conduct environmental rectification and risk assessment.
[0098] In this way, the computer equipment can form a gas concentration detection report based on the risk assessment results and safety protection measures. The gas concentration detection report can specifically include the gas concentration detection results, space type, determined safety risk level and corresponding safety protection measures.
[0099] For example, the gas concentration detection report may include the following contents:
[0100] Gas concentration test results:
[0101] Target detection area A: 0.5% (low risk);
[0102] Target detection area B: 1.5% (medium risk);
[0103] Target detection area C: 2.5% (high risk).
[0104] Corresponding space type:
[0105] A: Open space;
[0106] B: narrow space;
[0107] C: Confined space.
[0108] Output safety protection measures:
[0109] For target detection area A, routine monitoring is recommended; for target detection area B, it is recommended to increase ventilation and monitoring frequency; for target detection area C on the working face, it is recommended to immediately stop work, evacuate personnel, and make environmental rectifications.
[0110] The technical solution of this embodiment obtains the space type corresponding to the target detection area; generates a gas concentration detection report according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area. In this way, according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area, a risk assessment analysis can be carried out on the target detection area in a targeted manner, and corresponding safety protection measures can be formulated to generate a gas concentration detection report, thereby ensuring safety during the operation.
[0111] In one embodiment, obtaining the spatial type corresponding to the target detection area includes: inputting the image to be detected into a pre-trained target detection model, and outputting the background objects detected in the image to be detected; identifying the nested scene system structure corresponding to the target detection area based on the background objects; and determining the spatial type corresponding to the target detection area based on the nested scene system structure corresponding to the target detection area.
[0112] The background object may be an object in the background of the image to be detected.
[0113] The foreground of the image to be detected may be a gas area.
[0114] The background objects may include but are not limited to workers, vehicles, mine entrances, rocks, etc.
[0115] In a specific implementation, when a computer device is in the process of obtaining the spatial type corresponding to a target detection area, the computer device may input the image to be detected into a pre-trained target detection model, output the background objects detected in the image to be detected, and identify the nested scene architecture corresponding to the target detection area based on the background objects, thereby determining the spatial type corresponding to the target detection area based on the nested scene architecture corresponding to the target detection area.
[0116] Specifically, the computer device may determine the space type corresponding to the target detection area based on the identified nested scene architecture and the category and position of the background object. For example, the space type may include:
[0117] Working face: The area where the main mining operations are carried out, usually with mining equipment and operators.
[0118] Ventilation Shaft: An area used for ventilation, usually containing ventilation equipment and related facilities.
[0119] Tunnel: A passage within a mine, usually with support structures and transport channels.
[0120] In this way, by identifying the nested scene architecture corresponding to the target detection area, rich contextual information can be provided for the target detection area. By identifying background objects and their relationships, the function and purpose of the target detection area can be better determined, thereby more accurately determining the space type corresponding to the target detection area.
[0121] In some embodiments, a nested scene architecture corresponding to a target detection area is identified based on background objects, including: identifying a target local area of the background object in the image to be detected; clustering each background object according to the spatial position relationship of each background object in the image to be detected to obtain a background object group; using the area corresponding to the leaking gas in the image to be detected as the foreground area of the image to be detected; and determining a nested scene architecture based on the foreground area, the background object group, the background object and the target local area.
[0122] The target local area may be a salient object part on the background object.
[0123] In a specific implementation, when a computer device identifies a nested scene architecture corresponding to a target detection area based on background objects, the computer device can identify a target local area of the background object in the image to be detected; cluster each background object according to the spatial position relationship of each background object in the image to be detected to obtain a background object group; for example, a group of people or objects are usually aggregated into a background object group; the area corresponding to the leaking gas in the image to be detected, that is, the gas area in the image to be detected, is used as the foreground area of the image to be detected; and the nested scene architecture is determined based on the foreground area, the background object group, the single background object and the target local area.
[0124] In this way, by dividing the scene into layers (foreground, background object group, single background object or salient object part), different levels of information can be analyzed. For example, the distribution of devices can be analyzed at the object group level, and the status of each device can be analyzed at the single object level. This multi-level analysis helps to fully understand the dynamic changes of the scene.
[0125] In some embodiments, a gas concentration detection report is generated according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area, including: generating detection event description information according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area; generating target prompt word information according to the detection event description information and a preset prompt word template; and inputting the target prompt word information into a pre-trained large model to instruct the pre-trained large model to generate a gas concentration detection report.
[0126] Among them, the preset prompt word template can be a Prompt template of a pre-trained large model.
[0127] Among them, Prompt is an instruction, question or sentence that can be used to guide or instruct a language model to generate specific text output. Prompt is the starting point for users to interact with language models. It tells the model the user's intention and expects the model to respond in a meaningful and relevant way.
[0128] In a specific implementation, the computer device can generate detection event description information according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area, and the detection event description information records the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area. In this way, the computer device can generate target prompt word information according to the detection event description information and the preset prompt word template, and input the target prompt word information into the pre-trained large model to instruct the pre-trained large model to generate a gas concentration detection report.
[0129] For example, if the gas concentration is 3.5% methane and the space type is a working face, the detection event description information may be: "A gas concentration of 3.5% was detected in the working face area, rising to the warning line. Timely measures must be taken." The preset prompt word template may be: "Attention: Air quality problems of [gas concentration] were found in the [space type] area. Please assess the risks and take measures!" The detection event description information is combined with the prompt word template to generate the target prompt word information: "Attention: Air quality problems of 3.5% were found in the working face area. Please assess the risks and take measures!"
[0130] The technical solution of this embodiment generates detection event description information according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area; generates target prompt word information according to the detection event description information and the preset prompt word template; and inputs the target prompt word information into the pre-trained large model to instruct the pre-trained large model to generate a gas concentration detection report. In this way, the detection event description information can be generated according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area, and the detection event description information can be combined with the preset prompt word template to generate the target prompt word information, so as to call the pre-trained large model to analyze the gas concentration of the target detection area according to the gas concentration and the space type, and output the corresponding gas concentration detection report, thereby improving the intelligence of the gas concentration detection of the target detection area.
[0131] In one embodiment, an image to be detected obtained by photographing a target detection area in an electric power operation scene includes: obtaining an initial image obtained by photographing the target detection area; performing noise reduction processing on the initial image to obtain a noise-reduced image; resampling the noise-reduced image to optimize the image coordinate system of the noise-reduced image to obtain a resampled image; performing contrast enhancement processing on the resampled image to obtain a contrast-enhanced image; performing spatial scale representation enhancement processing on the contrast-enhanced image to obtain a spatial scale-enhanced image; and using the spatial scale-enhanced image as the image to be detected.
[0132] In a specific implementation, when a computer device is acquiring an image to be detected obtained by photographing a target detection area in a power operation scene, the computer device may acquire an initial image photographed in the target detection area, and perform noise reduction processing on the initial image to remove random noise in the initial image so as to reduce the introduction of false information and obtain a noise-reduced image; then, the noise-reduced image is resampled to optimize the image coordinate system of the noise-reduced image to obtain a resampled image; then, the resampled image is contrast enhanced to improve visibility of important features in the image to ensure that required relevant information can be retrieved and obtain a contrast-enhanced image; thus, the contrast-enhanced image is spatially scaled to enhance local structure and obtain a spatially scale-enhanced image; thus, the spatially scale-enhanced image can be used as the image to be detected.
[0133] It is understandable that, in practical applications, the preprocessing methods of noise reduction, resampling, contrast enhancement and spatial scale representation enhancement can also be performed in other orders to obtain the image to be detected.
[0134] The technical solution of this embodiment is to obtain an initial image obtained by shooting the target detection area; perform noise reduction processing on the initial image to obtain a noise-reduced image; perform resampling processing on the noise-reduced image to optimize the image coordinate system of the noise-reduced image to obtain a resampled image; perform contrast enhancement processing on the resampled image to obtain a contrast-enhanced image; perform spatial scale representation enhancement processing on the contrast-enhanced image to obtain a spatial scale-enhanced image; and use the spatial scale-enhanced image as the image to be detected. In this way, the quality and information content of the image to be detected are improved, and the accuracy and efficiency of subsequent detection are improved.
[0135] In another embodiment, Figure 3 As shown, a gas concentration detection method is provided, which is described by taking the method applied to a computer device as an example, and includes the following steps:
[0136] Step S302: acquiring an image to be detected by photographing a target detection area in a power operation scene.
[0137] Step S304: extract features from the image to be detected to obtain features of the image to be detected.
[0138] Step S306, segmenting a gas region image from the image to be detected according to the features of the image to be detected.
[0139] Step S308, determining the gas concentration corresponding to the target detection area according to the gas area image.
[0140] Step S310: input the image to be detected into a pre-trained target detection model, and output the background objects detected in the image to be detected.
[0141] Step S312, identifying the target local area of the background object in the image to be detected.
[0142] Step S314: clustering the background objects according to their spatial positional relationship in the image to be detected to obtain a background object group.
[0143] Step S316: taking the area corresponding to the leaked gas in the image to be detected as the foreground area of the image to be detected.
[0144] Step S318, determining a nested scene system structure according to the foreground area, the background object group, the background object and the target local area.
[0145] Step S320: determining the space type corresponding to the target detection area according to the nested scene architecture corresponding to the target detection area.
[0146] Step S322, generating a gas concentration detection report according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area.
[0147] It should be noted that the specific limitations of the above steps can refer to the specific limitations of a gas concentration detection method mentioned above.
[0148] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0149] Based on the same inventive concept, the embodiment of the present application also provides a gas concentration detection device for implementing the gas concentration detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations of one or more gas concentration detection device embodiments provided below can refer to the limitations of the gas concentration detection method above, and will not be repeated here.
[0150] In an exemplary embodiment, Figure 4 As shown, a gas concentration detection device is provided, including: an acquisition module 410, an extraction module 420, a segmentation module 430, a determination module 440 and a generation module 450, wherein:
[0151] The acquisition module 410 is used to acquire the image to be detected obtained by photographing the target detection area in the power operation scene.
[0152] The extraction module 420 is used to extract features of the image to be detected to obtain features of the image to be detected; the features of the image to be detected include at least one of image line features, image point features, image color features, image texture features, image area shape description features or moment description features.
[0153] The segmentation module 430 is used to segment a gas region image in the image to be detected according to the features of the image to be detected; the gas region image is used to characterize the region corresponding to the leaked gas in the target detection region in the image to be detected.
[0154] The determination module 440 is used to determine the gas concentration corresponding to the target detection area according to the gas area image.
[0155] The generation module 450 is used to generate a gas concentration detection report for the target detection area according to the gas concentration corresponding to the target detection area; the gas concentration detection report includes a risk assessment and safety protection measures for the target detection area.
[0156] In one of the embodiments, the generating module 450 is specifically used to obtain the space type corresponding to the target detection area; and generate the gas concentration detection report according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area.
[0157] In one embodiment, the generation module 450 is specifically used to input the image to be detected into a pre-trained target detection model, and output the background objects detected in the image to be detected; based on the background objects, identify the nested scene architecture corresponding to the target detection area; and determine the space type corresponding to the target detection area based on the nested scene architecture corresponding to the target detection area.
[0158] In one of the embodiments, the generation module 450 is specifically used to identify the target local area of the background object in the image to be detected; cluster each background object according to the spatial position relationship of each background object in the image to be detected to obtain a background object group; use the area corresponding to the leaked gas in the image to be detected as the foreground area of the image to be detected; and determine the nested scene system structure based on the foreground area, the background object group, the background object and the target local area.
[0159] In one embodiment, the generation module 450 is specifically used to generate detection event description information according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area; generate target prompt word information according to the detection event description information and a preset prompt word template; and input the target prompt word information into a pre-trained large model to instruct the pre-trained large model to generate the gas concentration detection report.
[0160] In one embodiment, the acquisition module 410 is specifically used to acquire an initial image obtained by photographing the target detection area; perform noise reduction processing on the initial image to obtain a noise-reduced image; perform resampling processing on the noise-reduced image to optimize the image coordinate system of the noise-reduced image to obtain a resampled image; perform contrast enhancement processing on the resampled image to obtain a contrast-enhanced image; perform spatial scale representation enhancement processing on the contrast-enhanced image to obtain a spatial scale-enhanced image; and use the spatial scale-enhanced image as the image to be detected.
[0161] Each module in the above-mentioned gas concentration detection device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0162] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG5. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a gas concentration detection method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0163] Those skilled in the art will understand that the structure shown in FIG. 5 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0164] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0165] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0166] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0167] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0168] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0169] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0170] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for detecting gas concentration, characterized in that: The method comprises: Acquire an image to be detected obtained by photographing a target detection area in an electric power operation scene; Extracting features of the image to be detected to obtain features of the image to be detected; the features of the image to be detected include at least one of image line features, image point features, image color features, image texture features, image region shape description features or moment description features; Segmenting a gas region image in the image to be detected according to the features of the image to be detected; the gas region image is used to characterize the region corresponding to the leaked gas in the target detection region in the image to be detected; Determining the gas concentration corresponding to the target detection area according to the gas area image; A gas concentration detection report for the target detection area is generated according to the gas concentration corresponding to the target detection area; the gas concentration detection report includes a risk assessment and safety protection measures for the target detection area.
2. The method according to claim 1, characterized in that The generating a gas concentration detection report for the target detection area according to the gas concentration corresponding to the target detection area includes: Obtaining the space type corresponding to the target detection area; The gas concentration detection report is generated according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area.
3. The method according to claim 2, characterized in that The acquiring the space type corresponding to the target detection area includes: Inputting the image to be detected into a pre-trained object detection model, and outputting background objects detected in the image to be detected; According to the background object, identifying a nested scene architecture corresponding to the target detection area; According to the nested scene architecture corresponding to the target detection area, a space type corresponding to the target detection area is determined.
4. The method according to claim 3, characterized in that The step of identifying the nested scene architecture corresponding to the target detection area according to the background object comprises: Identify a target local area of the background object in the image to be detected; Clustering the background objects according to the spatial position relationship of the background objects in the image to be detected to obtain a background object group; Using the area corresponding to the leaked gas in the image to be detected as the foreground area of the image to be detected; The nested scene architecture is determined according to the foreground area, the background object group, the background object and the target local area.
5. The method according to claim 2, characterized in that: The generating the gas concentration detection report according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area includes: Generate detection event description information according to the gas concentration corresponding to the target detection area and the space type corresponding to the target detection area; Generate target prompt word information according to the detection event description information and a preset prompt word template; The target prompt word information is input into the pre-trained large model to instruct the pre-trained large model to generate the gas concentration detection report.
6. The method according to claim 1, characterized in that The step of acquiring the image to be detected obtained by photographing the target detection area in the power operation scene includes: Acquire an initial image captured from the target detection area; Performing noise reduction processing on the initial image to obtain a noise-reduced image; Resampling the denoised image to optimize the image coordinate system where the denoised image is located, to obtain a resampled image; Performing contrast enhancement processing on the resampled image to obtain a contrast enhanced image; Performing spatial scale representation enhancement processing on the contrast-enhanced image to obtain a spatial scale-enhanced image; The image after the spatial scale enhancement is used as the image to be detected.
7. A gas concentration detection device, characterized in that: The device comprises: An acquisition module is used to acquire an image to be detected obtained by photographing a target detection area in a power operation scene; An extraction module is used to extract features from the image to be detected to obtain features of the image to be detected; the features of the image to be detected include at least one of image line features, image point features, image color features, image texture features, image region shape description features or moment description features; A segmentation module, used to segment a gas region image from the image to be detected according to the features of the image to be detected; the gas region image is used to characterize the region corresponding to the leaked gas in the target detection region in the image to be detected; A determination module, used to determine the gas concentration corresponding to the target detection area according to the gas area image; A generation module is used to generate a gas concentration detection report for the target detection area according to the gas concentration corresponding to the target detection area; the gas concentration detection report includes a risk assessment and safety protection measures for the target detection area.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Intelligent gas detection method based on double-branch inference mechanism
CN112767342A
Infrared detection method for oil and gas leakage
CN114897812A
Combustible gas leakage area detection method based on AI algorithm
CN116152724A
Gas leakage detection method and device, electronic equipment and storage medium
CN118096634A
Gas leakage detection method and device, electronic equipment and storage medium
CN118654815A
Cited By
Wellhead chromatographic analysis and leakage identification device and method
CN121024586A