Poison gas leakage inversion method, device, equipment, medium and product

Through the stochastic simulation algorithm and differential evolution algorithm combined with the quasi-Newtonian optimization algorithm, the existing toxic gas leakage inversion methods have solved the problem of high computational complexity and low accuracy, and achieved more efficient and reliable toxic gas leakage inversion.

CN119989656APending Publication Date: 2025-05-13TSINGHUA UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510045554.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing toxic gas leakage inversion methods have high computational complexity and slow convergence speed, which is easy to fall into local optimal solutions, resulting in insufficient calculation accuracy and reliability of the prediction results.

Method used

Random simulation algorithm is used to determine the simulated position and simulation intensity with the smallest error in the concentration of toxic gas. Based on these results, the position constraints and intensity constraints of the toxic gas leak source are constructed, and the leakage source position and intensity are calculated by combining differential evolution algorithm and quasi-Newtonian optimization algorithm.

Benefits of technology

The convergence speed of toxic gas leakage inversion is improved, and the premature fall into the local optimal solution is avoided, and the calculation accuracy of the leakage source position and intensity is enhanced, thereby improving the reliability of the inversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989656A_ABST
    Figure CN119989656A_ABST
Patent Text Reader

Abstract

The invention provides a poison gas leakage inversion method, device and equipment, a medium and a product. According to one example of the application, the method may include: using a stochastic simulation algorithm to determine a simulation position and simulation intensity where a poison gas concentration error is minimum, the poison gas concentration error being an error between a sampled poison gas concentration of a sampling point and a stochastic simulated poison gas concentration; based on the simulation position and the simulation intensity, constructing a position constraint condition and an intensity constraint condition of the poison gas leakage source; calculating a leakage source position of a poison gas leakage source by adopting a differential evolution algorithm and a position constraint condition; and calculating the leakage source intensity of the poison gas leakage source by adopting a quasi-Newton optimization algorithm and an intensity constraint condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of public safety emergency management technology, and in particular to a toxic gas leakage inversion method, device, equipment, medium and product. Background Art

[0002] In the fields of chemical industry, petrochemical industry, natural gas processing, military facilities and other scientific research fields, toxic gas leakage accidents occur from time to time, posing a serious threat to personnel safety, environmental protection and the stable development of social economy. Toxic gas leakage not only directly endangers the life and health of on-site personnel due to its strong toxicity, but also brings great challenges to emergency rescue work due to the complexity and uncertainty of the accident site.

[0003] Current methods for inversion of toxic gas leaks usually rely on physical models, chemical diffusion models and other models to infer the source of the leak, involving complex mathematical equations and a large amount of calculations. They often face problems of high computational complexity and slow convergence, and are prone to falling into local optimal solutions, resulting in insufficient computational accuracy and reliability of the prediction results. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present application provides a toxic gas leakage inversion method, device, equipment, medium and product.

[0005] According to a first aspect of any embodiment of the present application, a method for inversion of toxic gas leakage is provided, the method comprising:

[0006] Using a random simulation algorithm, determining a simulation position and a simulation intensity with a minimum gas concentration error, wherein the gas concentration error is an error between a sampled gas concentration at a sampling point and a random simulated gas concentration;

[0007] Based on the simulated position and the simulated intensity, constructing the position constraint condition and the intensity constraint condition of the toxic gas leakage source;

[0008] Using a differential evolution algorithm and the position constraint condition, the leakage source position of the poisonous gas leakage source is calculated;

[0009] The leakage source intensity of the poisonous gas leakage source is calculated by using a quasi-Newton optimization algorithm and the intensity constraint condition.

[0010] According to a second aspect of any embodiment of the present application, a poisonous gas leakage inversion device is provided, the device comprising:

[0011] A simulation module, used to determine a simulation position and a simulation intensity with a minimum gas concentration error using a random simulation algorithm, wherein the gas concentration error is an error between a sampled gas concentration at a sampling point and a random simulated gas concentration;

[0012] A construction module, used for constructing the position constraint condition and the intensity constraint condition of the poisonous gas leakage source based on the simulated position and the simulated intensity;

[0013] A position calculation module, used to calculate the leakage source position of the poison gas leakage source by using a differential evolution algorithm and the position constraint condition;

[0014] The strength calculation module is used to calculate the leakage source strength of the poisonous gas leakage source by using a quasi-Newton optimization algorithm and the strength constraint condition.

[0015] According to a third aspect of any embodiment of the present application, there is provided an electronic device, including:

[0016] processor;

[0017] a memory for storing processor-executable instructions;

[0018] The processor implements the method described in any embodiment of the present application by running the executable instructions.

[0019] According to a fourth aspect of any embodiment of the present application, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the method described in any embodiment of the present application is implemented.

[0020] According to a fifth aspect of any embodiment of the present application, a computer program product is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the method described in any embodiment of the present application is implemented.

[0021] The technical solution provided by this application may have the following beneficial effects:

[0022] According to the above embodiments, by using a random simulation algorithm, the simulation position and simulation intensity with the smallest gas concentration error are determined, based on the simulation position and simulation intensity, the position constraint and intensity constraint of the gas leakage source are constructed, the differential evolution algorithm and the position constraint are used to calculate the leakage source position of the gas leakage source, and the quasi-Newton optimization algorithm and the intensity constraint are used to calculate the leakage source intensity of the gas leakage source. Through the random simulation algorithm, the search range of the optimal solution of the differential evolution algorithm and the quasi-Newton optimization algorithm can be quickly determined, the convergence speed of the overall inversion can be improved, and it is avoided to fall into the local optimal solution too early. At the same time, combined with the differential evolution algorithm and the quasi-Newton optimization algorithm, the calculation accuracy of the leakage source position and the leakage source intensity can be improved, thereby improving the reliability of the gas leakage inversion.

[0023] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings, which are incorporated in the specification and constitute a part of this application, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.

[0025] Figure 1 is a flow chart of a toxic gas leakage inversion method shown in the present application according to an exemplary embodiment;

[0026] Figure 2 is a schematic diagram of a poison gas concentration heat map according to an exemplary embodiment of the present application;

[0027] Figure 3 is a flow chart of a method for calculating a leakage source position according to an exemplary embodiment of the present application;

[0028] Figure 4 is a flow chart of a method for calculating leakage source intensity according to an exemplary embodiment of the present application;

[0029] Figure 5 is a flow chart of another toxic gas leakage inversion method shown in the present application according to an exemplary embodiment;

[0030] Figure 6 is a structural schematic diagram of an electronic device according to an exemplary embodiment of the present application;

[0031] Figure 7 It is a block diagram of a poisonous gas leakage inversion device shown in the present application according to an exemplary embodiment. DETAILED DESCRIPTION

[0032] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0033] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0034] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0035] At present, gas leakage inversion methods usually rely on models to infer the source of toxic gas leakage, which is highly complex and slow to converge. In addition, there is a high risk of falling into a local optimal solution, resulting in a large gap between the inversion results and the actual situation, and the calculation accuracy and reliability of the prediction results cannot be guaranteed.

