Optimization method applied to gas network leakage detector and pressure sensor deployment

By improving the Levy flight mechanism and adaptive parameters of the Cuckoo algorithm, the deployment of gas pipeline leak detectors and pressure sensors was optimized, solving the local limit problem, achieving efficient sensor network coverage and energy balance, and improving the ability to monitor and prevent gas leaks.

CN113473501BActive Publication Date: 2025-11-18BEIJING GLOBAL SAFETY TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110721451.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-28
Publication Date
2025-11-18
Estimated Expiration
2041-06-28

AI Technical Summary

Technical Problem

Existing wireless sensor network deployment optimization methods are prone to getting stuck in local limits, have weak search capabilities, and are difficult to achieve effective coverage and energy balance between gas pipeline leak detectors and pressure sensors.

Method used

An improved Cuckoo algorithm, employing the Levy flight mechanism combined with adaptive scaling factors and adaptive discovery probabilities, optimizes the deployment of gas leak detectors and pressure sensors by updating sensor positions and states, avoiding local limits and improving search capabilities and convergence speed.

Benefits of technology

It enables the efficient deployment of gas leak detectors and pressure sensors, reduces hardware costs, improves equipment utilization, and enhances gas risk prevention, monitoring, and early warning capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113473501B_ABST
    Figure CN113473501B_ABST
Patent Text Reader

Abstract

The application provides an optimization method, an optimization device and a position determination device applied to deployment of a gas pipeline network leakage detector and a pressure sensor. The method comprises the following steps: obtaining a sensor group for monitoring gas leakage and gas pipeline pressure; obtaining a target function of each sensor position by initializing the sensor group; obtaining a target function value of each sensor position according to the target function and comparing the target function value to obtain a current optimal sensor; updating the position and state of all sensors except the current optimal sensor by using a Levy flight mechanism, and determining a global optimal sensor; and performing layout optimization according to the position of the global optimal sensor and outputting the position of the global optimal sensor. The method optimizes the deployment of the sensor group based on the Levy flight mechanism, avoids the problem that the existing optimization method is prone to falling into a local limit, and reduces hardware device cost and monitoring data redundancy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of gas pipeline leak detectors and pressure sensor deployment technology, and in particular to an optimized method for deploying gas pipeline leak detectors and pressure sensors. Background Technology

[0002] Natural gas is a crucial energy source for my country's economic development, characterized by its cleanliness and lack of pollution. Therefore, strengthening natural gas pipeline transportation construction not only benefits my country's economic development but also contributes to environmental protection. However, due to inherent defects in natural gas pipelines and oversights during construction and operation, leaks occur frequently, posing serious safety risks. Deploying gas leak detectors and pressure sensors in adjacent spaces and at key nodes within the gas pipeline network is crucial for real-time monitoring of gas leaks and ensuring gas safety. By hybridizing gas leak detectors and pressure sensors in different adjacent spaces and at various nodes, both gas leaks and pipeline pressure can be monitored simultaneously, enabling multi-parameter fusion for risk control and early warning. Researching optimized hybrid deployment techniques for urban underground gas pipeline leak detectors and pipeline pressure sensors can reduce hardware costs, decrease data redundancy, and improve equipment utilization.

[0003] Gas leak detectors and pipeline pressure sensors are typical examples of wireless detectors. A wireless detector network is formed by a communication network of numerous wireless sensor nodes, enabling real-time monitoring and collaborative sensing of key areas within a target region, and the collection and processing of information on monitored objects and work areas. Therefore, the deployment of wireless sensor nodes is crucial. A high-performance wireless sensor network exhibits excellent performance in terms of network node coverage, node utilization, and energy balance coefficient. Specifically, it needs to achieve maximum network coverage of the target area with the minimum number of wireless sensors, allowing it to operate for a sufficiently long time. However, in practical applications, often only one or two targets are targeted, as these factors are often conflicting; optimizing one target may constrain one or more other targets. Therefore, a reasonable multi-objective optimization algorithm is needed to optimize the deployment of sensor network nodes, significantly improving the performance of the wireless sensor network.

[0004] However, current optimization methods for wireless sensor network deployment are prone to getting stuck in local limits and have weak search capabilities. Summary of the Invention

[0005] This application aims to at least partially address one of the technical problems in the related art.

[0006] Therefore, the first objective of this application is to propose an optimization method for the deployment of gas pipeline leak detectors and pressure sensors, in order to solve the technical problems that current optimization methods for wireless sensor network deployment are prone to getting stuck in local limits and have weak search capabilities.

[0007] The second objective of this application is to propose an optimized device for the deployment of gas pipeline leak detectors and pressure sensors.

[0008] The third objective of this application is to provide a location determination device for use with gas leak detectors and pressure sensors.

[0009] The fourth objective of this application is to provide a computer device.

[0010] The fifth objective of this application is to provide a non-transitory computer-readable storage medium.

