Multi-cluster-head routing optimization method and device for oil and gas pipeline internet of things

By constructing network and energy consumption models for cluster management and cluster head election, and optimizing the routing protocol for the Internet of Things (IoT) of oil and gas pipelines, the problems of high energy consumption and short lifespan of wireless sensor networks are solved, thereby improving network performance and extending lifespan.

CN121751287APending Publication Date: 2026-03-27RICHFIT INFORMATION TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing IoT routing optimization methods for oil and gas pipelines are difficult to effectively optimize wireless sensor networks with energy harvesting capabilities, resulting in limited network performance and lifespan.

Method used

By constructing network models, communication energy consumption models, and information acquisition energy consumption models, cluster management and cluster head election are carried out to optimize the routing protocol for the Internet of Things (IoT) of oil and gas pipelines, thereby improving network performance and extending network lifespan.

Benefits of technology

The routing protocol for IoT networks of oil and gas pipelines with energy harvesting capabilities has been optimized, improving network performance and extending network lifespan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121751287A_ABST
    Figure CN121751287A_ABST
Patent Text Reader

Abstract

The invention provides an oil and gas pipeline Internet of Things multi-cluster-head routing optimization method and device, and the method comprises the steps: building a network model on a two-dimensional plane based on the sensor information of a preset sensor and the position of a base station, and building a communication energy consumption model of the sensor based on a transmitting node and a receiving node of the sensor, an information acquisition energy consumption model is constructed based on radio frequency parameters of a radio frequency source of a base station, and clustering management and cluster head election are performed on sensors based on a network model, a communication energy consumption model and the information acquisition energy consumption model. According to the method, the network model, the communication energy consumption model and the information acquisition energy consumption model are constructed, and clustering management and cluster head election are performed on the sensors based on the models, so that the oil and gas pipeline Internet of Things routing protocol optimization with an energy acquisition function is realized, the network performance of the oil and gas pipeline Internet of Things is improved, and the network service life is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Things, in particular to an oil and gas pipeline Internet of Things multi-cluster head routing optimization method and device. BACKGROUND

[0002] Oil and gas pipelines are often distributed in remote environments, and it is very difficult to monitor and maintain the pipelines. Therefore, researchers widely introduce wireless sensor network technology into oil and gas pipelines for pipeline monitoring. Sensor nodes in the oil and gas pipeline Internet of Things are distributed at certain intervals between the first station, intermediate station and terminal station of the pipeline, and monitor various data of the pipeline during transportation of oil or natural gas in real time, so as to facilitate the operation and maintenance personnel to master the pipeline situation, effectively prevent pipeline failure, and greatly reduce the maintenance cost of the pipeline. However, the sensor nodes of the wireless sensor network have large energy consumption, which seriously affects the performance and life of the network. In order to improve the network performance, it is necessary to optimize the routing method and system of the oil and gas pipeline Internet of Things.

[0003] At present, in the routing optimization of the oil and gas pipeline Internet of Things, the clustering algorithm and cluster head election function are mainly optimized to further reduce the network data transmission energy consumption, prolong the network life, and ensure the high quality and long life cycle of the oil and gas pipeline Internet of Things.

[0004] However, the current optimization research of the Internet of Things routing is difficult to optimize the wireless sensor network with energy harvesting function, and it is also difficult to improve the network performance and prolong the network life of such wireless sensor network. SUMMARY

[0005] Therefore, the purpose of the present application is to provide an oil and gas pipeline Internet of Things multi-cluster head routing optimization method and device, which constructs a network model, a communication energy consumption model and an information collection energy consumption model, and performs clustering management and cluster head election on the sensors based on these models, thereby optimizing the routing protocol of the oil and gas pipeline Internet of Things with energy harvesting function, and improving the network performance and prolonging the network life of the oil and gas pipeline Internet of Things.

[0006] In a first aspect, an oil and gas pipeline Internet of Things multi-cluster head routing optimization method is provided, which comprises:

[0007] constructing a network model on a two-dimensional plane based on preset sensor information of a sensor and a base station position of a base station; wherein the sensor information comprises a node and a position of the sensor, the node of the sensor comprises a sending node and a receiving node; the network model represents a cluster group of the node of the sensor, and the cluster group comprises a cluster member node and a cluster head node;

[0008] establishing a communication energy consumption model of the sensor based on the sending node and the receiving node of the sensor;

[0009] constructing an information collection energy consumption model based on a radio frequency parameter of a radio frequency source of the base station;

[0010] performing cluster management and cluster head election for the sensors based on the network model, the communication energy consumption model and the information collection energy consumption model.

[0011] In a possible implementation, the establishing of the communication energy consumption model of the sensor based on the transmitting node and the receiving node of the sensor comprises:

[0012] determining a node parameter between the transmitting node and the receiving node for the transmitting node and the receiving node of the sensor; wherein the node parameter comprises distance, transmission data volume and energy consumption parameter of a power amplifier;

[0013] establishing the communication energy consumption model of the sensor based on the node parameter of the transmitting node and the receiving node.

[0014] In a possible implementation, the establishing of the communication energy consumption model of the sensor based on the node parameter of the transmitting node and the receiving node comprises:

[0015] determining a channel model of a channel of the sensor based on the environment where the sensor is located and the distance; wherein the channel model comprises free space model and multipath fading model;

[0016] establishing the communication energy consumption model of the sensor based on the channel model and the node parameter; wherein the communication energy consumption model is:

[0017]

[0018] wherein E Tx (k,d) represents energy consumed for transmitting k bits of data at a distance d, k represents the number of bits transmitted, d represents the distance of data transmission, E elec represents energy consumed by a transmitter circuit in the communication model, E fs and E mp represent energy consumption parameters of a power amplifier, and d0 represents a threshold value of data transmission.

[0019] In a possible implementation, the constructing of the information collection energy consumption model based on the radio frequency parameter of the radio frequency source of the base station comprises:

[0020] performing wireless energy collection from the environment for a preset time by the node of the sensor in a radio frequency energy collection mode to obtain the radio frequency parameter;

[0021] constructing a corresponding information collection energy consumption model based on the radio frequency parameter; wherein the information collection energy consumption model is:

[0022]

[0023] wherein, E H represents the energy collected by the collection point in the collection time T, P t represents the power sent by the energy transmitter; g r and g t respectively represent the antenna gain of the transmitter and the collection sensor node; d i,j represents the transmission distance between the collection point and the transmitter; γ represents the wavelength of the RF signal sent by the transmitter, α represents the path loss index, and β represents the collection efficiency of the collection node.

[0024] In a possible implementation, the clustering management and cluster head election of the sensor based on the network model, the communication energy consumption model and the information collection energy consumption model comprises:

