A method for repairing coverage vulnerabilities in the Internet of Things based on reinforcement learning

By guiding the movement of sensor nodes through reinforcement learning and two-way selection methods, it solves the problem of rapid repair of IoT coverage loopholes, achieves efficient coverage improvement and energy consumption reduction, and is suitable for a variety of application scenarios.

CN114168971BActive Publication Date: 2024-09-27HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111502028.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-09
Publication Date
2024-09-27
Estimated Expiration
2041-12-09

AI Technical Summary

Technical Problem

The rapid identification and repair of IoT coverage vulnerabilities presents challenges in terms of energy consumption and repair speed. In particular, the selection of network coverage models and the optimization of movement paths of sensor nodes are difficult to meet the real-time repair requirements.

Method used

A method based on reinforcement learning is adopted, and the two-way selection method of the minimum and shortest coordinate distance between the vulnerability reconstruction point and the movable node is used through the trusted information coverage model and the Q-Learning algorithm to guide the movement of sensor nodes to achieve fast and effective vulnerability repair.

Benefits of technology

It improves the repair efficiency of IoT coverage, saves energy consumption and repair time, and is suitable for a variety of application scenarios and terrains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114168971B
    Figure CN114168971B
Patent Text Reader

Abstract

The present invention discloses a method for repairing Internet of Things coverage vulnerabilities based on reinforcement learning: (1) establishing a network model according to the target area monitoring coverage requirements; (2) establishing a network coverage model through a trusted information coverage model and calculating the coverage rate; (3) using a two-way selection method of the minimum shortest coordinate distance between the vulnerability reconstruction point and the movable node to determine the directional repair node of the vulnerability area; (4) using a Q-Learning method to train the directional repair node M-node and repair the vulnerability subgrid until the coverage rate meets the requirements or the number of iterations reaches a set upper limit. The global coverage rate is high after the method of the present invention is repaired. The invention comprehensively mines the spatial correlation of the monitoring reconstruction points of the coverage target area from the perspective of information collaboration, and uses a reward mechanism based on the reinforcement learning method to guide the movement of the directional repair node to complete the coverage vulnerability repair, save energy consumption and repair time, and improve the coverage rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of Internet of Things, and more specifically, relates to a method for repairing Internet of Things coverage vulnerabilities based on reinforcement learning. Background Art

[0002] IoT coverage is the core technical issue in the development of IoT technology and is the basic requirement for IoT to meet the real-time and accurate collection of monitoring target information. Coverage holes caused by energy consumption, environmental factors, software defects and other factors will greatly reduce IoT coverage and affect the security and reliability of the network. The task of IoT coverage hole repair is to quickly identify coverage holes that suddenly appear and repair them as quickly as possible with the lowest possible energy consumption to meet coverage requirements. Therefore, it is particularly important to repair network coverage holes in a real-time and effective manner.

[0003] The difficulties in repairing IoT coverage vulnerabilities are mainly reflected in three aspects. First, the network coverage model has different coverage descriptions and definitions for different actual scenarios. The choice of model will directly affect the applicability of the repair method and the actual application scenario; second, select a suitable sensor repair node for the vulnerability so that it can reach the repair location in the shortest time to ensure the repair timeliness and reduce the repair energy consumption; third, when repairing vulnerabilities, sensor nodes need to choose effective movement directions and paths to avoid unnecessary movement trajectories to save sensor node energy. Summary of the invention

[0004] In view of the above defects or improvement needs of the prior art, the present invention provides a method for repairing coverage vulnerabilities of the Internet of Things based on reinforcement learning, the purpose of which is to quickly and effectively repair coverage vulnerabilities that appear in the Internet of Things network. The vulnerability repair method defines the sensor coverage range through a trusted information coverage model, gives full play to the spatial correlation of the vulnerability reconstruction point, adopts a two-way selection method of the minimum and shortest coordinate distance between the vulnerability reconstruction point and the movable node to determine the directional repair node of the vulnerability area, and uses a reward mechanism based on the reinforcement learning method to guide the movement of the directional repair node, saving energy consumption and repair time, thereby solving the technical problem of repairing coverage vulnerabilities of the Internet of Things.

[0005] To achieve the above object, according to one aspect of the present invention, a method for repairing IoT coverage vulnerabilities based on reinforcement learning is provided, comprising the following steps:

[0006] (1) Establish a network model based on the monitoring coverage requirements of the target area;

[0007] (1.1) According to the spatial correlation of the detection target, the range and estimated root mean square error threshold are set, and the target coverage area is divided into regional subgrids according to the range;