[0011] To achieve the above objectives, the first aspect of this application proposes an optimized method for deploying gas pipeline leak detectors and pressure sensors, comprising the following steps:

[0012] Step S10: Obtain the sensor group for monitoring gas and gas pipeline, and initialize the sensor group. The initialization of the sensor group includes randomly initializing the position of each sensor in the sensor group and defining the objective function for the position of each sensor.

[0013] Step S20: Obtain the objective function value of each sensor location and compare them to obtain the current optimal function value and the corresponding current optimal sensor;

[0014] Step S30: Use the Levi flight mechanism to update the position and state of all sensors except the current optimal sensor, and obtain the objective function values ​​of all sensors except the current optimal sensor. Compare the obtained function values ​​with the current optimal function value. If they are better, update and record the current optimal function value and its corresponding current optimal sensor. The current optimal sensor is the global optimal sensor.

[0015] Step S40: Optimize the layout of the gas pipeline leak detector and pressure sensor deployment based on the location of the globally optimal sensor, and output the location of the globally optimal sensor.

[0016] Optionally, in this embodiment of the application, initializing the sensor group in step S10 further includes setting the sensor group size, the search space dimension, the maximum number of iterations, and the initial discovery probability.

[0017] Optionally, in this embodiment of the application, the method for obtaining the objective function value for each sensor location in step S20 specifically includes the following steps:

[0018] Step S21: Discretize the monitored sensor group into multiple sub-regions, deploy multiple sensor nodes in the sub-regions, and combine the multiple sensor nodes into a sensor set;

[0019] Step S22: Calculate the coverage rate, node utilization rate, and energy balance coefficient of the multiple sensor nodes;

[0020] Step S23: Optimize the objective function for each sensor location based on the coverage rate, the node utilization rate, and the energy balance coefficient.

[0021] Optionally, in this embodiment, step S30 compares the obtained function value with the current optimal function value. If the value is better, the current optimal function value and its corresponding current optimal sensor are updated and recorded. The current optimal sensor is the globally optimal sensor. The step also includes updating the position of the current optimal sensor using the following formula:

[0022]

[0023] Where r is the scaling factor, r∈[0,1], and x is a random number following a uniform distribution. i t+1 x i t Let x represent the (t+1)th generation and tth generation sensor group of the i-th sensor, respectively; j t x i t Let x represent the j-th sensor and the i-th sensor in the t-th generation sensor group, respectively, where x j t It is x i t Nearby sensors.

[0024] Optionally, in this embodiment of the application, step S30 further includes the following steps:

[0025] Step S31: After the position is updated, the improved adaptive scaling factor is compared with the adaptive discovery probability. If the adaptive scaling factor is greater than the adaptive discovery probability, the sensor position is updated randomly once.

[0026] Otherwise, the sensor position remains unchanged.

[0027] Step S32: When the algorithm iterates to the first threshold, it is determined whether the position of the globally optimal sensor is trapped in a local optimum. If so, the position of the globally optimal sensor is updated by using the simulated annealing algorithm mechanism, the objective function value of the globally optimal sensor is calculated, and a memory function is introduced to retain the optimal sensor position during the annealing process. After the annealing is completed, the current optimal function value and its corresponding current optimal sensor are obtained, and then the process proceeds to step S30.

[0028] If not, proceed directly to step S30.

[0029] Step S33: When the algorithm iteration meets the maximum number of iterations or the preset search accuracy requirement, execute step S40.

[0030] Otherwise, return to step S30.

[0031] To achieve the above objectives, a second aspect of this application provides an optimized device for deploying gas pipeline leak detectors and pressure sensors, comprising:

[0032] An initialization module is used to acquire a sensor group for monitoring gas and gas pipelines and to initialize the sensor group. The initialization of the sensor group includes randomly initializing the position of each sensor in the sensor group and defining an objective function for the position of each sensor.

[0033] The comparison module is used to obtain the objective function value of each sensor position and compare them to obtain the current optimal function value and the corresponding current optimal sensor.

[0034] The update module is used to update the position and state of all sensors except the current best sensor using the Levi flight mechanism, and obtain the objective function values ​​of all sensors except the current best sensor. The obtained function values ​​are compared with the current best function value. If they are better, the current best function value and its corresponding current best sensor are updated and recorded. The current best sensor is the global best sensor.

[0035] The optimization module is used to optimize the layout of the gas pipeline leak detectors and pressure sensors based on the location of the globally optimal sensor, and output the location of the globally optimal sensor.

[0036] Optionally, in this embodiment, the comparison module specifically includes:

[0037] Discrete unit, used to discretize the monitored sensor group into multiple sub-regions, deploy multiple sensor nodes in the sub-regions, and combine the multiple sensor nodes into a sensor set;

[0038] The computing unit is used to calculate the coverage rate, node utilization rate, and energy balance coefficient of the multiple sensor nodes.

[0039] An optimization unit is used to optimize the objective function of each sensor location based on the coverage rate, the node utilization rate, and the energy balance coefficient.