[0025] obtaining a competition radius formula parameter of a competition radius formula of the cluster head node based on the network model, the communication energy consumption model and the information collection energy consumption model, and performing clustering management on the nodes of the sensor based on a preset clustering algorithm, the competition radius formula parameter and the competition radius formula, to obtain the nodes after clustering; wherein the competition radius formula is:

[0026]

[0027] wherein, weight parameters a, b, c, d ∈ [0, 1] and a+b+c+d=1, E c represents the current node capability, E max represents the maximum energy of the node, d Rmax represents the maximum distance between the node and the energy collection source R in the network, d Rmin represents the minimum distance between the node and the energy collection source R in the network, d(C i , R) represents the distance of C i to the energy collection source R;

[0028] obtaining an election parameter of a preset election function based on the network model, the communication energy consumption model and the information collection energy consumption model, and performing cluster head election on the nodes after clustering based on the election parameter and the election function, to obtain the cluster head nodes after cluster head election; wherein the election parameter comprises the residual energy of the node, the position of the node in the cluster, the base station distance between the node and the base station, and the position of the sensor; the cluster head node comprises a primary cluster head node and a secondary cluster head node; wherein the election function is:

[0029]

[0030] wherein E(c) represents the energy of node c, E(i) represents the energy of node i in the cluster, m is the number of nodes in the cluster, di represents the distance between node i and node c, di represents the distance between node c and the base station B, di represents the distance between node c and the energy collection source R, and wherein a, b, g, h are adaptive parameters, a, b, g, h e [0, 1] and a + b + g + h = 1; when f takes the minimum value, the corresponding node is selected as the primary cluster head, and the node corresponding to the second minimum value is selected as the secondary cluster head. i ic cB cR wherein a, b, g, h are adaptive parameters, a, b, g, h e [0, 1] and a + b + g + h = 1; when f takes the minimum value, the corresponding node is selected as the primary cluster head, and the node corresponding to the second minimum value is selected as the secondary cluster head.

[0031] In a possible implementation, the cluster head tenure of the cluster head node is obtained by the following steps:

[0032] obtaining the residual energy and the energy consumed once in normal operation of the cluster head of the cluster head node;

[0033] calculating the ratio of the residual energy and the energy consumed once in normal operation, and determining the cluster head tenure of the cluster head node based on the ratio.

[0034] In a possible implementation, the method further comprises:

[0035] obtaining a target node in the nodes of the sensor in response to the end of the cluster head tenure or the depletion of the residual energy of the cluster head node in the cluster head tenure; wherein the residual energy of the target node is not less than a residual energy threshold; the residual energy threshold is the energy consumed three times in normal operation of the cluster head node;

[0036] determining the target node as a new cluster head node, and determining the cluster head tenure of the new cluster head node based on the ratio of the residual energy and the energy consumed once in normal operation of the target node.

[0037] In a second aspect, the embodiments of the present application also provide an oil and gas pipeline Internet of Things multi-cluster head routing optimization device, which comprises:

[0038] a first construction module, configured to construct a network model on a two-dimensional plane based on preset sensor information of a sensor and a base station position of a base station; wherein the sensor information comprises nodes and positions of the sensor, the nodes of the sensor comprise sending nodes and receiving nodes; the network model represents a cluster group of the nodes of the sensor, and the cluster group comprises cluster member nodes and cluster head nodes;

[0039] a second construction module, configured to establish a communication energy consumption model of the sensor based on the sending nodes and the receiving nodes of the sensor;

[0040] ​​​The third construction module is used to construct an information acquisition energy consumption model based on the radio frequency parameters of the radio frequency source of the base station;

[0041] An optimization module is used to perform cluster management and cluster head election for the sensors based on the network model, the communication energy consumption model, and the information acquisition energy consumption model.

[0042] In one possible implementation, the second building module is specifically used for:

[0043] For the transmitting and receiving nodes of the sensor, determine the node parameters between the transmitting and receiving nodes; wherein, the node parameters include distance, amount of transmitted data, and power amplifier energy consumption parameters;

[0044] The communication energy consumption model of the sensor is established based on the node parameters of the transmitting node and the receiving node.

[0045] In one possible implementation, the second building module is specifically used for:

[0046] The channel model used by the sensor is determined based on the environment in which the sensor is located and the distance; wherein, the channel model includes a free space model and a multipath fading model;

[0047] A communication energy consumption model for the sensor is established based on the channel model and the node parameters; wherein, the communication energy consumption model is:

[0048]

[0049] Among them, E Tx (k,d) represents the energy consumed in transmitting k bits of data over a distance d, where k represents the number of bits sent and d represents the data transmission distance. elec E represents the energy consumed by the transmitter circuit in the communication model. fs and E mp This represents the power amplifier's energy consumption parameter, and d0 represents the data transmission threshold.

[0050] In one possible implementation, the third building module is specifically used for:

[0051] In the radio frequency energy harvesting method, the node based on the sensor performs wireless energy harvesting from the environment within a preset time to obtain the radio frequency parameters;

[0052] A corresponding information acquisition energy consumption model is constructed based on the aforementioned radio frequency parameters; wherein, the information acquisition energy consumption model is:

[0053]

[0054] wherein, E H represents the energy collected by the collection point in the collection time T, P t represents the power transmitted by the energy transmitter; g r and g t respectively represent the antenna gains of the transmitter and the collection sensor node; d i,j represents the transmission distance between the collection point and the transmitter; γ represents the wavelength of the RF signal transmitted by the transmitter, α represents the path loss exponent, and β represents the collection efficiency of the collection node.

[0055] In a possible implementation, the optimization module is specifically configured to:

[0056] obtain a competition radius formula parameter of a competition radius formula of the cluster head node based on the network model, the communication energy consumption model and the information collection energy consumption model, and perform cluster management on the sensor nodes based on a preset clustering algorithm, the competition radius formula parameter and the competition radius formula, to obtain the clustered nodes; wherein the competition radius formula is:

[0057]

[0058] wherein, weight parameters a, b, c, d ∈ [0, 1] and a+b+c+d=1, E c represents the current node capability, E max represents the maximum energy of the node, d Rmax represents the maximum distance between the node and the energy collection source R in the network, d Rmin represents the minimum distance between the node and the energy collection source R in the network, d(C i , R) represents the distance from C i to the energy collection source R;

[0059] obtain an election parameter of a preset election function based on the network model, the communication energy consumption model and the information collection energy consumption model, and perform cluster head election on the clustered nodes based on the election parameter and the election function, to obtain the cluster head nodes after cluster head election; wherein the election parameter includes the residual energy of the node, the position of the node in the cluster, the base station distance between the node and the base station, and the position of the sensor; the cluster head node includes a primary cluster head node and a secondary cluster head node; wherein the election function is:

[0060]