[0008] (1.2) According to the distribution of sensor nodes, record the sensor node number i, and according to the divided coverage sub-grid, take the sub-grid center point as the reconstruction point, denoted as p;

[0009] (2) Establish a network coverage model through the trusted information coverage model and calculate the coverage rate;

[0010] (3) The directional repair node of the vulnerability area is determined by using the two-way selection method of the minimum shortest coordinate distance between the vulnerability reconstruction point and the movable node;

[0011] (4) The Q-Learning method is used to train the directional repair node M-node and repair the vulnerable sub-grid until the coverage meets the requirements or the number of iterations reaches the set upper limit.

[0012] In one embodiment of the present invention, the step (2) specifically includes the following sub-steps:

[0013] (2.1) In the trusted information coverage model, for unsampled spatial points, the ordinary Kriging interpolation function is used to calculate the estimated value of the environmental variable of the reconstruction point, that is, the sensor node τ in the reconstruction neighborhood Z(p) is used i The estimated value of the environmental variable is calculated by taking the weighted average of the measured values; the interpolation weight coefficient λ of the sensor nodes in the neighborhood i satisfy n is the sensor node τ in the reconstruction neighborhood Z(p) i the number of

[0014] (2.2) Combined with the ordinary Kriging interpolation function, the root mean square error Φ(p) of the reconstructed point p is calculated, and the calculation expression is: in and μ(p) are solved by steps (2.1.1) and (2.1.2);

[0015] (2.3) According to the definition of the trusted information coverage model, if Φ(p)>ε0, that is, the root mean square error is greater than the set coverage threshold, the subgrid is covered, otherwise it is not covered; the number of the covered reconstruction point j' is recorded, and the number of the leaky reconstruction point whose root mean square error is less than the threshold ε0 is j";

[0016] (2.4) Calculate the coverage of the target area.

[0017] In one embodiment of the present invention, the calculation formula of the coverage in step (2.4) is as follows:

[0018]

[0019] Where S is the total area of ​​the coverage area, j' is the number of the reconstruction point covered, S j'is the sub-grid area where the covered reconstruction point j' is located, and m is the total number of covered reconstruction points.

[0020] In one embodiment of the present invention, the step (2.1) includes the following sub-steps:

[0021] (2.1.1) Interpolation weight coefficient λ i A set of optimal solutions is obtained through the minimum Kriging variance; the Lagrange multiplier μ(p) is introduced to generate a linear Kriging system consisting of n+1 equations with n+1 unknowns, and the interpolation weight coefficient λ is obtained after solving it i ;

[0022]

[0023] Among them, γ(τ i ,τ j ) and γ(τ i ,p) is calculated by the variogram;

[0024] (2.1.2) Calculate γ(τ) in step (2.1.1) i ,τ j ) and γ(τ i ,p); Gaussian variogram is selected as the variogram of the environmental variables to describe the sensor node τ i Spatial correlation between collected data; the formula of Gaussian variogram is:

[0025]

[0026]

[0027] Among them, d τp is the sensor node τ i The Euclidean distance from the reconstructed point p, is the sensor node τ i and τ j The Euclidean distance of , C0 and C are constants.

[0028] In one embodiment of the present invention, the step (3) specifically includes the following sub-steps:

[0029] (3.1) Select fixed nodes and mobile nodes from the undamaged sensor nodes; select fixed nodes for the covered subgrids, and the fixed nodes will no longer move to ensure the coverage of the covered subgrids; calculate the Euclidean distance between the sensor nodes and the reconstruction points within the range of the reconstruction points of each covered subgrid, and select a sensor node with the smallest Euclidean distance from the coverage reconstruction point as the fixed node of the coverage grid, denoted as F-node, and the other sensor nodes are mobile nodes, denoted as R-node;

[0030] (3.2) Determine a directional repair node for each vulnerability reconstruction point;

[0031] In one embodiment of the present invention, the step (3.2) specifically includes the following sub-steps:

[0032] (3.2.1) Calculate the shortest coordinate distance from R-node to the vulnerability reconstruction point j''; based on the shortest coordinate distance, select an intended repair node from R-node for each vulnerability reconstruction point j'';

[0033] (3.2.2) If an R-node is only selected as an intended repair node by one vulnerability reconstruction point, a two-way selection is established, and the intended repair node is the directional repair node of the corresponding vulnerability reconstruction point; if the same R-node is selected as an intended repair node by multiple vulnerability reconstruction points, the intended repair node will select the vulnerability reconstruction point with the smallest shortest coordinate distance from it as the target repair reconstruction point, and the intended repair node is the directional repair node of the selected target repair reconstruction point; the directional repair node is denoted as M-node;