[0036] In order to solve the above problems, the present application proposes a method for inversion of toxic gas leakage. To further illustrate the present application, the following embodiments are provided:

[0037] See also Figure 1 , Figure 1 This is a flow chart of a method for inverting a toxic gas leak according to an exemplary embodiment of the present application. The method can be applied to an inversion system, and the inversion system can be deployed in electronic devices such as mobile phones, computers, digital broadcast terminals, messaging devices, tablet devices, personal digital assistants, etc.

[0038] like Figure 1 As shown, the poison gas leakage inversion method may include the following steps:

[0039] Step 101: using a random simulation algorithm, determine the simulation position and simulation intensity with the minimum gas concentration error, where the gas concentration error is the error between the sampled gas concentration at the sampling point and the random simulated gas concentration.

[0040] In this step, the inversion system can obtain the sampling position and sampling gas concentration of the sampling point through a collection device such as a sensor. The sampling position can be represented by the spatial coordinates of the collection device, or other representation forms can be used. The collection device can be installed in a fixed position, or it can be carried by rescue personnel such as emergency responders of fire emergency and medical rescue.

[0041] The inversion system uses random simulation algorithms such as the Monte Carlo algorithm and the Las Vegas algorithm to randomly generate a series of possible combinations of random positions and random intensities. These combinations represent possible leak source locations and leak source intensities. For each set of randomly generated random positions and random intensities, the inversion system calculates the simulated toxic gas concentration at the sampling point under these conditions. By comparing the sampled toxic gas concentration at the sampling point with the simulated toxic gas concentration, the toxic gas concentration error is determined.

[0042] The inversion system continuously repeats the above simulation process, and through a large number of simulation operations, it searches for the simulation position and simulation intensity with the smallest error in toxic gas concentration, providing a more accurate initial range for the subsequent calculation of the leakage source position and leakage source intensity, which helps to quickly narrow the search range and improve calculation efficiency.

[0043] Among them, the sampled gas concentration is the actual gas concentration collected at the sampling point, and the simulated gas concentration is the simulated gas concentration generated at the sampling point based on the random position and random intensity. The gas concentration error is the error between the sampled gas concentration at the sampling point and the random simulated gas concentration, which can reflect the difference between the simulated gas concentration corresponding to the random position and random intensity and the actual sampled gas concentration.

[0044] The simulated position is the simulated leak source position generated during the simulation process, which can represent the actual leak source in the simulation environment. The leak source position is the location information of the gas leak source, which can be a relative coordinate, etc. The simulated intensity is the simulated leak source intensity set at the simulated position, which can represent the actual leak intensity in the simulation environment. The leak source intensity is an indicator to measure the ability of the gas leak source to release harmful substances, which is related to multiple factors such as the type, concentration, and rate of harmful substances released by the gas leak source.

[0045] Step 102: Based on the simulated position and simulated intensity, construct the position constraint condition and intensity constraint condition of the gas leakage source.

[0046] In this step, the inversion system constructs the location constraint and intensity constraint of the gas leak source based on the simulated position and simulated intensity. The location constraint is the constraint on the location of the leak source, which can limit the possible location range of the leak source and ensure that the subsequent search process only considers solutions that meet these conditions. The intensity constraint is the constraint on the intensity of the leak source, which can limit the possible intensity range of the leak source.

[0047] The location constraint conditions can be constructed in a way, for example, based on the simulated location, to constrain the location of the leakage source within the preset unit scale of the simulated location; or by combining the simulated location and the wind direction and wind speed data at the simulated location, to construct the location constraint conditions to constrain the location of the leakage source within a certain distance upstream or downstream of the wind direction, or to adjust the constraint range according to the wind speed. Alternatively, the location of the leakage source can be constrained to areas where historical toxic gas leaks frequently occur, by combining the simulated location and historical toxic gas leaks.

[0048] The intensity constraint condition can be constructed in a way, for example, by constraining the leakage source intensity within a preset unit scale range of the simulation intensity based on the simulation intensity; or by setting an upper or lower constraint limit for the leakage source intensity in combination with the simulation intensity and the toxicity, flammability, explosiveness and other properties of the toxic gas; or by constraining the leakage source intensity within a range that the environment can safely withstand in combination with the simulation intensity and the environment's capacity to accommodate the toxic gas.

[0049] It can be understood that the position constraints and strength constraints shown above are just some examples. The position constraints and strength constraints can be constructed in combination with factors such as the spatial scale and accuracy requirements of the actual leakage scenario, and the embodiments of the present application do not limit this.

[0050] Step 103: using a differential evolution algorithm and position constraints to calculate the leakage source position of the poisonous gas leakage source.

[0051] In this step, the inversion system uses the differential evolution algorithm (DE) to calculate the leakage source location of the gas leakage source. An initial population is generated according to the position constraint, and the population is continuously iterated to generate new candidate solutions through operations such as selection, crossover and mutation, and the optimal solution is determined by comparison, and finally the leakage source location that satisfies the smallest evaluation indicators such as gas concentration error is determined.

[0052] The differential evolution algorithm is a search algorithm improved from the genetic algorithm (GA). It searches for the optimal solution by simulating operations such as selection, crossover and mutation in the biological evolution process.

[0053] The principle of the differential evolution algorithm is to use directional perturbations on individuals to achieve the purpose of reducing the function value of individuals, without the need to be based on the gradient information of the function. Therefore, there is no requirement for the differentiability or even continuity of the optimization function, and it has strong applicability in complex gas leakage accident scenarios. In addition, it can also consider the correlation between multiple variables, and has outstanding advantages in dealing with the coupling problem of the leakage source location, with high calculation precision and accuracy.

[0054] Step 104: Calculate the leakage source intensity of the poisonous gas leakage source by using the quasi-Newton optimization algorithm and the intensity constraint condition.

[0055] In this step, the inversion system uses a quasi-Newton optimization algorithm (Limited-memory Broyden-Fletcher-Goldfarb-Shanno, L-BFGS-B) to calculate the leakage source intensity of the gas leakage source. The quasi-Newton optimization algorithm is a gradient-based optimization algorithm that can use the gradient information of the function to accelerate the search process.

[0056] The inversion system generates an initial guess based on the intensity constraint, which represents the possible intensity of the leak source. By continuously iterating this solution, the optimal solution is approached by calculating the gradient and updating the solution. Finally, the leak source intensity that minimizes the evaluation indicators such as the gas concentration error is determined.

[0057] By using the differential evolution algorithm to calculate the leakage source position and the quasi-Newton optimization algorithm to calculate the leakage source intensity, the calculation precision and accuracy can be further improved compared to the calculation of the leakage source position and the leakage source intensity by using the differential evolution algorithm alone.

[0058] In one embodiment, a plurality of grid cells are divided on a two-dimensional plane or in a three-dimensional space according to the resolution of the gas concentration heat map. Each grid cell has a unique coordinate for identifying its position on the heat map. The resolution can determine the degree of detail that can be displayed on the gas concentration heat map, that is, the size of each grid cell. The higher the resolution, the smaller the grid cell, and the finer the gas concentration distribution that can be displayed.