[0061] wherein, E(c) represents the energy of the node c, E(n i ) represents the energy of the node i in the cluster, m is the number of nodes in the cluster, d ic represents the distance between the node i and the node c, and m is the number of nodes in the cluster.cB denotes the distance between node c and base station B, d cR denotes the distance between node c and energy harvesting source R; wherein a, b, g, h are adaptive parameters, a, b, g, h e [0, 1] and a + b + g + h = 1; when f takes the minimum value, the corresponding node is selected as the primary cluster head, and the node corresponding to the second minimum value is selected as the secondary cluster head.

[0062] In a possible implementation, the cluster head term of the cluster head node is obtained by the following steps:

[0063] obtaining the residual energy of the cluster head of the cluster head node and the energy consumed by normal operation once;

[0064] calculating the ratio of the residual energy and the energy consumed by normal operation once, and determining the cluster head term of the cluster head node based on the ratio.

[0065] In a possible implementation, the apparatus further includes:

[0066] an obtaining module, configured to obtain a target node in the nodes of the sensor in response to the end of the cluster head term or the depletion of the residual energy of the cluster head node within the cluster head term; wherein the residual energy of the target node is not less than a residual energy threshold; and the residual energy threshold is the energy consumed by normal operation three times of the cluster head node.

[0067] a determining module, configured to determine the target node as a new cluster head node, and determine the cluster head term of the new cluster head node based on the ratio of the residual energy of the target node and the energy consumed by normal operation once.

[0068] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a storage medium, and a bus, the storage medium stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine readable instructions to perform the steps of the oil and gas pipeline Internet of Things multi-cluster head routing optimization method in any one of the first aspect.

[0069] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by a processor to perform the steps of the oil and gas pipeline Internet of Things multi-cluster head routing optimization method in any one of the first aspect.

[0070] The oil and gas pipeline Internet of Things multi-cluster head routing optimization method and device provided by the embodiment of the application constructs a network model on a two-dimensional plane based on preset sensor information of a sensor and a base station position of a base station, establishes a communication energy consumption model of the sensor based on a sending node and a receiving node of the sensor, constructs an information acquisition energy consumption model based on a radio frequency parameter of a radio frequency source of the base station, and performs cluster management and cluster head election on the sensor based on the network model, the communication energy consumption model and the information acquisition energy consumption model. The application realizes optimization of an oil and gas pipeline Internet of Things routing protocol with energy acquisition function by constructing the network model, the communication energy consumption model and the information acquisition energy consumption model and performing cluster management and cluster head election on the sensor based on these models, thereby improving the network performance of the oil and gas pipeline Internet of Things and prolonging the network life.

[0071] In order to make the above objectives, features and advantages of the application more apparent, the following will specifically describe a preferred embodiment in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0072] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the application, and therefore should not be considered as a limitation to the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0073] Figure 1 is a flowchart of an oil and gas pipeline Internet of Things multi-cluster head routing optimization method according to an embodiment of the application;

[0074] Figure 2 is a flowchart of an oil and gas pipeline Internet of Things multi-cluster head routing optimization method according to another embodiment of the application;

[0075] Figure 3 is a flowchart of an oil and gas pipeline Internet of Things multi-cluster head routing optimization method according to another embodiment of the application;

[0076] Figure 4 is a flowchart of an oil and gas pipeline Internet of Things multi-cluster head routing optimization method according to another embodiment of the application;

[0077] Figure 5 is a structural schematic diagram of an oil and gas pipeline Internet of Things multi-cluster head routing optimization device according to an embodiment of the application;

[0078] Figure 6 is a structural schematic diagram of an electronic device according to an embodiment of the application. DETAILED DESCRIPTION

[0079] To make the purposes, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of description and illustration, and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportions. The flowcharts used in the present application show the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowcharts or one or more operations can be removed from the flowcharts under the guidance of the content of the present application.

[0080] In addition, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0081] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0082] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0083] At present, in the routing optimization of the oil and gas pipeline Internet of Things, the clustering algorithm and the cluster head election function are mainly optimized to further reduce the network data transmission energy consumption, prolong the network life, and ensure the high quality and long life cycle of the oil and gas pipeline Internet of Things. However, the current optimization research of the Internet of Things routing is difficult to optimize the wireless sensor network with energy harvesting function, and it is also difficult to improve the network performance and prolong the network life of such wireless sensor network.

[0084] To solve the problem, the application provides an oil and gas pipeline Internet of Things multi-cluster head routing optimization method and device, which constructs a network model, a communication energy consumption model and an information collection energy consumption model, and performs cluster management and cluster head election on the sensors based on the models, so as to optimize the routing protocol of the oil and gas pipeline Internet of Things with energy collection function, thereby improving the network performance of the oil and gas pipeline Internet of Things and prolonging the network life.

[0085] Figure 1 is a flow chart of the oil and gas pipeline Internet of Things multi-cluster head routing optimization method according to an embodiment of the application, as shown in the figure, the oil and gas pipeline Internet of Things multi-cluster head routing optimization method of the embodiment of the application can specifically include: Figure 1

[0086] S101, constructing a network model on a two-dimensional plane based on preset sensor information of sensors and base station positions of base stations.

[0087] S102, establishing a communication energy consumption model of the sensors based on the sending nodes and the receiving nodes of the sensors.

[0088] S103, constructing an information collection energy consumption model based on radio frequency parameters of radio frequency sources of the base stations.

[0089] S104, performing cluster management and cluster head election on the sensors based on the network model, the communication energy consumption model and the information collection energy consumption model.

[0090] In the above oil and gas pipeline Internet of Things multi-cluster head routing optimization method, the network model, the communication energy consumption model and the information collection energy consumption model are constructed, and the sensors are managed and the cluster heads are elected based on the models, so as to optimize the routing protocol of the oil and gas pipeline Internet of Things with energy collection function, thereby improving the network performance of the oil and gas pipeline Internet of Things and prolonging the network life.

[0091] The above exemplary steps of the embodiment of the application will be described below in combination with specific examples:

[0092] S101, constructing a network model on a two-dimensional plane based on preset sensor information of sensors and base station positions of base stations.

[0093] It should be noted that the sensors are sensors in a pre-set wireless sensor network, and the wireless sensor network is an Internet of Things with energy collection function.

[0094] ​In the embodiments of the present application, the sensor is a sensor in a pre-configured wireless sensor network, such as a pressure sensor, the sensor information includes the node and position of the sensor, the node of the sensor includes a sending node and a receiving node, the network model represents a cluster group of the node of the sensor, the cluster group includes a cluster member node and a cluster head node, and the network model is constructed on a two-dimensional plane based on the sensor information of the sensor and the base station position for subsequent processing. It can be understood that the network model follows a corresponding linear distribution rule, and the cluster group management of the sensor is performed according to the sensor and the base station position, wherein the cluster head node is responsible for collecting / forwarding data, and the cluster member node is responsible for environmental monitoring, data processing and data transmission.