[0034] (3.2.3) The directional repair node selected in step (3.2.2) is deleted from the selectable repair node R-nodes space, and other vulnerability reconstruction points that have not established a two-way selection will reselect the intended repair node or the directional repair node in the next round;

[0035] (3.2.4) Record the shortest coordinate distance between the directional repair node and its target repair and reconstruction point as the initial node benefit value of the directional repair node;

[0036] (3.2.5) Repeat (3.2.1), (3.2.2), (3.2.3) and (3.2.4) until all vulnerability reconstruction points have selected corresponding directional repair nodes.

[0037] In one embodiment of the present invention, step (4) includes the following sub-steps:

[0038] (4.1) Initialize the parameters of the Q-Learning training model; set the learning probability α and the exploration probability ε, where α and ε are constants between [0,1]; set the target area coverage requirement and the number of training times t, establish a Q table, and initialize the initial Q value of each sensor node to 0; since the initial repair energy consumption value is 0, the initial utility function value of the node is the initial node benefit value recorded in step (3.2.4);

[0039] (4.2) Select an action strategy for M-node and update its sensor node status;

[0040] (4.3) Learning: Update the Q value of the corresponding state position of the sensor node, the expression is as follows:

[0041] Q(s,a i ,a -i )←(1-α)Q(s,a i ,a -i )+α[R(s,a i )+γπ(s')]

[0042] Among them, Q(s,a i ,a -i ) is the sensor node τ i Select strategy a in state s i Q value at ; s' is the next state of the sensor node, Num(s',a -i ) is the next state neighbor node to select except strategy a i The number of strategies other than the above; n(s') is the number of adjacent nodes that are not damaged in the next state, Q(s',a i ,a -i ) is the sensor node τ i Select strategy a in state s' i Q value at ;

[0043] (4.4) Repeat; Repeat steps (2), (3), (4.2) and (4.3) until the coverage meets the requirements or the number of iterations reaches the set upper limit.

[0044] In one embodiment of the present invention, the step (4.2) specifically includes the following sub-steps:

[0045] (4.2.1) Exploration: Generate a random number and randomly select one of the four strategies of moving up, down, left and right with probability ε as a i ;

[0046] (4.2.2) Using probability 1-ε, considering the joint effect of M-node Q value and other sensor node strategies, select strategy a i ,satisfy Among them, s represents the current state of the sensor node, a -i Indicates that in the strategy space, except for strategy a i Other strategies except -i ) is the neighboring node to select except strategy a i The number of strategies other than , n(s) is the number of undamaged adjacent nodes;

[0047] (4.2.3) Calculate the utility function R; the utility function value is determined by the node benefit value P(ai ,a -i ) and the repair energy consumption value C(a i ) jointly decide; the expression is as follows:

[0048] R(a i ,a -i )=μ α P(a i ,a -i )-μ β C(a i )

[0049] Among them, R(a i ,a -i ) represents the sensor node selection strategy a i The utility value when i ,a -i ) Select strategy a for the sensor node i The node benefit value when C(a i ) Select strategy a for the sensor node i The energy consumption value of repair at the time of α and μ β is the weight coefficient for balancing the node benefit value and the repair energy consumption; the node benefit value is determined by the shortest coordinate distance from the sensor node to the target vulnerability repair point, and the repair energy consumption value is determined by the distance the sensor node moves. The expression is as follows:

[0050]

[0051]

[0052] Among them, ω is a constant, which is the order of magnitude relationship between the balanced moving distance and energy consumption; is the shortest coordinate distance from the sensor node to the target repair and reconstruction point; C is a constant to avoid unnecessary frequent movement of the sensor node, Δd i is the distance moved;

[0053] (4.2.4) Node state protection: The state information of the sensor node includes the node's location information, Q value, strategy value, and utility function value. When the utility function value of the sensor node after executing this strategy is less than the utility reward value of the previous state, that is, R i (t)<R i (t-1), the current action strategy is not executed and the current state s is maintained; otherwise, the current strategy is executed and the sensor node enters the next state s'.

[0054] In general, the above technical solution conceived by the present invention has the following beneficial effects compared with the prior art:

[0055] (1) The global coverage rate after restoration is high. The invention comprehensively explores the spatial correlation of monitoring and reconstruction points in the coverage target area from the perspective of information collaboration, and uses the root mean square error to estimate the coverage error, complete the coverage prediction, and improve the coverage rate;