[0040] To achieve the above objectives, a third aspect of this application provides a location determination device for a gas leak detector and a pressure sensor, comprising:

[0041] The first initialization module is used to initialize the initial parameters of the cuckoo search algorithm. The initial parameters include the number of sensors and the initial sensor positions. The number of sensors indicates the number of multiple gas leak detectors and pressure sensors, and the initial sensor positions indicate the first positions of the multiple gas leak detectors and pressure sensors.

[0042] The calculation module is used to determine the objective function values ​​corresponding to multiple sensors based on the positions of multiple gas leak detectors and pressure sensors determined by the first initialization module; wherein, the objective function values ​​are used to indicate the degree of contribution of multiple gas leak detectors and pressure sensors to gas leak risk prevention and monitoring and early warning;

[0043] The location module is used to update the location based on the objective function values ​​corresponding to multiple sensors determined by the calculation module and a preset algorithm, and to determine the target location of the target sensor; wherein, the target sensor is any one of the multiple sensors, used to indicate the sensor to be finally deployed, and the target location is used to indicate the deployment location of the target sensor.

[0044] To achieve the above objectives, a fourth aspect of this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the method described in the first aspect of this application.

[0045] To achieve the above objectives, a fifth aspect of this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the method described in the first aspect of this application.

[0046] In summary, the optimization method, optimization device, location determination device, computer equipment, and non-transitory computer-readable storage medium for the deployment of gas pipeline leak detectors and pressure sensors according to embodiments of this application involve: acquiring a sensor group for monitoring gas leaks and gas pipeline pressure; initializing the sensor group to obtain the objective function for each sensor location; obtaining the objective function value for each sensor location based on its objective function, and comparing the objective function values ​​to obtain the current optimal function value and its corresponding current optimal sensor; using the Levy flight mechanism to update the positions and states of all sensors except the current optimal sensor, and obtaining the objective function values ​​of all sensors except the current optimal sensor; comparing the obtained function value with the current optimal function value, and if it is better, updating and designating the current optimal sensor as the global optimal sensor; optimizing the layout of the gas pipeline leak detector and pressure sensor deployment based on the position of the global optimal sensor, and outputting the position of the global optimal sensor. Therefore, the above scheme optimizes the deployment of gas leak detectors and pipeline pressure sensors based on the Levy flight mechanism. The optimized hybrid deployment of gas leak detectors and pipeline pressure sensors is used for gas risk prevention and monitoring and early warning, avoiding the problem that existing optimization methods are prone to getting stuck in local limits, and reducing hardware costs and monitoring data redundancy.

[0047] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0048] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0049] Figure 1 A flowchart illustrating an optimized method for deploying gas pipeline leak detectors and pressure sensors, provided in an embodiment of this application;

[0050] Figure 2 This is a flowchart of the cuckoo algorithm in the embodiments of this application;

[0051] Figure 3 This is the initial node distribution diagram in the embodiments of this application;

[0052] Figure 4 This is a MATLAB simulation diagram of the Levi flight mechanism in the embodiments of this application;

[0053] Figure 5 This is the optimized node distribution diagram in the embodiments of this application; and

[0054] Figure 6A schematic diagram of an optimized device for deploying gas pipeline leak detectors and pressure sensors, provided in an embodiment of this application; and

[0055] Figure 7 This is a schematic diagram of a location determination device for a gas pipeline leak detector and pressure sensor, provided in an embodiment of this application. Detailed Implementation

[0056] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0057] The following description, with reference to the accompanying drawings, describes an optimized method and apparatus for deploying gas pipeline leak detectors and pressure sensors according to embodiments of this application.

[0058] Figure 1 This is a flowchart illustrating an optimized method for deploying gas pipeline leak detectors and pressure sensors, as provided in an embodiment of this application.

[0059] Figure 2 This is a flowchart of the cuckoo algorithm in the embodiments of this application.

[0060] like Figure 1 and Figure 2 As shown in the figure, an optimization method for deploying gas pipeline leak detectors and pressure sensors provided in this application includes the following steps:

[0061] Step S10, as follows Figure 3 As shown, a sensor group for monitoring gas leaks and gas pipeline pressure is acquired and initialized. The initialization of the sensor group includes randomly initializing the position of each sensor in the group and defining an objective function for each sensor position. The sensor position is randomly set to (x... i y i Let i ∈ [1, n], and let f(x) be the objective function for each sensor location, where x = [x1, x2, ..., xn]. n ] T .

[0062] In this embodiment of the application, initializing the sensor group further includes setting the sensor group size, the search space dimension, the maximum number of iterations, and the initial discovery probability.

[0063] Step S20: Obtain the objective function value for each sensor location and compare them to obtain the current optimal function value and the corresponding current optimal sensor.

[0064] Furthermore, in this embodiment, the method for obtaining the objective function value at each sensor location specifically includes the following steps:

[0065] Step S21: Discretize the monitored sensor group into multiple sub-regions, deploy multiple sensor nodes in the sub-regions, and combine the multiple sensor nodes into a sensor set.