[0095] It should be noted that the base station position is fixed and has unlimited energy, the sensor node can determine its own position, and has limited self-energy, and the transmission power can be adjusted according to the communication distance to save energy. It can be understood by those skilled in the art that the greater the transmission power of the sensor, the farther the distance covered by the signal, and as the distance increases, the signal attenuation will also increase, resulting in a decrease in the signal quality at the receiving end. Therefore, the transmission power needs to be reasonably set according to the actual communication distance.

[0096] Optionally, the sensor position and sensor energy of the sensor are determined based on the sensor node, a mapping table of the preset communication distance and transmission power of the sensor is obtained, the target transmission power corresponding to the communication distance is queried from the mapping table according to the communication distance between the sensor and the base station, and the transmission power of the sensor is adjusted based on the target transmission power.

[0097] It should be further noted that the communication between the cluster head and the base station in the network model can adopt single-hop transmission and multi-hop transmission. If the cluster head is close to the base station, the cluster head will adopt single-hop transmission, and if the distance is far, multi-hop transmission will be selected. When multi-hop transmission is adopted, a relay node needs to be selected, and the data is first transmitted to the relay node, and then uploaded to the base station through the relay node.

[0098] When multi-hop transmission is adopted, the relay node is closer to the base station than the original node, and the relay node is also a cluster head node. The relay node not only collects / forwards the data of its own cluster member nodes, but also forwards the data of other cluster groups. Therefore, the energy consumption of the relay node is large, and the energy of each sensor node is limited. Therefore, uniform clustering will cause the energy consumption of the relay node to be fast, and the energy consumption of the cluster head node to be unbalanced. This phenomenon is the "hot zone" problem in the Internet of Things network.

[0099] In S102, a communication energy consumption model of the sensor is established based on the sending node and the receiving node of the sensor.

[0100] In the embodiments of the present application, the communication energy consumption model of the sensor is established based on the sending node and the receiving node of the sensor in step S101 for subsequent processing.

[0101] S103, constructing an information collection energy consumption model based on the radio frequency parameters of the radio frequency source of the base station.

[0102] In the embodiments of the present application, the radio frequency parameters include transmission power, transmission distance, energy collection circuit, environment, and wavelength of the radio frequency signal. The corresponding information collection energy consumption model is constructed based on the radio frequency parameters of the radio frequency source of the base station in step S101, i.e., transmission power, transmission distance, energy collection circuit, environment, and wavelength of the radio frequency signal, for subsequent processing.

[0103] S104, clustering management and cluster head election of the sensors based on the network model, the communication energy consumption model, and the information collection energy consumption model.

[0104] In the embodiments of the present application, the clustering management and cluster head election of the sensors are based on the communication energy consumption model constructed in step S101, the network model constructed in step S102, and the information collection energy consumption model constructed in step S103.

[0105] Thus, the multi-cluster head routing optimization of the oil and gas pipeline Internet of Things is completed through the clustering management and cluster head election of the sensors.

[0106] The multi-cluster head routing optimization method of the oil and gas pipeline Internet of Things provided by the embodiments of the present application constructs a network model based on the preset sensor information of the sensors and the base station position on a two-dimensional plane, establishes a communication energy consumption model of the sensors based on the sending nodes and receiving nodes of the sensors, constructs an information collection energy consumption model based on the radio frequency parameters of the radio frequency source of the base station, and performs clustering management and cluster head election of the sensors based on the network model, the communication energy consumption model, and the information collection energy consumption model. The multi-cluster head routing optimization method of the oil and gas pipeline Internet of Things of the present application realizes the routing protocol optimization of the oil and gas pipeline Internet of Things with energy collection function by constructing the network model, the communication energy consumption model, and the information collection energy consumption model, and performing clustering management and cluster head election of the sensors based on these models, thereby improving the network performance of the oil and gas pipeline Internet of Things and prolonging the network life.

[0107] Further, as shown in FIG. 2, the step S102 “establishing a communication energy consumption model of the sensors based on the sending nodes and receiving nodes of the sensors” in the above embodiments can specifically include the following steps: Figure 2

[0108] S201, determining the node parameters between the sending nodes and the receiving nodes for the sending nodes and the receiving nodes of the sensors.

[0109] ​In the embodiments of the present application, the node parameters include distance, transmission data volume, and energy consumption parameter of the power amplifier. The distance between the sending node and the receiving node, the transmission data volume, and the energy consumption parameter of the power amplifier are determined for the sending node and the receiving node of the sensor, for subsequent processing.

[0110] In S202, an energy consumption model of the sensor is established based on the node parameters of the sending node and the receiving node.

[0111] In the embodiments of the present application, the energy consumption model of the sensor is established based on the node parameters of the sending node and the receiving node of the sensor determined in S201, for subsequent processing.

[0112] It should be noted that the present application does not limit the specific way of establishing the energy consumption model of the sensor, which can be set according to actual conditions.

[0113] In some embodiments, a channel model of a channel of the sensor is determined based on the environment and the distance of the sensor, and a communication energy consumption model of the sensor is established based on the channel model and the node parameters. The channel model includes a free space model and a multipath fading model. For example, the communication energy consumption model determines the channel by the environment of the sensor and the distance between the sending node and the receiving node. When the distance is less than a threshold value and the environment is good, the channel adopts the free space model, otherwise, the channel adopts the multipath fading model.

[0114] The communication energy consumption model (i.e., the energy consumption model of the sending and receiving data of the sensor node) is as follows:

[0115]

[0116] wherein, E Tx (k,d) represents the energy consumed by transmitting k bits of data for a distance d, k represents the number of bits transmitted, d represents the distance of data transmission (i.e., the distance between the sending node and the receiving node), E elec represents the energy consumed by the transmitter circuit in the communication model, E fs and E mp represent the energy consumption parameter of the power amplifier, and d0 represents the threshold value of data transmission.

[0117] It should be noted that the communication energy consumption model is a classical communication module energy consumption model. The communication module energy consumption can be divided into energy consumption between transceiver lines based on digital filter, encoding circuit and power amplifier according to energy consumption objects; According to the channel type, the communication module energy consumption under the free space model and the communication module energy consumption under the multipath fading model can be divided. When the distance between two nodes is less than the distance, because the distance between two nodes is short, it can be considered that when the communication between two nodes is carried out, there is no interference in the channel, which is a free space channel. When the distance between two nodes is far, the signal transmission process will encounter obstacles, causing refraction, reflection and other phenomena of the signal. Therefore, when the distance between two nodes is greater than the distance, the propagation loss of the signal will increase sharply.

[0118] Therefore, the energy consumption model of the sensor is established by the node parameters of the sending node and the receiving node.

[0119] Further, as shown in Figure 3 The step S103 "constructing an information collection energy consumption model based on the radio frequency parameters of the radio frequency source of the base station" in the above embodiment can specifically include the following steps:

[0120] S301, under the radio frequency energy collection mode, the node of the sensor collects wireless energy from the environment within a preset time to obtain radio frequency parameters.

[0121] In the embodiment of the application, the node of the sensor based on the above embodiment collects wireless energy from the environment within a preset time, and the energy collection mode is radio frequency energy collection, so as to obtain radio frequency parameters, that is, transmission power, transmission distance, energy collection circuit and environment, and wavelength of radio frequency signal, for subsequent processing.

[0122] S302, constructing a corresponding information collection energy consumption model based on the radio frequency parameters.

[0123] In the embodiment of the application, the radio frequency parameters obtained by step S301 construct a corresponding information collection energy consumption model, that is, an information collection energy consumption model is constructed according to the transmission power, transmission distance, energy collection circuit and environment, and wavelength of radio frequency signal, for subsequent processing. Wherein, the transmission power is the transmission power of the energy transmitter. Optionally, the information collection energy consumption model can be constructed according to the transmission power, sensor node antenna gain, transmission distance and wavelength of radio frequency signal.

[0124] Wherein, the information collection energy consumption model is:

[0125]

[0126] Wherein, E H represents the energy collected by the collection point within the collection time T, P t represents the transmission power of the energy transmitter; gr and g t d represents the antenna gain of the transmitter and the sensor node, respectively; i,j γ represents the transmission distance between the acquisition point and the transmitter; γ represents the wavelength of the RF signal transmitted by the transmitter; α represents the path loss exponent; and β represents the acquisition efficiency of the acquisition node.

[0127] It should be noted that this application uses radio frequency energy harvesting to provide secondary energy to the sensor node. Since radio frequency energy harvesting means that the electromagnetic wave emitted by the radio frequency energy source is received by the antenna of the sensor node, not all the energy received by the antenna can be harvested by the sensor node. In order to calculate the data harvested by the sensor node within a certain period of time, the signal power received by the antenna of the sensor node is multiplied by time to obtain the received signal energy, and then multiplied by the harvesting efficiency of the harvesting node to determine the energy harvested by the node within a certain period of time.

[0128] Based on the above information acquisition energy consumption model formula analysis, it can be concluded that: when the antenna gain is fixed, the power acquired by the sensor node is inversely proportional to the square of the distance between the node and the energy acquisition source, that is, the closer the node is to the energy acquisition source, the greater the energy acquisition power of the node.

[0129] Therefore, this application utilizes radio frequency energy harvesting to provide secondary energy supply for the Internet of Things (IoT) of oil and gas pipelines, sustainably replenishing the energy of sensor nodes. Since wireless sensor nodes are often deployed in harsh, sparsely populated areas, their small size and limited energy capacity mean they fail once their energy is depleted, significantly impacting the performance of the IoT system. By employing energy harvesting technology, sensor nodes can sustainably replenish energy from energy sources in the nearby environment, ensuring network stability, improving network performance, and extending network lifespan.

[0130] Furthermore, such as Figure 4 As shown, step S104 in the above embodiment, "based on the network model, communication energy consumption model, and information acquisition energy consumption model, performs cluster management and cluster head election for sensors," may specifically include the following steps:

[0131] S401, based on the network model, communication energy consumption model and information acquisition energy consumption model, obtains the competition radius formula parameters of the cluster head node, and performs cluster management on the sensor nodes based on the preset clustering algorithm, competition radius formula parameters and competition radius formula, to obtain the clustered nodes.

[0132] In the embodiments of the present application, the clustering algorithm is a pre-set clustering management algorithm, for example, a non-uniform clustering algorithm. The present application takes the non-uniform clustering algorithm as an example for description, but does not constitute a limitation thereto. Based on the network model, the communication energy consumption model and the information collection energy consumption model created in the above embodiments, the competition radius formula parameter of the competition radius formula of the cluster head node of the sensor is obtained, and the nodes of the sensor are managed by clustering based on the pre-set clustering algorithm, the competition radius formula parameter and the competition radius formula, to obtain the clustered nodes for subsequent processing. It should be noted that all the competition radius formula parameters of the competition radius formula are obtained from the network model, the communication energy consumption model and the energy consumption model.

[0133] wherein the competition radius formula is:

[0134]

[0135] wherein the weight parameters a, b, c and d are in [0, 1] and a+b+c+d=1, E c represents the current node capability, E max represents the maximum energy of the node, d Rmax represents the maximum distance between the node and the energy collection source R in the network, d Rmin represents the minimum distance between the node and the energy collection source R in the network, d(C i represents the distance of C i to the energy collection source R.

[0136] It can be understood that the clustering of the sensor nodes adopts the non-uniform clustering algorithm, and the clustering is performed according to the residual energy of the node, the distance between the node and the base station and the node density, and the position factor of the energy collection source.

[0137] It should be noted that compared with the competition radius formula of the general non-uniform clustering algorithm of the Internet of Things, the present application not only considers the influence of the residual energy of the node and the distance between the node and the base station on the competition radius, but also considers the influence of the distance between the node and the energy collection source on the clustering due to the introduction of the radio frequency energy collection mode, and considers the influence of the density of the adjacent nodes on the competition radius, thereby improving the accuracy of the calculated competition radius.

[0138] It can also be added that the underlying logic of setting the competition radius is to maintain energy balance among clusters. The more remaining energy a cluster head node has, the better. When a node has relatively little remaining energy, it is less suitable to be a cluster head node. By increasing its competition radius, the number of nodes within the cluster is increased, thereby ensuring energy balance between the cluster and other clusters. Based on the aforementioned "hot zone" problem, nodes closer to the base station consume more energy, while nodes closer to the energy source have higher energy harvesting power. To ensure energy balance among clusters, clusters closer to the base station and energy sources are smaller. When the density of neighboring nodes is high, the node competition radius is reduced to balance cluster energy consumption and prevent too many nodes within the cluster.

[0139] S402, based on the network model, communication energy consumption model and information acquisition energy consumption model, obtains the election parameters of the preset election function, and performs cluster head election on the clustered nodes based on the election parameters and election function to obtain the cluster head node after the cluster head election.

[0140] In this embodiment, the election parameters include the node's remaining energy, the node's position in the cluster, the distance between the node and the base station, and the sensor's position. The cluster head node includes a primary cluster head node and a secondary cluster head node. Based on the network model, communication energy consumption model, and information acquisition energy consumption model constructed in the above embodiments, the election parameters of the election function are obtained. Based on the election parameters and the election function, cluster head election is performed on the clustered nodes to obtain the cluster head nodes after the election. All the election parameters are also obtained from the network model, communication energy consumption model, and information acquisition energy consumption model.

[0141] Optionally, a target cluster head set is elected within a cluster of sensors. This target cluster head set includes a primary cluster head and secondary cluster heads; the primary cluster head is responsible for intra-cluster communication, and the secondary cluster heads are responsible for inter-cluster communication.

[0142] The election function is:

[0143]

[0144] Where E(c) represents the energy of node c, and E(n) represents the energy of node c. i ) represents the energy of node i within the cluster, m is the number of nodes in the cluster, and d ic The distance between node i and node c is represented by m, where m is the number of nodes in the cluster, and d is the distance between node i and node c. cB d represents the distance between node c and base station B. cR Let α, β, γ, η represent the distance between node c and energy harvesting source R; where α, β, γ, η are adaptive parameters, α, β, γ, η ∈ [0, 1] and α + β + γ + η = 1.