[0056] (2) Fast repair speed. The Q-Learning method under reinforcement learning used in the invention can use the distance between the sensor node and the vulnerability reconstruction point as a reward to quickly guide the movement of the sensor node, reduce unnecessary movement trajectories, and save repair time;

[0057] (3) Low energy consumption. The two-way selection method adopted by the invention can select directional repair nodes for the vulnerability sub-grid, avoiding the movement and energy consumption of unnecessary sensor nodes. At the same time, the Q-Learning method of reinforcement learning guides the directional repair nodes to repair the vulnerability with the shortest distance movement, saving repair energy consumption;

[0058] (4) High versatility: The Internet of Things involved in the present invention is a universal network, applicable to a variety of application scenarios. The trusted information coverage model used in the present invention can be used to cover different terrains, regions, and different data monitoring targets. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 is a flow chart of a coverage vulnerability repair method based on reinforcement learning in an embodiment of the present invention;

[0060] Figure 2 is a schematic diagram of the utility value of a sensor node in an embodiment of the present invention;

[0061] FIG3 is an example of a visualization result of vulnerability repair in an embodiment of the present invention, wherein:

[0062] Figure 3(a) is a schematic diagram of coverage at the initial moment;

[0063] Figure 3(b) is a schematic diagram of the first vulnerability and the number of training times t = 1;

[0064] Figure 3(c) is a schematic diagram of the training number t=99;

[0065] Figure 3(d) is a schematic diagram of the second vulnerability, when the number of training times is t = 100;

[0066] Figure 3(e) is a schematic diagram of the training number t=199;

[0067] Figure 3(f) is a schematic diagram of the third vulnerability, when the number of training times is t = 200;

[0068] Figure 3(g) is a schematic diagram of the training number t=299;

[0069] Figure 3(h) is a schematic diagram of the fourth vulnerability, when the number of training times is t = 300;

[0070] Figure 3(i) is a schematic diagram of the training number t=500;

[0071] In all the drawings, the same reference numerals are used to denote the same elements or structures, wherein: F-node denotes a fixed node, R-node denotes a movable node, M-node denotes a directional repair node, Rp j (Rx j ,Ry j ) represents the grid reconstruction point of the vulnerability to be repaired, CR represents the range, Num represents the number of normal sensor nodes in the current state network, t represents the number of training times, and Per represents the coverage of the target area under the current training. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0073] The following first explains and illustrates the technical terms of the present invention:

[0074] Correlation Range (CR): The distance threshold that characterizes the spatial correlation of environmental variables. For a specific environmental variable and spatial point, only the values ​​of other spatial points within the range of the correlation range are correlated with the current spatial point.

[0075] Root mean square error (RMSE): It is used to measure and evaluate the reconstruction and estimation quality of the unused spatial environment variable values, that is, the error measure between the estimated value and the reference point value.

[0076] Confident Information Coverage: In the target monitoring area, if the root mean square error of the reconstructed information at a spatial point in the area is less than or equal to the threshold ε0 required by the actual application, the spatial point is covered by credible information.

[0077] Euclidean distance: measures the absolute distance between two points or vectors in multidimensional space, that is, the square root of the difference between the vectors. x ,a y ) to point B(b x ,b y ) is

[0078] Shortest coordinate distance: Each time the sensor node moves, it moves 1 unit distance in one of the four directions: up, down, left, and right. x ,a y ) to point B(b x ,b y ) is the shortest coordinate distance |a x -b x |+|a y -b y |.

[0079] Kriging interpolation: Kriging is essentially a sliding weighted average method with optimal, linear, and unbiased characteristics. Kriging is a regression algorithm for spatial modeling and prediction (interpolation) of random processes or random fields based on covariance functions. In certain random processes, such as intrinsic stationary processes, Kriging can give the optimal linear unbiased estimate, so it is also called the spatial optimal unbiased estimator in geostatistics.

[0080] Q-Learning: A model-independent reinforcement learning algorithm based on the Markov Decision Processes (MDPs) theory. It continuously improves and finally obtains the optimal behavior strategy through interaction with the environment.

[0081] Utility function: A function used in Q-Leaning to measure the return after strategy selection, used to evaluate the pros and cons of taking an action under a specific state.

[0082] Neighboring nodes: sensor nodes τ i The Euclidean distance within its communication range R c Other sensor nodes in the i The adjacent nodes of .

[0083] Q-value: The value used to evaluate an action in Q-learning is called the Q-value, which represents the expected total reward from the agent's selection of this action to the final state.

[0084] argmaxf(x) function: finds the value of x that makes f(x) reach its maximum value.

[0085] The solutions to the difficulties in the prior art are:

[0086] For the first difficulty, most existing methods use a disk model to define the coverage of sensor nodes, which is too ideal and simple. The trusted information coverage model can be used to perform information collaborative reconstruction from the dimension of the spatial domain, and the correlation of spatial points can be used to predict the coverage of the reconstruction points. The trusted information coverage model makes full use of spatial correlation and can be well applied in practice. For the second difficulty, most existing methods select repair nodes based on the shortest path, and do not consider the directional nodes for vulnerability repair. These methods generally have high energy consumption due to the global or local movement of network nodes. The use of the vulnerability-mobile node bidirectional selection method based on the shortest path can well improve this problem and greatly reduce the movement energy consumption of unnecessary repair nodes. For the third difficulty, the existing Voronoi diagram method is often used for spatial geometric division and path selection, and the topology control method adjusts the network coverage by adjusting the position and sensing radius of the sensor node. However, these methods all have the problem of excessive energy consumption or a large number of repetitions. The reinforcement learning method can guide the movement of sensor nodes through a reward mechanism to improve energy utilization and repair speed.

[0087] like Figure 1 As shown, the IoT coverage vulnerability repair method based on reinforcement learning of the present invention includes the following steps:

[0088] (1) Establish a network model based on the monitoring coverage requirements of the target area.

[0089] (1.1) According to the spatial correlation of the detection target, the range and estimated root mean square error threshold are set, and the target coverage area is divided into regional subgrids according to the range;

[0090] (1.2) According to the distribution of sensor nodes, record the sensor node number i, and according to the divided coverage sub-grid, take the sub-grid center point as the reconstruction point, denoted as p.

[0091] (2) Establish a network coverage model through the trusted information coverage model and calculate the coverage rate. This includes the following sub-steps:

[0092] (2.1) In the trusted information coverage model, for unsampled spatial points, the ordinary Kriging interpolation function is used to calculate the estimated value of the environmental variable of the reconstruction point, that is, the sensor node τ in the reconstruction neighborhood Z(p) is used i The estimated value of the environmental variable is calculated by taking the weighted average of the measured values. The interpolation weight coefficient λ of the sensor node in the neighborhood i satisfy n is the sensor node τ in the reconstruction neighborhood Z(p) i The number of i The calculation of includes the following sub-steps:

[0093] (2.1.1) Interpolation weight coefficient λi A set of optimal solutions can be obtained by the minimum kriging variance. The Lagrange multiplier μ(p) is introduced to generate a linear kriging system consisting of n+1 equations with n+1 unknowns. After solving, the interpolation weight coefficient λ is obtained. i .

[0094]

[0095] Among them, γ(τ i ,τ j ) and γ(τ i ,p) can be calculated through the variation function.

[0096] (2.1.2) Calculate γ(τ) in step (2.1.1) i ,τ j ) and γ(τ i ,p). The Gaussian variogram is selected as the variogram of the environmental variables to describe the sensor node τ i Spatial correlation between collected data. The general formula for the Gaussian variogram is:

[0097]

[0098]

[0099] Among them, d τp is the sensor node τ i The Euclidean distance from the reconstructed point p, d τiτj is the sensor node τ i and τ j Euclidean distance, C0 and C are constants. When C0=0, C=1, it is a standard Gaussian function.

[0100] (2.2) Combined with the ordinary Kriging interpolation function, the root mean square error Φ(p) of the reconstructed point p is calculated, and the calculation expression is: in and μ(p) are solved by steps (2.1.1) and (2.1.2).

[0101] (2.3) According to the definition of the trusted information coverage model, if Φ(p)>ε0, that is, the root mean square error is greater than the set coverage threshold, the subgrid is covered, otherwise it is not covered. Record the number of the covered reconstruction point j', and the number of the vulnerable reconstruction point whose root mean square error is less than the threshold ε0 is j".

[0102] (2.4) Calculate the coverage of the target area. The calculation formula is as follows:

[0103]

[0104] Where S is the total area of ​​the coverage area, j' is the number of the reconstruction point covered, S j' is the sub-grid area where the covered reconstruction point j' is located, and m is the total number of covered reconstruction points.

[0105] (3) The directional repair node of the vulnerability area is determined by using the two-way selection method of the minimum shortest coordinate distance between the vulnerability reconstruction point and the movable node. The specific steps include the following:

[0106] (3.1) Select fixed nodes and mobile nodes from the undamaged sensor nodes. Select fixed nodes for the covered subgrids. Fixed nodes will no longer move to ensure the coverage of the covered subgrids. Calculate the Euclidean distance between the sensor nodes and the reconstruction points within the range of the reconstruction point of each covered subgrid. Select a sensor node with the smallest Euclidean distance from the coverage reconstruction point as the fixed node of the coverage grid, denoted as F-node, and the other sensor nodes are mobile nodes, denoted as R-node.