[0066] Specifically, in this embodiment, the monitored area is discretized into m×n sub-regions, and a sensor set C = {c1, c2, ..., cn} consisting of N sensor nodes is deployed within each sub-region. n}

[0067] Step S22: Calculate the coverage rate, node utilization rate, and energy balance coefficient of the multiple sensor nodes.

[0068] The specific calculation process for the coverage rate, node utilization rate, and energy balance coefficient of multiple sensor nodes in this application is as follows:

[0069] Let the i-th sensor node c i The coordinates are c i =(x i ,y i Given a target sub-region p with coordinates (x, y), the probability that the target sub-region p is covered by the sensor set C is:

[0070]

[0071] Wherein, the sensor's position coordinates c i It can be one-dimensional coordinate information, two-dimensional coordinate information, or three-dimensional coordinate information. The above embodiment only uses two-dimensional coordinates as an example.

[0072] Specifically, in this embodiment of the application, the node adopts a Boolean (0-1) perception model, then the target sub-region p is perceived by sensor node c. i The probability of being covered is:

[0073]

[0074] Where R is the monitoring radius of the sensor node. For a gas leak detector, the monitoring radius is affected by the porosity and moisture content of the soil near the pipeline; for a pipeline pressure sensor, the monitoring radius is affected by the pipeline diameter and gas pressure. The monitoring radius is much smaller than the communication radius between sensor nodes; d(c i p) represents sensor node ci The Euclidean distance to the target sub-region p is shown in the following formula:

[0075]

[0076] Therefore, the node coverage rate of the monitored area is expressed as the ratio of the number of sub-regions covered by sensor nodes to the total number of sub-regions in the working area, as shown in the following formula:

[0077]

[0078] The node utilization rate of the monitored area represents the ratio of the number of nodes in operation within the deployment area to the total number of N sensor nodes, as shown in the following formula:

[0079]

[0080] The energy balance coefficient of the monitored area represents the degree of energy balance of the effectively operating nodes, as shown in the following formula:

[0081]

[0082] Where max(E) i ) represents the node with the maximum remaining energy among all sensor nodes, min(E) i ) represents the node with the minimum remaining energy among all sensor nodes, and K represents the number of nodes that are effectively working.

[0083] The node coverage of a gas leak detector is expressed as μ. leak Node utilization rate Energy balance coefficient η leak The node coverage of pipeline pressure sensors is expressed as μ. pressure Node utilization rate Energy balance coefficient η pressure .

[0084] Gas leak detectors and pipeline pressure sensors are not placed in the same location at the same time.

[0085] Step S23: Optimize the objective function for each sensor location based on the coverage rate, the node utilization rate, and the energy balance coefficient.

[0086] In this embodiment, the objective function for each sensor location is optimized based on three indicators: network node coverage, utilization, and energy balance coefficient. The optimized objective function is expressed by the following formula:

[0087]

[0088] Where ω1, ω2, and ω3 are the weighting coefficients of each sub-target of the corresponding gas leak detector, ω1 + ω2 + ω3 = 1; ω4, ω5, and ω6 are the weighting coefficients of each sub-target of the corresponding pipeline pressure sensor, ω4 + ω5 + ω6 = 1; ξ leak ξ pressure The respective contributions of gas leak detectors and pipeline pressure sensors to gas leak risk prevention, monitoring, and early warning technologies, ξ leak +ξ pressure =1.

[0089] Step S30, as follows Figure 4 As shown, the position and state of all sensors except the current optimal sensor are updated using the Levy flight mechanism, and the objective function values ​​of all sensors except the current optimal sensor are obtained. The obtained function values ​​are compared with the current optimal function value. If they are better, the current optimal function value and its corresponding current optimal sensor are updated and recorded. The current optimal sensor is the global optimal sensor.

[0090] In this embodiment of the application, the formula for the Lévy flight mechanism is:

[0091]

[0092] Where Г is the Gamma function;

[0093] Where s is the random step size of the Lévy distribution, its expression is as follows:

[0094]

[0095] Among them, u~N(0,σ 2 ), v ~ N(0,1). Where, the expression for σ is:

[0096]

[0097] In step S30 of this embodiment, the obtained function value is compared with the current optimal function value. If it is better, the current optimal function value and its corresponding current optimal sensor are updated and recorded. The current optimal sensor is the globally optimal sensor. The method also includes updating the position of the current optimal sensor using the following formula:

[0098]

[0099] Where r is the scaling factor, r∈[0,1], and x is a random number following a uniform distribution. i t+1 x i tLet x represent the (t+1)th generation and tth generation sensor group of the i-th sensor, respectively; j t x i t Let x represent the j-th sensor and the i-th sensor in the t-th generation sensor group, respectively, where x j t It is x i t Nearby sensors.

[0100] Specifically, the sensor position is updated in the following manner in the embodiments of this application:

[0101] When sensor i needs to generate a new position x t+1 At that time, the Lévy flight formula is executed once, as shown in the following formula:

[0102] Lévy(λ)~u=t -λ (1≤λ≤3).

[0103] Therefore, the sensor position update formula is as follows:

[0104]

[0105] Furthermore, step S30 in this embodiment of the application also includes the following steps:

[0106] Step S31: After the position is updated, the improved adaptive scaling factor is compared with the adaptive discovery probability. If the adaptive scaling factor is greater than the adaptive discovery probability, the sensor position is randomly updated once; otherwise, the sensor position remains unchanged. This application improves the Cuckoo Algorithm by using a dual-parameter approach of adaptive step size and adaptive discovery probability, avoiding the problem of the sensor Cuckoo Algorithm easily getting trapped in local limits, and effectively improving the search capability and convergence speed.

[0107] Specifically, in this embodiment of the application, the adaptive scaling factor r and the adaptive discovery probability Pa are calculated using the following formula:

[0108]

[0109]

[0110] Where, r i t Let r be the scaling factor for the i-th sensor in the sensor group of generation t; max and r min These are the upper and lower limits of the scaling factor, respectively; f i t f best t and f worstt p represents the fitness values ​​of the i-th sensor, the best sensor, and the worst sensor in the t-th generation sensor group, respectively; a t Let p be the probability that the i-th sensor in the sensor group of generation t is detected; amax and p amin This represents the upper and lower bounds of the probability of discovery.

[0111] Probability of discovery P a Alternatively, the following update method can be used. In the original cuckoo algorithm, P a It is a fixed value; in the actual optimization process, as the number of iterations increases, the result gets closer and closer to the optimal value, at which point the probability P is found to be... a If the original cardinality is maintained, a large number of high-quality solutions will be eliminated, damaging the algorithm's optimization performance. Therefore, the discovery probability P is updated using the learning rate decay method, with the following formula: a Make the discovery probability P a It becomes a value that changes with the number of iterations:

[0112] P a =0.95 t P a0

[0113] Where t is the iteration number, P a0 The initial discovery probability is set to 0.25.

[0114] Step S32: When the algorithm iterates to the first threshold, it is determined whether the position of the globally optimal sensor has fallen into a local optimum. If so, the simulated annealing algorithm is used to update the position of the globally optimal sensor, the objective function value of the globally optimal sensor is calculated, and a memory function is introduced to retain the optimal sensor position during the annealing process. After annealing, the current optimal function value and its corresponding current optimal sensor are obtained, and then the process proceeds to step S30. The first threshold in "when the algorithm iterates to the first threshold" refers to the 12th step reached. Figure 2 As shown.

[0115] If not, proceed directly to step S30.

[0116] Specifically, in this embodiment of the application, the following formula is used to determine whether the position of the globally optimal sensor has fallen into a local optimum:

[0117]

[0118] After updating the cuckoo's nest using the simulated annealing algorithm, the new discovery probability and random number are calculated and used as a metric for deciding whether to abandon the solution. The calculation formula is as follows:

[0119]

[0120] r i ′=(r i +P ai ) / 2

[0121] Step S33: When the algorithm iteration meets the maximum number of iterations or the preset search accuracy requirement, execute step S40.

[0122] Otherwise, return to step S30.

[0123] Step S40: Optimize the layout of the gas pipeline leak detectors and pressure sensors based on the location of the globally optimal sensor, and output the location of the globally optimal sensor. The optimized sensor node distribution diagram is shown below. Figure 5 As shown.

[0124] In summary, the optimization method for deploying gas pipeline leak detectors and pressure sensors provided in this application utilizes the advantages of the Cuckoo Algorithm, such as few parameters, ease of implementation, and strong search capability. Furthermore, based on the existing Cuckoo Algorithm, it improves the algorithm by employing a dual-parameter approach with adaptive step size and adaptive discovery probability, thus avoiding the problem of the sensor Cuckoo Algorithm easily getting trapped in local limits and effectively improving search capability and convergence speed. On the other hand, it performs multi-objective optimization of the sensor network with sensor network coverage, node utilization, and network equilibrium coefficient as comprehensive optimization objectives.

[0125] Figure 6 This is a schematic diagram of an optimized device for deploying gas pipeline leak detectors and pressure sensors, provided in an embodiment of this application.

[0126] like Figure 6 As shown in the figure, an optimized device for deploying gas pipeline leak detectors and pressure sensors, provided in this application embodiment, includes:

[0127] The initialization module 10 is used to acquire a sensor group for monitoring gas leaks and gas pipeline pressure, and to initialize the sensor group. The initialization of the sensor group includes randomly initializing the position of each sensor in the sensor group and defining the objective function for the position of each sensor.

[0128] The comparison module 20 is used to obtain the target function value of each sensor position and compare them to obtain the current optimal function value and the corresponding current optimal sensor.

[0129] The comparison module 20 in this embodiment specifically includes:

[0130] Discrete unit, used to discretize the monitored sensor group into multiple sub-regions, deploy multiple sensor nodes in the sub-regions, and combine the multiple sensor nodes into a sensor set;

[0131] The computing unit is used to calculate the coverage rate, node utilization rate, and energy balance coefficient of the multiple sensor nodes.

[0132] An optimization unit is used to optimize the objective function of each sensor location based on the coverage rate, the node utilization rate, and the energy balance coefficient.

[0133] The update module 30 is used to update the position and state of all sensors except the current optimal sensor using the Levi flight mechanism, and to obtain the objective function values ​​of all sensors except the current optimal sensor. The obtained function values ​​are compared with the current optimal function value. If they are better, the current optimal function value and its corresponding current optimal sensor are updated and recorded. The current optimal sensor is the global optimal sensor.

[0134] The optimization module 40 is used to optimize the layout of the gas pipeline leak detectors and pressure sensors based on the location of the globally optimal sensor, and output the location of the globally optimal sensor.

[0135] Figure 7 This is a schematic diagram of a location determination device for a gas leak detector and a pressure sensor, provided in an embodiment of this application.

[0136] To achieve the above embodiments, such as Figure 7 As shown, this application also proposes a location determination device for gas leak detectors and pressure sensors, comprising:

[0137] The first initialization module 50 is used to initialize the initial parameters of the cuckoo search algorithm. The initial parameters include the number of sensors and the initial sensor positions. The number of sensors is used to indicate the number of multiple gas leak detectors and pressure sensors, and the initial sensor positions are used to indicate the first positions of the multiple gas leak detectors and pressure sensors.

[0138] The calculation module 60 is used to determine the objective function value corresponding to multiple sensors based on the positions of multiple gas leak detectors and pressure sensors determined by the first initialization module; wherein, the objective function value is used to indicate the degree of contribution of multiple gas leak detectors and pressure sensors to gas leak risk prevention and monitoring and early warning;

[0139] The location module 70 is used to update the location based on the objective function values ​​corresponding to multiple sensors determined by the calculation module and a preset algorithm, and to determine the target location of the target sensor; wherein, the target sensor is any one of the multiple sensors, used to indicate the sensor to be finally deployed, and the target location is used to indicate the deployment location of the target sensor.

[0140] In summary, the solutions provided in the embodiments of this application have the following advantages:

[0141] Advantage 1: The gas leak detector and pipeline pressure sensor are arranged in a mixed manner for gas risk prevention and monitoring and early warning. Different weight coefficients are assigned to the two sensors according to their contribution to gas risk prevention and monitoring and early warning technologies, which is used for sensor deployment optimization design based on the Cuckoo algorithm.

[0142] Advantage Two: Many problems in scientific and engineering practice can be reduced to optimization problems. Compared to well-developed biomimetic intelligent algorithms such as ACO (Ant Colony Optimization) and PSO (Particle Swarm Optimization), the Cuckoo Algorithm uses Lévy flight random walks and biased random walks to construct new solutions. It not only has good global search capabilities but also strong local search capabilities, demonstrating superior performance. The biased random walk generates new solutions by essentially performing mutation operations on individuals, maintaining high diversity in the sensor swarm. The larger the scaling factor r, the more mutations occur in individuals, and the greater their contribution to the constructed new solution; conversely, the smaller the mutations, the smaller their contribution to the constructed new solution. Discovery probability P a The larger the value, the greater the probability of generating a new solution and the greater the contribution to the next generation of solutions, which is beneficial to improving search ability and accelerating convergence speed; conversely, the smaller the value, the smaller the contribution to the next generation of solutions, which is not beneficial to improving search ability and accelerating convergence speed.

[0143] The scaling factor r in the standard cuckoo algorithm is randomly generated and is generally positively correlated with the step size; the discovery probability P a As the scaling factor r is fixed, it decreases as the search space shrinks in the later stages of evolution. This leads to a decrease in the algorithm's mutation ability, getting trapped in local optima, slow convergence speed, and low accuracy.

[0144] In other words, this application's embodiments optimize the standard cuckoo algorithm by employing a dual-parameter improvement using adaptive step size and adaptive discovery probability. This avoids the problem of the standard cuckoo algorithm easily getting trapped in local optima, effectively improving search capability and convergence speed. In addition, a simulated annealing algorithm mechanism is used to determine whether the sensor position is trapped in a local optimum. The combined use of the above two methods effectively ensures that the algorithm is not easily trapped in local optima.

[0145] For two different types of detectors, namely gas leak sensors and pressure sensors, an objective function combining the two is proposed, which is of great significance for gas leak risk prevention, monitoring and early warning.

[0146] To implement the above embodiments, this application also proposes a computer device, characterized in that it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the optimization method for deploying gas pipeline leak detectors and pressure sensors as described in the above embodiments.

[0147] To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the optimization method for deploying gas pipeline leak detectors and pressure sensors as described in the above embodiments.