[0059] Using the toxic gas diffusion model such as the Gaussian plume model, the inverted toxic gas concentration of each grid unit is calculated based on the location and intensity of the leak source. Taking the Gaussian plume model as an example, the inversion system can input parameters such as the location of the leak source, the leak source intensity, the wind speed, the effective source height, and the diffusion coefficient into the Gaussian plume model. For each grid unit, the inverted toxic gas concentration of the point is calculated using the Gaussian plume model according to its position on the thermal map.

[0060] The calculated inverted toxic gas concentration of each grid cell is stored in the corresponding data structure for subsequent visualization. The inverted toxic gas concentration is the toxic gas concentration inferred based on the calculated leakage source location and leakage source intensity, which is used to reflect the distribution of toxic gas in the toxic gas leakage scene.

[0061] On the gas concentration heat map, the inverted gas concentration is mapped and displayed through visual symbols such as color scales, and the calculated gas concentration data is converted into intuitive visual information, which helps emergency response personnel quickly understand the situation at the accident site.

[0062] Exemplarily, the Gaussian plume model can calculate the inverted toxic gas concentration according to the following formula 1:

[0063]

[0064] Among them, C(x,y,z) represents the inverted gas concentration of the grid unit, in kg / m 2, x, y and z represent the distance between the grid unit and the leakage source, in meters. Q represents the leakage source intensity, in kg / s. u represents the wind speed, in meters / s; H represents the height of the effective source, in meters; σ x , σ y and σ z They represent the diffusion coefficients in the downwind, crosswind and vertical wind directions respectively, with the unit being m.

[0065] See also Figure 2 , Figure 2 A schematic diagram of a gas concentration heat map is shown. Taking a two-dimensional gas concentration heat map as an example, the inversion system sets a color scale according to the range of gas concentration and the needs of rescuers. The color scale is a color sequence that gradually changes from low to high and is used to represent different gas concentration values. For each grid cell, find the corresponding color on the color scale according to the inverted gas concentration.

[0066] On the heat map, the distribution of toxic gas concentration in the entire area is drawn according to the position and corresponding color of each grid unit. The location of the rescue personnel can also be displayed, that is, the location indicated by the green dot. Rescuers can intuitively understand the distribution of toxic gas concentration at the accident site by viewing the heat map.

[0067] Understandably, Figure 2 The coordinates (0, 0) of the leakage source in the toxic gas concentration heat map shown are relative coordinates to the location of the rescuers, and can also be expressed as longitude and latitude coordinates based on the location of the rescuers, without limitation.

[0068] Figure 2 The toxic gas concentration heat map shown is only an example. The distribution of toxic gas concentration can also be displayed in a visual way such as a three-dimensional view. The location of the leakage source, the risk level corresponding to the toxic gas concentration, and other related information can also be displayed on the toxic gas concentration heat map. The embodiments of the present application do not limit this.

[0069] As mentioned above, by dividing each grid unit according to the resolution of the gas concentration heat map, the gas diffusion model is used to calculate the inverted gas concentration of each grid unit based on the leakage source location and leakage source intensity. On the gas concentration heat map, the inverted gas concentration is mapped and displayed through visual labels to achieve a visual display of gas leakage, making the gas concentration distribution intuitive and easy to understand, so that relevant personnel can quickly identify and respond to areas with high gas concentrations, thereby realizing digital twin support for gas leakage inversion.

[0070] The poisonous gas leakage inversion method of this embodiment uses a random simulation algorithm to determine the simulation position and simulation intensity with the smallest poisonous gas concentration error, constructs the position constraint and intensity constraint of the poisonous gas leakage source based on the simulation position and simulation intensity, calculates the leakage source position of the poisonous gas leakage source by using the differential evolution algorithm and the position constraint, and calculates the leakage source intensity of the poisonous gas leakage source by using the quasi-Newton optimization algorithm and the intensity constraint. Through the random simulation algorithm, the search range of the optimal solution of the differential evolution algorithm and the quasi-Newton optimization algorithm can be quickly determined, the convergence speed of the overall inversion can be improved, and it can be avoided to fall into the local optimal solution too early. At the same time, combined with the differential evolution algorithm and the quasi-Newton optimization algorithm, the calculation accuracy of the leakage source position and the leakage source intensity can be improved, thereby improving the reliability of the poisonous gas leakage inversion.

[0071] In the above-mentioned embodiment, the random simulation algorithm is introduced to preliminarily determine the search range of the differential evolution algorithm and the quasi-Newton optimization algorithm, and then solve the leakage source position and leakage source intensity respectively, so as to improve the calculation accuracy and convergence speed. In the following embodiment, the inversion process of poisonous gas leakage will be described in more detail, and can be applied to any of the above embodiments.

[0072] In one embodiment, the rescuer can carry a collection device with him, and the inversion system obtains the location of the rescuer through the collection device, and obtains the sampled toxic gas concentration at the location of the rescuer. The sampled toxic gas concentration can be expanded by a data expansion algorithm such as a grid interpolation algorithm.

[0073] For example, a small-scale grid is generated around the existing personnel position, and the grid interpolation is performed on the preset range where the personnel position is located to generate multiple sampling points. The sampled toxic gas concentration at the personnel position is used as the sampled toxic gas concentration of multiple sampling points. The sampling position and sampled toxic gas concentration of the expanded sampling points are used as input data for the subsequent differential evolution algorithm and quasi-Newton optimization algorithm to calculate the leakage source location and leakage source intensity.

[0074] As described above, by obtaining the position of the rescue personnel, the rescue personnel carry toxic gas concentration measuring equipment, and use the toxic gas concentration measuring equipment to obtain the sampled toxic gas concentration at the personnel position, and perform grid interpolation on the preset range of the personnel position to generate multiple sampling points. The sampled toxic gas concentration at the personnel position is used as the sampled toxic gas concentration of multiple sampling points, and the data of the sampled toxic gas concentration is expanded by grid interpolation. This can reduce the number of actual sampling points, and there is no need to set the collection device at a fixed position, which reduces the dependence on the deployment of the collection device at the accident site and improves the flexibility of toxic gas leak inversion.

[0075] In one embodiment, taking the Monte Carlo algorithm as an example of a random simulation algorithm, the problem to be solved can be converted into a feature number with a random distribution. Through the random sampling method, the probability is estimated by the frequency of occurrence of random events, or the digital features of random variables are estimated by the sampled digital features as the solution to the problem.

[0076] The inversion algorithm can pre-randomly generate several groups of random positions and random concentrations, and can set several simulation tasks. In each simulation task, a gas diffusion model such as a Gaussian plume model is used to generate simulated gas concentrations at the sampling point according to each group of random positions and random intensities.

[0077] The inversion algorithm can pre-build an error function based on the least squares method. The error function is used to calculate the gas concentration error between the simulated gas concentration at the sampling point and the sampled gas concentration. Several simulation tasks can be performed simultaneously in parallel, thereby reducing the time consumption of gas leak inversion.

[0078] Exemplarily, the inversion system can calculate the poison gas concentration error according to the error function shown in the following formula 2:

[0079]

[0080] in, Indicates the gas concentration error, represents the leakage source parameter vector, which may include the relative coordinates of the leakage source position and the leakage source intensity, n represents the number of sampling points, y m Represents the simulated gas concentration, y i Indicates the concentration of sampled toxic gas.

[0081] Among the multiple gas concentration errors obtained by simulation, the random position and random intensity with the smallest gas concentration error are selected as the simulation position and simulation intensity. Among them, the random position is the geographical location coordinates randomly generated for the gas leakage source during the simulation process, which is used to explore all potential leakage points in the entire preset area. The random intensity is the intensity randomly generated for the gas leakage source during the simulation process, which is used to simulate different leakage situations of the gas leakage source.

[0082] As described above, by utilizing the poison gas diffusion model, a simulated poison gas concentration is generated according to random positions and random intensities, and the poison gas concentration error between the simulated poison gas concentration and the sampled poison gas concentration is calculated. Among multiple poison gas concentration errors, the random position and random intensity with the smallest poison gas concentration error are selected as the simulated position and simulated intensity. By selecting the combination with the smallest error under multiple random combinations of simulated poison gas concentrations as the final simulated position and simulated intensity, the accuracy of the simulated position and simulated intensity can be significantly improved.

[0083] In one embodiment, see Figure 3, Figure 3 A flow chart showing a method for calculating the location of a leakage source is shown. Figure 3 As shown, the calculation method may include the following steps:

[0084] Step 301: Generate an initial population according to location constraints.

[0085] In this step, the inversion algorithm can generate the initial population of the differential evolution algorithm according to the constructed location constraints of the gas leakage source. Each individual position in the initial population represents a possible leakage source position, that is, a potential solution, which can be represented by a D-dimensional real vector, and each individual position is randomly generated within the range of the location constraints.

[0086] Step 302: Using the fitness function, evaluate the fitness of each individual position in the current population.

[0087] In this step, the inversion algorithm can use the least squares method to construct a fitness function, which is used to calculate the error between the sampled gas concentration and the simulated gas concentration corresponding to each individual position. The smaller the fitness, the smaller the error between the simulated gas concentration corresponding to the individual position and the sampled gas concentration, that is, the closer the individual position is to the actual leak source position.

[0088] The quality of each individual position as a potential leak source position can be evaluated by calculating the fitness of each individual position in the current population, which is the population being evaluated during the iteration process.

[0089] Step 303: Determine whether the position convergence condition is met.

[0090] In this step, the inversion system can determine whether the position convergence condition is met. The position convergence condition is a condition for determining whether the individual position has approached or reached the global optimal solution during the iteration process, which can be the fitness value reaching a preset threshold, reaching the maximum number of iterations, etc.

[0091] If the position convergence condition is met, step 310 is executed; if the position convergence condition is not met, step 304 is continued to iterate and mutate and combine the current population. After each iteration, a new test vector is generated and compared with the individual position in the current population. Through continuous iterative optimization, the individual position in the population will gradually approach the actual leakage source position.

[0092] Step 304: Select a mutant individual position from the current population and calculate a mutation vector of the mutant individual position.

[0093] In this step, the inversion system can randomly select N individual positions from the current population as variant individual positions, and calculate the mutation vector of the variant individual position, where N is a positive integer. Taking N as 3 as an example, three different individual positions are randomly selected from the current population, denoted as X1, X2, and X3, and the mutation vector is calculated based on the variant individual position and the scaling factor.

[0094] Among them, the mutant individual position is the new individual position generated by the mutation operation. The position of the mutant individual position can be represented by a mutation vector, which can introduce new genetic information to the current population and increase the diversity of the current population. The mutation vector represents the new potential leakage source position, which can represent the position change of the mutant individual position relative to the target individual in the search space, and is used for subsequent hybridization operations and fitness evaluation.

[0095] Exemplarily, the inversion system may calculate the mutation vector according to the mutation formula shown in Formula 3 below:

[0096] V=X1+F×(X2-X3) Formula 3

[0097] Wherein, V represents the mutation vector, and F represents the scaling factor, and the value range may be between 0 and 1, for example, F may be 0.5.

[0098] The scaling factor can control the magnitude of the mutation operation and determine the degree of difference between the mutation vector and the position of the mutated individual. The larger the value of the scaling factor, the greater the difference between the mutation vector and the position X1 of the mutated individual, which helps the algorithm explore a wider area in the search space; the smaller the value of the scaling factor, the smaller the magnitude of the mutation, and the algorithm explores more finely in the search space.

[0099] Step 305: For each dimension of the individual position, generate a dimensional random number for each dimension.

[0100] In this step, the inversion system can randomly generate a dimensional random number in the range of [0,1] for each dimension of each individual position, for example, the x, y, and z coordinates of each individual position, for subsequent crossover probability judgment, and the dimensional random number can be uniformly distributed in the range of [0,1].

[0101] Step 306: Determine whether the crossover probability condition is met.

[0102] In this step, the inversion system determines whether the dimensional random number of the current dimension satisfies the crossover probability condition, where the current dimension is the dimension being evaluated during the crossover process.

[0103] If the dimensional random number of the current dimension meets the crossover probability condition, continue to execute step 307; if the dimensional random number of the current dimension does not meet the crossover probability condition, execute step 308.

[0104] Step 307: Use the mutation dimension value of the mutation vector as the test dimension value.

[0105] In this step, when it is determined that the dimensional random number of the current dimension meets the crossover probability condition, the mutation dimension value of the mutation vector is used as the test dimension value of the test vector to ensure that the test vector can inherit the characteristics of the mutation vector in the current dimension. Among them, the mutation dimension value is the value of the mutation vector in the current dimension, the test dimension value is the value of the test vector in the current dimension, and the test vector is a new potential solution generated by the mutation and hybridization operations of the differential evolution algorithm.

[0106] Exemplarily, the inversion system may determine the test vector according to the following formula 4:

[0107]

[0108] Among them, u i,j represents the test vector u i The value in the jth dimension, v i,j Represents the mutation vector v i The value in the jth dimension, x i,j Represents the current individual position x i The value in the jth dimension, r j Indicates the dimensional random number generated on the jth dimension. CR represents the crossover rate, which can range from 0 to 1. For example, CR is 0.7, j rand Represents a dimension index randomly selected from all dimensions at the current individual position.

[0109] The crossover probability condition can be that the dimension random number is less than or equal to the crossover probability, or that the current dimension is the dimension index. The dimension index can ensure that the test vector inherits the value of at least one dimension from the mutation vector, even if the dimension random number of the dimension does not satisfy the crossover probability, thereby increasing the search diversity of the algorithm and avoiding premature convergence.

[0110] It can be understood that the above crossover probability condition is only an example, and other crossover probability conditions may also be used, which is not limited in the embodiments of the present application.

