Path generation method and device, electronic device and storage medium
The target connectivity path is generated through parity and even collaborative pairing processing, which solves the problem of complex singularity selection and matching when manually constructing Euler loops, and achieves fast and efficient path generation.
Patent Information
- Application Number
- CN202111572650.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2041-12-21
AI Technical Summary
During the 5G cluster optimization and road testing process, when manually building Euler loops, the singularity selection and mutual matching process are complex, resulting in large time loss.
By obtaining the initial path map and the initial adjacency matrix, determining the singular vertices and performing parity co-pairing processing, the singular vertices are updated to even vertices, thereby generating the target connectivity path.
It realizes the rapid generation of Euler loops, reducing the time of manual selection and matching, small calculations, and efficient and fast.
Smart Images

Figure CN114268544B_ABST
Abstract
Description
Background Art
[0002] Communication network refers to the link that physically connects isolated devices to realize information exchange between people, people and computers, and computers and computers, so as to achieve the purpose of resource sharing and communication. At present, the country is in the stage of full deployment and vigorous construction of the fifth generation mobile communication technology (5th Generation Mobile Communication Technology, referred to as 5G). In the process of 5G cluster optimization and boutique area creation, a large number of road tests are needed to verify the integrity of coverage.
[0003] Specifically, the test requirements need to be met: (1) The test route should traverse major streets, important locations, very important person (VIP) areas, and all residential areas; (2) Repeated test routes should be distinguished and represented. In manually planned routes, intersections and duplications are inevitable, so try to minimize repeated test routes.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a path generation method, a path generation device, an electronic device and a computer-readable storage medium, thereby overcoming, at least to a certain extent, the problem of large time loss caused by the complex singularity selection and mutual matching process in the process of manually adding blank jump lines to construct an Euler circuit.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present invention.
[0007] According to a first aspect of the present disclosure, a path generation method is provided, comprising: obtaining an initial path graph, determining an initial adjacency matrix corresponding to path vertices in the initial path graph; determining singular vertices from the multiple path vertices according to the initial adjacency matrix; performing odd-even collaborative pairing processing on the singular vertices, updating the singular vertices to even vertices, so as to obtain a path vertex set; determining a path starting point from the generated path vertex set, and performing path connectivity processing on multiple path vertices in the path vertex set based on the path starting point, so as to obtain a target connected path.
[0008] In an exemplary embodiment of the present disclosure, singularity vertices are determined from the multiple path vertices according to the initial adjacency matrix, including: updating the element values of the initial adjacency matrix to corresponding Boolean values to generate an intermediate adjacency matrix; enumerating and accumulating the intermediate adjacency matrix by row to obtain the number of connected roads for each row of vertices; and determining the singularity vertices according to the number of connected roads.
[0009] In an exemplary embodiment of the present disclosure, the number of the singular vertices is multiple, and the singular vertices are subjected to odd-even collaborative pairing processing to update the singular vertices to even vertices, including: determining the number of singular vertices corresponding to the multiple singular vertices; executing the singular vertex pairing step until the number of singular vertices is less than or equal to a first number; when the number of singular vertices is equal to the first number, taking the remaining singular vertices as target singular vertices, and performing odd-even vertex pairing processing on the target singular vertices.
[0010] In an exemplary embodiment of the present disclosure, the singularity vertex pairing step includes: determining a singularity vertex pair from a plurality of the singularity vertices; the singularity vertex pair is two singularity vertices with the shortest path distance among the plurality of singularity vertices; constructing an auxiliary path based on the singularity vertex pair, updating the singularity vertices to even vertices, and updating the number of singularity vertices.
[0011] In an exemplary embodiment of the present disclosure, the target singular point vertex is subjected to an odd-even vertex pairing process, including: determining the path distance between the target singular point vertex and each even point vertex, sorting a plurality of the path distances to obtain a path distance sequence; determining the even point vertex closest to the target singular point vertex from the path distance sequence as the first even point vertex; and taking the distance between the target singular point vertex and the first even point vertex as the first vertex distance, so as to perform an odd-even vertex pairing process based on the first vertex distance.
[0012] In an exemplary embodiment of the present disclosure, an odd-even vertex pairing process is performed based on the first vertex distance, including: determining a second even vertex that is closest to the first even vertex, and taking the distance between the target odd vertex and the second even vertex as the second vertex distance; if the second vertex distance is less than or equal to the first vertex distance, taking the target odd vertex and the first even vertex as an odd-even vertex pair; if the second vertex distance is greater than the first vertex distance, updating the second even vertex until an odd-even vertex pair is determined, and performing path connection processing on the odd-even vertex pair.
[0013] In an exemplary embodiment of the present disclosure, path connectivity processing is performed on multiple path vertices in the path vertex set based on the path starting point to obtain a target connectivity path, including: determining an existing connectivity path and an edge set corresponding to the initial path graph; the existing connectivity path includes an initial endpoint vertex; determining a newly added connection edge based on the existing connectivity path and the edge set; the newly added connection edge is adjacent to the connection edge corresponding to the initial endpoint vertex; adding the newly added connection edge to the initial path graph to update the existing connectivity path until the target connectivity path is obtained; the path starting point of the target connectivity path is the same as the path endpoint.
[0014] According to a second aspect of the present disclosure, a path generation device is provided, comprising: an adjacency matrix determination module, used to obtain an initial path graph, and determine the initial adjacency matrix corresponding to the path vertices in the initial path graph; a singular point determination module, used to determine the singular point vertices from the multiple path vertices according to the initial adjacency matrix; an odd-even vertex pairing module, used to perform odd-even collaborative pairing processing on the singular point vertices, and update the singular point vertices to even point vertices to obtain a path vertex set; a connected path generation module, used to determine the path starting point from the generated path vertex set, and perform path connectivity processing on multiple path vertices in the path vertex set based on the path starting point to obtain a target connected path.
[0015] In an exemplary embodiment of the present disclosure, the singularity determination module includes a singularity determination unit, which is used to update the element values of the initial adjacency matrix to corresponding Boolean values to generate an intermediate adjacency matrix; enumerate and accumulate the intermediate adjacency matrix by row to obtain the number of connected roads for each row of vertices; and determine the singularity vertex according to the number of connected roads.
[0016] In an exemplary embodiment of the present disclosure, the number of the singular vertices is multiple, and the odd-even vertex pairing module includes a vertex pairing unit, which is used to determine the number of singular vertices corresponding to the multiple singular vertices; execute the singular vertex pairing step until the number of singular vertices is less than or equal to a first number; when the number of singular vertices is equal to the first number, take the remaining singular vertices as target singular vertices, and perform odd-even vertex pairing processing on the target singular vertices.
[0017] In an exemplary embodiment of the present disclosure, the vertex pairing unit includes a singularity pairing unit, which is used to determine a singularity vertex pair from a plurality of the singularity vertices; the singularity vertex pair is two singularity vertices with the shortest path distance among the plurality of singularity vertices; an auxiliary path is constructed based on the singularity vertex pair, the singularity vertices are updated to even vertices, and the number of singularity vertices is updated.
[0018] In an exemplary embodiment of the present disclosure, the vertex pairing unit also includes an odd-even pairing unit, which is used to determine the path distance between the target singular point vertex and each even point vertex, sort the multiple path distances to obtain a path distance sequence; determine the even point vertex closest to the target singular point vertex from the path distance sequence as the first even point vertex; take the distance between the target singular point vertex and the first even point vertex as the first vertex distance, so as to perform odd-even vertex pairing based on the first vertex distance.
[0019] In an exemplary embodiment of the present disclosure, the odd-even pairing unit includes an odd-even pairing subunit, which is used to determine a second even point vertex that is closest to the first even point vertex, and use the distance between the target odd point vertex and the second even point vertex as the second vertex distance; if the second vertex distance is less than or equal to the first vertex distance, the target odd point vertex and the first even point vertex are used as an odd-even vertex pair; if the second vertex distance is greater than the first vertex distance, the second even point vertex is updated until an odd-even vertex pair is determined, and the odd-even vertex pair is path-connected.
[0020] In an exemplary embodiment of the present disclosure, the connectivity path generation module includes a connectivity path generation unit, which is used to determine an existing connectivity path and an edge set corresponding to the initial path graph; the existing connectivity path includes an initial terminal vertex; a newly added connection edge is determined based on the existing connectivity path and the edge set; the newly added connection edge is adjacent to the connection edge corresponding to the initial terminal vertex; the newly added connection edge is added to the initial path graph to update the existing connectivity path until the target connectivity path is obtained; the path starting point and path end point of the target connectivity path are the same.
[0021] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the path generation method according to any one of the above items is implemented.
[0022] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the path generation method according to any one of the above items is implemented.
[0023] The technical solution provided by the present disclosure may include the following beneficial effects: by constructing auxiliary paths to generate target connectivity paths through odd-even collaborative pairing processing, it is possible to establish an Eulerian circuit for any mesh route with low computational complexity and high efficiency and speed.
[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0026] Figure 1 A flow chart of a path generation method according to an exemplary embodiment of the present disclosure is schematically shown;
[0027] Figure 2 A schematic diagram showing an ideal test road according to an exemplary embodiment of the present disclosure is shown;
[0028] Figure 3 A flowchart schematically shows a singular point vertex pairing step according to an exemplary embodiment of the present disclosure;
[0029] Figure 4 Schematically shows a flowchart of an even-odd vertex pairing process according to an exemplary embodiment of the present disclosure;
[0030] Figure 5 A schematic diagram of generating a target communication path according to an exemplary embodiment of the present disclosure is shown;
[0031] Figure 6 A road distribution diagram corresponding to a certain network planning scheme according to an exemplary embodiment of the present disclosure is schematically shown;
[0032] Figure 7 A block diagram schematically shows a path generation device according to an exemplary embodiment of the present disclosure;
[0033] Figure 8 A block diagram schematically shows an electronic device according to an exemplary embodiment of the present disclosure;
[0034] Fig. 9 A schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0035] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0036] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations, materials or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0037] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or these functional entities or parts of functional entities may be implemented in one or more software hardened modules, or these functional entities may be implemented in different networks and / or processor devices and / or microcontroller devices.
[0038] The most mature path planning algorithm is the Fleury algorithm, but this algorithm requires the path graph to satisfy the Euler circuit condition to be solved, that is, each point is an even point. In real life, roads do not necessarily satisfy the Euler circuit condition, so the path needs to be properly modified to meet the solution conditions and obtain the shortest path. In some implementations, you can manually add blank jump lines and select two unconnected singular points to connect them so that they become even points. However, in the real environment, there are a large number of points and lines, and selecting singular points and matching them will greatly waste time and energy.
[0039] Based on this, in this example embodiment, a path generation method is first provided. The path generation method of the present disclosure can be implemented using a server, or the method described in the present disclosure can be implemented using a terminal device, wherein the terminal described in the present disclosure may include mobile terminals such as mobile phones, tablet computers, laptops, PDAs, personal digital assistants (PDAs), and fixed terminals such as desktop computers. Figure 1 The following is a schematic diagram schematically showing the process of the path generation method according to some embodiments of the present disclosure. Figure 1 , the path generation method may include the following steps:
[0040] Step S110, obtaining an initial path graph, and determining an initial adjacency matrix corresponding to the path vertices in the initial path graph.
[0041] Step S120, determining a singular point vertex from a plurality of path vertices according to the initial adjacency matrix.
[0042] Step S130, performing odd-even collaborative pairing processing on the odd point vertices, updating the odd point vertices to even point vertices, to obtain a path vertex set.
[0043] Step S140 , determining a path starting point from the generated path vertex set, and performing path connectivity processing on multiple path vertices in the path vertex set based on the path starting point to obtain a target connectivity path.
[0044] According to the path generation method in this example embodiment, an auxiliary path is constructed to generate a target connected path through odd-even cooperative pairing processing, so that an Euler circuit can be established for any mesh route with low computational complexity and high efficiency.
[0045] The path generation method in this exemplary embodiment will be further described below.
[0046] In step S110, an initial path graph is obtained, and an initial adjacency matrix corresponding to the path vertices in the initial path graph is determined.
[0047] In some exemplary embodiments of the present disclosure, the initial path graph may be a path graph generated by abstracting the specific entities included in the initial state into vertices and edges. For example, in the optimization of the path test project, it is necessary to traverse all the intersections and main streets in the cluster optimization, and the base stations and roads in the path test may be abstracted as vertices and edges in graph theory. The path vertices may be vertices included in the initial path graph, for example, in the immediate path test project, the path vertices may be base stations. The initial adjacency matrix may be a matrix generated by the relationship between the edges of different vertices in the initial path graph.
[0048] In the path testing project, in order to construct the target connectivity path, you can first obtain the initial path graph. Figure 2 , Figure 2 FIG. 1 shows a schematic diagram of an ideal test road according to an exemplary embodiment of the present disclosure. Figure 2 It can be seen that in the ideal test road graph, there is an Euler circuit connecting multiple path vertices, and the Euler circuit includes multiple vertices, namely, 16 path vertices such as vertex A, vertex B to vertex P. The purpose of the present disclosure is to generate an ideal test road graph corresponding to multiple vertex paths. Specifically, assume that the initial path graph corresponding to the road is G = (V, E), where V is the set of vertices and E is the set of edges. Assume that there are n path vertices in the initial path graph, that is, V = {v0,v1,v2,...,v n-1}, E can be described by the initial adjacency matrix D in the form of n*n, where the element d ij Represented as vertex v i and vertex v j The relationship between the edges.
[0049] In step S120, singular point vertices are determined from a plurality of path vertices according to the initial adjacency matrix.
[0050] In some exemplary embodiments of the present disclosure, a singular point vertex may be a vertex in a path graph whose corresponding connecting edges are an odd number. For example, if there is a vertex in an initial path graph whose corresponding connecting edges are 3, then the vertex is a singular point vertex.
[0051] After determining the initial adjacency matrix corresponding to the initial path graph, the connecting edges corresponding to all path vertices can be determined according to the initial adjacency matrix to further determine the singular point vertices.
[0052] In an exemplary embodiment of the present disclosure, the element values of the initial adjacency matrix are updated to corresponding Boolean values to generate an intermediate adjacency matrix; the intermediate adjacency matrix is enumerated and accumulated row by row to obtain the number of connected roads for each row of vertices; and the singular point vertices are determined based on the number of connected roads.
[0053] Among them, the element value of the initial adjacency matrix can be vertex v i and vertex v j The distance between the vertices. The Boolean value can be i and vertex v j The distance between the two vertex v i and vertex v j If there is a connecting edge between them, the corresponding Boolean value is 1. i and vertex v j If there is no connecting edge between them, the corresponding Boolean value is 0. The intermediate adjacency matrix can be the adjacency matrix corresponding to the element values in the initial adjacency matrix converted into Boolean values. The enumeration accumulation process can be the process of accumulating the intermediate adjacency matrix row by row. The number of connected roads can be the number of connecting edges corresponding to each vertex.
[0054] After determining the initial adjacency matrix, the element d of the initial adjacency matrix is ij The numerical value is converted to a Boolean value to generate an intermediate adjacency matrix. After obtaining the intermediate adjacency matrix, the values of the intermediate adjacency matrix can be enumerated and accumulated row by row to calculate the number of connecting paths between the vertices in each row and other vertices, that is, V = {v0,v1,v2,...,v n-1} iIf there are singular vertices in the initial path graph, these singular vertices need to be further processed until all the singular vertices in the path graph are converted into even vertices and the path is connected.
[0055] In step S130, odd-even collaborative pairing processing is performed on the odd point vertices, and the odd point vertices are updated to even point vertices to obtain a path vertex set.
[0056] In some exemplary embodiments of the present disclosure, the odd-even collaborative pairing process may be a process of adding auxiliary paths between odd-point vertices or even-point vertices in the initial path graph for pairing process to convert odd-point vertices in the initial path graph into even-point vertices. An even-point vertex may be a vertex in the path graph whose corresponding connecting edges are even. For example, if the number of connecting edges corresponding to a vertex in the initial path graph is 4, then the vertex is an even-point vertex. A path vertex set may be a vertex set used to construct a connected path, and the vertices in the path vertex set are all even-point vertices.
[0057] After all the odd-point vertices are determined, all the odd-point vertices can be processed by odd-even collaborative pairing, and auxiliary paths can be added through the odd-point vertices and / or even-point vertices. All the odd-point vertices in the initial path graph are updated to even-point vertices to obtain the corresponding path vertex set, and the path fixed-point set contains all even-point vertices.
[0058] In an exemplary embodiment of the present disclosure, the number of singularity vertices corresponding to a plurality of singularity vertices is determined; a singularity vertex pairing step is performed until the number of singularity vertices is less than or equal to a first number; when the number of singularity vertices is equal to the first number, the remaining singularity vertices are used as target singularity vertices, and odd-even vertex pairing is performed on the target singularity vertices.
[0059] The number of singular vertices may be the number of singular vertices included in the initial path graph. The singular vertex pairing step may be a processing step of converting the singular vertex into an even vertex by adding an auxiliary path to the singular vertex. The first number may be a pre-set number. The target singular vertex may be a singular vertex that still exists in the initial path graph after being processed by the singular vertex pairing step.
[0060] After determining the singular vertices included in the initial path graph, the number of singular vertices can be determined, if the number of singular vertices is greater than a first number, wherein the first number may be a pre-set number, such as 1. For example, when the first number is 1, if the number of singular vertices is greater than 1, the singular vertex pairing step can be performed on these singular vertices first, by adding auxiliary roads to the singular vertices until the number of singular vertices is less than or equal to 1. When the number of singular vertices is equal to 1, the remaining singular vertices can be used as target singular vertices, and odd-even vertex pairing processing is performed on the target singular vertices, that is, the process of converting the singular vertices into even vertices by adding auxiliary roads between the singular vertices and the even vertices.
[0061] In an exemplary embodiment of the present disclosure, the singularity vertex pairing step includes: determining a singularity vertex pair from multiple singularity vertices; the singularity vertex pair is two singularity vertices with the shortest path distance among the multiple singularity vertices; constructing an auxiliary path based on the singularity vertex pair, updating the singularity vertex to an even vertex, and updating the number of singularity vertices.
[0062] The singular point vertex pair may be two singular point vertices with the shortest path distance among all singular point vertices. The auxiliary path may be an auxiliary edge added between two vertices, and the Boolean value corresponding to the auxiliary path is 1.
[0063] If the number of singular vertices is greater than the first number, auxiliary roads can be constructed by pairing singular points. Due to the existence of singular points, the projection abstraction of the cluster optimization path graph is generally a non-Eulerian graph, so it is necessary to transform the singular vertices in the initial path graph into even vertices. Figure 3 , Figure 3 The flowchart of the singular point vertex pairing step according to the exemplary embodiment of the present disclosure is schematically shown. In step S310, a singular point vertex pair is determined from multiple singular point vertices; the singular point vertex pair is the two singular point vertices with the shortest path distance among the multiple singular point vertices. The singular point queue Y can be screened out, and y0 can be selected from it, and the distance between y0 and the remaining singular point vertices is calculated, and the two singular point vertices with the shortest distance are paired. In step S320, an auxiliary path is constructed based on the singular point vertex pair, the singular point vertex is updated to an even point vertex, and the number of singular point vertices is updated. After determining the two singular point vertices with the shortest distance, an auxiliary path is constructed with a straight line distance. Then, the paired singular point vertices are deleted, and the remaining singular point queues Y are paired in sequence until only 0 or 1 singular points remain. If there are still singular point vertices after the singular point vertex pairing step, that is, the number of remaining singular point vertices is 1, the singular point vertex is used as the target singular point vertex, and the odd-even vertex pairing process is performed. Otherwise, the path starting point is determined from the generated path vertex set to generate a target connected path.
[0064] In an exemplary embodiment of the present disclosure, the path distances between the target singular point vertex and each even point vertex are determined, and the multiple path distances are sorted to obtain a path distance sequence; the even point vertex closest to the target singular point vertex is determined from the path distance sequence as the first even point vertex; the distance between the target singular point vertex and the first even point vertex is used as the first vertex distance, so as to perform odd and even vertex pairing based on the first vertex distance.
[0065] The path distance may be the distance between the target singular vertex and each even vertex. The path distance sequence may be a sequence generated by sorting multiple path distances from small to large. The first even vertex may be the even vertex closest to the target singular vertex. The first vertex distance is the distance between the target singular vertex and the first even vertex.
[0066] refer to Figure 4 , Figure 4 The flowchart of the even-odd vertex pairing process according to the exemplary embodiment of the present disclosure is schematically shown. In step S410, the path distance between the target odd vertex and each even vertex is determined, and the multiple path distances are sorted to obtain a path distance sequence. If the number of odd vertex vertices is equal to the first number, the auxiliary road is constructed by the even-odd vertex pairing process. For example, if there is only one odd vertex y left n (i.e., the target singular vertex), then the target singular vertex y n It is necessary to connect two even-point vertices in pairs. For example, the path distance L between the target odd-point vertex and the surrounding even-point vertices can be determined. After obtaining multiple path distances L, the multiple path distances L can be arranged in ascending order to obtain a path distance sequence.
[0067] In step S420, the even vertex closest to the target singular vertex is determined from the path distance sequence as the first even vertex. The even vertex with the shortest path distance to the target singular vertex is selected from the path distance sequence as the first even vertex x0, and the path distance between the first even vertex and the target singular vertex is recorded as the first vertex distance L0.
[0068] In step S430, the distance between the target odd vertex and the first even vertex is used as the first vertex distance to perform odd-even vertex pairing based on the first vertex distance. After determining the first vertex distance L0, the odd-even vertex pairing is performed based on the first vertex distance L0.
[0069] In an exemplary embodiment of the present disclosure, a second even vertex that is closest to the first even vertex is determined, and the distance between the target odd vertex and the second even vertex is taken as the second vertex distance; if the second vertex distance is less than or equal to the first vertex distance, the target odd vertex and the first even vertex are taken as an odd-even vertex pair; if the second vertex distance is greater than the first vertex distance, the second even vertex is updated until an odd-even vertex pair is determined, and the odd-even vertex pair is path-connected.
[0070] The second even vertex may be the even vertex closest to the first even vertex. The second vertex distance may be the distance between the target odd vertex and the second even vertex. The odd-even vertex pair may be a vertex pair corresponding to an auxiliary path constructed between the odd vertex and the even vertex. The path connection process may be a process of adding an auxiliary path between different vertices.
[0071] After determining the first even vertex, the second even vertex closest to the first even vertex can be determined from the surrounding even vertices. That is, the even vertex with the shortest distance to the target singular vertex x0 is calculated from the surrounding multiple even vertices and recorded as the second even vertex x j , the second even point vertex x j The path distance between the target singular point vertex is recorded as the second vertex distance L j . Compare the distance between the second vertex and the first vertex. If the distance between the second vertex is less than or equal to the distance between the first vertex, the target odd vertex and the first even vertex are taken as an odd-even vertex pair. That is, if L j ≤L0, then x0x j is the even point of cooperative pairing. If the second vertex distance is greater than the first vertex distance, the second even vertex is updated until an odd-even vertex pair is determined, and the odd-even vertex pair is connected by path. For example, when the second vertex distance is greater than the first vertex distance, the second even vertex x1 is selected to continue the operation until all the remaining odd-point vertices are paired.
[0072] In step S140 , a path starting point is determined from the generated path vertex set, and path connectivity processing is performed on multiple path vertices in the path vertex set based on the path starting point to obtain a target connectivity path.
[0073] In some exemplary embodiments of the present disclosure, the path starting point may be a starting point selected for constructing a target connectivity path. The path vertex set may be a set of vertices included in generating the target connectivity path. The path vertices may be vertices constituting the target connectivity path. The path connectivity processing may be a process of connecting different path vertices. The target connectivity path may be an Euler circuit containing all path vertices.
[0074] After the above processing is performed on all the singular vertices in the initial path graph, all the singular vertices in the path graph are transformed into even vertices. At this time, all the singular points are paired, and there will be no singular points by constructing auxiliary roads, and a new adjacency matrix is obtained. The obtained even vertices are used as the path vertex set, and the path starting point is determined from the path vertex set. Specifically, a vertex v0 in the graph G can be selected at random, and the starting point of the planned path is set to W0=v0, and the path connection processing is performed based on the path starting point W0, and finally the target connection path can be generated, that is, the modified Euler graph is generated.
[0075] In an exemplary embodiment of the present disclosure, an existing connected path and edge set corresponding to an initial path graph are determined; the existing connected path includes an initial terminal vertex; a newly added connecting edge is determined based on the existing connected path and edge set; the newly added connecting edge is adjacent to the connecting edge corresponding to the initial terminal vertex; the newly added connecting edge is added to the initial path graph to update the existing connected path until a target connected path is obtained; the path starting point and path end point of the target connected path are the same.
[0076] The existing connected paths may be some existing paths of the path vertices. The edge set may be a set of edges that are not connected to the existing connected paths in the initial path graph. The initial end vertex may be a path point included in the existing connected paths. The newly added connecting edges may be connecting edges generated by adding auxiliary roads to multiple path vertices. The connecting edges corresponding to the initial end vertex. The target connected path.
[0077] After determining the path vertex set, the specific process of generating the target connected path according to the path vertex set is as follows: m =v0e1v1e2...e m v m Selected, that is, the initial path graph contains existing connected paths and edge sets, and the existing connected paths can contain an initial terminal vertex. Determine the new connecting edges based on the existing connected paths and edge sets in the existing connected paths. Specifically, it can be selected from E-{e1, e2, …, e m}Select a new edge e m+1 , so that e m+1 With e m adjacent, so that unless there are no other connecting edges to choose from, e m+1 It shouldn't be G m =G-{e1, e2, ..., e m}. Find the next road and intersection to be passed until the traversal is completed. When the above path connection traversal is completed, the corresponding Euler circuit W = v0e1v1e2...v0 can be obtained, that is, the end of the target connection path is connected, and the starting point of the path is the same as the end of the path, which is the Euler circuit of graph G.
[0078] refer to Figure 5 , Figure 5 FIG. 2 shows a schematic diagram of generating a target connectivity path according to an exemplary embodiment of the present disclosure. After the above processing, an odd-even collaborative pairing scheme can be used to add a pair of odd-point vertices or even-point vertices. Figure 5 The auxiliary roads shown in , such as auxiliary roads BC', EI', HL' and NO', are used to obtain the final planned path, that is, the target connected path.
[0079] refer to Figure 6 , Figure 6 The diagram schematically shows a road distribution map corresponding to a certain network planning scheme according to an exemplary embodiment of the present disclosure. In order to evaluate the network coverage in the central area of a city, a 5G cluster optimization dragnet benchmark test is conducted. The specific test requirements are: (1) All roads are walked; (2) Repeated test routes are minimized. According to the path generation method of the present disclosure, after calculation, the planned path obtained in Table 1 can be output, that is, after 101 steps, the traversal is completed. Specifically, the planned path is shown in Table 1.
[0080] Table 1
[0081] S1-S15 1 2 3 4 5 6 7 8 9 10 11 12 131 14 15 S15-S30 16 17 18 19 20 21 1 23 24 22 20 19 47 46 45 S30-S45 44 50 51 52 53 28 60 29 30 53 32 31 30 29 28 S45-S60 26 25 48 49 46 45 44 43 42 41 40 59 61 62 54 S60-S75 55 56 34 35 36 37 58 57 39 38 12 11 10 36 35 S75-S90 9 8 7 31 30 53 32 33 34 56 57 61 62 51 50 S90-S101 49 48 47 19 20 21 22 24 23 2 1
[0082] Will Figure 6 Compared with the manually drawn path, the planned path generated in the experiment shows that the test kilometers and test time of the path are reduced, and the coverage, reference signal receiving power (RSRP), signal to interference plus noise ratio (SINR), average downlink rate and average uplink rate are improved.
[0083] It should be noted that the terms "first", "second", etc. used in the present disclosure are only for distinguishing different even point vertices, vertex distances, etc., and should not impose any limitations on the present disclosure.
[0084] In summary, the path generation method disclosed in the present invention obtains an initial path graph, determines the initial adjacency matrix corresponding to the path vertices in the initial path graph; determines the singular point vertices from multiple path vertices according to the initial adjacency matrix; performs odd-even cooperative pairing processing on the singular point vertices, updates the singular point vertices to even point vertices, so as to obtain a path vertex set; determines the path starting point from the generated path vertex set, and performs path connectivity processing on multiple path vertices in the path vertex set based on the path starting point, so as to obtain a target connected path. On the one hand, by adopting odd-even cooperative pairing and odd-even cooperative pairing, two-level linkage connection is generated to construct auxiliary roads to convert odd points into even points, so that the modified Euler graph can be quickly obtained, eliminating the tedious process of manual labeling. On the other hand, through the pairing of odd points and odd-even points, the constructed auxiliary paths all use points that can be directly connected, that is, the existing paths in the initial path graph, without the need for additional calculations. On the other hand, an Euler loop can be established for any meshed route to realize the function of route planning, and the calculation amount is small, efficient and fast.
[0085] It should be noted that, although the steps of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0086] In addition, in this exemplary embodiment, a path generation device is also provided. Figure 7 The path generating device 700 may include: an adjacency matrix determining module 710 , a singular point determining module 720 , an odd-even vertex pairing module 730 , and a connected path generating module 740 .
[0087] Specifically, the adjacency matrix determination module 710 is used to obtain the initial path graph and determine the initial adjacency matrix corresponding to the path vertices in the initial path graph; the singular point determination module 720 is used to determine the singular point vertex from multiple path vertices according to the initial adjacency matrix; the odd-even vertex pairing module 730 is used to perform odd-even collaborative pairing processing on the singular point vertices, and update the odd-point vertices to even-point vertices to obtain a path vertex set; the connected path generation module 740 is used to determine the path starting point from the generated path vertex set, and perform path connectivity processing on multiple path vertices in the path vertex set based on the path starting point to obtain a target connected path.
[0088] In an exemplary embodiment of the present disclosure, the singularity determination module includes a singularity determination unit, which is used to update the element values of the initial adjacency matrix to corresponding Boolean values to generate an intermediate adjacency matrix; enumerate and accumulate the intermediate adjacency matrix by row to obtain the number of connected roads for each row of vertices; and determine the singularity vertex according to the number of connected roads.
[0089] In an exemplary embodiment of the present disclosure, the number of singular vertices is multiple, and the odd-even vertex pairing module includes a vertex pairing unit, which is used to determine the number of singular vertices corresponding to the multiple singular vertices; execute the singular vertex pairing step until the number of singular vertices is less than or equal to a first number; when the number of singular vertices is equal to the first number, use the remaining singular vertices as target singular vertices, and perform odd-even vertex pairing on the target singular vertices.
[0090] In an exemplary embodiment of the present disclosure, the vertex pairing unit includes a singularity pairing unit, which is used to determine a singularity vertex pair from multiple singularity vertices; the singularity vertex pair is two singularity vertices with the shortest path distance among the multiple singularity vertices; an auxiliary path is constructed based on the singularity vertex pair, the singularity vertices are updated to even vertices, and the number of singularity vertices is updated.
[0091] In an exemplary embodiment of the present disclosure, the vertex pairing unit also includes an odd-even pairing unit, which is used to determine the path distance between the target singular point vertex and each even point vertex, sort the multiple path distances to obtain a path distance sequence; determine the even point vertex closest to the target singular point vertex from the path distance sequence as the first even point vertex; use the distance between the target singular point vertex and the first even point vertex as the first vertex distance, so as to perform odd-even vertex pairing based on the first vertex distance.
[0092] In an exemplary embodiment of the present disclosure, the odd-even pairing unit includes an odd-even pairing subunit, which is used to determine a second even point vertex that is closest to the first even point vertex, and use the distance between the target odd point vertex and the second even point vertex as the second vertex distance; if the second vertex distance is less than or equal to the first vertex distance, the target odd point vertex and the first even point vertex are used as an odd-even vertex pair; if the second vertex distance is greater than the first vertex distance, the second even point vertex is updated until an odd-even vertex pair is determined, and path connection processing is performed on the odd-even vertex pair.
[0093] In an exemplary embodiment of the present disclosure, a connectivity path generation module includes a connectivity path generation unit, which is used to determine an existing connectivity path and an edge set corresponding to an initial path graph; the existing connectivity path includes an initial terminal vertex; a newly added connection edge is determined based on the existing connectivity path and the edge set; the newly added connection edge is adjacent to the connection edge corresponding to the initial terminal vertex; the newly added connection edge is added to the initial path graph to update the existing connectivity path until a target connectivity path is obtained; the path starting point and the path end point of the target connectivity path are the same.
[0094] The specific details of the virtual modules of each of the above-mentioned path generating devices have been described in detail in the corresponding path generating methods, so they will not be repeated here.
[0095] It should be noted that, although several modules or units of the path generation device are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0096] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0097] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0098] Reference below Figure 8 800 according to this embodiment of the present disclosure is described. Figure 8 The electronic device 800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0099] like Figure 8 As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.
[0100] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 executes the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.
[0101] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 821 and / or a cache memory unit 822 , and may further include a read-only memory unit (ROM) 823 .
[0102] The storage unit 820 may include a program / utility 824 having a set (at least one) of program modules 825, such program modules 825 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include the implementation of a network environment.
[0103] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0104] The electronic device 800 may also communicate with one or more external devices 870 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0105] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0106] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0107] refer to Fig. 9 As shown, a program product 900 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0108] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0109] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0110] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0111] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0112] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0113] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0114] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A path generation method, characterized in that: include: Obtaining an initial path graph, and determining an initial adjacency matrix corresponding to path vertices in the initial path graph; Determine a singular vertex from a plurality of path vertices according to the initial adjacency matrix, wherein the singular vertex is a vertex whose corresponding connecting edges are an odd number; Performing odd-even collaborative pairing processing on the singular point vertices, updating the singular point vertices to even point vertices, so as to obtain a path vertex set, wherein the singular point vertices include target singular point vertices, the path vertex set is a set of vertices used to construct a target connected path, and the vertices in the path vertex set are all even point vertices, and the even point vertices are vertices whose corresponding connecting edges are even; Determine a path starting point from the generated path vertex set, and perform path connectivity processing on a plurality of path vertices in the path vertex set based on the path starting point to obtain the target connectivity path; The performing odd-even collaborative pairing processing on the singular point vertices includes: Determine the even point vertex closest to the target singular point vertex as the first even point vertex; Determine a second even-point vertex that is closest to the first even-point vertex, and use the distance between the target singular point vertex and the second even-point vertex as the second vertex distance; If the second vertex distance is less than or equal to the first vertex distance, the target singular vertex and the first even vertex are taken as an odd-even vertex pair, and the first vertex distance is the distance between the target singular vertex and the first even vertex; If the second vertex distance is greater than the first vertex distance, the second even vertex is updated until an odd-even vertex pair is determined, and path connection processing is performed on the odd-even vertex pair. The path connection processing is a process of adding auxiliary paths between different vertices.
2. The method according to claim 1, characterized in that Determining singular point vertices from the plurality of path vertices according to the initial adjacency matrix comprises: Updating the element values of the initial adjacency matrix to corresponding Boolean values to generate an intermediate adjacency matrix; The intermediate adjacency matrix is enumerated and accumulated according to rows to obtain the number of connected paths of vertices in each row; The singular point vertex is determined according to the number of connected paths.
3. The method according to claim 1, characterized in that There are multiple singular vertices, and performing odd-even collaborative pairing processing on the singular vertices to update the singular vertices to even vertices includes: Determine the number of singular point vertices corresponding to the plurality of singular point vertices; Executing a singular point vertex pairing step until the number of the singular point vertices is less than or equal to a first number; When the number of the singular point vertices is equal to the first number, the remaining singular point vertices are used as target singular point vertices, and odd-even vertex pairing processing is performed on the target singular point vertices.
4. The method according to claim 3, characterized in that The singular point vertex pairing step comprises: Determine a singular point vertex pair from the plurality of singular point vertices; the singular point vertex pair is two singular point vertices with the shortest path distance among the plurality of singular point vertices; An auxiliary path is constructed based on the singular vertex pair, the singular vertex is updated to an even vertex, and the number of the singular vertices is updated.
5. The method according to claim 3, characterized in that: Performing an odd-even vertex pairing process on the target singular vertex includes: Determine the path distances between the target singular point vertex and each even point vertex, and sort the plurality of path distances to obtain a path distance sequence; Determine, from the path distance sequence, an even point vertex that is closest to the target singular point vertex as a first even point vertex; The distance between the target odd-point vertex and the first even-point vertex is used as a first vertex distance, so as to perform odd-even vertex pairing processing based on the first vertex distance.
6. The method according to claim 1, characterized in that Performing path connectivity processing on a plurality of path vertices in the path vertex set based on the path starting point to obtain a target connectivity path includes: Determine an existing connected path and edge set corresponding to the initial path graph; the existing connected path includes an initial end vertex; Determine a newly added connecting edge according to the existing connected path and the edge set; the newly added connecting edge is adjacent to the connecting edge corresponding to the initial end vertex; The newly added connection edge is added to the initial path graph to update the existing connection path until the target connection path is obtained; the path starting point and path end point of the target connection path are the same.
7. A path generation device, characterized in that: include: An adjacency matrix determination module is used to obtain an initial path graph and determine an initial adjacency matrix corresponding to path vertices in the initial path graph; A singular point determination module, used to determine a singular point vertex from a plurality of path vertices according to the initial adjacency matrix, wherein the singular point vertex is a vertex whose corresponding connecting edges are an odd number; an odd-even vertex pairing module, configured to perform odd-even collaborative pairing processing on the odd-point vertices, and update the odd-point vertices to even-point vertices to obtain a path vertex set, wherein the odd-point vertices include target odd-point vertices, and the path vertex set is a set of vertices used to construct a target connected path, and all vertices in the path vertex set are even-point vertices, and the even-point vertices are vertices whose corresponding connecting edges are even; A connected path generation module, used to determine a path starting point from the generated path vertex set, and perform path connectivity processing on a plurality of path vertices in the path vertex set based on the path starting point to obtain the target connected path; The even-odd vertex pairing module is further used to determine the even vertex closest to the target odd-point vertex as the first even vertex; Determine a second even-point vertex that is closest to the first even-point vertex, and use the distance between the target singular point vertex and the second even-point vertex as the second vertex distance; If the second vertex distance is less than or equal to the first vertex distance, the target singular vertex and the first even vertex are taken as an odd-even vertex pair, and the first vertex distance is the distance between the target singular vertex and the first even vertex; If the second vertex distance is greater than the first vertex distance, the second even vertex is updated until an odd-even vertex pair is determined, and path connection processing is performed on the odd-even vertex pair. The path connection processing is a process of adding auxiliary paths between different vertices.
8. An electronic device, characterized in that: include: processor; as well as A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the path generation method according to any one of claims 1 to 6.
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 path generation method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Electric power inspection robot closed path planning algorithm based on Fleury and Dijkstra algorithms
CN112561116A