Line patrol planning method considering route information age and planning system thereof
By finding Euler loops in the route network map or building an expanded map to ensure even-numbered nodes, the problem of line information age optimization in the existing technology is solved, and a smaller average information age and a more reliable inspection path are achieved, which ensures that The ability to detect line damage in time in extreme environments.
Patent Information
- Application Number
- CN202411299617.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-07
AI Technical Summary
The prior art is difficult to optimize the information age of continuous paths, resulting in line damage in extreme environments that may not be detected in time, increasing risks.
By judging whether there is an Euler loop in the route network diagram to be inspected, if it does not exist, a complete graph is built and the problem of perfect matching of the minimum weight is solved, and the graph is expanded to ensure that the degrees of each node are even, so as to find the Euler loop as the inspection line Path, optimize the average information age of the overall route.
The average information age obtained in any connected graph is achieved without exceeding twice the minimum possible average information age, ensuring the reliability and timeliness of inspections and reducing the risk of line damage detection.
Smart Images

Figure CN119272956A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field related to path planning, and more specifically, relates to a line patrol planning method and a planning system thereof that considers the age of route information. Background Art
[0002] Networks such as power grids, highways, and pipelines require frequent monitoring and damage detection, especially during natural disasters (such as wildfires, earthquakes), extreme weather conditions (such as freezing rain, blizzards, low temperatures), and accidents. These networks are particularly susceptible to damage caused by dynamic environments. Unlike regular line inspection tasks, in these cases, the lines need to be inspected repeatedly to ensure that any damage caused by the time-varying environment is discovered in a timely manner.
[0003] Age of Information (AoI) is a measure of how timely decision makers understand the state of a dynamic environment. The AoI of a particular location is defined as the length of time since the last visit to that location. For example, the age of information at location x at time t is Δ(x, t) = tU(x, t), where U(x, t) is the time of the most recent visit to location x before time t.
[0004] Current research focuses on setting up paths to minimize the information age of nodes. However, there is a big difference between ensuring the information age of nodes and the information age of lines. Nodes are discretely distributed, while line inspection is a continuous process. Optimizing the information age of nodes cannot optimize the information age of continuous paths, which may result in a long visit interval for some paths and the inability to detect risks on the route in a timely manner.
[0005] Assume that the connected route network graph G to be inspected has a node set V and an edge set E. Under the inspection path R, the average information age of the entire network graph G = (V, E) is defined as In a rapidly changing environment, a large average information age means that the sampling interval at that location is long, which may result in defects in the line that cannot be detected in time, resulting in increased risks. Line managers need to monitor the status of each line in a timely manner for diagnosis and preventive maintenance, especially in extreme environments.
[0006] Therefore, it is urgent to propose a patrol planning scheme that takes the age of route information into consideration, so that patrol planning can be carried out with the goal of optimizing the average information age of the entire route to ensure that each part of the route is patrolled in a timely manner, thereby ensuring the reliability of the patrol. Summary of the invention
[0007] In view of the above defects or improvement needs of the prior art, the present invention provides a patrol line planning method and a planning system that take into account the age of route information, the purpose of which is to perform patrol planning with the goal of optimizing the average information age of the entire route to ensure that each part of the route is patrolled in a timely manner, thereby ensuring the reliability of the patrol.
[0008] To achieve the above object, according to one aspect of the present invention, a route patrol planning method considering the age of route information is provided, which comprises:
[0009] Step S1: Determine whether there is an Euler loop in the route network graph G to be patrolled. If not, execute step S2;
[0010] Step S2: Find all nodes with odd degrees in graph G to construct the complete graph G f , the degree is the number of edges connecting the node, and the node is the intersection of different edges; Figure G f The length of the edge between two points in is the access time of the shortest path between the corresponding two points in graph G;
[0011] Step S3: For graph G f Solve the minimum weight perfect matching problem and obtain the set OM of the best matching edges;
[0012] Step S4: Use graph G as the initial extended graph G′, traverse each edge (v,u) of the set OM, where v and u are the nodes of the current edge, and find the shortest path R from node v to node u in graph G. s And the path R s Each edge in is added to the current graph G′, and the final graph G′ is obtained after the traversal is completed;
[0013] Step S5: Find an Euler circuit from the graph G′;
[0014] Step S6: Using the found Euler circuit as the line inspection path R.
[0015] Preferably, in step S1, it is determined whether there is an Euler circuit in the route network graph G to be patrolled. If so, the existing Euler circuit is used as the patrol path R.
[0016] Preferably, when there is an Euler loop in the route network graph G to be inspected, the existing Euler loop is used as the inspection path R and the average information age of the inspection path R is calculated. l(E) is the access time of all edges in graph G.
[0017] Preferably, in step S5, the finding of the Euler circuit from the graph G′ comprises: finding the Euler circuit using a minimum penalty search algorithm;
[0018] The minimum penalty search algorithm includes:
[0019] Step S51: Use graph G′ as the initial graph Select Graph A node in is used as the starting point v0 of the Euler circuit S;
[0020] Step S52: For the node v′ at the end of the current path S, find all extendable nodes u′ to form a set V next , node u′ satisfies: connected to node v′ and deleting the edge (v′,u′) will not change the graph Divided into two disconnected subgraphs;
[0021] Step S53: Calculate the set V next The penalty function value p of each node u′ in u′ :
[0022] If there is only one edge between node v′ and node u′ in graph G′, then is the visit duration of all edges E′ in graph G′;
[0023] If there are two edges between node v′ and node u′ in graph G′ and the current path S already contains one of the edges, then p u′ is the interval between two visits to the edge (v′,u′);
[0024] If there are two edges between node v' and node u' in graph G' and the edge (v',u') does not appear in the current path S, then ∈ is the preset positive disturbance value, l(S) is the access time of the current path S, l((v′,u′)) is the access time of the edge (v′,u′), and dist(u′,v0) is the access time of the shortest path from node u′ to the starting point v0 in graph G;
[0025] Step S54: From the set V next Select the penalty function value p u′ The largest node u′ is added to the end of path S as the next extended node, and the current graph is deleted. An edge (v′,u′) in ;
[0026] Step S55: Repeat steps S52 to S54 until The set of middle edges is empty, and the Euler circuit S is output.
[0027] Preferably, in step S6, taking the found Euler circuit as the line patrol path R includes: directly taking the Euler circuit found by adopting the minimum penalty search algorithm as the final line patrol path R.
[0028] Preferably, in step S6, taking the found Euler circuit as the line inspection path R includes:
[0029] Compare the Euler circuits found from the graph G′ using different methods and calculate the average information age of each Euler circuit, and take the Euler circuit with the smallest average information age as the final line inspection path R;
[0030] The method for calculating the average information age of path S includes:
[0031] Step S61: Expand the Euler circuit S = (S[0], ..., S[M]) to a path S a =(S[0],…,S[M],S[M+1],…,S[2M]), path S a is the patrol path formed by patrolling two cycles along the path S, S[i] = S[M+i], S[i] is the node reached in the i-th step of the patrol path, and M is the number of edges of the path S;
[0032] Step S61: Initialize the accumulated information age Δ to 0, and initialize i=M;
[0033] Step S62: Along the path S a When patrolling, when visiting edge e=(S a [i],S a [i+1]), from the current S a [i] Start along S a Backtrack until you reach the location where edge e was last visited and calculate the current S a [i] The time from the last edge e visit to the end of S a The access time t elapsed in
[0034] If the direction of the last access to edge e is the same as the current access direction, then add the current accumulated information age Δ Where l(e) is the visit duration of edge e;
[0035] If the direction of the last visit to edge e is opposite to the current visit direction, the accumulated information age Δ is accumulated
[0036] Step S63: Determine whether i is 2M. If not, set i=i+1 and jump to step S62. If yes, execute step S64:
[0037] Step S64: Calculate the average information age is the visit time of all edges in path S.
[0038] Preferably, the step of determining whether there is an Euler circuit in the route network graph G to be patrolled includes:
[0039] Determine whether the degree of each node in graph G is an even number. If so, there is an Euler circuit in graph G. If not, there is no Euler circuit in graph G.
[0040] According to another aspect of the present invention, there is provided a line patrol planning system taking into account the age of route information, comprising:
[0041] A judgment unit, used for judging whether there is an Euler loop in the route network graph G to be patrolled;
[0042] The complete graph construction unit is used to find all nodes with odd degrees in the graph G to construct the complete graph G when there is no Euler circuit in the graph G. f , the degree is the number of edges connecting the node, and the node is the intersection of different routes; Graph G f The length of the edge between two points in is the access time of the shortest path between the corresponding two points in graph G;
[0043] The best matching unit is used to match the graph G f Solve the minimum weight perfect matching problem and obtain the set OM of the best matching edges;
[0044] The graph expansion unit is used to use the graph G as the initial expanded graph G′, traverse each edge (v,u) of the set OM, where v and u are the nodes of the current edge, and find the shortest path R from node v to node u in the graph G. s And the path R s Each edge in is added to the current graph G′, and the final graph G′ is obtained after the traversal is completed;
[0045] Planning unit, used to find the Euler circuit from the graph G′;
[0046] The output unit is used to use the Euler circuit to be found as the line patrol path R.
[0047] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0048] According to another aspect of the present invention, a computer program product is provided, comprising a computer program or instructions, wherein when the computer program or instructions are executed by a processor, the steps of any of the above methods are implemented.
[0049] In general, compared with the prior art, the above technical solutions conceived by the present invention mainly have the following beneficial effects:
[0050] 1. For the area to be inspected, all routes that need to be inspected constitute a connected route network graph. It is necessary to design a patrol path to repeatedly patrol the route network graph. If a path passes through each edge in the graph exactly once within a cycle, then the path is called the Euler path of the graph. By using the Euler path as the patrol path, the minimum patrol average information age of the route network graph can be obtained. However, there is often no Euler circuit in the route network graph. For the network graph that does not have an Euler circuit, the present invention designs a patrol planning method. By solving the minimum weight perfect matching problem, the edges that need to be added to the original graph G are obtained, and these edges are expanded into the graph G to obtain the expanded graph G′; since the minimum weight matching problem is based on the points with odd degrees in the original graph G, after adding edges to these points, the degrees of all points in the expanded graph G′ are even numbers, so the expanded graph G′ has an Euler circuit; in addition, the edges obtained by solving the minimum weight perfect matching problem are all added edges. The method has the shortest length, and through theoretical analysis it is strictly proved that there are at most two edges connecting any two points of the expanded graph G′. Based on the Euler circuit found by the graph G′, each edge in the graph G is visited at most twice. The Euler circuit of the expanded graph G′ is used as the line inspection path. It is theoretically proved that the average information age obtained by the line inspection method in any connected graph does not exceed twice the minimum average information age that all algorithms can theoretically achieve. In this way, the average age information of the network graph to be inspected can be optimized to ensure timely inspection of each part of the line, thereby ensuring the reliability of the inspection.
[0051] 2. In a specific embodiment, Fleury's algorithm is further improved, and a minimum penalty search algorithm is proposed to find the Euler circuit. This method adopts a method of gradually constructing the Euler circuit, and searches for edges that can be added to the Euler circuit at each step until the entire Euler circuit is constructed. When searching for edges that can be added at each step, a penalty value is introduced, which is essentially to estimate the gradient information of the information age of each edge, and then give priority to edges with larger information age gradients to join the Euler circuit, thereby avoiding a certain edge from having too large an information age, thereby reducing the information age of the entire graph.
[0052] 3. In a specific embodiment, a method for calculating the average information age of an Euler circuit is further proposed. By comparing the average information ages of different Euler circuits found, the Euler circuit with the smallest average information age is used as the final line patrol path. This calculation method considers whether the order in which each edge is visited twice in the line patrol path is the same, thereby modeling the instantaneous information age state of this edge when it is visited, and then integrating the instantaneous information age of this edge in the interval between two visits in the line patrol path to obtain the cumulative information age of each edge in the access cycle, and further summarizing the cumulative information age of all edges in the line patrol path and dividing it by the access time of all edges in the line patrol path, thereby obtaining the average information age of all edges in the line patrol path. Based on the above method for calculating the average information age, the average information age can be calculated quickly and accurately and the line patrol path can be evaluated. The smaller the average information age, the better the line patrol path. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 is a flowchart of the steps of a line patrol planning method considering the age of route information in one embodiment of the present invention;
[0054] Figure 2 is a route network diagram in one embodiment of the present invention;
[0055] Figure 3 It is a specific code for finding the Euler circuit by using Fleury's algorithm in one embodiment of the present invention;
[0056] Figure 4 is a schematic diagram of expanding a graph G to form an expanded graph G′ in one embodiment of the present invention;
[0057] Figure 5 is a code for generating an extended graph in one embodiment of the present invention;
[0058] Figure 6 is a flowchart of the steps of a minimum penalty search algorithm in one embodiment of the present invention;
[0059] Figure 7 is the code of the minimum penalty search algorithm in one embodiment of the present invention;
[0060] Figure 8 is a code for calculating the average information age of a path in one embodiment of the present invention;
[0061] Fig. 9 It is a structural diagram of a line patrol planning system that takes into account the age of route information in one embodiment of the present invention. DETAILED DESCRIPTION
[0062] 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.
[0063] Example 1
[0064] like Figure 1 The flowchart is a step flow chart of a line patrol planning method considering the age of route information in one embodiment of the present invention, which mainly includes steps S1 to S6, and the steps are introduced below.
[0065] Step S1: Determine whether there is an Euler circuit in the route network graph G to be patrolled. If not, execute step S2.
[0066] Specifically, Figure 2 The figure shows a route network diagram in one embodiment of the present invention, in which the lines that need to be inspected are summarized, and the places where the lines are cross-summed in reality are regarded as nodes of the network diagram, and the lines are regarded as edges of the network diagram. In this way, the part that needs to be inspected is abstracted into a network diagram G = (V, E), where V is the node set of the network diagram, and E is the edge set of the network diagram.
[0067] In one embodiment, the access time of the edges in the network graph G can be counted to construct the following adjacency matrix of the route network graph G:
[0068]
[0069] Where N is the number of nodes in the network graph G, A i,j is the length of the edge connecting node i and node j divided by the patrol speed of the drone, that is, the access time of edge (i, j). When there is no direct edge connection between two nodes, the corresponding A i,j = 0. Therefore, A i,i = 0. Since the distance from node i to node j is the same as the distance from node j to node i, we have A i,j =A j,i That is, the adjacency matrix is symmetric about the diagonal, and the diagonal elements are all zero.
[0070] Specifically, the method for determining whether there is an Euler circuit is as follows: determine whether the degree of each node in the graph G is an even number. If so, there is an Euler circuit in the graph G; if not, there is no Euler circuit in the graph G.
[0071] Specifically, the method for determining whether the degree of each node in the graph G is an even number can be:
[0072] Loop through each row of the adjacency matrix A: For the element in the pth row (1≤p≤N), calculate d p is the degree of the pth node (the number of connected edges), when A p,q >0, g p,q =1, otherwise, g p,q = 0. According to the above formula, the degree of all nodes is calculated. When the degree of all nodes is an even number, that is, for all 1≤p≤N, there is d p %2=0, the graph has an Euler circuit if there exists a p such that d p %2=1, then there is no Euler circuit in the graph.
[0073] When an Euler circuit exists, the Euler circuit is the optimal line inspection path, and the existing Euler circuit is used as the line inspection path.
[0074] The currently available algorithms can be used to find the Euler circuit. For example, Fleury's algorithm can be used to find the Euler circuit in the graph G, such as Figure 3 The figure shows the specific code of using Fleury's algorithm to find the Euler circuit in one embodiment. The specific process is as follows:
[0075] Step S11: Use graph G as the initial graph Select a node as the starting point v0 of the line patrol loop R;
[0076] Step S12: For the node v′ at the end of the current path R, find all extendable nodes u′ to form a set V next , node u′ satisfies: connected to node v′ and deleting the edge (v′,u′) will not change the graph Divided into two disconnected subgraphs;
[0077] Step S13: From the set V next A node u′ is randomly selected as the next extended node and added to the end of the path R, and the current graph is deleted. The edge (v′,u′) in
[0078] Step S14: Repeat steps S12 to S14 until The set of middle edges is empty, and the line patrol path R is output.
[0079] Through the above Fleury's algorithm, we can find the Euler circuit in the graph G as the line patrol path R.
[0080] When there is no Euler circuit, perform the following steps to plan the line patrol path.
[0081] like Figure 4FIG. 1 is a schematic diagram showing a method of expanding a graph G to form an expanded graph G′ in an embodiment of the present invention. Figure 5 The code for generating an extended graph in one embodiment is shown in FIG. Figure 4 and Figure 5 Let's understand steps S2 to S4.
[0082] Step S2: Find all nodes with odd degrees in graph G to construct the complete graph G f , the degree is the number of edges connecting the node.
[0083] Specifically, find nodes with odd degrees in graph G and form a set nodes odd , where the degree of a point is the number of edges connecting it, using nodes odd Construct a complete graph G from the points in f , the complete graph G f Each point in is connected to other points by an edge, and the length of the edge is the visit time of the shortest path between the two points on the original graph G.
[0084] Step S3: For graph G f Solve the minimum weight perfect matching problem and obtain the set OM of the best matching edges.
[0085] Specifically, in Figure G f Solve the minimum weight perfect matching problem above and get the set of best matching edges OM. The weight of each edge is the access time of the edge. The purpose of minimum weight perfect matching is to solve the set of edges that need to be added to the original graph, so that the degree of each node in the added graph is an even number, and the total length of the added edges is the shortest, thereby ensuring that at most one edge is added between every two points.
[0086] Step S4: Use graph G as the initial extended graph G′, traverse each edge (v,u) of the set OM, where v and u are the nodes of the current edge, and find the shortest path R from node v to node u in graph G. s And the path R s Each edge in is added to the current graph G′, and the final graph G′ is obtained after the traversal is completed.
[0087] Specifically, this step is to expand the graph G based on the edges in the set OM. The edges in the set OM come from the graph G. f , while Figure G fIt is a complete graph reconstructed from nodes with odd degrees in graph G. Therefore, the edges in set OM may not exist in graph G. For example, there is an edge from node 1 to node 3 in set OM. The degrees of node 1 and node 3 in graph G are both odd. In graph G, there is no edge between node 1 and node 3. The shortest path from node 1 to node 3 is node 1→node 2→node 3. Therefore, adding the edge from node 1→node 2 and the edge from node 2→node 3 to the current graph G′ is actually an expansion of the edges of the original graph G. At this time, there are two edges from node 1→node 2 and two edges from node 2→node 3.
[0088] In the present invention, the minimum weight perfect matching problem is introduced to obtain the set of best matching edges, and then the original graph G is expanded. Since the minimum weight perfect matching is solved based on the points with odd degrees in the original graph, the degree of each point in the expanded graph G′ is an even number, and the Euler circuit must exist in the expanded graph G′.
[0089] Step S5: Find the Euler circuit from the graph G′.
[0090] Step S6: Using the found Euler circuit as the line inspection path R.
[0091] Specifically, in the graph G′ obtained after expansion, two nodes can be connected by at most two edges, and the degree of each node is an even number, so it has an Euler circuit. In addition, the Euler circuit of the expanded graph constructed based on the above method must visit every edge of the graph G within one patrol cycle, and each edge is visited at most twice. Therefore, it is only necessary to find the Euler circuit in the graph G′ and use the Euler circuit as the patrol path to achieve rapid planning of the patrol path and the average information age of the overall path is better.
[0092] In some embodiments, Fleury's algorithm as described above may be used to find the Euler circuit in the graph G′, and the Euler circuit is used as the line patrol path R.
[0093] In some embodiments, Fleury's algorithm is further improved to propose a minimum penalty search algorithm to find the Euler circuit, such as Figure 6 FIG. 1 is a flowchart of the steps of the minimum penalty search algorithm in one embodiment of the present invention. Figure 7 The code of the minimum penalty search algorithm in one embodiment is shown. The process of the minimum penalty search algorithm is as follows.
[0094] Step S51: Use graph G′ as the initial graph Select Graph A node in is used as the starting point v0 of the Euler circuit S.
[0095] Step S52: For the node v′ at the end of the current path S, find all extendable nodes u′ to form a set V next , node u′ satisfies: connected to node v′ and deleting the edge (v′,u′) will not change the graph Split into two disconnected subgraphs.
[0096] Specifically, step S51 and step S52 are the same as step S11 and step S12 in the Fleury's algorithm described above. The improvement of the minimum penalty search algorithm compared to the Fleury's algorithm is mainly reflected in the subsequent steps S53 and S54.
[0097] Step S53: Calculate the set V next The penalty function value p of each node u′ in u′ .
[0098] If there is only one edge between node v′ and node u′ in graph G′, then l(E′) is the visit duration of all edges E′ in graph G′.
[0099] Specifically, since graph G′ is an extended graph, some of the edges have two edges, for example, in the above example, there are two edges from node 1→node 2 and two edges from node 2→node 3. Therefore, edge E′ contains two edges from node 1→node 2 and two edges from node 2→node 3.
[0100] If there are two edges between node v′ and node u′ in graph G′ and the current path S already contains one of the edges, then p u′ is the time interval between two visits to the edge (v′,u′).
[0101] Specifically, after the graph is expanded, some edges have two, and when searching for an Euler circuit, the same edge will be passed twice. If the edge has been visited once before in the current path S, the penalty for choosing to visit this edge again is the time interval from the last time the edge was visited to the time the edge was visited again, that is, p u′ =l((v′,u′))+τ, l((v′,u′)) is the access time of edge (v′,u′), τ is the time from the current distance to the end of the first patrol of edge (v′,u′).
[0102] If there are two edges between node v' and node u' in graph G' and the edge (v',u') does not appear in the current path S, then ∈ is a preset positive disturbance value, for example, it can be 0.01, and its value can be selected as long as the computing system can identify Greater than That is, l(S) is the access time of the current path S, and dist(u′,v0) is the access time of the shortest path from node u′ to the starting point v0 in graph G.
[0103] Specifically, the penalty function can be expressed as follows:
[0104]
[0105] Case 1: (v′,u′) has only one edge in the graph G′;
[0106] Case 2: (v′,u′) has two single edges in the graph G′ and the edge ((v′,u′) appears only once in the current path R, and τ is the time from the end of the last visit to (v′,u′) in S;
[0107] Case 3: (v′,u′) has two single edges in graph G′ and the edge (v′,u′) has not yet appeared in the current path S, where ∈ is a value greater than zero but very small, such as 0.01, and dist(u′,v0) is the access time of the shortest path from node u′ to the initial node v0 in graph G.
[0108] Step S54: From the set V next Select the penalty function value p u′ The largest node u′ is added to the end of path S as the next extended node, and the current graph is deleted. An edge (v′,u′) in .
[0109] Step S55: Repeat steps S52 to S54 until The set of middle edges is empty, and the Euler circuit is output.
[0110] Specifically, step S3 and step S4 introduce penalty values, which essentially estimate the information age gradient information of each edge that meets the addition criteria, and then give priority to adding edges with larger information age gradients to the line inspection path, thereby avoiding visiting the edge too late, resulting in the information age of this edge being too large.
[0111] The expanded graph G′ may have different Euler circuits. In specific operations, the found Euler circuit can be directly used as the line inspection path, or different Euler circuits can be compared to select a better Euler circuit as the line inspection path.
[0112] Therefore, in some embodiments, an innovative calculation method for calculating the average information age of an Euler circuit is further proposed. In step S6, the found Euler circuit is used as the line inspection path R, including: comparing the Euler circuits found from the graph G′ using different methods and calculating the average information age of each Euler circuit, and taking the Euler circuit with the smallest average information age as the final line inspection path R.
[0113] like Figure 8 The code for calculating the average information age of a path is shown. The method for calculating the average information age of a path S includes:
[0114] Step S61: Expand the path S = (S[0], ..., S[M]) to the path S a =(S[0],…,S[M],S[M+1],…,S[2M]), path S a is the patrol path formed by patrolling two cycles along the path S, S[i] = S[M+i], S[i] is the node reached in the i-th step of the patrol path, and M is the number of edges of the path S;
[0115] Step S61: Initialize the accumulated information age Δ to 0, and initialize i=M;
[0116] Step S62: Along the path S a When patrolling, when visiting edge e=(S a [i],S a [i+1]), S a [i] is the patrol path S a The node reached in step i in the current S a [i] Start along S a Backtrack until you reach the location where edge e was last visited and calculate the current S a [i] The time from the last edge e visit to the end of S a The access time t elapsed in
[0117] If the direction of the last access to edge e is the same as the current access direction, then add the current accumulated information age Δ Where l(e) is the visit duration of edge e;
[0118] If the direction of the last visit to edge e is opposite to the current visit direction, the accumulated information age Δ is accumulated
[0119] Step S63: Determine whether i is 2M. If not, set i=i+1 and jump to step S62. If yes, execute step S64:
[0120] Step S64: Calculate the average information age is the visit time of all edges in path S.
[0121] The logic of calculating the average information age above is actually to calculate the cumulative information age of each edge from the end of one patrol to the end of the next patrol. If this edge is patrolled only once in the patrol path, the cumulative information age calculation only needs to be performed once. If an edge is patrolled twice in the patrol path, the cumulative information age calculation needs to be performed twice.
[0122] For example, suppose an edge e0 is visited twice in the patrol path S, where the first visit starts from time 0 and ends at time l(e0), and the second visit starts from time l(e0)+t and ends at time 2l(e0)+t. If the two patrols are in the same direction, the cumulative information age of edge e0 from time l(e0) to time 2l(e0)+t is If the two patrols e0 are in different directions, the cumulative information age of edge e0 from time l(e0) to time 2l(e0)+t is Similarly, the cumulative information age from the end of the second visit to the end of the first visit in the next cycle can be calculated. If an edge is only inspected once in S, then e0 is inspected from the same direction each time, and the cumulative information age of e0 in each cycle can be obtained as Where t = Rl(e0).
[0123] The above method for calculating the average information age of the path S is based on considering the instantaneous information age state of each edge in both cases of being visited and not being visited, thereby integrating the instantaneous information age of each edge in the two cases with respect to time, and then obtaining the cumulative information age and dividing it by the access time of the entire path. The average information age is calculated based on the above method, and the average information age can be calculated quickly and accurately and the Euler circuit can be evaluated. The smaller the average information age, the better the Euler circuit.
[0124] In one embodiment, the following method can be used to verify the distance from the minimum information age:
[0125]
[0126] In the formula, is the calculated average information age, l(E) is the access time of all edges in the network graph G, and the ratio is always a number greater than or equal to 1. The closer this ratio is to 1, the closer the information age obtained by the solved path is to the theoretical optimum that can be achieved.
[0127] Example 2
[0128] The present invention also relates to a line patrol planning system that takes into account the age of route information, such as Fig. 9FIG. 1 is a schematic diagram of a line patrol planning system considering the age of route information in one embodiment of the present invention, which includes:
[0129] A judgment unit, used for judging whether there is an Euler loop in the route network graph G to be patrolled;
[0130] The complete graph construction unit is used to find all nodes with odd degrees in the graph G to construct the complete graph G when there is no Euler circuit in the graph G. f , the degree is the number of edges connecting the node, and the node is the intersection of different edges;
[0131] The best matching unit is used to match the graph G f Solve the minimum weight perfect matching problem and obtain the set OM of the best matching edges;
[0132] The graph expansion unit is used to use the graph G as the initial expanded graph G′, traverse each edge (v,u) of the set OM, where v and u are the nodes of the current edge, and find the shortest path R from node v to node u in the graph G. s And the path R s Each edge in is added to the current graph G′, and the final graph G′ is obtained after the traversal is completed;
[0133] Planning unit, used to find the Euler circuit from the graph G′;
[0134] The output unit is used to use the Euler circuit to be found as the line patrol path R.
[0135] Specifically, the above line patrol planning system can implement the line patrol planning method considering the age of route information in the embodiment, wherein each functional unit can execute the corresponding steps in the method. For specific details, please refer to the introduction of embodiment 1 and will not be repeated here.
[0136] Example 3
[0137] The present invention also relates to a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps of the above method when executed by a processor.
[0138] Specifically, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, an internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0139] Example 4
[0140] The embodiment of the present invention provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of the method of the above embodiment of the present invention.
[0141] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. It should be noted that "in one embodiment", "for example", "for example", etc. of the present invention are intended to illustrate the present invention, rather than to limit the present invention.
[0142] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent application. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention.
Claims
1. A line patrol planning method considering the age of route information, characterized in that: include: Step S1: Determine whether there is an Euler loop in the route network graph G to be patrolled. If not, execute step S2; Step S2: Find all nodes with odd degrees in graph G to construct the complete graph G f , the degree is the number of edges connecting the node, and the node is the intersection of different edges; Figure G f The length of the edge between two points in is the access time of the shortest path between the corresponding two points in graph G; Step S3: For graph G f Solve the minimum weight perfect matching problem and obtain the set OM of the best matching edges; Step S4: Use graph G as the initial extended graph G′, traverse each edge (v,u) of the set OM, where v and u are the nodes of the current edge, and find the shortest path R from node v to node u in graph G. s And the path R s Each edge in is added to the current graph G′, and the final graph G′ is obtained after the traversal is completed; Step S5: Find an Euler circuit from the graph G′; Step S6: Using the found Euler circuit as the line inspection path R.
2. The line patrol planning method considering the age of route information as claimed in claim 1, characterized in that: In step S1, it is determined whether there is an Euler loop in the route network graph G to be patrolled. If there is, the existing Euler loop is used as the patrol path R.
3. The line patrol planning method considering the age of route information as claimed in claim 2, characterized in that: When there is an Euler loop in the route network graph G to be inspected, the existing Euler loop is used as the patrol path R and the average information age of the patrol path R is calculated. l(E) is the access time of all edges in graph G.
4. The line patrol planning method considering the age of route information as claimed in claim 1, characterized in that: In step S5, the step of finding an Euler circuit from the graph G′ includes: finding an Euler circuit using a minimum penalty search algorithm; The minimum penalty search algorithm includes: Step S51: Use graph G′ as the initial graph Select Graph A node in is used as the starting point v0 of the Euler circuit S; Step S52: For the node v′ at the end of the current path S, find all extendable nodes u′ to form a set V next , node u′ satisfies: connected to node v′ and deleting the edge (v′,u′) will not change the graph Divided into two disconnected subgraphs; Step S53: Calculate the set V next The penalty function value p of each node u′ in u′ : If there is only one edge between node v′ and node u′ in graph G′, then l(E′) is the visit duration of all edges E′ in graph G′; If there are two edges between node v′ and node u′ in graph G′ and the current path S already contains one of the edges, then p u′ is the interval between two visits to the edge (v′,u′); If there are two edges between node v' and node u' in graph G' and the edge (v',u') does not appear in the current path S, then ∈ is the preset positive disturbance value, l(S) is the access time of the current path S, l((v′,u′)) is the access time of the edge (v′,u′), and dist(u′,v0) is the access time of the shortest path from node u′ to the starting point v0 in graph G; Step S54: From the set V next Select the penalty function value p u′ The largest node u′ is added to the end of path S as the next extended node, and the current graph is deleted. An edge (v′,u′) in ; Step S55: Repeat steps S52 to S54 until The set of middle edges is empty, and the Euler circuit S is output.
5. The patrol line planning method considering the age of route information as claimed in claim 4, characterized in that: In step S6, taking the found Euler circuit as the line patrol path R includes: directly taking the Euler circuit found by adopting the minimum penalty search algorithm as the final line patrol path R.
6. The line patrol planning method considering the age of route information according to any one of claims 1 to 4, characterized in that: In step S6, the step of using the found Euler circuit as the line inspection path R includes: Compare the Euler circuits found from the graph G′ using different methods and calculate the average information age of each Euler circuit, and take the Euler circuit with the smallest average information age as the final line inspection path R; The method for calculating the average information age of path S includes: Step S61: Expand the Euler circuit S = (S[0], ..., S[M]) to a path S a =(S[0],…,S[M],S[M+1],…,S[2M]), path S a is the patrol path formed by patrolling two cycles along the path S, S[i] = S[M+i], S[i] is the node reached in the i-th step of the patrol path, and M is the number of edges of the path S; Step S61: Initialize the accumulated information age Δ to 0, and initialize i=M; Step S62: Along the path S a When patrolling, when visiting edge e=(S a [i],S a [i+1]), S a [i] is the patrol path S a The node reached in step i in the current S a [i] Start along S a Backtrack until you reach the location where edge e was last visited and calculate the current S a [i] The time from the last edge e visit to the end of S a The access time t elapsed in If the direction of the last access to edge e is the same as the current access direction, then the current accumulated information age Δ is accumulated Where l(e) is the visit duration of edge e; If the direction of the last visit to edge e is opposite to the current visit direction, the accumulated information age Δ is accumulated Step S63: Determine whether i is 2M. If not, set i=i+1 and jump to step S62. If yes, execute step S64: Step S64: Calculate the average information age l(S) is the access time of all edges in path S.
7. The line patrol planning method considering the age of route information as claimed in claim 1, characterized in that: The step of determining whether there is an Euler loop in the route network graph G to be patrolled includes: Determine whether the degree of each node in graph G is an even number. If so, there is an Euler circuit in graph G. If not, there is no Euler circuit in graph G.
8. A line patrol planning system considering the age of route information, characterized in that: include: A judgment unit, used for judging whether there is an Euler loop in the route network graph G to be patrolled; The complete graph construction unit is used to find all nodes with odd degrees in the graph G to construct the complete graph G when there is no Euler circuit in the graph G. f , the degree is the number of edges connecting the node, and the node is the intersection of different edges; Figure G f The length of the edge between two points in is the access time of the shortest path between the corresponding two points in graph G; The best matching unit is used to match the graph G f Solve the minimum weight perfect matching problem and obtain the set OM of the best matching edges; The graph expansion unit is used to use the graph G as the initial expanded graph G′, traverse each edge (v,u) of the set OM, where v and u are the nodes of the current edge, and find the shortest path R from node v to node u in the graph G. s And the path R s Each edge in is added to the current graph G′, and the final graph G′ is obtained after the traversal is completed; Planning unit, used to find the Euler circuit from the graph G′; The output unit is used to use the Euler circuit to be found as the line patrol path R.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Electric power inspection method and system
CN119740720A
A power inspection method and system
CN119740720B