[0107] (3.2) Determine a directional repair node for each vulnerability reconstruction point. This includes the following sub-steps:

[0108] (3.2.1) Calculate the shortest coordinate distance from R-node to the vulnerability reconstruction point j''. Based on the shortest coordinate distance, select an intended repair node from R-node for each vulnerability reconstruction point j''.

[0109] (3.2.2) If an R-node is selected as an intended repair node by only one vulnerability reconstruction point, a two-way selection is established, and the intended repair node is the directional repair node of the corresponding vulnerability reconstruction point. If the same R-node is selected as an intended repair node by multiple vulnerability reconstruction points, the intended repair node will select the vulnerability reconstruction point with the smallest shortest coordinate distance from it as the target repair reconstruction point, and the intended repair node is the directional repair node of the selected target repair reconstruction point. The directional repair node is denoted as M-node.

[0110] (3.2.3) The directional repair node selected in step (3.2.2) is deleted from the selectable repair node R-nodes space, and other vulnerability reconstruction points that have not established a two-way selection will reselect the intended repair node or the directional repair node in the next round.

[0111] (3.2.4) Record the shortest coordinate distance between the directional repair node and its target repair and reconstruction point as the initial node benefit value of the directional repair node.

[0112] (3.2.5) Repeat (3.2.1), (3.2.2), (3.2.3) and (3.2.4) until all vulnerability reconstruction points have selected corresponding directional repair nodes.

[0113] (4) Using the Q-Learning method, the directional repair node M-node is trained and the vulnerable sub-grid is repaired until the coverage rate meets the requirements or the number of iterations reaches the set upper limit. This includes the following sub-steps:

[0114] (4.1) Initialize the parameters of the Q-Learning training model. Set the learning probability α and the exploration probability ε, where α and ε are constants between [0,1]. Set the target area coverage requirement and the number of training times t, establish a Q table, and initialize the initial Q value of each sensor node to 0. Since the initial repair energy consumption value is 0, the initial utility function value of the node is the initial node benefit value recorded in step (3.2.4).

[0115] (4.2) Select an action strategy for M-node and update its sensor node status. This includes the following sub-steps:

[0116] (4.2.1) Exploration. Generate a random number and randomly select one of the four strategies of moving up, down, left and right with probability ε as a i .

[0117] (4.2.2) Using probability 1-ε, considering the combined effect of M-node Q value and other sensor node strategies, select strategy a i ,satisfy Among them, s represents the current state of the sensor node, a -i Indicates that in the strategy space, except for strategy a i Other strategies except -i ) is the neighboring node to select except strategy a i The number of strategies other than , n(s) is the number of undamaged adjacent nodes.

[0118] (4.2.3) Calculate the utility function R. The utility function value is determined by the node benefit value P(a i ,a -i ) and the repair energy consumption value C(a i ) are jointly determined. The expression is as follows:

[0119] R(a i ,a -i )=μ α P(a i ,a -i )-μ β C(a i )

[0120] Among them, R(a i ,a -i ) represents the sensor node selection strategy a iThe utility value when i ,a -i ) Select strategy a for the sensor node i The node benefit value when C(a i ) Select strategy a for the sensor node i The energy consumption value of repair at the time. α and μ β is the weight coefficient for balancing the node benefit value and repair energy consumption. The node benefit value is determined by the shortest coordinate distance from the sensor node to the target vulnerability repair point, such as Figure 2 As shown in Figure 2, the repair energy consumption value is determined by the distance the sensor node moves, and the expression is as follows:

[0121]

[0122]

[0123] Among them, ω is a constant, which is the order of magnitude relationship between the balanced moving distance and energy consumption. is the shortest coordinate distance from the sensor node to the target repair and reconstruction point. C is a constant to avoid unnecessary frequent movement of sensor nodes. i is the distance moved.

[0124] (4.2.4) Node state protection. The state information of the sensor node includes the node's location information, Q value, strategy value, utility function value, etc. When the utility function value of the sensor node after executing this strategy is less than the utility reward value of the previous state, that is, R i (t)<R i (t-1), the current action strategy is not executed and the current state s is maintained. Otherwise, the current strategy is executed and the sensor node enters the next state s'.

[0125] (4.3) Learning. Update the Q value of the corresponding state position of the sensor node, the expression is as follows:

[0126] Q(s,a i ,a -i )←(1-α)Q(s,a i ,a -i )+α[R(s,a i )+γπ(s')]

[0127] Among them, Q(s,a i ,a -i ) is the sensor node τ i Select strategy a in state s i The Q value at that time. s' is the next state of the sensor node, Num(s',a -i) is the next state neighbor node to select except strategy a i The number of strategies other than . n(s') is the number of adjacent nodes that are not damaged in the next state, Q(s',a i ,a -i ) is the sensor node τ i Select strategy a in state s' i The Q value at that time.

[0128] (4.4) Repeat. Repeat steps (2), (3), (4.2) and (4.3) until the coverage meets the requirements or the number of iterations reaches the set upper limit.

[0129] As shown in FIG3 , an example of the visualization result of vulnerability repair in an embodiment of the present invention is shown, wherein: FIG3(a) is a schematic diagram of the initial moment coverage; FIG3(b) is a schematic diagram of the first vulnerability occurrence, with training times t=1; FIG3(c) is a schematic diagram of the training times t=99; FIG3(d) is a schematic diagram of the second vulnerability occurrence, with training times t=100; FIG3(e) is a schematic diagram of the training times t=199; FIG3(f) is a schematic diagram of the third vulnerability occurrence, with training times t=200; FIG3(g) is a schematic diagram of the training times t=299; FIG3(h) is a schematic diagram of the fourth vulnerability occurrence, with training times t=300;

[0130] Figure 3(i) is a schematic diagram of the training number t = 500. As can be seen from Figure 3, this method avoids unnecessary invalid node movement and has an obvious repair effect.

[0131] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for repairing Internet of Things coverage vulnerabilities based on reinforcement learning, characterized in that: The following steps are involved: (1) Establish a network model based on the monitoring coverage requirements of the target area; (1.1) According to the spatial correlation of the detection target, set the range and estimated root mean square error threshold, and divide the target coverage area into regional subgrids according to the range; (1.2) Record the sensor node numbers according to the sensor node distribution , according to the divided covering sub-grid, the center point of the sub-grid is used as the reconstruction point, which is expressed as ; (2) Establish a network coverage model through the trusted information coverage model and calculate the coverage rate; The step (2) specifically includes the following sub-steps: (2.1) In the credible information coverage model, for unsampled spatial points, the ordinary Kriging interpolation function is used to calculate the estimated value of the environmental variable of the reconstruction point, that is, the reconstruction neighborhood is used Sensor nodes within The estimated value of the environmental variable is calculated by taking the weighted average of the measured values; the interpolation weight coefficient of the sensor nodes in the neighborhood satisfy , To rebuild the neighborhood Sensor nodes within the number of (2.2) Calculate the reconstruction points by combining the ordinary Kriging interpolation function The root mean square error , the calculation expression is: ,in and Solve through steps (2.1.1) and (2.1.2); (2.3) According to the definition of the trusted information coverage model, if , that is, if the root mean square error is greater than the set coverage threshold, the subgrid is covered, otherwise it is not covered; record the number of the covered reconstruction point , the root mean square error is less than the threshold The vulnerability reconstruction point number is ; (2.4) Calculate the coverage of the target area; the calculation formula of the coverage in step (2.4) is as follows: in, is the total area of ​​the coverage area, Number the reconstruction point that is covered, The reconstruction point is covered The area of ​​the subgrid, is the total number of covered reconstruction points; (3) The directional repair node of the vulnerability area is determined by using the two-way selection method of the minimum shortest coordinate distance between the vulnerability reconstruction point and the movable node; (4) Using the Q-Learning method, the directional repair node M-node is trained and the vulnerable sub-grid is repaired until the coverage meets the requirements or the number of iterations reaches the set upper limit; The step (4) includes the following sub-steps: (4.1) Initialize Q-Learning training model parameters; set learning probability and exploration probability , and for Constant between; set target area coverage requirements and training times ,Establish Table, initialize each sensor node The value is 0; since the initial repair energy consumption value is 0, the initial utility function value of the node is the initial node benefit value recorded in step (3.2.4); (4.2) Select an action strategy for M-node and update its sensor node status; (4.3) Learning; updating the corresponding state position of the sensor node The value is expressed as follows: in, For sensor nodes In Status Next Select Strategy of value; , is the next state of the sensor node, Select the elimination strategy for the next state neighbor nodes The number of strategies other than is the number of adjacent nodes that are not damaged in the next state, For sensor nodes In Status Next Select Strategy of value; (4.4) Repeat; Repeat steps (2), (3), (4.2) and (4.3) until the coverage meets the requirements or the number of iterations reaches the set upper limit; The step (4.2) specifically includes the following sub-steps: (4.2.1) Exploration; Generate a random number with probability Randomly select one of the four strategies of moving up, down, left and right as ; (4.2.2) Utilization; probability , consider the M-node node The combined effect of the value and other sensor node strategies, the selection strategy ,satisfy ,in, Indicates the current state of the sensor node. Indicates that in the strategy space, except for strategy Other strategies besides Select a removal strategy for adjacent nodes The number of strategies other than is the number of undamaged adjacent nodes; (4.2.3) Calculate the utility function ; The utility function value is determined by the node benefit value and repair energy consumption value Joint decision; the expression is as follows: in, Represents the sensor node selection strategy The utility value when Selecting strategies for sensor nodes The node benefit value at time Selecting strategies for sensor nodes The energy consumption value of repair at the time of and is the weight coefficient for balancing the node benefit value and the repair energy consumption; the node benefit value is determined by the shortest coordinate distance from the sensor node to the target vulnerability repair point, and the repair energy consumption value is determined by the distance the sensor node moves. The expression is as follows: in, is a constant, which is the order of magnitude relationship between the balanced moving distance and energy consumption; The shortest coordinate distance from the sensor node to the target repair and reconstruction point; is a constant to avoid unnecessary frequent movement of sensor nodes. is the distance moved; (4.2.4) Node status protection: The status information of the sensor node includes the node's location information, value, strategy value, and utility function value; when the utility function value after the sensor node executes this strategy is less than the utility reward value of the previous state, that is, , the current action strategy is not executed and the current state is maintained ; Otherwise, the current strategy is executed and the sensor node enters the next state .

2. The method for repairing IoT coverage vulnerabilities based on reinforcement learning as claimed in claim 1, characterized in that: The step (2.1) includes the following sub-steps: (2.1.1) Interpolation weight coefficient Obtain a set of optimal solutions through minimum Kriging variance; introduce Lagrange multiplier Produce with An unknown number The linear Kriging system composed of a set of equations is solved to obtain the interpolation weight coefficient ; in, and Calculated by variogram; (2.1.2) Calculate the value of step (2.1.1) and ; Gaussian variogram is selected as the variogram of environmental variables to describe sensor nodes Spatial correlation between collected data; the formula of Gaussian variogram is: in, For sensor nodes and reconstruction points The Euclidean distance of For sensor nodes and The Euclidean distance of and is a constant.

3. The method for repairing IoT coverage vulnerabilities based on reinforcement learning as claimed in claim 1, characterized in that: The step (3) specifically includes the following sub-steps: (3.1) Select fixed nodes and movable nodes from the undamaged sensor nodes; select fixed nodes for the covered subgrids, and the fixed nodes will no longer move to ensure the coverage of the covered subgrids; Calculate the Euclidean distance between the sensor nodes and the reconstruction point within the range of each covered subgrid reconstruction point, and select a sensor node with the smallest Euclidean distance from the covered reconstruction point as the fixed node of the covered grid, denoted as F-node, and other sensor nodes are movable nodes, denoted as R-node; (3.2) Determine the directional repair node for each vulnerability reconstruction point.

4. The method for repairing IoT coverage vulnerabilities based on reinforcement learning as claimed in claim 3, characterized in that: The step (3.2) specifically includes the following sub-steps: (3.2.1) Calculate R-node to the vulnerability reconstruction point The shortest coordinate distance; based on the shortest coordinate distance, reconstruct the point for each vulnerability Select an intended repair node from R-node; (3.2.2) If an R-node is only selected as an intended repair node by one vulnerability reconstruction point, a two-way selection is established, and the intended repair node is the directional repair node of the corresponding vulnerability reconstruction point; if the same R-node is selected as an intended repair node by multiple vulnerability reconstruction points, the intended repair node will select the vulnerability reconstruction point with the smallest shortest coordinate distance from it as the target repair reconstruction point, and the intended repair node is the directional repair node of the selected target repair reconstruction point; the directional repair node is recorded as M-node; (3.2.3) The directional repair node selected in step (3.2.2) is deleted from the selectable repair node R-nodes space, and other vulnerability reconstruction points that have not established a two-way selection will reselect the intended repair node or the directional repair node in the next round; (3.2.4) Record the shortest coordinate distance between the directional repair node and its target repair and reconstruction point as the initial node benefit value of the directional repair node; (3.2.5) Repeat (3.2.1), (3.2.2), (3.2.3) and (3.2.4) until all vulnerability reconstruction points have selected corresponding directional repair nodes.