[0145] It can be understood that the cluster head of the sensor node needs to undertake a large amount of data receiving, aggregation, and forwarding tasks, and the cluster head election mainly considers the four factors of the residual energy of the node, the position of the node in the cluster, the distance of the node to the base station, and the position of the energy collection source.

[0146] It should be noted that when f takes the minimum value, the corresponding node is selected as the primary cluster head, and the node corresponding to the second minimum value is selected as the secondary cluster head. Specifically, since the cluster head node (i.e. the primary cluster head node and the secondary cluster head node) not only needs to collect and process the data in the cluster, but also needs to forward the data between clusters, the energy consumption pressure of the cluster head node is very large, which leads to an unbalanced energy distribution in the cluster. Therefore, the double cluster head algorithm is introduced, two cluster heads are elected in a cluster group, the primary cluster head is responsible for intra-cluster communication, and the secondary cluster head is responsible for inter-cluster communication, mainly relaying data from distant clusters, which can reduce the energy consumption pressure of the primary cluster head node and improve the overall performance of the network.

[0147] It can be supplemented that the greater the residual energy, the greater the sum of the distances to other nodes in the cluster, the closer to the base station, and the closer to the energy collection source, the greater the probability of the candidate cluster head node winning the competition.

[0148] Therefore, the corresponding parameters are obtained through the network model, the communication energy consumption model and the information collection energy consumption model, and the competition radius of the non-uniform clustering algorithm is optimized by combining the corresponding functions or formulas. According to the residual energy of the node, the distance of the node to the base station, and the position of the energy collection source, clustering is performed, which not only solves the "hot zone problem" caused by multi-hop communication, but also comprehensively considers the influence of the node energy collection rate on clustering. Since clustering is the basis of data transmission, reasonable clustering provides a better possibility for the selection of cluster head nodes and the determination of data transmission paths.

[0149] In addition, the cluster head election function is also optimized. Since the cluster head needs to undertake a large amount of data receiving, aggregation, and forwarding tasks, the cluster head election mainly considers the four factors of the residual energy of the node, the position of the node in the cluster, the distance of the node to the base station, and the position of the energy collection source, the election of the primary cluster head and the secondary cluster head is completed, the primary cluster head is responsible for intra-cluster communication, i.e. receiving and processing intra-cluster information, and the secondary cluster head is responsible for inter-cluster communication, mainly relaying data from distant clusters, which reduces the energy consumption pressure of the single cluster head node, and comprehensively considers the residual energy of the cluster head, data transmission energy consumption, and energy collection rate, etc. factors to optimize the overall performance of the system.

[0150] In summary, the clustering management of the sensor and the election of the cluster head are realized, that is, the routing optimization of the multi-cluster head of the Internet of Things is realized. At the same time, due to the election of the double cluster head, the energy consumption pressure of the primary cluster head node is reduced, and the overall performance of the network is improved.

[0151] Further, the cluster head term of the cluster head node is obtained by the following steps:

[0152] The residual energy of the cluster head of the cluster head node and the energy consumed once in normal operation are obtained; the ratio of the residual energy and the energy consumed once in normal operation is calculated, and the cluster head term of the cluster head node is determined based on the ratio.

[0153] Further, in response to the end of the cluster head term or the depletion of the residual energy of the cluster head node in the cluster head term, a target node is obtained in the sensor node; the target node is determined as a new cluster head node, and the cluster head term of the new cluster head node is determined based on the ratio of the residual energy and the energy consumed once in normal operation of the target node. Wherein the residual energy of the target node is not less than a residual energy threshold; the residual energy threshold is the energy consumed three times in normal operation of the cluster head node; the target node is selected in the sensor node except the previous cluster head node, that is, when a node is selected as a cluster head node, the node is not considered in the selection of a new cluster head node.

[0154] Specifically, the cluster head term of the sensor node is determined by the residual energy of the node. The cluster head node polls in a fixed area, and the energy consumption of the node is greater than that of the node in the edge area. When the energy is greater than the threshold value, the node has the qualification to compete for the cluster head node. According to the theoretical model of node data transmission, the threshold value of node operation is:

[0155] E th,CH =E th,res >ωE CH,i ω=3

[0156] Wherein E th,res represents the residual energy of the cluster head node, E CH,i represents the energy consumed once in normal operation of the cluster head node; after the cluster head node is determined, the term R is set, and in the term, the cluster group does not select a new cluster head node. After the end of the term or the depletion of the energy of the cluster head node in the term, the cluster head node is reselected; the term is determined by the residual energy, and the term R is:

[0157]

[0158] When the residual energy is greater than the threshold value, the node has the qualification to be elected as the cluster head node. When the residual energy is less than the threshold value, the node is in the sleep period. After the end of the cluster head node term, whether the residual energy is higher than E th,CH , the cluster head node will enter the sleep mode.

[0159] It should be noted that the residual energy threshold is equal to the energy consumed three times in normal operation of the cluster head node, that is, the residual energy of the node must be sufficient to support the normal operation of the cluster head node three times to have the qualification to compete for the cluster head node, and the term of the cluster head node is the number of times that the residual energy of the node can guarantee the normal operation of the cluster head node.

[0160] Thus, by taking into account the cluster head residual energy, a new cluster head node is reselected, thereby ensuring normal operation of the cluster head node.

[0161] Figure 5 is a flowchart of an oil and gas pipeline Internet of Things multi-cluster head routing optimization device according to an embodiment of the present application, as shown, the oil and gas pipeline Internet of Things multi-cluster head routing optimization device 500 of the embodiment of the present application can specifically include: Figure 5

[0162] The first construction module 5001 is configured to construct a network model on a two-dimensional plane based on preset sensor information of a sensor and a base station position of a base station; wherein the sensor information includes a node and a position of the sensor, the node of the sensor includes a sending node and a receiving node; the network model represents a cluster group of the node of the sensor, and the cluster group includes a cluster member node and a cluster head node.

[0163] The second construction module 5002 is configured to establish a communication energy consumption model of the sensor based on the sending node and the receiving node of the sensor.

[0164] The third construction module 5003 is configured to construct an information acquisition energy consumption model based on a radio frequency parameter of a radio frequency source of the base station.