[0111] As described above, by generating dimensional random numbers for each dimension of the individual position, when it is determined that the dimensional random number of the current dimension meets the crossover probability condition, the mutation dimension value of the mutation vector is used as the trial dimension value of the trial vector, and when it is determined that the dimensional random number of the current dimension does not meet the crossover probability condition, the individual dimension value of the individual position is used as the trial dimension value. This helps to find solutions that may be far away from the current population but have higher fitness. By controlling the mutation and maintaining the proportion of the original individuals through the crossover probability condition, the diversity of the population can be maintained and it is avoided to fall into the local optimum too early.

[0112] Step 308: Use the individual dimension value of the individual position as the test dimension value.

[0113] In this step, when it is determined that the dimensional random number of the current dimension does not meet the crossover probability condition, the individual dimension value of the individual position is used as the test dimension value to ensure that the test vector maintains the characteristics of the current individual in the current dimension. The individual dimension value is the value of the individual position in the current dimension.

[0114] Through the operations of steps 306 to 308 above, the mutation vector and each individual position are combined to generate a test vector, thereby obtaining a test vector after mutation and hybridization operations.

[0115] Step 309: Among the individual positions and test vectors, select the individual position with the smallest fitness.

[0116] In this step, the inversion system can use the fitness function to calculate the fitness of each individual position and test vector in the current population. Among the individual positions and test vectors, the individual position with the smallest fitness is selected as the optimal solution for the current iteration round.

[0117] Step 310: The individual position with the smallest fitness is taken as the leakage source position.

[0118] In this step, when the position convergence condition is met, the iteration is stopped, and the position of the individual with the smallest fitness value in the current population is output as the final leakage source position.

[0119] As described above, by generating an initial population based on position constraints and ensuring that the selected individual positions are within a reasonable range, it helps to avoid falling into a local optimal solution. The fitness function is used to evaluate the fitness of each individual position in the current population, and the mutant individual position is selected from the current population. The mutation vector of the mutant individual position is calculated, the mutation vector and each individual position are combined to generate a test vector. Among each individual position and the test vector, the individual position with the smallest fitness is selected, and the current population is iteratively mutated and combined until the preset position convergence condition is met. The individual position with the smallest fitness is used as the leakage source position, and new solution spaces are continuously explored through mutation and combination operations, thereby improving the global search capability of the differential evolution algorithm, and being able to find individual positions close to the optimal solution in a shorter time, thereby improving computational efficiency.

[0120] In one embodiment, see Figure 4 , Figure 4 A flow chart showing a method for calculating the leakage source intensity is shown. Figure 4 As shown, the calculation method may include the following steps:

[0121] Step 401: according to the strength constraint condition, the initial strength of the leakage source strength is set.

[0122] In this step, the inversion system can set the initial strength x0 of the leakage source strength according to the strength constraint condition of the constructed toxic gas leakage source, and the initial strength can be used as the starting point of the quasi-Newton optimization algorithm for subsequent iterative calculations. Exemplarily, the strength range of the strength constraint condition constructed according to the simulation strength is [l, u], and the initial strength x0 can be determined in the strength range [l, u].

[0123] Step 402: During the iteration process, the function gradient of the objective function is calculated.

[0124] In this step, the inversion system can use the least squares method as the objective function to be minimized. In each round of iteration, the inversion system can calculate the function gradient of the objective function f(x) The objective function is used to reflect the error between the sampled gas concentration and the simulated gas concentration corresponding to the current intensity. The function gradient is used to reflect the rate of change in all directions at the current intensity, that is, the derivative vector of the objective function at the current point, which can determine the search direction and step size.

[0125] Step 403: Update the Hessian matrix according to the change in the current intensity and the change in the function gradient.

[0126] In this step, the inversion system can calculate the change of the current intensity according to the current intensity of the current iteration round and the intensity of the previous iteration round, and calculate the change of the function gradient according to the function gradient of the current iteration round and the function gradient of the previous iteration round.

[0127] The idea of ​​the BFGS algorithm can be used to iteratively update the Hessian matrix according to the change in the current intensity and the change in the function gradient, and use the updated Hessian matrix to build a secondary model, thereby approximating the objective function and determining the search direction and step size for the next part. The Hessian matrix is ​​used to reflect the curvature information of the objective function.

[0128] Exemplarily, the inversion system can determine the Hessian matrix according to the following formula 5:

[0129]

[0130] Among them, H k+1 represents the Hessian matrix at the k+1th iteration, is the initial estimate of the inverse matrix of the Hessian matrix of the kth iteration, I represents the identity matrix, ρ k Represents a scalar, used to adjust the weight of the update formula, which can be defined y k Indicates the change in the function gradient at the kth iteration, s k represents the change in the current intensity at the kth iteration, The transposed vector representing the amount of change in the function gradient, The transposed vector representing the amount of change in the current intensity.

[0131] Step 404: Based on the updated Hessian matrix, perform a direction search to determine the search direction.

[0132] In this step, after obtaining the updated Hessian matrix, the Hessian matrix can be used to calculate the search direction. The search direction is the direction along which the objective function decreases fastest at the current point, that is, the direction after the negative gradient direction is adjusted by the inverse matrix of the Hessian matrix. Exemplarily, the inversion system can determine the search direction according to the following formula 6:

[0133]

[0134] Among them, p k Indicates the search direction, H k represents the approximate value of the inverse matrix of the Hessian matrix at the kth iteration, Represents the function gradient at the kth iteration.

[0135] Step 405: Determine the step length in the search direction using a line search algorithm.

[0136] In this step, in the search direction, the Armijo condition, Wolfe condition and other line search algorithms are used to determine the optimal step size so that the function value of the objective function reaches the minimum at the updated point.

[0137] Step 406: Update the current intensity based on the search direction and step size.

[0138] In this step, the inversion system can update the current intensity according to the determined search direction and step size, so that the updated current intensity is closer to the optimal solution.

[0139] Exemplarily, the inversion system may determine the step size according to the following formula 7:

[0140] x k+1 =x k +α k p k Formula 7

[0141] Among them, x k+1 represents the current intensity at the k+1th iteration, x k represents the current intensity at the kth iteration, α k represents the step size, ρ k Represents a scalar.

[0142] Step 407: Determine whether the strength convergence condition is met.

[0143] In this step, the inversion system can determine whether the preset intensity convergence condition is met. The intensity convergence condition is a condition for determining whether the current intensity is close to or reaches the global optimal solution during the iteration process, which can be the norm of the gradient reaching a certain accuracy requirement, reaching the maximum number of iterations, etc.

[0144] If the intensity convergence condition is met, then step 408 is continued to be executed; if the intensity convergence condition is not met, then step 402 is executed to iteratively calculate, search and update the updated current intensity until the intensity convergence condition is met.

[0145] Step 408: The current intensity with the minimum function value of the objective function is taken as the leakage source intensity.

[0146] In this step, when the intensity convergence condition is met, the current intensity with the minimum function value of the objective function can be output as the final leakage source intensity to ensure that the algorithm can converge to the global optimal solution or the approximate optimal solution.

