Gas leakage determination method, leakage determination model training method and device
By collecting environmental information and sound signals at the gas leakage location, and using the noise comparison loss training model to remove noise characteristics and extract leakage quantity characteristics, the problem of low accuracy in determining gas leakage quantity in the prior art is solved, and a higher Accuracy.
Patent Information
- Application Number
- CN202411613790.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-11-13
AI Technical Summary
The prior art is difficult to accurately determine the amount of gas leakage, especially when the noise in the acoustic signal caused by turbulence caused by pipeline leakage is large, with large errors and low accuracy.
By obtaining the environmental information of the gas leakage location and nearby sound signals, inputting them into the pre-trained leakage determination model, using noise comparison loss training model, removing noise characteristics, extracting leakage characteristics, and then determining the gas leakage.
It improves the accuracy of determining gas leakage, reduces errors, and can more accurately reflect the impact of environmental information on gas leakage sound signals.
Smart Images

Figure CN119146373B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of gas detection technology, and in particular to a method for determining gas leakage, and a method and device for training a leakage determination model. Background Art
[0002] In industrial production, gas leaks may occur in pipelines used to transport gas, which will cause safety hazards and bring economic losses. In order to formulate corresponding treatment strategies, it is usually necessary to determine the amount of gas leakage. Since the leakage diameter of the pipeline is often small, there will be a pressure difference between the inside and outside of the pipeline, which will cause turbulence when the gas leaks. Turbulence will stimulate specific sound information. Therefore, it is theoretically feasible to determine the amount of gas leakage through sound signals.
[0003] However, the sound signal in the low frequency band includes a large amount of noise, so the collected sound signal will contain more noise signals. The error will be large and the accuracy will be low when determining the gas leakage amount through the collected sound signal. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method for determining gas leakage, a method and device for training a leakage determination model, so as to improve the accuracy of gas leakage determination. The specific technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for determining a gas leakage amount, the method comprising:
[0006] Acquiring environmental information of a gas leakage location and sound signals collected near the gas leakage location;
[0007] Inputting the sound signal and the environmental information into a pre-trained leakage determination model, so that the leakage determination model determines fusion information based on the sound signal and the environmental information, removes noise features from the fusion information, obtains leakage features, and determines the gas leakage amount according to the leakage features and the environmental information, wherein the leakage features characterize the characteristics of the sound signal generated by the gas leakage under the influence of the environmental information;
[0008] Among them, the leakage amount determination model is obtained by training at least based on noise contrast loss, and the noise contrast loss is determined based on the difference in sample noise characteristics in sample fusion information corresponding to two groups of samples included in the sample pair. The two groups of samples included in the sample pair are collected under the same environmental noise, and each group of samples includes a sample sound signal and sample environmental information.
[0009] Optionally, the leakage amount determination model includes a sound signal encoder, an environmental information encoder and a fusion module;
[0010] The step of inputting the sound signal and the environmental information into a pre-trained leakage determination model so that the leakage determination model determines fusion information based on the sound signal and the environmental information, and removing noise features from the fusion information to obtain leakage features includes:
[0011] Inputting the sound signal into the sound signal encoder so that the sound signal encoder encodes the sound signal to obtain a sound coding feature, and inputting the sound coding feature into the fusion module;
[0012] Inputting the environmental information into the environmental information encoder so that the environmental information encoder encodes the environmental information to obtain environmental coding features, and inputting the environmental coding features into the fusion module;
[0013] The fusion module fuses the sound coding feature and the environment coding feature to obtain a fusion feature vector;
[0014] The noise feature included in the fused feature vector is removed to obtain the leakage feature.
[0015] Optionally, the step of removing the noise feature included in the fused feature vector to obtain the leakage feature includes:
[0016] The fused feature vector is segmented according to a preset segmentation method to obtain a first sub-vector and a second sub-vector, and the second sub-vector is removed, wherein the first sub-vector is related to the leakage feature, and the second sub-vector is related to the noise feature.
[0017] Optionally, the step of determining the gas leakage amount according to the leakage amount characteristics and the environmental information includes:
[0018] splicing the first sub-vector and the environmental coding feature to obtain a spliced vector;
[0019] Based on the splicing vector and the corresponding relationship between the sample splicing vector and the leakage amount learned by the leakage amount determination model during the training process, the gas leakage amount is output.
[0020] Optionally, the step of obtaining environmental information of the gas leakage location includes:
[0021] Acquire the ultrasonic echo signal collected by the ultrasonic sensor; or,
[0022] A temperature signal collected by a temperature sensor is obtained, and / or a humidity signal collected by a humidity sensor is obtained.
[0023] In a second aspect, an embodiment of the present application provides a method for training a leakage determination model, the method comprising:
[0024] Acquire multiple sample pairs and gas leakage labels corresponding to the samples included in the multiple sample pairs, wherein each sample pair includes two groups of samples collected under the same environmental noise, and each group of samples includes a sample sound signal and sample environmental information;
[0025] For each group of samples, the group of samples is input into an initial leakage determination model, so that the initial leakage determination model determines sample fusion information based on the sample sound signals and sample environmental information included in the group of samples, separates sample noise features and sample leakage features from the sample fusion information, and determines the predicted gas leakage according to the sample leakage features and the sample environmental information, wherein the sample leakage features characterize the characteristics of the sample sound signals generated by the gas leakage under the influence of the sample environmental information;
[0026] According to the difference between the predicted gas leakage amount corresponding to each group of samples and the gas leakage amount label, and the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair, the parameters of the initial leakage amount determination model are adjusted until the initial leakage amount determination model meets the convergence condition, thereby obtaining the leakage amount determination model.
[0027] Optionally, the step of adjusting the parameters of the initial leakage determination model according to the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label, and the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair, comprises:
[0028] Determine the noise contrast loss corresponding to each sample pair according to the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair;
[0029] The parameters of the initial leakage determination model are adjusted in order to reduce the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label and reduce the noise contrast loss corresponding to each sample pair as the optimization direction.
[0030] Optionally, the initial leakage amount determination model includes a sound signal encoder, an environmental information encoder and a fusion module;
[0031] The step of inputting the group of samples into the initial leakage determination model so that the initial leakage determination model determines sample fusion information based on the sample sound signals and sample environment information included in the group of samples, and separating the sample noise features and the sample leakage features from the sample fusion information includes:
[0032] The group of samples is input into the initial leakage amount determination model, so that the sound signal encoder encodes the sample sound signals included in the group of samples to obtain sample sound coding features, and the sample sound coding features are input into the fusion module, and the environment information encoder encodes the sample environment information included in the group of samples to obtain sample environment coding features, and the sample environment coding features are input into the fusion module;
[0033] The fusion module performs fusion processing on the sample sound coding features and the sample environment coding features corresponding to the group of samples to obtain a sample fusion feature vector;
[0034] A sample noise feature and a sample leakage feature are separated from the sample fusion feature vector.
[0035] Optionally, the step of separating the sample noise feature and the sample leakage feature from the sample fusion feature vector includes:
[0036] The sample fusion feature vector is segmented according to a preset segmentation method to obtain a sample first sub-vector and a sample second sub-vector, wherein the sample first sub-vector is related to the sample leakage feature, and the sample second sub-vector is related to the sample noise feature.
[0037] Optionally, the step of determining the predicted gas leakage amount according to the sample leakage amount characteristics and the sample environment information includes:
[0038] Splicing the sample first sub-vector and the sample environment coding feature to obtain a sample splicing vector;
[0039] Based on the sample splicing vector and the initial leakage amount, the corresponding relationship between the sample splicing vector currently learned by the model and the leakage amount is determined, and the predicted gas leakage amount is output.
[0040] In a third aspect, an embodiment of the present application provides a device for determining gas leakage, the device comprising:
[0041] A signal acquisition module, used to acquire environmental information of a gas leakage location and sound signals collected near the gas leakage location;
[0042] a leakage determination module, configured to input the sound signal and the environmental information into a pre-trained leakage determination model, so that the leakage determination model determines fusion information based on the sound signal and the environmental information, removes noise features from the fusion information, obtains leakage features, and determines the gas leakage amount according to the leakage features and the environmental information, wherein the leakage features characterize the characteristics of the sound signal generated by the gas leakage under the influence of the environmental information;
[0043] Among them, the leakage amount determination model is obtained by training at least based on noise contrast loss, and the noise contrast loss is determined based on the difference in sample noise characteristics in sample fusion information corresponding to two groups of samples included in the sample pair. The two groups of samples included in the sample pair are collected under the same environmental noise, and each group of samples includes a sample sound signal and sample environmental information.
[0044] Optionally, the leakage amount determination model includes a sound signal encoder, an environmental information encoder and a fusion module;
[0045] The leakage amount determination module comprises:
[0046] A sound signal encoding submodule, used for inputting the sound signal into the sound signal encoder, so that the sound signal encoder encodes the sound signal to obtain a sound encoding feature, and inputting the sound encoding feature into the fusion module;
[0047] An environmental signal encoding submodule, used for inputting the environmental information into the environmental information encoder, so that the environmental information encoder encodes the environmental information to obtain environmental coding features, and inputting the environmental coding features into the fusion module;
[0048] A fusion feature vector determination submodule is used for the fusion module to fuse the sound coding feature and the environment coding feature to obtain a fusion feature vector;
[0049] The leakage feature determination submodule is used to remove the noise feature included in the fused feature vector to obtain the leakage feature.
[0050] Optionally, the leakage characteristic determination submodule includes:
[0051] The vector segmentation submodule is used to segment the fused feature vector according to a preset segmentation method to obtain a first subvector and a second subvector, and remove the second subvector, wherein the first subvector is related to the leakage feature and the second subvector is related to the noise feature.
[0052] Optionally, the leakage amount determination module further includes:
[0053] A vector splicing submodule, used for splicing the first sub-vector and the environmental coding feature to obtain a splicing vector;
[0054] The gas leakage determination submodule is used to output the gas leakage amount based on the splicing vector and the corresponding relationship between the sample splicing vector and the leakage amount learned by the leakage determination model during the training process.
[0055] Optionally, the signal acquisition module includes:
[0056] A first signal acquisition module, used to acquire an ultrasonic echo signal collected by an ultrasonic sensor;
[0057] The second signal acquisition module is used to acquire a temperature signal acquired by a temperature sensor and / or a humidity signal acquired by a humidity sensor.
[0058] In a fourth aspect, an embodiment of the present application provides a training device for a leakage determination model, the device comprising:
[0059] A sample signal acquisition module, used to acquire a plurality of sample pairs and gas leakage labels corresponding to the samples included in the plurality of sample pairs, wherein each sample pair includes two groups of samples collected under the same environmental noise, and each group of samples includes a sample sound signal and sample environmental information;
[0060] A leakage prediction module is used for inputting each group of samples into an initial leakage determination model, so that the initial leakage determination model determines sample fusion information based on the sample sound signals and sample environmental information included in the group of samples, separates sample noise characteristics and sample leakage characteristics from the sample fusion information, and determines the predicted gas leakage according to the sample leakage characteristics and the sample environmental information, wherein the sample leakage characteristics characterize the characteristics of the sample sound signals generated by the gas leakage under the influence of the sample environmental information;
[0061] A parameter adjustment module is used to adjust the parameters of the initial leakage determination model according to the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label, and the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair, until the initial leakage determination model meets the convergence condition, thereby obtaining the leakage determination model.
[0062] Optionally, the parameter adjustment module includes:
[0063] A noise contrast loss determination submodule, used to determine the noise contrast loss corresponding to each sample pair according to the difference between the sample noise features corresponding to the two groups of samples included in each sample pair;
[0064] A parameter adjustment submodule, configured to adjust the parameters of the initial leakage determination model in such a way that the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label is reduced, and the noise contrast loss corresponding to each sample pair is reduced as an optimization direction;
[0065] The initial leakage amount determination model includes a sound signal encoder, an environmental information encoder and a fusion module.
[0066] Optionally, the leakage prediction module includes:
[0067] The sample signal encoding submodule is used to input the group of samples into the initial leakage amount determination model, so that the sound signal encoder encodes the sample sound signals included in the group of samples to obtain sample sound encoding features, and inputs the sample sound encoding features into the fusion module, and the environment information encoder encodes the sample environment information included in the group of samples to obtain sample environment encoding features, and inputs the sample environment encoding features into the fusion module;
[0068] A sample fusion feature vector determination submodule is used for the fusion module to fuse the sample sound coding features and the sample environment coding features corresponding to the group of samples to obtain a sample fusion feature vector;
[0069] The sample leakage feature determination submodule is used to separate the sample noise feature and the sample leakage feature from the sample fusion feature vector.
[0070] Optionally, the sample leakage characteristic determination submodule includes:
[0071] A vector segmentation unit is used to segment the sample fusion feature vector according to a preset segmentation method to obtain a sample first sub-vector and a sample second sub-vector, wherein the sample first sub-vector is related to the sample leakage feature, and the sample second sub-vector is related to the sample noise feature.
[0072] Optionally, the leakage prediction module further includes:
[0073] A sample vector splicing submodule, used to splice the sample first subvector and the sample environment coding feature to obtain a sample splicing vector;
[0074] The gas leakage prediction submodule is used to determine the correspondence between the sample splicing vector currently learned by the model and the leakage amount based on the sample splicing vector and the initial leakage amount, and output the predicted gas leakage amount.
[0075] In a fifth aspect, an embodiment of the present application provides an electronic device, including:
[0076] Memory, used to store computer programs;
[0077] The processor is used to implement any method described in the first aspect or any method described in the second aspect when executing a program stored in the memory.
[0078] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspect or any one of the second aspect is implemented.
[0079] Beneficial effects of the embodiments of the present application:
[0080] In the solution provided by the embodiment of the present application, the electronic device can obtain the environmental information of the gas leakage location and the sound signal collected near the gas leakage location; input the sound signal and the environmental information into the pre-trained leakage determination model, so that the leakage determination model determines the fusion information based on the sound signal and the environmental information, removes the noise feature from the fusion information, obtains the leakage feature, and determines the gas leakage according to the leakage feature and the environmental information, and the leakage feature characterizes the characteristics of the sound signal generated by the gas leakage under the influence of the environmental information; wherein the leakage determination model is at least trained based on the noise contrast loss, the noise contrast loss is determined based on the difference of the sample noise features in the sample fusion information corresponding to the two groups of samples included in the sample pair, and the two groups of samples included in the sample pair are collected under the same environmental noise, and each group of samples includes the sample sound signal and the sample environmental information. Since the two groups of samples included in the sample pair are collected under the same environmental noise, the difference in the sample noise features in the sample fusion information corresponding to the two groups of samples is small. By introducing the noise contrast loss in the training process and adjusting the parameters of the initial leakage determination model in the direction of reducing the noise contrast loss, the trained leakage determination model can accurately extract the environmental noise. When applying the leakage determination model, the leakage determination model can determine the fusion information based on the environmental information and sound signal of the gas leakage location, and the fusion information contains both the leakage characteristics and the noise characteristics. The leakage determination model can accurately remove the noise characteristics contained in the fusion information to obtain accurate leakage characteristics. In this way, the gas leakage determined based on the leakage characteristics and environmental information is also more accurate, which can improve the accuracy of the gas leakage determination. Of course, implementing any product or method of the present application does not necessarily require all of the advantages described above to be achieved at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0082] Figure 1 A flow chart of a method for determining gas leakage provided in an embodiment of the present application;
[0083] Figure 2 Based on Figure 1 A schematic diagram of the turbulence phenomenon of the illustrated embodiment;
[0084] Figure 3 for Figure 1 A specific flow chart of step S102 in the illustrated embodiment;
[0085] Figure 4 for Figure 1 Another specific flow chart of step S102 in the illustrated embodiment;
[0086] Figure 5 A flowchart of a method for training a leakage determination model provided in an embodiment of the present application;
[0087] Figure 6 for Figure 5 A specific flow chart of step S503 in the illustrated embodiment;
[0088] Figure 7 for Figure 5 A specific flow chart of step S502 in the illustrated embodiment;
[0089] Figure 8 for Figure 5 Another specific flow chart of step S502 in the illustrated embodiment;
[0090] Fig. 9 Based on Figure 1 A schematic diagram of a training method of a leakage determination model in the illustrated embodiment;
[0091] Fig.10 A schematic diagram of the structure of a gas leakage determination device provided in an embodiment of the present application;
[0092] Fig.11 A schematic diagram of the structure of a training device for a leakage determination model provided in an embodiment of the present application;
[0093] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0094] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0095] In order to improve the accuracy of gas leakage determination, the embodiments of the present application provide a gas leakage determination method, a training method, a device, an electronic device, a computer-readable storage medium, and a computer program product for a leakage determination model. The following first introduces a gas leakage determination method provided by the embodiments of the present application.
[0096] The gas leakage determination method provided in the embodiment of the present application can be applied to any electronic device that needs to determine the gas leakage, for example, it can be a detection device, a testing device, a processing device, etc., which is not specifically limited here. For the sake of clarity, it is subsequently referred to as an electronic device in this article.
[0097] like Figure 1 As shown, a method for determining gas leakage, the method comprising:
[0098] S101, obtaining environmental information of a gas leakage location and a sound signal collected near the gas leakage location;
[0099] S102, inputting the sound signal and the environmental information into a pre-trained leakage determination model, so that the leakage determination model determines fusion information based on the sound signal and the environmental information, removes noise features from the fusion information, obtains leakage features, and determines the gas leakage based on the leakage features and the environmental information.
[0100] Among them, the leakage amount characteristic characterizes the characteristics of the sound signal generated by the gas leakage under the influence of the environmental information, and the leakage amount determination model is obtained by training at least based on the noise contrast loss, and the noise contrast loss is determined based on the difference in sample noise characteristics in the sample fusion information corresponding to the two groups of samples included in the sample pair. The two groups of samples included in the sample pair are collected under the same environmental noise, and each group of samples includes a sample sound signal and sample environmental information.
[0101] It can be seen that in the embodiment of the present application, the electronic device can obtain the environmental information of the gas leakage location and the sound signal collected near the gas leakage location; input the sound signal and the environmental information into the pre-trained leakage determination model, so that the leakage determination model determines the fusion information based on the sound signal and the environmental information, removes the noise feature from the fusion information, obtains the leakage feature, and determines the gas leakage according to the leakage feature and the environmental information, and the leakage feature characterizes the characteristics of the sound signal generated by the gas leakage under the influence of the environmental information; wherein the leakage determination model is at least trained based on the noise contrast loss, the noise contrast loss is determined based on the difference in the sample noise features in the sample fusion information corresponding to the two groups of samples included in the sample pair, and the two groups of samples included in the sample pair are collected under the same environmental noise, and each group of samples includes the sample sound signal and the sample environmental information. Since the two groups of samples included in the sample pair are collected under the same environmental noise, the difference in the sample noise features in the sample fusion information corresponding to the two groups of samples is small. By introducing the noise contrast loss in the training process and adjusting the parameters of the initial leakage determination model in the direction of reducing the noise contrast loss, the trained leakage determination model can accurately extract the environmental noise. When the leakage determination model is applied, the leakage determination model can determine fusion information based on the environmental information and sound signal of the gas leakage location, and the fusion information contains both leakage characteristics and noise characteristics. The leakage determination model can accurately remove the noise characteristics contained in the fusion information to obtain accurate leakage characteristics. In this way, the gas leakage determined based on the leakage characteristics and environmental information is also more accurate, which can improve the accuracy of gas leakage determination.
[0102] In industrial production, gas leaks may occur in pipelines used to transport gas. Due to the small leakage diameter of various pipelines, there is a pressure difference inside and outside the pipeline, which causes turbulence when the gas leaks, stimulating specific sound information. A schematic diagram of the turbulence phenomenon can be shown as follows Figure 2 As shown, the pressure vessel 201 stores compressed gas 202 , and there are tiny leakage holes 203 on the surface of the pressure vessel 201 . The compressed gas 202 leaks through the tiny leakage holes 203 , which will generate turbulence 204 .
[0103] Since the low-frequency sound signal contains more noise, the collected sound signal will contain more noise signals, and there will be a large error in determining the gas leakage amount through the collected sound signal. However, ultrasound has strong directionality and attenuation, and can be measured in the pipeline without external interference. In addition, the noise spectrum of the leaking gas is more concentrated in the high-frequency band in addition to the audible sound frequency band.
[0104] Therefore, as long as the relationship between the sound pressure level of the sound signal in this frequency band and the gas leakage is determined, the gas leakage can be determined by measuring the sound pressure level of the sound signal. It can be seen that there is a certain feasibility in obtaining ultrasonic echo signals through ultrasonic sensors, obtaining sound signals through microphone arrays, and determining the pipeline gas leakage based on ultrasonic echo signals and sound signals.
[0105] The sound intensity of leaking gas is affected by many factors. First, the ambient temperature at the leak source and path will affect the sound intensity of the leaking gas. As the ambient temperature increases, the molecular kinetic energy increases, resulting in an increase in the sound intensity at the leak location. The ambient temperature affects the density and viscosity of the leaking gas, both of which change the sound pressure level at the leak location. For example, the density of helium is less than that of compressed air, and assuming the gas flow and pressure are the same, the helium sound pressure level measured at the leak location will be lower than the sound pressure level of compressed air. Second, the ambient humidity will also affect the sound pressure level of the leaking gas.
[0106] There are many ways to achieve environmental perception. For example, environmental information can be obtained through external temperature sensors, humidity sensors, and pressure sensors, or coupled information related to determining the amount of gas leakage in the environment can be obtained through ultrasonic echo signals. When obtaining coupled information related to determining the amount of gas leakage in the environment through ultrasonic echo signals, the propagation characteristics of ultrasonic waves in the atmosphere can be used to work. Specifically, meteorological parameters such as air temperature, humidity, wind speed and wind direction can be inferred by measuring the propagation time, speed and scattering characteristics of ultrasonic signals in the atmosphere.
[0107] This measurement method is based on the fact that the propagation speed of sound waves in a gas medium is a function of the gas composition and absolute temperature. The propagation speed of sound waves is related to factors such as the gas adiabatic index, gas constant, gas molar mass, and gas absolute temperature. Therefore, by measuring the propagation speed of sound waves, the temperature and humidity of the gas, as well as the gas composition, can be indirectly calculated. Therefore, it can be considered that the ultrasonic echo information contains environmental information that affects the estimation of gas leakage.
[0108] In step S101, the electronic device can obtain environmental information of the gas leakage location and the sound signal collected near the gas leakage location. As mentioned above, the environmental humidity and ambient temperature have a greater impact on the sound intensity of the leaking gas, and the coupling information contained in the ultrasonic echo signal can simultaneously reflect the environmental humidity and ambient temperature. Therefore, the electronic device can obtain environmental information in one of the following four ways:
[0109] In the first mode, the electronic device can obtain the ultrasonic echo signal collected by the ultrasonic sensor. In the second mode, the electronic device can simultaneously obtain the temperature signal collected by the temperature sensor and the humidity signal collected by the humidity sensor. In the third mode, the electronic device can obtain the temperature signal collected by the temperature sensor. In the fourth mode, the electronic device can obtain the humidity signal collected by the humidity sensor.
[0110] Through the first and second methods, the environmental information obtained can more comprehensively reflect the environmental temperature and humidity. Since the temperature signal or humidity signal can also reflect the characteristics of the environment to a certain extent, the third and fourth methods are also feasible in principle.
[0111] The sound signal collected near the gas leakage location may be a high-frequency sound signal, which may be obtained by filtering the full-band sound signal collected by the microphone array. A microphone array is an acoustic camera, also called a sound camera. It consists of multiple microphones arranged in a certain pattern. The array signal processing algorithm generates the sound pressure level distribution on a plane, and realizes sound visualization in the form of a color contour map. The sound distribution of the object under test is displayed in the form of photos or videos, which can be used for sound source positioning, abnormal sound testing, and trajectory tracking and positioning. The array signal processing algorithm may specifically be beamforming.
[0112] In step S102, the electronic device can input the sound signal and the environmental information into the pre-trained leakage determination model, and the leakage determination model can determine the fusion information based on the sound signal and the environmental information. Since the sound signal and the environmental information contain both the information corresponding to the noise and the information corresponding to the leaked gas, the fusion information includes both the leakage feature and the noise feature.
[0113] In order to determine the leakage characteristics from the fused information, the leakage determination model can remove the noise characteristics from the fused information to obtain the leakage characteristics. The leakage characteristics can characterize the characteristics of the sound signal generated by the gas leakage under the influence of environmental information. Therefore, the gas leakage reflected by the sound signal can be determined by combining the leakage characteristics and environmental information.
[0114] In order to improve the accuracy of noise feature extraction of the leakage determination model, the leakage determination model can be trained based on noise contrast loss training. Specifically: when training the leakage determination model, training can be performed in sample pairs, each sample pair includes two groups of samples collected under the same environmental noise, and each group of samples includes sample sound signals and sample environmental information.
[0115] The two groups of samples included in a sample pair are respectively input into the initial leakage determination model, and the initial leakage determination model will output the sample noise characteristics corresponding to the two groups of samples respectively. Since the two groups of samples included in the same sample pair are collected under the same environmental noise, the sample noise characteristics corresponding to the two groups of samples should be relatively close. Therefore, when adjusting the parameters, the parameters can be adjusted in the direction of reducing the difference in the sample noise characteristics in the sample fusion information corresponding to the two groups of samples. In this way, the leakage determination model can enhance its ability to extract noise characteristics and the consistency of identifying the same noise characteristics.
[0116] The difference in sample noise characteristics in the sample fusion information corresponding to the two groups of samples may be calculated by calculating Euclidean distance, cosine distance, Manhattan distance, etc., which is not specifically limited here.
[0117] It can be seen that in the embodiment of the present application, since the two groups of samples included in the sample pair are collected under the same environmental noise, the difference in the sample noise characteristics in the sample fusion information corresponding to the two groups of samples is small. By introducing noise contrast loss during the training process and adjusting the parameters of the initial leakage determination model in the direction of reducing the noise contrast loss, the trained leakage determination model can accurately extract environmental noise. When applying the leakage determination model, the leakage determination model can determine the fusion information based on the environmental information and sound signal of the gas leakage location, and the fusion information contains both leakage characteristics and noise characteristics. The leakage determination model can accurately remove the noise characteristics contained in the fusion information to obtain accurate leakage characteristics. Since the leakage characteristics are not affected by the noise characteristics, the gas leakage determined according to the leakage characteristics and environmental information is more accurate, which can improve the accuracy of gas leakage determination.
[0118] As an implementation method of the present application, Figure 3 As shown, the leakage amount determination model may include a sound signal encoder, an environmental information encoder and a fusion module. In this case, the step of inputting the sound signal and the environmental information into the pre-trained leakage amount determination model so that the leakage amount determination model determines fusion information based on the sound signal and the environmental information, and removing the noise feature from the fusion information to obtain the leakage amount feature may include:
[0119] S301, inputting the sound signal into the sound signal encoder, so that the sound signal encoder encodes the sound signal to obtain a sound coding feature, and inputting the sound coding feature into the fusion module;
[0120] Since the sound coding feature can reflect the characteristics of the sound signal, the electronic device can input the sound signal into the sound signal encoder in the leakage determination model. In this way, the sound signal encoder can encode the sound signal to obtain the sound coding feature. Then, the sound coding feature is input into the fusion module.
[0121] S302, inputting the environmental information into the environmental information encoder, so that the environmental information encoder encodes the environmental information to obtain environmental coding features, and inputting the environmental coding features into the fusion module;
[0122] Since the environmental coding features can reflect the multi-coupling factors such as temperature, humidity, gas composition, etc. related to the environment, the electronic device can input the environmental information into the environmental information encoder in the leakage determination model. In this way, the environmental information encoder can encode the environmental information to obtain the environmental coding features. Then, the environmental coding features are input into the fusion module.
[0123] The environmental information may specifically be an ultrasonic echo signal, a humidity signal, and a temperature signal, and the environmental information encoder may specifically be an encoder adapted to the environmental information. For example, assuming that the environmental information is an ultrasonic echo signal, the environmental information encoder may be an ultrasonic signal encoder; assuming that the environmental information is a humidity signal and a temperature signal, the environmental information encoder may be a humidity signal encoder and a temperature signal encoder. In this case, the environmental information collected by multiple sensors may be fused to determine the amount of gas leakage.
[0124] S303, the fusion module fuses the sound coding feature and the environment coding feature to obtain a fusion feature vector;
[0125] The fusion module can fuse the sound coding features and the environmental coding features to obtain a fused feature vector, which can also be called an embedding vector. Since the sound coding features and the environmental coding features reflect the characteristics of the leaking gas and the characteristics of the noise, the fused feature vector can simultaneously reflect the leakage amount characteristics and the noise characteristics.
[0126] S304, removing the noise feature included in the fused feature vector to obtain a leakage feature.
[0127] Since the leakage amount feature in the fused feature vector is related to the leaking gas and can be used to determine the gas leakage amount, while the noise feature in the fused feature vector is related to the noise and cannot be used to determine the gas leakage amount, the noise feature included in the fused feature vector can be removed from the fused feature vector to obtain the leakage amount feature.
[0128] It can be seen that in the embodiment of the present application, the electronic device can input the sound signal into the sound signal encoder so that the sound signal encoder encodes the sound signal to obtain the sound coding feature, and input the sound coding feature into the fusion module; input the environmental information into the environmental information encoder so that the environmental information encoder encodes the environmental information to obtain the environmental coding feature, and input the environmental coding feature into the fusion module; the fusion module fuses the sound coding feature and the environmental coding feature to obtain a fusion feature vector; removes the noise feature included in the fusion feature vector to obtain the leakage feature. Since the sound coding feature and the environmental coding feature reflect the characteristics of the leaking gas and the characteristics of the noise, the fusion feature vector can simultaneously reflect the leakage feature and the noise feature. Next, in order to determine the gas leakage, the noise feature in the fusion feature vector can be removed to obtain the leakage feature, and then the gas leakage is determined based on the leakage feature and the environmental information. Since the leakage determination model is obtained based on the noise contrast loss training, the extraction of the noise feature is more accurate, that is, the noise feature can be accurately removed from the fusion feature vector to obtain an accurate leakage feature.
[0129] As an implementation of the embodiment of the present application, the step of removing the noise feature included in the fused feature vector to obtain the leakage feature may include:
[0130] The fused feature vector is segmented according to a preset segmentation method to obtain a first sub-vector and a second sub-vector, and the second sub-vector is removed.
[0131] The fused feature vector includes the leakage feature and the noise feature. The part used to characterize the leakage feature and the part used to characterize the noise feature in the fused feature vector have fixed positions, so the position corresponding to the leakage feature and the position corresponding to the noise feature in the fused feature vector can be recorded in advance. In this way, the fused feature vector can be segmented according to the positions corresponding to the pre-recorded parts, thereby obtaining the first sub-vector related to the leakage feature and the second sub-vector related to the noise feature.
[0132] For example, assuming that the dimension of the fused feature vector is 1024×1, the upper half is related to the leakage feature, and the lower half is related to the noise feature, then the fused feature vector can be split in the middle to obtain two vectors with a dimension of 512×1, the vector in the upper half is the first sub-vector, and the vector in the lower half is the second sub-vector.
[0133] It can be seen that in the embodiment of the present application, the leakage determination model can divide the fused feature vector according to a preset division method to obtain a first sub-vector and a second sub-vector, and remove the second sub-vector, wherein the first sub-vector is related to the leakage feature and the second sub-vector is related to the noise feature. Since the part of the fused feature vector used to characterize the leakage feature and the part used to characterize the noise feature are fixed, the position corresponding to the leakage feature and the position corresponding to the noise feature in the fused feature vector can be recorded in advance, and then the fused feature vector can be divided based on the pre-recorded position. In this way, the first sub-vector related to the leakage feature can be obtained quickly and accurately.
[0134] As an implementation method of the present application, Figure 4 As shown, the step of determining the gas leakage amount according to the leakage amount characteristics and the environmental information may include:
[0135] S401, concatenating the first sub-vector and the environmental coding feature to obtain a concatenated vector;
[0136] The environmental coding feature includes multiple coupling factors related to the environment, such as temperature, humidity, and gas composition. Since the first sub-vector represents the characteristics of the sound signal generated by the gas leakage under the influence of environmental information, it is necessary to determine the gas leakage amount based on both the first sub-vector and the environmental coding feature. In step S401, the leakage amount determination model can splice the first sub-vector and the environmental coding feature to obtain a spliced vector.
[0137] S402, outputting the gas leakage amount based on the stitching vector and the corresponding relationship between the sample stitching vector and the leakage amount learned by the leakage amount determination model during the training process.
[0138] During the training process of the leakage determination model, the predicted gas leakage is output based on the sample splicing vector, and then the parameters are adjusted based on the difference between the predicted gas leakage and the gas leakage label. Therefore, the leakage determination model has pre-learned the correspondence between the sample splicing vector and the leakage. The leakage determination model can output the gas leakage based on the splicing vector and the above-mentioned pre-learned correspondence.
[0139] It can be seen that in the embodiment of the present application, the leakage determination model can splice the first sub-vector and the environmental coding feature to obtain a splicing vector; based on the splicing vector and the correspondence between the sample splicing vector and the leakage amount learned by the leakage determination model during the training process, the gas leakage amount is output. Since the leakage determination model has pre-learned the correspondence between the sample splicing vector and the leakage amount, the gas leakage amount can be quickly and accurately output based on the splicing vector and the pre-learned correspondence.
[0140] As an implementation of an embodiment of the present application, the above step of obtaining environmental information of the gas leakage location may include:
[0141] Acquire the ultrasonic echo signal collected by the ultrasonic sensor; or,
[0142] A temperature signal collected by a temperature sensor is obtained, and / or a humidity signal collected by a humidity sensor is obtained.
[0143] In the first implementation, the electronic device may acquire the ultrasonic echo signal collected by the ultrasonic sensor. Since the ultrasonic echo signal contains multiple coupling factors such as environmental information and environmental humidity, only the ultrasonic echo signal collected by the ultrasonic sensor may be acquired.
[0144] In the second embodiment, the electronic device can obtain the temperature signal collected by the temperature sensor and the humidity signal collected by the humidity sensor. Since temperature and humidity are important factors affecting the sound pressure level of the leaked gas, the temperature signal and humidity signal of the gas leak location can be obtained at the same time. In this way, the characteristics of the environment can be more comprehensively reflected.
[0145] In a third embodiment, the electronic device may only obtain the temperature signal collected by the temperature sensor. In a fourth embodiment, the electronic device may only obtain the humidity signal collected by the humidity sensor. Although the effects of these two embodiments are poor, they are also feasible in principle.
[0146] It can be seen that in the embodiment of the present application, the electronic device can obtain the environmental information of the gas leakage location through one of the above four implementations. Since temperature and humidity are important factors affecting the sound pressure level of the leaked gas, and the above four implementations can accurately reflect at least one of temperature and humidity, the environmental information of the gas leakage location can be accurately obtained.
[0147] Corresponding to the above-mentioned method for determining the amount of gas leakage, an embodiment of the present application also provides a method for training a leakage determination model. The following will introduce a method for training a leakage determination model provided in an embodiment of the present application.
[0148] like Figure 5 As shown, a method for training a leakage determination model comprises:
[0149] S501, obtaining a plurality of sample pairs and gas leakage labels corresponding to the samples included in the plurality of sample pairs;
[0150] Each sample pair includes two groups of samples collected under the same environmental noise, and each group of samples includes a sample sound signal and sample environmental information.
[0151] S502, for each group of samples, input the group of samples into an initial leakage determination model, so that the initial leakage determination model determines sample fusion information based on the sample sound signals and sample environmental information included in the group of samples, separates sample noise features and sample leakage features from the sample fusion information, and determines the predicted gas leakage according to the sample leakage features and the sample environmental information;
[0152] The sample leakage characteristic represents the characteristics of the sample sound signal generated by the gas leakage under the influence of the sample environmental information.
[0153] S503, according to the difference between the predicted gas leakage amount corresponding to each group of samples and the gas leakage amount label, and the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair, adjust the parameters of the initial leakage amount determination model until the initial leakage amount determination model meets the convergence condition, thereby obtaining the leakage amount determination model.
[0154] It can be seen that in the embodiment of the present application, the electronic device can obtain multiple sample pairs and gas leakage labels corresponding to the samples included in the multiple sample pairs, wherein each sample pair includes two groups of samples collected under the same environmental noise, and each group of samples includes sample sound signals and sample environmental information; for each group of samples, the group of samples is input into the initial leakage determination model, so that the initial leakage determination model determines sample fusion information based on the sample sound signals and sample environmental information included in the group of samples, and separates the sample noise characteristics and the sample leakage characteristics from the sample fusion information, and determines the predicted gas leakage according to the sample leakage characteristics and the sample environmental information, wherein the sample leakage characteristics characterize the characteristics of the sample sound signals generated by the gas leakage under the influence of the sample environmental information; according to the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage labels, and the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair, the parameters of the initial leakage determination model are adjusted until the initial leakage determination model meets the convergence condition, and the leakage determination model is obtained. Since the two groups of samples included in the sample pair are collected under the same environmental noise, the difference in the sample noise characteristics in the sample fusion information corresponding to the two groups of samples is small. By introducing noise contrast loss during the training process and adjusting the parameters of the initial leakage determination model in a direction that reduces the noise contrast loss, the trained leakage determination model can accurately extract environmental noise.
[0155] In step S501, the electronic device may obtain multiple sample pairs and gas leakage labels corresponding to the samples included in the multiple sample pairs. The gas leakage labels may be determined by pressure decay method, flow meter method, mass conservation method and other current related technologies, which are not specifically limited here.
[0156] Each sample pair may include two groups of samples collected under the same environmental noise, and each group of samples may include a sample sound signal and sample environmental information. The method for obtaining the sample sound signal and the sample environmental information is the same as the method for obtaining the sound signal and the environmental information in the above embodiment, and will not be repeated here.
[0157] Next, the electronic device can input each group of samples into the initial leakage determination model, and the initial leakage determination model can determine the sample fusion information based on the sample sound signal and sample environment information included in the group of samples, and separate the sample noise characteristics and sample leakage characteristics from the sample fusion information. Then, the predicted gas leakage can be determined based on the sample leakage characteristics and the sample environment information, that is, step S502 is executed. Among them, the sample leakage characteristics can characterize the characteristics of the sample sound signal generated by the gas leakage under the influence of the sample environment information.
[0158] Since the leakage amount determination model needs to be trained by the difference between the sample noise features corresponding to the samples included in the sample pair, it is not necessary to remove the sample noise features from the sample fusion information during the training process, but to retain the sample noise features.
[0159] Because the gas leakage label is the actual gas leakage, and the predicted gas leakage is the gas leakage estimated by the initial leakage determination model, which may be inaccurate, the parameters of the initial leakage determination model can be adjusted according to the difference between the predicted gas leakage and the gas leakage label corresponding to each group of samples. The difference between the predicted gas leakage and the gas leakage label corresponding to each group of samples can be calculated by calculating the Euclidean distance, cosine distance, Manhattan distance, etc., which are not specifically limited here.
[0160] Since the two groups of samples included in the sample pair are collected under the same environmental noise, the sample noise characteristics corresponding to the two groups of samples output by the initial leakage determination model should be relatively small. If the difference between the sample noise characteristics corresponding to the two groups of samples output by the initial leakage determination model is large, it means that the initial leakage determination model has poor ability to extract noise characteristics.
[0161] In order to improve the ability of the initial leakage determination model to extract noise features, the electronic device can also adjust the parameters of the initial leakage determination model according to the difference between the sample noise features corresponding to the two groups of samples included in each sample pair, until the initial leakage determination model meets the convergence conditions, and a trained leakage determination model can be obtained.
[0162] For example, assuming that sample pair 1 includes sample 1 and sample 2, and sample pair 2 includes sample 3 and sample 4, the electronic device can obtain gas leakage amount label 1-gas leakage amount label 4 corresponding to sample 1-sample 4. Next, samples 1-sample 4 can be input into the initial leakage amount determination model to obtain sample noise features 1-sample noise features 4 and predicted gas leakage amounts 1-predicted gas leakage amounts 4 corresponding to samples 1-sample 4 output by the initial leakage amount determination model.
[0163] The following uses sample pair 1 as an example to illustrate the parameter adjustment process: the electronic device can adjust the parameters of the initial leakage determination model according to the difference between gas leakage label 1 and predicted gas leakage 1, the difference between gas leakage label 2 and predicted gas leakage 2, and the difference between sample noise feature 1 and sample noise feature 2. The parameter adjustment process corresponding to sample pair 2 is the same as that of sample pair 1, and will not be repeated here.
[0164] It can be seen that in the embodiment of the present application, during the training process of the initial leakage determination model, multi-loss joint training is achieved based on the difference between the predicted gas leakage and the gas leakage label, and the difference between the sample noise features corresponding to the two groups of samples included in the same sample pair. In this way, the leakage determination model can enhance its ability to extract noise features, thereby improving the accuracy of gas leakage determination.
[0165] As an implementation method of the present application, Figure 6 As shown, the step of adjusting the parameters of the initial leakage determination model according to the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label, and the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair, may include:
[0166] S601, determining the noise contrast loss corresponding to each sample pair according to the difference between the sample noise features corresponding to the two groups of samples included in each sample pair;
[0167] Since the two groups of samples included in each sample pair are collected under the same environmental noise, the sample noise characteristics corresponding to the two groups of samples should be slightly different. The electronic device can determine the noise contrast loss corresponding to each sample pair based on the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair.
[0168] For example, sample pair 1 includes sample 1 and sample 2, and sample pair 2 includes sample 3 and sample 4. Sample 1-sample 4 are input into the initial leakage determination model to obtain sample noise feature 1-sample noise feature 4. Further, based on the difference between sample noise feature 1 and sample noise feature 2, the noise contrast loss corresponding to sample pair 1 can be determined, and based on the difference between sample noise feature 3 and sample noise feature 4, the noise contrast loss corresponding to sample pair 2 can be determined.
[0169] The above-mentioned noise contrast loss can be directly determined based on the difference between the sample noise features corresponding to the two groups of samples included in the sample pair, or it can be first determined based on a preset noise classification method to determine the noise classification of the sample noise features corresponding to the two groups of samples, and then determined based on the difference between the noise classifications corresponding to the two groups of samples. Both are reasonable.
[0170] S602, adjusting the parameters of the initial leakage determination model in an optimization direction such that the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label is reduced, and the noise contrast loss corresponding to each sample pair is reduced.
[0171] Since the predicted gas leakage is estimated by the initial leakage determination model, and the gas leakage label is the actual gas leakage, in order to make the predicted gas leakage estimated by the initial leakage determination model close to the actual gas leakage, the parameters of the initial leakage determination model can be adjusted in the optimization direction of reducing the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label.
[0172] If the noise contrast loss is large, it means that the consistency of the noise features extracted by the initial leakage determination model for the same environmental noise is poor, and the accuracy of the noise feature extraction is poor. Therefore, in order to improve the accuracy of the noise features extracted by the initial leakage determination model, the parameters of the initial leakage determination model can be adjusted in the optimization direction of reducing the corresponding noise contrast loss of each sample pair.
[0173] It can be seen that in the embodiment of the present application, the electronic device can determine the noise contrast loss corresponding to each sample pair according to the difference between the sample noise features corresponding to the two groups of samples included in each sample pair; so as to reduce the difference between the predicted gas leakage amount corresponding to each group of samples and the gas leakage amount label, and reduce the noise contrast loss corresponding to each sample pair as the optimization direction, and adjust the parameters of the initial leakage determination model. Adding noise contrast loss at the model training level can constrain the representation of sample noise features in the sample fusion feature vector, map similar sample noise features to close positions, and map dissimilar sample noise features to far positions. In this way, the accuracy of the initial leakage determination model in determining the gas leakage amount can be improved, and the accuracy of the initial leakage determination model in determining the noise features can be improved.
[0174] As an implementation of an embodiment of the present application, the initial leakage amount determination model may include a sound signal encoder, an environmental information encoder and a fusion module. In this case, Figure 7 As shown, the step of inputting the group of samples into the initial leakage determination model so that the initial leakage determination model determines sample fusion information based on the sample sound signals and sample environment information included in the group of samples, and separating the sample noise features and the sample leakage features from the sample fusion information may include:
[0175] S701, inputting the group of samples into the initial leakage amount determination model, so that the sound signal encoder encodes the sample sound signals included in the group of samples to obtain sample sound coding features, and inputs the sample sound coding features into the fusion module, and the environment information encoder encodes the sample environment information included in the group of samples to obtain sample environment coding features, and inputs the sample environment coding features into the fusion module;
[0176] Step S701 is substantially the same as the above-mentioned steps S301 and S302, except that step S701 is a process of training a model, while steps S301 and S302 are a process of applying a model, and therefore step S701 will not be described in detail.
[0177] S702, the fusion module fuses the sample sound coding features and the sample environment coding features corresponding to the group of samples to obtain a sample fusion feature vector;
[0178] Step S702 is substantially the same as the above-mentioned step S303, the difference being that step S702 is a process of training a model, while step S303 is a process of applying a model, and therefore step S702 will not be described in detail.
[0179] S703, separating a sample noise feature and a sample leakage feature from the sample fusion feature vector.
[0180] Since the sample fusion feature is obtained by fusing the sample sound coding feature and the sample environment coding feature, the sample fusion feature can reflect the noise information and the leakage gas information at the same time, and the sample noise feature and the sample leakage amount feature can be separated from the sample fusion feature vector.
[0181] It can be seen that in the embodiment of the present application, the electronic device can input the group of samples into the initial leakage determination model, so that the sound signal encoder encodes the sample sound signal included in the group of samples to obtain the sample sound coding feature, and inputs the sample sound coding feature into the fusion module, and the environmental information encoder encodes the sample environmental information included in the group of samples to obtain the sample environment coding feature, and inputs the sample environment coding feature into the fusion module; the fusion module fuses the sample sound coding feature and the sample environment coding feature corresponding to the group of samples to obtain a sample fusion feature vector; and separates the sample noise feature and the sample leakage feature from the sample fusion feature vector. Since the sample fusion feature is obtained by fusing the sample sound coding feature and the sample environment coding feature, the sample fusion feature can simultaneously reflect the information of the noise and the information of the leaked gas, and the sample noise feature and the sample leakage feature can be separated from the sample fusion feature vector. In this way, the sample noise feature can be used to calculate the noise contrast loss, and the sample leakage feature can be used to determine the predicted gas leakage.
[0182] As an implementation of an embodiment of the present application, the above step of separating the sample noise feature and the sample leakage feature from the sample fusion feature vector may include:
[0183] The sample fusion feature vector is segmented according to a preset segmentation method to obtain a sample first sub-vector and a sample second sub-vector.
[0184] The sample fusion feature vector includes the sample leakage feature and the sample noise feature. The part used to characterize the sample leakage feature and the part used to characterize the sample noise feature in the sample fusion feature vector have fixed positions. Therefore, the position corresponding to the sample leakage feature and the position corresponding to the sample noise feature in the sample fusion feature vector can be recorded in advance.
[0185] In this way, the sample fusion feature vector can be segmented according to the positions corresponding to the pre-recorded parts, thereby obtaining a sample first sub-vector related to the sample leakage feature and a sample second sub-vector related to the sample noise feature.
[0186] It can be seen that in the embodiment of the present application, the initial leakage determination model can divide the sample fusion feature vector according to a preset division method to obtain a sample first sub-vector and a sample second sub-vector, wherein the sample first sub-vector is related to the sample leakage feature, and the sample second sub-vector is related to the sample noise feature. Since the position corresponding to the sample leakage feature and the position corresponding to the sample noise feature in the sample fusion feature vector can be recorded in advance, the sample fusion feature vector can be divided according to the positions corresponding to the pre-recorded parts, thereby obtaining a sample first sub-vector related to the sample leakage feature and a sample second sub-vector related to the sample noise feature. In this way, the sample first sub-vector and the sample second sub-vector can be determined quickly and accurately.
[0187] As an implementation method of the present application, Figure 8 As shown, the above step of determining the predicted gas leakage amount according to the sample leakage amount characteristics and the sample environment information may include:
[0188] S801, concatenating the sample first sub-vector and the sample environment coding feature to obtain a sample concatenated vector;
[0189] The first sub-vector of the sample is related to the sample leakage amount characteristics, and the sample environment coding characteristics can reflect the sample environment information. The leakage amount determination model can splice the first sub-vector of the sample with the sample environment coding characteristics, and the obtained sample splicing vector can simultaneously reflect the sample leakage amount characteristics and the sample environment information.
[0190] S802, based on the sample splicing vector and the initial leakage amount, determine the correspondence between the sample splicing vector currently learned by the model and the leakage amount, and output the predicted gas leakage amount.
[0191] In the process of training the initial leakage determination model, the parameters of the initial leakage determination model continuously learn the correspondence between the sample splicing vector and the leakage. The initial leakage determination model can output the gas leakage based on the sample splicing vector and the currently learned correspondence between the sample splicing vector and the leakage.
[0192] It can be seen that in the embodiment of the present application, the initial leakage determination model can splice the sample first sub-vector and the sample environment coding feature to obtain a sample splicing vector; based on the sample splicing vector and the correspondence between the sample splicing vector and the leakage amount learned by the initial leakage determination model during the training process, the predicted gas leakage amount is output. In this way, the initial leakage determination model can quickly and accurately determine the predicted gas leakage amount based on the correspondence between the currently learned sample splicing vector and the leakage amount.
[0193] As an implementation method of an embodiment of the present application, a schematic diagram of a training method of a leakage determination model can be as follows: Fig. 9 As shown, the sample pair includes sample A and sample B. Sample A includes sample ultrasonic echo signal A and sample sound signal A, and sample B includes sample ultrasonic echo signal B and sample sound signal B. Fig. 9 The upper and lower parts of represent the same process, and the upper part is used as an example for explanation here.
[0194] The electronic device may input the sample ultrasonic echo signal A into the ultrasonic signal encoder, which extracts the sample ultrasonic echo signal A to obtain the sample ultrasonic signal coding feature A, and inputs the sample ultrasonic signal coding feature A into the fusion module. The electronic device may input the sample sound signal A into the sound signal encoder, which extracts the sample sound signal A to obtain the sample sound coding feature A, and inputs the sample sound coding feature A into the fusion module.
[0195] The fusion module fuses the sample ultrasonic signal coding feature A and the sample sound coding feature A to obtain fusion information A. The fusion information A can be the white part and the shaded part in the sample fusion feature vector 901. The white part is the sample first subvector, and the shaded part is the sample second subvector. The black part is the sample ultrasonic signal coding feature A, which does not belong to the sample fusion feature vector 901.
[0196] The leakage determination model can splice the sample ultrasonic signal encoding feature A and the sample first sub-vector to obtain a sample splicing vector, and then determine the predicted gas leakage based on the sample splicing vector. The leakage determination model can determine the noise classification based on the sample second sub-vector, and the noise classification is used to characterize the category of the sample noise feature.
[0197] Similarly, for sample B, the leakage determination model will output the predicted gas leakage and noise classification corresponding to sample B. The electronic device can determine the noise contrast loss based on the difference between the sample noise feature B corresponding to sample B and the sample noise feature A corresponding to sample A, and then adjust the parameters in the leakage determination model in a direction that reduces the noise contrast loss.
[0198] In the technical solution of this application, the operations involved in obtaining, storing, using, processing, transmitting, providing and disclosing user personal information are all carried out with the user's authorization.
[0199] Corresponding to the above-mentioned method for determining the amount of gas leakage, the embodiment of the present application further provides a device for determining the amount of gas leakage. The following is an introduction to the device for determining the amount of gas leakage provided in the embodiment of the present application.
[0200] like Fig.10As shown, a gas leakage determination device comprises:
[0201] A signal acquisition module 1001 is used to acquire environmental information of a gas leakage location and a sound signal collected near the gas leakage location;
[0202] The leakage determination module 1002 is used to input the sound signal and the environmental information into a pre-trained leakage determination model, so that the leakage determination model determines fusion information based on the sound signal and the environmental information, removes noise features from the fusion information, obtains leakage features, and determines the gas leakage according to the leakage features and the environmental information, wherein the leakage features characterize the characteristics of the sound signal generated by the gas leakage under the influence of the environmental information;
[0203] Among them, the leakage amount determination model is obtained by training at least based on noise contrast loss, and the noise contrast loss is determined based on the difference in sample noise characteristics in sample fusion information corresponding to two groups of samples included in the sample pair. The two groups of samples included in the sample pair are collected under the same environmental noise, and each group of samples includes a sample sound signal and sample environmental information.
[0204] It can be seen that in the embodiment of the present application, the electronic device can obtain the environmental information of the gas leakage location and the sound signal collected near the gas leakage location; input the sound signal and the environmental information into the pre-trained leakage determination model, so that the leakage determination model determines the fusion information based on the sound signal and the environmental information, removes the noise feature from the fusion information, obtains the leakage feature, and determines the gas leakage according to the leakage feature and the environmental information, and the leakage feature characterizes the characteristics of the sound signal generated by the gas leakage under the influence of the environmental information; wherein the leakage determination model is at least trained based on the noise contrast loss, the noise contrast loss is determined based on the difference in the sample noise features in the sample fusion information corresponding to the two groups of samples included in the sample pair, and the two groups of samples included in the sample pair are collected under the same environmental noise, and each group of samples includes the sample sound signal and the sample environmental information. Since the two groups of samples included in the sample pair are collected under the same environmental noise, the difference in the sample noise features in the sample fusion information corresponding to the two groups of samples is small. By introducing the noise contrast loss in the training process and adjusting the parameters of the initial leakage determination model in the direction of reducing the noise contrast loss, the trained leakage determination model can accurately extract the environmental noise. When the leakage determination model is applied, the leakage determination model can determine fusion information based on the environmental information and sound signal of the gas leakage location, and the fusion information contains both leakage characteristics and noise characteristics. The leakage determination model can accurately remove the noise characteristics contained in the fusion information to obtain accurate leakage characteristics. In this way, the gas leakage determined based on the leakage characteristics and environmental information is also more accurate, which can improve the accuracy of gas leakage determination.
[0205] As an implementation of an embodiment of the present application, the leakage amount determination model may include a sound signal encoder, an environmental information encoder, and a fusion module. In this case, the leakage amount determination module 1002 may include:
[0206] A sound signal encoding submodule, used for inputting the sound signal into the sound signal encoder, so that the sound signal encoder encodes the sound signal to obtain a sound encoding feature, and inputting the sound encoding feature into the fusion module;
[0207] An environmental signal encoding submodule, used for inputting the environmental information into the environmental information encoder, so that the environmental information encoder encodes the environmental information to obtain environmental coding features, and inputting the environmental coding features into the fusion module;
[0208] A fusion feature vector determination submodule is used for the fusion module to fuse the sound coding feature and the environment coding feature to obtain a fusion feature vector;
[0209] The leakage feature determination submodule is used to remove the noise feature included in the fused feature vector to obtain the leakage feature.
[0210] As an implementation of the embodiment of the present application, the leakage characteristic determination submodule may include:
[0211] The vector segmentation submodule is used to segment the fused feature vector according to a preset segmentation method to obtain a first subvector and a second subvector, and remove the second subvector, wherein the first subvector is related to the leakage feature and the second subvector is related to the noise feature.
[0212] As an implementation of the embodiment of the present application, the leakage amount determination module 1002 may further include:
[0213] A vector splicing submodule, used for splicing the first sub-vector and the environmental coding feature to obtain a splicing vector;
[0214] The gas leakage determination submodule is used to output the gas leakage amount based on the splicing vector and the corresponding relationship between the sample splicing vector and the leakage amount learned by the leakage determination model during the training process.
[0215] As an implementation of the embodiment of the present application, the signal acquisition module 1001 may include:
[0216] A first signal acquisition module, used to acquire an ultrasonic echo signal collected by an ultrasonic sensor;
[0217] The second signal acquisition module is used to acquire a temperature signal acquired by a temperature sensor and / or a humidity signal acquired by a humidity sensor.
[0218] Corresponding to the above-mentioned training method for a leakage determination model, the embodiment of the present application further provides a training device for a leakage determination model. The following is an introduction to a training device for a leakage determination model provided in the embodiment of the present application.
[0219] like Fig.11 As shown, a training device for a leakage determination model comprises:
[0220] The sample signal acquisition module 1101 is used to acquire multiple sample pairs and gas leakage labels corresponding to the samples included in the multiple sample pairs, wherein each sample pair includes two groups of samples collected under the same environmental noise, and each group of samples includes a sample sound signal and sample environmental information;
[0221] The leakage prediction module 1102 is used for inputting each group of samples into an initial leakage determination model, so that the initial leakage determination model determines sample fusion information based on the sample sound signal and sample environment information included in the group of samples, separates the sample noise feature and the sample leakage feature from the sample fusion information, and determines the predicted gas leakage according to the sample leakage feature and the sample environment information, wherein the sample leakage feature represents the characteristics of the sample sound signal generated by the gas leakage under the influence of the sample environment information;
[0222] The parameter adjustment module 1103 is used to adjust the parameters of the initial leakage determination model according to the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label, and the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair, until the initial leakage determination model meets the convergence condition, thereby obtaining the leakage determination model.
[0223] It can be seen that in the embodiment of the present application, the electronic device can obtain multiple sample pairs and gas leakage labels corresponding to the samples included in the multiple sample pairs, wherein each sample pair includes two groups of samples collected under the same environmental noise, and each group of samples includes sample sound signals and sample environmental information; for each group of samples, the group of samples is input into the initial leakage determination model, so that the initial leakage determination model determines sample fusion information based on the sample sound signals and sample environmental information included in the group of samples, and separates the sample noise characteristics and the sample leakage characteristics from the sample fusion information, and determines the predicted gas leakage according to the sample leakage characteristics and the sample environmental information, wherein the sample leakage characteristics characterize the characteristics of the sample sound signals generated by the gas leakage under the influence of the sample environmental information; according to the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage labels, and the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair, the parameters of the initial leakage determination model are adjusted until the initial leakage determination model meets the convergence condition, and the leakage determination model is obtained. Since the two groups of samples included in the sample pair are collected under the same environmental noise, the difference in the sample noise characteristics in the sample fusion information corresponding to the two groups of samples is small. By introducing noise contrast loss during the training process and adjusting the parameters of the initial leakage determination model in a direction that reduces the noise contrast loss, the trained leakage determination model can accurately extract environmental noise.
[0224] As an implementation of the embodiment of the present application, the parameter adjustment module 1103 may include:
[0225] A noise contrast loss determination submodule, used to determine the noise contrast loss corresponding to each sample pair according to the difference between the sample noise features corresponding to the two groups of samples included in each sample pair;
[0226] The parameter adjustment submodule is used to adjust the parameters of the initial leakage determination model in an optimization direction such that the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label is reduced, and the noise contrast loss corresponding to each sample pair is reduced.
[0227] As an implementation of an embodiment of the present application, the initial leakage amount determination model may include a sound signal encoder, an environmental information encoder, and a fusion module. In this case, the leakage amount prediction module 1102 may include:
[0228] The sample signal encoding submodule is used to input the group of samples into the initial leakage amount determination model, so that the sound signal encoder encodes the sample sound signals included in the group of samples to obtain sample sound encoding features, and inputs the sample sound encoding features into the fusion module, and the environment information encoder encodes the sample environment information included in the group of samples to obtain sample environment encoding features, and inputs the sample environment encoding features into the fusion module;
[0229] A sample fusion feature vector determination submodule is used for the fusion module to fuse the sample sound coding features and the sample environment coding features corresponding to the group of samples to obtain a sample fusion feature vector;
[0230] The sample leakage feature determination submodule is used to separate the sample noise feature and the sample leakage feature from the sample fusion feature vector.
[0231] As an implementation of the embodiment of the present application, the above-mentioned sample leakage characteristic determination submodule may include:
[0232] A vector segmentation unit is used to segment the sample fusion feature vector according to a preset segmentation method to obtain a sample first sub-vector and a sample second sub-vector, wherein the sample first sub-vector is related to the sample leakage feature, and the sample second sub-vector is related to the sample noise feature.
[0233] As an implementation of the embodiment of the present application, the leakage prediction module 1102 may further include:
[0234] A sample vector splicing submodule, used to splice the sample first subvector and the sample environment coding feature to obtain a sample splicing vector;
[0235] The gas leakage prediction submodule is used to determine the correspondence between the sample splicing vector currently learned by the model and the leakage amount based on the sample splicing vector and the initial leakage amount, and output the predicted gas leakage amount.
[0236] The present application also provides an electronic device, such as Fig.12 As shown, including:
[0237] Memory 1201, used for storing computer programs;
[0238] The processor 1202 is used to implement the gas leakage determination method and the leakage determination model training method described in any of the above embodiments when executing the program stored in the memory 1201.
[0239] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 1202, the communication interface, and the memory 1201 communicate with each other via the communication bus.
[0240] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0241] The communication interface is used for communication between the above electronic device and other devices.
[0242] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0243] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0244] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned gas leakage determination methods or the steps of any leakage determination model training method are implemented.
[0245] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any gas leakage determination method or any leakage determination model training method in the above embodiments.
[0246] 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 described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.
[0247] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0248] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0249] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A method for determining gas leakage, characterized in that: The method comprises: Acquiring environmental information of a gas leakage location and sound signals collected near the gas leakage location; Inputting the sound signal and the environmental information into a pre-trained leakage determination model, so that the leakage determination model determines fusion information based on the sound signal and the environmental information, removes noise features from the fusion information, obtains leakage features, and determines the gas leakage amount according to the leakage features and the environmental information, wherein the leakage features characterize the characteristics of the sound signal generated by the gas leakage under the influence of the environmental information; Among them, the leakage amount determination model is obtained by training at least based on noise contrast loss, and the noise contrast loss is determined based on the difference in sample noise characteristics in sample fusion information corresponding to two groups of samples included in the sample pair. The two groups of samples included in the sample pair are collected under the same environmental noise, and each group of samples includes a sample sound signal and sample environmental information.
2. The method according to claim 1, characterized in that: The leakage determination model includes a sound signal encoder, an environmental information encoder and a fusion module; The step of inputting the sound signal and the environmental information into a pre-trained leakage determination model so that the leakage determination model determines fusion information based on the sound signal and the environmental information, and removing noise features from the fusion information to obtain leakage features includes: Inputting the sound signal into the sound signal encoder so that the sound signal encoder encodes the sound signal to obtain a sound coding feature, and inputting the sound coding feature into the fusion module; Inputting the environmental information into the environmental information encoder so that the environmental information encoder encodes the environmental information to obtain environmental coding features, and inputting the environmental coding features into the fusion module; The fusion module fuses the sound coding feature and the environment coding feature to obtain a fusion feature vector; The noise feature included in the fused feature vector is removed to obtain the leakage feature.
3. The method according to claim 2, characterized in that The step of removing the noise feature included in the fused feature vector to obtain the leakage feature comprises: The fused feature vector is segmented according to a preset segmentation method to obtain a first sub-vector and a second sub-vector, and the second sub-vector is removed, wherein the first sub-vector is related to the leakage feature, and the second sub-vector is related to the noise feature.
4. The method according to claim 3, characterized in that The step of determining the gas leakage amount according to the leakage amount characteristics and the environmental information comprises: splicing the first sub-vector and the environmental coding feature to obtain a spliced vector; Based on the splicing vector and the corresponding relationship between the sample splicing vector and the leakage amount learned by the leakage amount determination model during the training process, the gas leakage amount is output.
5. The method according to any one of claims 1 to 4, characterized in that: The step of obtaining environmental information of the gas leakage location includes: Acquire the ultrasonic echo signal collected by the ultrasonic sensor; or, A temperature signal collected by a temperature sensor is obtained, and / or a humidity signal collected by a humidity sensor is obtained.
6. A method for training a leakage determination model, characterized in that: The method comprises: Acquire multiple sample pairs and gas leakage labels corresponding to the samples included in the multiple sample pairs, wherein each sample pair includes two groups of samples collected under the same environmental noise, and each group of samples includes a sample sound signal and sample environmental information; For each group of samples, the group of samples is input into an initial leakage determination model, so that the initial leakage determination model determines sample fusion information based on the sample sound signals and sample environmental information included in the group of samples, separates sample noise features and sample leakage features from the sample fusion information, and determines the predicted gas leakage according to the sample leakage features and the sample environmental information, wherein the sample leakage features characterize the characteristics of the sample sound signals generated by the gas leakage under the influence of the sample environmental information; According to the difference between the predicted gas leakage amount corresponding to each group of samples and the gas leakage amount label, and the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair, the parameters of the initial leakage amount determination model are adjusted until the initial leakage amount determination model meets the convergence condition, thereby obtaining the leakage amount determination model.
7. The method according to claim 6, characterized in that The step of adjusting the parameters of the initial leakage determination model according to the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label, and the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair, comprises: Determine the noise contrast loss corresponding to each sample pair according to the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair; The parameters of the initial leakage determination model are adjusted in order to reduce the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label and reduce the noise contrast loss corresponding to each sample pair as the optimization direction.
8. The method according to claim 6, characterized in that The initial leakage determination model includes a sound signal encoder, an environmental information encoder and a fusion module; The step of inputting the group of samples into the initial leakage determination model so that the initial leakage determination model determines sample fusion information based on the sample sound signals and sample environment information included in the group of samples, and separating the sample noise features and the sample leakage features from the sample fusion information includes: The group of samples is input into the initial leakage amount determination model, so that the sound signal encoder encodes the sample sound signals included in the group of samples to obtain sample sound coding features, and the sample sound coding features are input into the fusion module, and the environment information encoder encodes the sample environment information included in the group of samples to obtain sample environment coding features, and the sample environment coding features are input into the fusion module; The fusion module performs fusion processing on the sample sound coding features and the sample environment coding features corresponding to the group of samples to obtain a sample fusion feature vector; A sample noise feature and a sample leakage feature are separated from the sample fusion feature vector.
9. The method according to claim 8, characterized in that The step of separating the sample noise feature and the sample leakage feature from the sample fusion feature vector comprises: The sample fusion feature vector is segmented according to a preset segmentation method to obtain a sample first sub-vector and a sample second sub-vector, wherein the sample first sub-vector is related to the sample leakage feature, and the sample second sub-vector is related to the sample noise feature.
10. The method according to claim 9, characterized in that The step of determining the predicted gas leakage amount according to the sample leakage amount characteristics and the sample environment information comprises: splicing the sample first sub-vector and the sample environment coding feature to obtain a sample splicing vector; Based on the sample splicing vector and the initial leakage amount, the corresponding relationship between the sample splicing vector currently learned by the model and the leakage amount is determined, and the predicted gas leakage amount is output.
11. A gas leakage determination device, characterized in that: The device comprises: A signal acquisition module, used to acquire environmental information of a gas leakage location and sound signals collected near the gas leakage location; a leakage determination module, configured to input the sound signal and the environmental information into a pre-trained leakage determination model, so that the leakage determination model determines fusion information based on the sound signal and the environmental information, removes noise features from the fusion information, obtains leakage features, and determines the gas leakage amount according to the leakage features and the environmental information, wherein the leakage features characterize the characteristics of the sound signal generated by the gas leakage under the influence of the environmental information; Among them, the leakage amount determination model is obtained by training at least based on noise contrast loss, and the noise contrast loss is determined based on the difference in sample noise characteristics in sample fusion information corresponding to two groups of samples included in the sample pair. The two groups of samples included in the sample pair are collected under the same environmental noise, and each group of samples includes a sample sound signal and sample environmental information.
12. The device according to claim 11, characterized in that The leakage determination model includes a sound signal encoder, an environmental information encoder and a fusion module; The leakage amount determination module comprises: A sound signal encoding submodule, used for inputting the sound signal into the sound signal encoder, so that the sound signal encoder encodes the sound signal to obtain a sound encoding feature, and inputting the sound encoding feature into the fusion module; An environmental signal encoding submodule, used for inputting the environmental information into the environmental information encoder, so that the environmental information encoder encodes the environmental information to obtain environmental coding features, and inputting the environmental coding features into the fusion module; A fusion feature vector determination submodule is used for the fusion module to fuse the sound coding feature and the environment coding feature to obtain a fusion feature vector; A leakage feature determination submodule, used for removing the noise feature included in the fused feature vector to obtain a leakage feature; The leakage characteristic determination submodule includes: A vector segmentation submodule, used to segment the fused feature vector according to a preset segmentation method to obtain a first subvector and a second subvector, and remove the second subvector, wherein the first subvector is related to the leakage feature, and the second subvector is related to the noise feature; The leakage amount determination module further includes: A vector splicing submodule, used for splicing the first sub-vector and the environmental coding feature to obtain a splicing vector; A gas leakage determination submodule, configured to output the gas leakage amount based on the splicing vector and the corresponding relationship between the sample splicing vector and the leakage amount learned by the leakage determination model during the training process; The signal acquisition module comprises: A first signal acquisition module, used to acquire an ultrasonic echo signal collected by an ultrasonic sensor; The second signal acquisition module is used to acquire a temperature signal acquired by a temperature sensor and / or a humidity signal acquired by a humidity sensor.
13. A training device for a leakage determination model, characterized in that: The device comprises: A sample signal acquisition module, used to acquire a plurality of sample pairs and gas leakage labels corresponding to the samples included in the plurality of sample pairs, wherein each sample pair includes two groups of samples collected under the same environmental noise, and each group of samples includes a sample sound signal and sample environmental information; A leakage prediction module is used for inputting each group of samples into an initial leakage determination model, so that the initial leakage determination model determines sample fusion information based on the sample sound signals and sample environmental information included in the group of samples, separates sample noise characteristics and sample leakage characteristics from the sample fusion information, and determines the predicted gas leakage according to the sample leakage characteristics and the sample environmental information, wherein the sample leakage characteristics characterize the characteristics of the sample sound signals generated by the gas leakage under the influence of the sample environmental information; A parameter adjustment module is used to adjust the parameters of the initial leakage determination model according to the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label, and the difference between the sample noise characteristics corresponding to the two groups of samples included in each sample pair, until the initial leakage determination model meets the convergence condition, thereby obtaining the leakage determination model.
14. The device according to claim 13, characterized in that The parameter adjustment module comprises: A noise contrast loss determination submodule, used to determine the noise contrast loss corresponding to each sample pair according to the difference between the sample noise features corresponding to the two groups of samples included in each sample pair; A parameter adjustment submodule, configured to adjust the parameters of the initial leakage determination model in such a way that the difference between the predicted gas leakage corresponding to each group of samples and the gas leakage label is reduced, and the noise contrast loss corresponding to each sample pair is reduced as an optimization direction; The initial leakage determination model includes a sound signal encoder, an environmental information encoder and a fusion module; The leakage prediction module comprises: The sample signal encoding submodule is used to input the group of samples into the initial leakage amount determination model, so that the sound signal encoder encodes the sample sound signals included in the group of samples to obtain sample sound encoding features, and inputs the sample sound encoding features into the fusion module, and the environment information encoder encodes the sample environment information included in the group of samples to obtain sample environment encoding features, and inputs the sample environment encoding features into the fusion module; A sample fusion feature vector determination submodule is used for the fusion module to fuse the sample sound coding features and the sample environment coding features corresponding to the group of samples to obtain a sample fusion feature vector; A sample leakage feature determination submodule, used to separate sample noise features and sample leakage features from the sample fusion feature vector; The sample leakage characteristic determination submodule includes: A vector segmentation unit, used for segmenting the sample fusion feature vector according to a preset segmentation method to obtain a sample first sub-vector and a sample second sub-vector, wherein the sample first sub-vector is related to the sample leakage feature, and the sample second sub-vector is related to the sample noise feature; The leakage prediction module further includes: A sample vector splicing submodule, used to splice the sample first subvector and the sample environment coding feature to obtain a sample splicing vector; The gas leakage prediction submodule is used to determine the correspondence between the sample splicing vector currently learned by the model and the leakage amount based on the sample splicing vector and the initial leakage amount, and output the predicted gas leakage amount.
15. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing the method described in any one of claims 1-5 or any one of claims 6-10 when executing a program stored in a memory.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 5 or any one of claims 6 to 10 is implemented.
Citation Information
Patent Citations
High-voltage converter transformer sleeve state monitoring method based on multi-source information fusion
CN112098780A