[0165] The optimization module 5004 is configured to perform cluster management and cluster head election on the sensor based on the network model, the communication energy consumption model and the information acquisition energy consumption model.

[0166] In a possible implementation, the second construction module is specifically configured to:

[0167] For the sending node and the receiving node of the sensor, determine a node parameter between the sending node and the receiving node; wherein the node parameter includes a distance, a transmission data amount and an energy consumption parameter of a power amplifier;

[0168] Establish the communication energy consumption model of the sensor based on the node parameter of the sending node and the receiving node.

[0169] In a possible implementation, the second construction module is specifically configured to:

[0170] Determine a channel model adopted by a channel of the sensor based on an environment and a distance where the sensor is located; wherein the channel model includes a free space model and a multipath fading model;

[0171] Establish the communication energy consumption model of the sensor based on the channel model and the node parameter; wherein the communication energy consumption model is:

[0172]

[0173] E Tx ​(k,d) represents the energy consumed by k-bit data transmission distance d, k represents the number of transmitted bits, d represents the distance of data transmission, E elec represents the energy consumed by the transmitter circuit in the communication model, E fs and E mp represent the energy consumption parameters of the power amplifier, and d0 represents the threshold value of data transmission.

[0174] In a possible implementation, the third construction module is specifically configured to:

[0175] In the radio frequency energy harvesting mode, the sensor-based node performs wireless energy harvesting from the environment for a preset time to obtain radio frequency parameters;

[0176] Based on the radio frequency parameters, a corresponding information acquisition energy consumption model is constructed; wherein the information acquisition energy consumption model is:

[0177]

[0178] wherein E H represents the energy collected by the collection point within the collection time T, P t represents the energy transmitter transmission power; g r and g t respectively represent the antenna gains of the transmitter and the collection sensor node; d i,j represents the transmission distance between the collection point and the transmitter; γ represents the wavelength of the RF signal transmitted by the transmitter, α represents the path loss index, and β represents the collection efficiency of the collection node.

[0179] In a possible implementation, the optimization module is specifically configured to:

[0180] Based on the network model, the communication energy consumption model and the information acquisition energy consumption model, a competition radius formula parameter of a competition radius formula of the cluster head node is obtained, and based on the preset clustering algorithm, the competition radius formula parameter and the competition radius formula, the nodes of the sensor are managed in clusters to obtain the nodes after clustering; wherein the competition radius formula is:

[0181]

[0182] wherein the weight parameters a, b, c and d are in the range of [0, 1] and a+b+c+d=1, E c represents the current node capability, E max represents the maximum energy of the node, d Rmax represents the maximum distance between the nodes in the network and the energy collection source R, d Rmin represents the minimum distance between the nodes in the network and the energy collection source R, d(C i , R) represents the distance from C i to the energy collection source R.

[0183] obtaining an election parameter of a preset election function based on the network model, the communication energy consumption model and the information collection energy consumption model, and performing cluster head election on the clustered nodes based on the election parameter and the election function to obtain a cluster head node after cluster head election; wherein the election parameter comprises residual energy of the node, position of the node in the cluster, base station distance of the node to the base station, and position of the sensor; the cluster head node comprises a primary cluster head node and a secondary cluster head node; wherein the election function is:

[0184]

[0185] wherein E(c) represents energy of the node c, E(n i ) represents energy of the node i in the cluster, m is the number of nodes in the cluster, d ic represents distance between the node i and the node c, m is the number of nodes in the cluster, d cB represents distance between the node c and the base station B, d cR represents distance between the node c and the energy collection source R; wherein α, β, γ, η are adaptive parameters, α, β, γ, η ∈ [0, 1] and α + β + γ + η = 1; when f takes the minimum value, the corresponding node is selected as the primary cluster head, and the node corresponding to the second minimum value is selected as the secondary cluster head.

[0186] In a possible implementation, the cluster head term of the cluster head node is obtained by the following steps:

[0187] obtaining residual energy and energy consumed by normal work once of the cluster head of the cluster head node;

[0188] calculating a ratio of the residual energy and the energy consumed by normal work once, and determining the cluster head term of the cluster head node based on the ratio.

[0189] In a possible implementation, the apparatus further comprises:

[0190] an obtaining module, configured to obtain a target node in the nodes of the sensor when the cluster head term ends or residual energy of the cluster head node in the cluster head term is exhausted; wherein residual energy of the target node is not less than a residual energy threshold; the residual energy threshold is energy consumed by normal work three times of the cluster head node;

[0191] a determining module, configured to determine the target node as a new cluster head node, and determine a cluster head term of the new cluster head node based on a ratio of residual energy and energy consumed by normal work once of the target node.

[0192] The oil and gas pipeline Internet of Things multi-cluster head routing optimization device provided by the embodiment of the application is based on the sensor information of the preset sensor and the base station position of the base station to construct a network model on a two-dimensional plane, based on the sending node and the receiving node of the sensor to establish a communication energy consumption model of the sensor, based on the radio frequency parameter of the radio frequency source of the base station to construct an information acquisition energy consumption model, and based on the network model, the communication energy consumption model and the information acquisition energy consumption model to perform cluster management and cluster head election on the sensor. The oil and gas pipeline Internet of Things multi-cluster head routing optimization device provided by the application realizes the optimization of the oil and gas pipeline Internet of Things routing protocol with the energy acquisition function by constructing the network model, the communication energy consumption model and the information acquisition energy consumption model, and performing cluster management and cluster head election on the sensor based on these models, thereby improving the network performance of the oil and gas pipeline Internet of Things and prolonging the network life.

[0193] As shown in Figure 6 The electronic device 600 provided by the embodiment of the application includes a processor 601, a memory 602 and a bus. The memory 602 stores machine readable instructions executable by the processor 601. When the electronic device is running, the processor 601 and the memory 602 communicate through the bus. The processor 601 executes the machine readable instructions to perform the steps of the oil and gas pipeline Internet of Things multi-cluster head routing optimization method.

[0194] Specifically, the memory 602 and the processor 601 can be general memory and processor, which are not specifically limited here. When the processor 601 runs the computer program stored in the memory 602, the oil and gas pipeline Internet of Things multi-cluster head routing optimization method can be executed.

[0195] Corresponding to the oil and gas pipeline Internet of Things multi-cluster head routing optimization method, the embodiment of the application further provides a computer readable storage medium, which stores a computer program. When the computer program is run by the processor, the steps of the oil and gas pipeline Internet of Things multi-cluster head routing optimization method are executed.

[0196] Those skilled in the art can clearly understand the specific working process of the system and the device described above for the convenience and brevity of the description, and the corresponding process in the method embodiment can be referred to, and the present application will not be described again. In the several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented by other ways. The device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed modules can be indirect coupling or communication connection through some communication interfaces, devices or modules, and can be electrical, mechanical or other forms.