[0147] As described above, by setting the initial intensity of the leakage source intensity according to the intensity constraint condition, calculating the function gradient of the objective function during the iteration process, it helps the algorithm to quickly locate the direction that reduces the objective function value, thereby achieving efficient convergence; updating the Hessian matrix according to the change in the current intensity and the change in the function gradient, performing direction search and line search based on the updated Hessian matrix, and determining the search direction and step size, it helps the algorithm to find the optimal search path in a complex multi-dimensional space, ensuring that the optimal solution can be approached in a stable manner in each iteration step, avoiding excessive fluctuations or instability during the optimization process; based on the search direction and step size, the current intensity is updated, and the updated current intensity is iteratively gradient calculated, searched and updated until the preset intensity convergence condition is met, thereby quickly and accurately calculating the leakage source intensity that minimizes the function value of the objective function.

[0148] In order to further introduce the inversion process of toxic gas leakage, Figure 5 A flowchart of another gas leak inversion method is shown. The inversion system can be deployed on a gas leak inversion device carried by rescuers, and the gas leak inversion method can be executed by the gas leak inversion device, which can be an electronic device with data processing capabilities and visual display means, such as a portable wearable device, a handheld electronic device, etc.

[0149] like Figure 5 As shown, the method may include the following steps:

[0150] Step 501: Obtain the location of the rescuer and the sampled toxic gas concentration at the location.

[0151] In this step, illustratively, the collection device can be integrated into the toxic gas leakage inversion equipment, and the inversion system can obtain the personnel position of the rescue personnel and the sampled toxic gas concentration at the personnel position through the collection device.

[0152] For example, in four different gas leakage scenarios, the sampled gas concentrations at the positions of rescuers A, B, C, D, E, and F can be shown in Table 1:

[0153] Table 1 Sampled toxic gas concentration at the personnel position

[0154]

[0155]

[0156] Among them, the personnel position of the rescue personnel can be expressed in relative coordinates.

[0157] Step 502: Grid interpolation is performed on the personnel positions to generate sampled toxic gas concentrations at multiple sampling points.

[0158] In this step, the inversion system can perform grid interpolation on the personnel position to generate sampled toxic gas concentrations at multiple sampling points. For example, a 0.5*0.5 grid can be generated within a preset range of ±2 unit scale around each personnel position, and the coordinates of each node position in the grid can be calculated to generate multiple sampling points.

[0159] The sampled toxic gas concentration at the personnel position is used as the sampled toxic gas concentration at multiple sampling points, and the sampled toxic gas concentration at multiple sampling points and the multiple sampling points are added to the database as input data.

[0160] Step 503: Use the Monte Carlo algorithm to determine the simulation position and simulation intensity.

[0161] In this step, the inversion system can perform 5000 simulation tasks in parallel by Monte Carlo algorithm. In each simulation task, the Gaussian plume model is used to generate simulated gas concentration according to random position and random intensity, and the gas concentration error between the simulated gas concentration and the sampled gas concentration is calculated.

[0162] Among the gas concentration errors calculated through 5000 simulation tasks, the random position and random intensity with the smallest gas concentration error are selected as the simulation position and simulation intensity.

[0163] For example, in four different gas leakage scenarios, the simulation positions and simulation intensities determined using the Monte Carlo algorithm can be shown in Table 2:

[0164] Table 2 Simulation positions and simulation intensities

[0165]

[0166] Among them, 1E-01 represents the precision level of 0.1, and 1E-02 represents the precision level of 0.01. As can be seen from Table 2, the Monte Carlo algorithm does not have significant advantages in terms of calculation accuracy and calculation time. It is suitable as a constraint condition for the differential evolution algorithm and the quasi-Newton optimization algorithm to predetermine the approximate range of the optimal solution, thereby improving the convergence speed of the differential evolution algorithm and the quasi-Newton optimization algorithm.

[0167] Step 504: constructing position constraints and strength constraints based on the simulated position and the simulated strength.

[0168] In this step, the inversion system can construct position constraints and intensity constraints based on the simulated position and simulated intensity. For example, the position constraint of the leakage source position can be set to be within the scale range of ±4 units of the simulated position, and the intensity constraint can be set to be within the scale range of ±1 unit of the simulated intensity.

[0169] Step 505: Generate an initial population of leakage source strengths according to the location constraints.

[0170] In this step, the inversion system can generate an initial population of leakage source intensities within a scale range of ±4 units of the simulation location according to the location constraints.

[0171] Step 506: Determine whether the position convergence condition is met.

[0172] In this step, the inversion system can determine whether the position convergence condition is met. Taking the position convergence condition as being lower than the preset error value between the simulated gas concentration and the sampled gas concentration as an example, the fitness function can be used to evaluate the fitness of each individual position in the current population to determine whether the minimum fitness is lower than the preset error value. If the position convergence condition is not met, continue to step 507; if the position convergence condition is met, execute step 509.

[0173] Step 507: Perform differential mutation and hybridization on the current population.

[0174] In this step, the inversion system can select the mutant individual position from the current population, calculate the mutation vector of the mutant individual position, and generate dimensional random numbers for each dimension of the individual position.

[0175] The dimensional random number of each dimension is judged. When it is determined that the dimensional random number of the current dimension meets the crossover probability condition, the mutation dimension value of the mutation vector is used as the test dimension value of the test vector; when it is determined that the dimensional random number of the current dimension does not meet the crossover probability condition, the individual dimension value of the individual position is used as the test dimension value of the test vector, thereby combining the mutation vector and each individual position to generate a test vector.

[0176] Step 508: Among the individual positions and test vectors, select the individual position with the smallest fitness.

[0177] In this step, the inversion system may select the individual position with the smallest fitness from among the individual positions and the test vectors, and repeat step 506 to determine whether the position convergence condition is met.

[0178] If the position convergence condition is not met, the iterative mutation and combination of the current population are repeated until the position convergence condition is met, and the position of the individual with the smallest fitness is taken as the leakage source position.

[0179] Step 509: According to the strength constraint condition, the initial strength of the leakage source strength is set.

[0180] In this step, the inversion system can set the initial intensity of the leakage source intensity within the scale range of ±1 unit of the simulation intensity according to the intensity constraint.

[0181] Step 510: The inversion system calculates the function gradient of the objective function.

[0182] Step 511: Update the Hessian matrix.

[0183] In this step, the inversion system updates the inverse matrix of the Hessian matrix according to the change in the current intensity and the change in the function gradient.

[0184] Step 512: Execute direction search and line search, and determine the search direction and step size.

[0185] In this step, the inversion system can construct a secondary model based on the inverse matrix of the updated Hessian matrix, perform a direction search, and determine the search direction. Perform a line search in the determined search direction to determine the optimal step size. Update the current intensity according to the determined search direction and step size, so that the updated current intensity is closer to the optimal solution.

[0186] Step 513: Determine whether the strength convergence condition is met.

[0187] In this step, the inversion system can determine whether the intensity convergence condition is met. If the intensity convergence condition is met, continue to step 514; if the intensity convergence condition is not met, execute step 510 to iteratively calculate, search and update the updated current intensity until the intensity convergence condition is met, and take the current intensity with the minimum function value of the objective function as the leakage source intensity.