[0148] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0149] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0150] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0151] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0152] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0153] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0154] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0155] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A method for optimizing deployment of gas network leak detectors and pressure sensors, characterized in that, The method comprises the following steps: Step S10, obtaining a sensor group for monitoring gas leakage and gas pipeline pressure, the sensor group comprising two types of nodes of gas leakage detectors and pressure sensors, and initializing the sensor group, wherein the initialization of the sensor group comprises randomly initializing the position of each sensor in the sensor group, and the gas leakage detectors and the pressure sensors are not deployed at the same position, and a target function of the position of each sensor is defined; Step S20, obtaining the target function value of the position of each sensor and comparing the target function value to obtain a current optimal function value and a current optimal sensor corresponding to the current optimal function value; The method for obtaining the target function value of the position of each sensor in the step S20 specifically comprises the following steps: Step S21, discretizing the monitored sensor group into a plurality of sub-regions, deploying a plurality of sensor nodes in the sub-regions, and grouping the plurality of sensor nodes into a sensor set; Step S22, calculating the coverage rate, node utilization rate and energy balance coefficient of the plurality of sensor nodes; Step S23, optimizing the target function of the position of each sensor according to the coverage rate, the node utilization rate and the energy balance coefficient, and the optimized target function is: wherein (x i ,y i ) represents the coordinates of the i-th sensor node, ω1, ω2, ω3 are weight coefficients of each sub-target corresponding to the gas leakage detector, ω1+ω2+ω3=1; ω4, ω5, ω6 are weight coefficients of each sub-target corresponding to the pipe network pressure sensor, ω4+ω5+ω6=1; ξ leak , ξ pressure are the contribution degrees of the gas leakage detector and the pipe network pressure sensor to the gas leakage risk prevention and control and monitoring and early warning technology, ξ leak +ξ pressure =1, μ leak is the node coverage rate of the gas leakage detector, is the node utilization rate of the gas leakage detector, η leak is the energy balance coefficient of the gas leakage detector, μ pressure is the node coverage rate of the pressure sensor, is the node utilization rate of the pressure sensor, η pressure is the energy balance coefficient of the pressure sensor; Step S30, updating the position and state of all sensors except the current optimal sensor by using a Levy flight mechanism, dynamically adjusting a scaling factor and a discovery probability by using a two-parameter adaptive strategy, obtaining the target function value of all sensors except the current optimal sensor, comparing the obtained function value with the current optimal function value, and if the obtained function value is better, updating and recording the current optimal function value and the current optimal sensor corresponding to the current optimal function value, wherein the current optimal sensor is a global optimal sensor; Step S40, performing layout optimization on the position of the global optimal sensor for the deployment of gas pipeline network leakage detectors and pressure sensors, and outputting the position of the global optimal sensor.

2. The optimization method applied to gas network leak detector and pressure sensor deployment of claim 1, wherein, The initialization of the sensor group in the step S10 further comprises setting the size of the sensor group, the dimension of the search space, the maximum number of iterations and the initial discovery probability.

3. The optimization method for deployment of gas network leak detectors and pressure sensors as claimed in claim 1 wherein, In the step S30, if the obtained function value is better than the current optimal function value, the current optimal function value and the current optimal sensor corresponding to the current optimal function value are updated and recorded, wherein the current optimal sensor is a global optimal sensor, and the position of the current optimal sensor is updated by the following formula: wherein r is a scaling factor, r e [0, 1], a random number obeying uniform distribution, respectively represent the t+1 generation and t generation sensor groups of the i-th sensor; respectively represent the j-th sensor in the t generation sensor group and the i-th sensor, wherein, is a sensor nearby.

4. A method for optimization of deployment of gas network leak detectors and pressure sensors as claimed in any one of claims 1 to 3, wherein, The step S30 further comprises the following steps: Step S31, after the position is updated, the improved adaptive scaling factor and the adaptive discovery probability are compared, and if the adaptive scaling factor is greater than the adaptive discovery probability, the position of the sensor is randomly updated once; Otherwise, the position of the sensor is unchanged. Step S32, when the algorithm iterates to the first threshold value, it is judged whether the position of the global optimal sensor falls into a local optimal state, if yes, the position of the global optimal sensor is updated by using a simulated annealing algorithm mechanism, a target function value of the global optimal sensor is calculated, a memory function is introduced to reserve the optimal sensor position in the annealing process, after the annealing is completed, a current optimal function value and a current optimal sensor corresponding to the current optimal function value are obtained, and the step S30 is entered; If not, it is directly entered into the step S30; Step S33, when the algorithm iteration meets the maximum iteration number or meets the preset search accuracy requirement, the step S40 is executed; Otherwise, it is returned to execute the step S30.