[0197] The modules described as separate components can or can not be physically separate, and the components shown as modules can or can not be physical units, i.e., can be located in one place, or can be distributed to a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0198] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.

[0199] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art or the part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the deployment method described in the embodiments of the present application. The foregoing storage medium includes: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, and various storage program codes.

[0200] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A multi-cluster head routing optimization method for oil and gas pipeline Internet of Things (IoT), characterized in that, The method includes: A network model is constructed on a two-dimensional plane based on the sensor information of the preset sensors and the base station location of the base station; wherein, the sensor information includes the nodes and locations of the sensors, and the nodes of the sensors include transmitting nodes and receiving nodes; the network model represents the clusters of the nodes of the sensors, and the clusters include cluster member nodes and cluster head nodes; A communication energy consumption model for the sensor is established based on the transmitting and receiving nodes of the sensor. An information acquisition energy consumption model is constructed based on the radio frequency parameters of the radio frequency source of the base station; Based on the network model, the communication energy consumption model, and the information acquisition energy consumption model, the sensors are clustered and cluster heads are elected.

2. The method according to claim 1, characterized in that, The establishment of the communication energy consumption model for the sensor based on the transmitting and receiving nodes of the sensor includes: For the transmitting and receiving nodes of the sensor, determine the node parameters between the transmitting and receiving nodes; wherein, the node parameters include distance, amount of transmitted data, and power amplifier energy consumption parameters; The communication energy consumption model of the sensor is established based on the node parameters of the transmitting node and the receiving node.

3. The method according to claim 2, characterized in that, The step of establishing the communication energy consumption model of the sensor based on the node parameters of the transmitting node and the receiving node includes: The channel model used by the sensor is determined based on the environment in which the sensor is located and the distance; wherein, the channel model includes a free space model and a multipath fading model; A communication energy consumption model for the sensor is established based on the channel model and the node parameters; wherein, the communication energy consumption model is: Among them, E Tx (k,d) represents the energy consumed in transmitting k bits of data over a distance d, where k represents the number of bits sent and d represents the data transmission distance. elec E represents the energy consumed by the transmitter circuit in the communication model. fs and E mp d0 represents the power amplifier's energy consumption parameter, and d0 represents the data transmission threshold.

4. The method according to claim 3, characterized in that, The construction of the information acquisition energy consumption model based on the radio frequency parameters of the base station's radio frequency source includes: In the radio frequency energy harvesting method, the node based on the sensor performs wireless energy harvesting from the environment within a preset time to obtain the radio frequency parameters; A corresponding information acquisition energy consumption model is constructed based on the aforementioned radio frequency parameters; wherein, the information acquisition energy consumption model is: Among them, E H P represents the energy collected by the sampling point within the sampling time T. t Indicates the power transmitted by the energy transmitter; g r and g t d represents the antenna gain of the transmitter and the sensor node, respectively; i,j γ represents the transmission distance between the acquisition point and the transmitter; γ represents the wavelength of the RF signal transmitted by the transmitter; α represents the path loss exponent; and β represents the acquisition efficiency of the acquisition node.

5. The method according to claim 1, characterized in that, The process of cluster management and cluster head election for the sensors based on the network model, the communication energy consumption model, and the information acquisition energy consumption model includes: Based on the network model, the communication energy consumption model, and the information acquisition energy consumption model, the competition radius formula parameters for the cluster head node are obtained. Then, based on a preset clustering algorithm, the competition radius formula parameters, and the competition radius formula, clustering management is performed on the sensor nodes to obtain the clustered nodes. The competition radius formula is: Where the weight parameters a,b,c,d∈[0,1] and a+b+c+d=1,E c E represents the current node's capability. max d represents the maximum energy of a node. Rmax d represents the maximum distance between a node in the network and the energy harvesting source R. Rmin d(C) represents the minimum distance between a node in the network and the energy harvesting source R. i ,R) represents C i Distance to the energy harvesting source R; Based on the network model, the communication energy consumption model, and the information acquisition energy consumption model, election parameters for a preset election function are obtained. Cluster head election is then performed on the clustered nodes based on these election parameters and the election function to obtain the cluster head nodes. The election parameters include the node's remaining energy, the node's position within the cluster, the distance between the node and the base station, and the sensor's position. The cluster head nodes include a primary cluster head node and a secondary cluster head node. The election function is: Where E(c) represents the energy of node c, and E(n) represents the energy of node c. i ) represents the energy of node i within the cluster, m is the number of nodes in the cluster, and d ic The distance between node i and node c is represented by m, where m is the number of nodes in the cluster, and d is the distance between node i and node c. cB d represents the distance between node c and base station B. cR Let f represent the distance between node c and energy source R; where α, β, γ, η are adaptive parameters, α, β, γ, η ∈ [0, 1] and α + β + γ + η = 1; when f takes the minimum value, the corresponding node is selected as the primary cluster head, and the node corresponding to the second minimum value is selected as the secondary cluster head.

6. The method according to claim 5, characterized in that, The term of office of the cluster head node is obtained by the following steps: Obtain the remaining energy of the cluster head node and the energy consumed in one normal operation; Calculate the ratio of the remaining energy to the energy consumed in one normal operation, and determine the cluster head term of the cluster head node based on the ratio.

7. The method according to claim 6, characterized in that, The method further includes: In response to the end of the cluster head's term or the depletion of the remaining energy of the cluster head node during the term of the cluster head, a target node is acquired from the nodes of the sensor; wherein the remaining energy of the target node is not less than a remaining energy threshold; the remaining energy threshold is the energy consumed by the cluster head node in three normal operations; The target node is identified as the new cluster head node, and the cluster head term of the new cluster head node is determined based on the ratio of the remaining energy of the target node to the energy consumed in one normal operation.

8. A multi-cluster routing optimization device for oil and gas pipeline IoT, characterized in that, The device includes: The first construction module is used to construct a network model on a two-dimensional plane based on the sensor information of the preset sensors and the base station location of the base station; wherein, the sensor information includes the nodes and locations of the sensors, and the nodes of the sensors include transmitting nodes and receiving nodes; the network model represents the clusters of the nodes of the sensors, and the clusters include cluster member nodes and cluster head nodes; The second construction module is used to establish a communication energy consumption model of the sensor based on the transmitting node and receiving node of the sensor; The third construction module is used to construct an information acquisition energy consumption model based on the radio frequency parameters of the radio frequency source of the base station; An optimization module is used to perform cluster management and cluster head election for the sensors based on the network model, the communication energy consumption model, and the information acquisition energy consumption model.

9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the multi-cluster routing optimization method for oil and gas pipeline Internet of Things as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the oil and gas pipeline Internet of Things multi-cluster head routing optimization method as described in any one of claims 1 to 7.