[0188] Step 514: Calculate the inverse toxic gas concentration based on the leakage source location and leakage source intensity.

[0189] In this step, the inversion system can use the Gaussian plume model to calculate the inverted toxic gas concentration at the leakage source location based on relevant parameters such as the regional wind direction is along the positive direction of the x-axis, the wind speed is 1.05m / s, the atmospheric stability level is A, the leakage source intensity is 0.05kg / s, and the height of the toxic gas leakage source is 0.5m.

[0190] For example, in four different gas leakage scenarios, the leakage source locations and leakage source intensities determined by using the differential evolution algorithm and the quasi-Newton optimization algorithm can be shown in Table 3:

[0191] Table 3 Simulation positions and simulation intensities

[0192]

[0193]

[0194] Among them, 1E-08 represents the precision level of 0.00000001, and 1E-09 represents the precision level of 0.000000001. As can be seen from Table 3, the differential evolution algorithm and the quasi-Newton optimization algorithm can achieve a high precision level of 1E-9 in terms of calculation accuracy, and the calculation efficiency can reach the second level, which has significant advantages in terms of calculation accuracy and calculation time. By constraining the initial value range of the differential evolution algorithm and the quasi-Newton optimization algorithm by the Monte Carlo algorithm, the differential evolution algorithm and the quasi-Newton optimization algorithm can also be effectively prevented from falling into the local optimal solution too early.

[0195] Step 515: On the poisonous gas concentration heat map, the inverted poisonous gas concentration is mapped and displayed through a visual mark.

[0196] In this step, the inversion system can map and display the inverted toxic gas concentration on the toxic gas concentration heat map through visual labels, displaying information such as the source of the toxic gas leak, the location of the rescue personnel, and the risk level, providing a digital twin foundation for the rescue personnel to perceive the situation at the accident site.

[0197] This embodiment expands the data set of sampled toxic gas concentrations through grid interpolation, reduces the number of required actual sampling locations, and does not require fixed sampling point locations. It is suitable for complex sudden toxic gas leakage scenarios. While reducing the amount of actual data required, it can ensure algorithm accuracy and convergence speed.

[0198] Combining the respective advantages of the random simulation algorithm, differential evolution algorithm and quasi-Newton optimization algorithm, the Monte Carlo algorithm is applied to preliminarily calculate the optimal solution, and the constraints of the differential evolution algorithm and the quasi-Newton algorithm are determined to ensure that the differential evolution algorithm and the quasi-Newton algorithm will not fall into the local optimum too early, avoiding the respective disadvantages of the Monte Carlo algorithm, differential evolution algorithm and quasi-Newton optimization algorithm, and having advantages in calculation accuracy and convergence speed.

[0199] At the same time, through the toxic gas leak inversion equipment with integrated collection devices carried by rescue personnel, the inverted toxic gas concentration in the toxic gas leak scene, the relative coordinates of the personnel's position and other digital information can be quantitatively calculated in an offline manner, the distribution of toxic gas concentration can be visualized, and the digital twin reproduction of the toxic gas concentration accident scene can be realized, thereby enhancing the rescue personnel's situational awareness of the accident scene.

[0200] Figure 6 1 is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present application. The electronic device may be, for example, a mobile phone, a computer, a digital broadcast terminal, a message transceiver, a game console, a tablet device, a personal digital assistant, a server, a smart home appliance, a car computer, etc. Figure 6At the hardware level, the electronic device includes a processor 601, an internal bus 602, a network interface 603, a memory 604, and a non-volatile memory 605, and may also include hardware required for other services. The processor 601 reads the corresponding computer program from the non-volatile memory 605 into the memory 604 and then runs it, forming a toxic gas leak inversion device at the logical level. Of course, in addition to the software implementation, this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0201] Figure 7 is a block diagram of a toxic gas leakage inversion device according to an exemplary embodiment of the present application. Figure 7 The device may include: a simulation module 701, a construction module 702, a position calculation module 703 and an intensity calculation module 704, wherein:

[0202] The simulation module 701 is used to determine the simulation position and simulation intensity with the minimum gas concentration error using a random simulation algorithm, wherein the gas concentration error is the error between the sampled gas concentration at the sampling point and the random simulated gas concentration;

[0203] The construction module 702 is used to construct the location constraint condition and the intensity constraint condition of the poisonous gas leakage source based on the simulated location and the simulated intensity;

[0204] The position calculation module 703 is used to calculate the leakage source position of the poison gas leakage source by using a differential evolution algorithm and the position constraint condition;

[0205] The intensity calculation module 704 is used to calculate the leakage source intensity of the poisonous gas leakage source by using a quasi-Newton optimization algorithm and the intensity constraint condition.

[0206] In one example, the intensity calculation module 704 is also used to divide each grid unit according to the resolution of the toxic gas concentration heat map; use the toxic gas diffusion model to calculate the inverted toxic gas concentration of each grid unit based on the leakage source location and the leakage source intensity; and map and display the inverted toxic gas concentration on the toxic gas concentration heat map through visual identification.

[0207] In one example, the simulation module 701, before being used to use a random simulation algorithm to determine the simulation position and simulation intensity with the smallest gas concentration error, also includes: obtaining the personnel position of the rescue personnel; obtaining the sampled gas concentration at the personnel position; performing grid interpolation on a preset range where the personnel position is located to generate multiple sampling points; and using the sampled gas concentration at the personnel position as the sampled gas concentration of the multiple sampling points.

[0208] In one example, the simulation module 701, when used to use a random simulation algorithm to determine the simulation position and simulation intensity with the smallest gas concentration error, includes: using a gas diffusion model to generate the simulated gas concentration according to a random position and a random intensity; calculating the gas concentration error between the simulated gas concentration and the sampled gas concentration; and selecting, from multiple gas concentration errors, the random position and random intensity with the smallest gas concentration error as the simulation position and the simulation intensity.

[0209] In one example, the position calculation module 703, when used to calculate the leakage source position of the toxic gas leakage source using the differential evolution algorithm and the position constraint condition, includes: generating an initial population according to the position constraint condition; using a fitness function to evaluate the fitness of each individual position in the current population, wherein the fitness is used to reflect the error between the sampled toxic gas concentration and the simulated toxic gas concentration corresponding to each individual position; selecting a variant individual position from the current population and calculating a mutation vector of the variant individual position; combining the mutation vector and each individual position to generate a test vector; selecting the individual position with the smallest fitness from each individual position and the test vector; iteratively mutating and combining the current population until a preset position convergence condition is met, and taking the individual position with the smallest fitness as the leakage source position.

[0210] In one example, the position calculation module 703, when used to combine the mutation vector and the individual positions to generate a test vector, includes: generating dimensional random numbers for each dimension of the individual position; when it is determined that the dimensional random number of the current dimension satisfies the crossover probability condition, using the mutation dimension value of the mutation vector as the test dimension value of the test vector; the mutation dimension value is the value of the mutation vector in the current dimension, and the test dimension value is the value of the test vector in the current dimension; when it is determined that the dimensional random number of the current dimension does not satisfy the crossover probability condition, using the individual dimension value of the individual position as the test dimension value, and the individual dimension value is the value of the individual position in the current dimension.