5. An optimized device for deploying gas pipeline leak detectors and pressure sensors, characterized in that, Comprise: The initialization module is used for obtaining a sensor group for monitoring gas leakage and gas pipeline pressure, the sensor group includes two types of nodes of gas leakage detectors and pressure sensors, and the sensor group is initialized, wherein the initialization of the sensor group includes randomly initializing the position of each sensor in the sensor group, and the gas leakage detector and the pressure sensor are not deployed at the same position, and a target function of each sensor position is defined; The comparison module is used for obtaining the target function value of each sensor position and comparing to obtain a current optimal function value and a current optimal sensor corresponding to the current optimal function value; The comparison module specifically comprises: The discrete unit is used for discretizing the monitored sensor group into a plurality of sub-regions, deploying a plurality of sensor nodes in the sub-regions, and grouping the plurality of sensor nodes into a sensor set; The calculation unit is used for calculating the coverage rate, node utilization rate and energy balance coefficient of the plurality of sensor nodes; The optimization unit is used for optimizing the target function of each sensor position according to the coverage rate, node utilization rate and energy balance coefficient, and the optimized target function is: wherein (x i ,y i ) represents the coordinates of the i-th sensor node, ω1, ω2, ω3 are weight coefficients of each sub-target corresponding to the gas leakage detector, ω1+ω2+ω3=1; ω4, ω5, ω6 are weight coefficients of each sub-target corresponding to the pipe network pressure sensor, ω4+ω5+ω6=1; ξ leak , ξ pressure are the contribution degrees of the gas leakage detector and the pipe network pressure sensor to the gas leakage risk prevention and control and monitoring and early warning technology, ξ leak +ξ pressure =1, μ leak is the node coverage rate of the gas leakage detector, is the node utilization rate of the gas leakage detector, η leak is the energy balance coefficient of the gas leakage detector, μ pressure is the node coverage rate of the pressure sensor, is the node utilization rate of the pressure sensor, η pressure is the energy balance coefficient of the pressure sensor; The update module is used for updating the position and state of all sensors except the current optimal sensor by using a Levy flight mechanism, dynamically adjusting a scaling factor and a discovery probability by using a double-parameter adaptive strategy, and obtaining the target function value of all sensors except the current optimal sensor, comparing the obtained function value with the current optimal function value, if better, updating and recording the current optimal function value and the current optimal sensor corresponding to the current optimal function value, wherein the current optimal sensor is a global optimal sensor; The optimization module is used for applying the position of the global optimal sensor to the layout optimization of the deployment of gas pipeline network leakage detectors and pressure sensors, and outputting the position of the global optimal sensor.

6. A position determination device applied to a gas leak detector and a pressure sensor, characterized in that, Comprise: The first initialization module is used for initializing initial parameters of the cuckoo search algorithm, the initial parameters include a sensor number and an initial sensor position; wherein the sensor number is used to indicate the number of a plurality of gas leakage detectors and pressure sensors, the initial sensor position is used to indicate a first position of the plurality of gas leakage detectors and pressure sensors, and the gas leakage detector and the pressure sensor are not deployed at the same position; A calculation module is configured to determine target function values corresponding to a plurality of sensors according to the positions of the plurality of gas leakage detectors and pressure sensors determined by the first initialization module; wherein the target function values are used to indicate the contribution degrees of the plurality of gas leakage detectors and pressure sensors to gas leakage risk prevention and control and monitoring and early warning; and wherein the determination of the target function values corresponding to the plurality of sensors specifically comprises: discretizing the monitored sensor group into a plurality of sub-regions, deploying a plurality of sensor nodes in the sub-regions, and grouping the plurality of sensor nodes into a sensor set; calculating the coverage, node utilization rate and energy balance coefficient of the plurality of sensor nodes; optimizing the target function of each sensor position according to the coverage, node utilization rate and energy balance coefficient, and the optimized target function is: wherein (x i ,y i ) represents the coordinates of the i-th sensor node, ω1, ω2, ω3 are weight coefficients of each sub-target corresponding to the gas leakage detector, ω1+ω2+ω3=1; ω4, ω5, ω6 are weight coefficients of each sub-target corresponding to the pipe network pressure sensor, ω4+ω5+ω6=1; ξ leak , ξ pressure are the contribution degrees of the gas leakage detector and the pipe network pressure sensor to the gas leakage risk prevention and control and monitoring and early warning technology, ξ leak +ξ pressure =1, μ leak is the node coverage rate of the gas leakage detector, is the node utilization rate of the gas leakage detector, η leak is the energy balance coefficient of the gas leakage detector, μ pressure is the node coverage rate of the pressure sensor, is the node utilization rate of the pressure sensor, η pressure is the energy balance coefficient of the pressure sensor; A position module is configured to update positions according to the target function values corresponding to the plurality of sensors determined by the calculation module and a preset algorithm, and determine target positions of target sensors; wherein the target sensors are any of the plurality of sensors, and are used to indicate the finally deployed sensors, and the target positions are used to indicate the deployment positions of the target sensors.

7. A computer device, characterized by The computer program is executed by the processor to implement the method of any one of claims 1-4.

8. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Wireless sensor network node deployment method based on particle swarm optimization and mutation operator

    CN107277830A

  • Method and device for determining position of mountain forest fire prevention sensor

    CN112348151A