[0211] In one example, the intensity calculation module 704, when using the quasi-Newton optimization algorithm and the intensity constraint condition to calculate the leakage source intensity of the toxic gas leakage source, sets the initial intensity of the leakage source intensity according to the intensity constraint condition; in the iterative process, calculates the function gradient of the objective function, the objective function is used to reflect the error between the sampled toxic gas concentration and the simulated toxic gas concentration corresponding to the current intensity, and the function gradient is used to reflect the rate of change along various directions at the current intensity; updates the Hessian matrix according to the change in the current intensity and the change in the function gradient, and the Hessian matrix is ​​used to reflect the curvature information of the objective function; based on the updated Hessian matrix, performs direction search and line search to determine the search direction and step size; based on the search direction and the step size, updates the current intensity; performs iterative gradient calculation, search and update on the updated current intensity until the preset intensity convergence condition is met, and takes the current intensity with the smallest function value of the objective function as the leakage source intensity.

[0212] In one example, the method is performed by a toxic gas leak inversion device carried by rescue personnel.

[0213] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0214] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0215] In an exemplary embodiment, a non-temporary computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by a processor of a toxic gas leak inversion device to implement a method as described in any of the above embodiments.

[0216] The non-temporary computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc., and the present application does not limit this.

[0217] In an exemplary embodiment, a computer program product including a computer program / instruction is also provided. The computer program / instruction can be executed by a processor of a toxic gas leakage inversion device to implement any of the methods described in the above embodiments.

[0218] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0219] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the inventions claimed herein. The present application is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

[0220] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A poisonous gas leakage inversion method, characterized in that: The method comprises: Using a random simulation algorithm, determining a simulation position and a simulation intensity with a minimum gas concentration error, wherein the gas concentration error is an error between a sampled gas concentration at a sampling point and a random simulated gas concentration; Based on the simulated position and the simulated intensity, constructing the position constraint condition and the intensity constraint condition of the toxic gas leakage source; Using a differential evolution algorithm and the position constraint condition, the leakage source position of the poisonous gas leakage source is calculated; The leakage source intensity of the poisonous gas leakage source is calculated by using a quasi-Newton optimization algorithm and the intensity constraint condition.

2. The method according to claim 1, characterized in that The method further comprises: According to the resolution of the gas concentration heat map, each grid unit is divided; Utilizing a poisonous gas diffusion model, based on the leakage source location and the leakage source intensity, calculating the inverted poisonous gas concentration of each grid unit; On the poison gas concentration heat map, the inverted poison gas concentration is mapped and displayed through visual markings.

3. The method according to claim 1, characterized in that Before using the random simulation algorithm to determine the simulation position and simulation intensity with the minimum gas concentration error, the method further includes: Obtain the personnel location of rescue personnel; Obtaining the sampled toxic gas concentration at the personnel position; Performing grid interpolation on a preset range where the personnel position is located to generate multiple sampling points; The sampled toxic gas concentration at the personnel position is used as the sampled toxic gas concentration at the multiple sampling points.

4. The method according to claim 1, characterized in that: The method of using a random simulation algorithm to determine a simulation position and a simulation intensity with a minimum gas concentration error includes: Using a poison gas diffusion model, generating the simulated poison gas concentration according to random positions and random intensities; Calculating the gas concentration error between the simulated gas concentration and the sampled gas concentration; Among a plurality of poisonous gas concentration errors, a random position and a random intensity with the smallest poisonous gas concentration error are selected as the simulation position and the simulation intensity.

5. The method according to claim 1, characterized in that The adopting of the differential evolution algorithm and the position constraint condition to calculate the leakage source position of the poisonous gas leakage source comprises: generating an initial population according to the position constraint conditions; Using a fitness function, evaluating the fitness of each individual position in the current population, the fitness being used to reflect the error between the sampled toxic gas concentration and the simulated toxic gas concentration corresponding to each individual position; Select a mutation individual position from the current population, and calculate a mutation vector of the mutation individual position; Combining the variation vector and each individual position to generate a test vector; Among the individual positions and the test vectors, selecting the individual position with the smallest fitness; The current population is iteratively mutated and combined until a preset position convergence condition is met, and the position of the individual with the minimum fitness is taken as the leakage source position.

6. The method according to claim 5, characterized in that The step of combining the variation vector and each individual position to generate a test vector includes: For each dimension of the individual position, generate a dimensional random number of each dimension; When it is determined that the dimensional random number of the current dimension satisfies the crossover probability condition, the mutation dimension value of the mutation vector is used as the trial dimension value of the trial vector; the mutation dimension value is the value of the mutation vector in the current dimension, and the trial dimension value is the value of the trial vector in the current dimension; When it is determined that the dimensional random number of the current dimension does not satisfy the crossover probability condition, the individual dimension value of the individual position is used as the trial dimension value, and the individual dimension value is the value of the individual position in the current dimension.

7. The method according to claim 1, characterized in that The method of using the quasi-Newton optimization algorithm and the intensity constraint condition to calculate the leakage source intensity of the poisonous gas leakage source includes: According to the intensity constraint condition, setting the initial intensity of the leakage source intensity; In the iteration process, the function gradient of the objective function is calculated, the objective function is used to reflect the error between the sampled gas concentration and the simulated gas concentration corresponding to the current intensity, and the function gradient is used to reflect the rate of change in each direction at the current intensity; According to the change of the current intensity and the change of the function gradient, updating the Hessian matrix, wherein the Hessian matrix is ​​used to reflect the curvature information of the objective function; Based on the updated Hessian matrix, perform direction search and line search to determine the search direction and step size; Based on the search direction and the step size, updating the current intensity; Iterative gradient calculation, search and update are performed on the updated current intensity until a preset intensity convergence condition is met, and the current intensity with the minimum function value of the objective function is used as the leakage source intensity.

8. The method according to claim 2, characterized in that: The method is performed by a toxic gas leak inversion device carried by rescuers.

9. A poisonous gas leakage inversion device, characterized in that: The device comprises: A simulation module, used to determine a simulation position and a simulation intensity with a minimum gas concentration error using a random simulation algorithm, wherein the gas concentration error is an error between a sampled gas concentration at a sampling point and a random simulated gas concentration; A construction module, used for constructing the position constraint condition and the intensity constraint condition of the poisonous gas leakage source based on the simulated position and the simulated intensity; A position calculation module, used to calculate the leakage source position of the poison gas leakage source by using a differential evolution algorithm and the position constraint condition; The strength calculation module is used to calculate the leakage source strength of the poisonous gas leakage source by using a quasi-Newton optimization algorithm and the strength constraint condition.

10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 8 by running the executable instructions.

11. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

12. A computer program product having a computer program / instructions stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Improved UWB error compensation positioning method based on Vegas + algorithm

    CN120652388A

  • UWB error compensation positioning method based on Vegas+ algorithm improvement

    CN120652388B

  • Method for detecting air tightness of welding seam of automobile axle housing

    CN120890610A