Ad hoc network automatic relay planning method, device, equipment and medium
Through Delaunay triangulation, Fermat point calculation and convex hull algorithm, the problem of low signal quality and node number efficiency in the ad hoc network is solved, and efficient network optimization and resource allocation are achieved.
Patent Information
- Application Number
- CN202411294500.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-09-14
AI Technical Summary
When the existing ad hoc networking technology connects between multiple nodes, the signal quality is difficult to ensure and the number of relay nodes needs to be increased, which is inefficient. Especially when covering a large area, multiple radio stations need to be deployed, resulting in disconnection of nodes.
Delaunay triangulation technology, Fermat point calculation and convex hull algorithm are used to optimize the placement position of the relay nodes, reduce redundant connections, ensure signal quality and reduce the number of relay nodes.
While ensuring signal quality, the number of relay nodes is reduced, network efficiency is optimized, network construction costs are reduced, and scalability and maintenance are improved, especially in scenarios where signal coverage requirements are high and equipment resources are limited.
Smart Images

Figure CN119155766A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of self-organizing networks, and in particular to a method, device, equipment and medium for automatic relay planning in a self-organizing network. Background Art
[0002] The existing single ad hoc network radio has a limited coverage area. When the area to be covered is larger than a single ad hoc network radio, multiple ad hoc network radios need to be deployed.
[0003] When there are multiple radio nodes and the radio coverage is insufficient, some radio stations will be disconnected. There is no relay solution in the prior art to achieve node connection when there are more than three nodes to be connected, and the existing relay solution can no longer guarantee the signal quality while reducing the number of added relay nodes, which is inefficient. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, equipment and medium for automatic relay planning in a self-organizing network, which can ensure signal quality while adding fewer relay nodes, in order to solve the above technical problems.
[0005] A method for automatic relay planning in a self-organizing network, the method comprising:
[0006] Obtain all nodes to be connected in the ad hoc network; if all the points to be connected are not connected, perform Delaunay triangulation on all the nodes to be connected to obtain multiple arrays; traverse multiple arrays, and when there are two intersections between triangles in the array, delete the data of one triangle to obtain a new array;
[0007] Convert the triangular array containing scattered points into a two-dimensional array and delete the scattered points to obtain a new two-dimensional array; find the point closest to the scattered point in the new two-dimensional array, connect the scattered point and the point closest to the scattered point, and add relay nodes with a certain radius between the connecting lines;
[0008] Find the Fermat points in the new array, connect the Fermat points and the relay nodes, split the new array and convert it into a scattered point array, add the scattered points in the new array to the scattered point array where the points closest to the scattered points are located, find the vertex set of the convex polygon in the scattered point array after adding the scattered points according to the convex hull algorithm, find all triangles containing the vertex set in the array and convert them into a two-dimensional array, delete the connected points in the two-dimensional array and calculate the points closest to each vertex in the vertex set in the two-dimensional array, connect the vertex and the point closest to the vertex to realize relay connection.
[0009] In one of the embodiments, if an independent scattered point is not connected to other self-organizing network nodes, all nodes to be connected in the self-organizing network are obtained; Delaunay triangulation is performed on all nodes to be connected to obtain multiple arrays, all triangular arrays containing the independent scattered point are found in the arrays, and duplicate nodes and the independent scattered point itself are deleted, and then the distance between the nodes in all triangular arrays and the independent scattered point is calculated, the node closest to the independent scattered point is found, and a relay node is deployed between the independent scattered point and the node closest to the independent scattered point.
[0010] In one of the embodiments, when several self-organizing network areas are disconnected, all nodes to be connected in the self-organizing network are obtained; Delaunay triangulation is performed on all nodes to be connected to obtain multiple arrays, and the scattered point set and the n*3*2 array after Delaunay triangulation are determined; for the disconnected self-organizing network areas, each scattered point set is created, and the vertex set of the convex polygon is calculated according to the convex hull algorithm; if each edge of the convex polygon is in the array, the vertex set of the convex polygon in the scattered point array after adding the scattered points is found according to the convex hull algorithm, all triangles containing the vertex set are found in the array and converted into a two-dimensional array, the connected points in the two-dimensional array are deleted, and the points closest to each vertex in the vertex set in the two-dimensional array are calculated, and the vertices are connected to the points closest to the vertices to realize relay connection, and if the convex polygon contains other convex polygons, it is determined that the vertex B of the other contained convex polygons is at a distance d from the nearest point A, and when the nearest distances of the vertices of the convex polygon are all greater than d, AB is connected, otherwise the convex polygon vertices and the nearest points are connected.
[0011] In one embodiment, the size of the array is n*3*2, where n is the number of triangles, 3 is the three vertices of the triangle, and 2 is the two coordinate values of the vertices.
[0012] In one embodiment, the Fermat point is a point in a triangle whose sum of distances to the three vertices is the smallest.
[0013] In one embodiment, the vertex set of the convex polygon in the scattered point array after adding scattered points is found according to the convex hull algorithm, all triangles containing the vertex set are found in the array and converted into a two-dimensional array, the connected points in the two-dimensional array are deleted and the point closest to each vertex in the vertex set in the two-dimensional array is calculated, and the vertex is connected to the point closest to the vertex to realize the relay connection, including:
[0014] If two points on one side of a convex polygon are not in a triangle in the array, it can be judged according to the uniqueness of Delaunay triangulation that the convex polygon contains scattered points of other convex polygons. Then, all independent convex polygons that do not contain other convex polygons are calculated first, and the vertex set of independent convex polygons that do not contain other convex polygons is found. All triangles containing the vertex set are found in the array and converted into a two-dimensional array. The connected points in the two-dimensional array are deleted and the points closest to each vertex in the vertex set in the two-dimensional array are calculated. The vertices are connected to the points closest to the vertices. After the independent convex polygons are connected, the number of scattered point arrays will decrease. The convex polygon with the least vertices is selected to calculate the shortest distance, and the scattered points with the shortest distance in the convex polygon are connected to realize relay connection.
[0015] An automatic relay planning device for a self-organizing network, the device comprising:
[0016] The triangulation module is used to obtain all nodes to be connected in the ad hoc network; if all the points to be connected are not connected, Delaunay triangulation is performed on all the nodes to be connected to obtain multiple arrays; multiple arrays are traversed, and when there are two intersections between triangles in the array, the data of one triangle is deleted to obtain a new array;
[0017] The fast relay module is used to convert the triangular array containing scattered points into a two-dimensional array and delete the scattered points to obtain a new two-dimensional array; find the point closest to the scattered point in the new two-dimensional array, connect the scattered point and the point closest to the scattered point, and add relay nodes with a certain radius between the connecting lines;
[0018] The automatic relay planning module is used to find Fermat points in the new array, connect Fermat points and relay nodes, split the new array and convert it into a scattered point array, add the scattered points in the new array to the scattered point array where the points closest to the scattered points are located, find the vertex set of the convex polygon in the scattered point array after adding the scattered points according to the convex hull algorithm, find all triangles containing the vertex set in the array and convert them into a two-dimensional array, delete the connected points in the two-dimensional array and calculate the point closest to each vertex in the vertex set in the two-dimensional array, and connect the vertex with the point closest to the vertex to realize relay connection.
[0019] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0020] Obtain all nodes to be connected in the ad hoc network; if all the points to be connected are not connected, perform Delaunay triangulation on all the nodes to be connected to obtain multiple arrays; traverse multiple arrays, and when there are two intersections between triangles in the array, delete the data of one triangle to obtain a new array;
[0021] Convert the triangular array containing scattered points into a two-dimensional array and delete the scattered points to obtain a new two-dimensional array; find the point closest to the scattered point in the new two-dimensional array, connect the scattered point and the point closest to the scattered point, and add relay nodes with a certain radius between the connecting lines;
[0022] Find the Fermat points in the new array, connect the Fermat points and the relay nodes, split the new array and convert it into a scattered point array, add the scattered points in the new array to the scattered point array where the points closest to the scattered points are located, find the vertex set of the convex polygon in the scattered point array after adding the scattered points according to the convex hull algorithm, find all triangles containing the vertex set in the array and convert them into a two-dimensional array, delete the connected points in the two-dimensional array and calculate the points closest to each vertex in the vertex set in the two-dimensional array, connect the vertex and the point closest to the vertex to realize relay connection.
[0023] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0024] Obtain all nodes to be connected in the ad hoc network; if all the points to be connected are not connected, perform Delaunay triangulation on all the nodes to be connected to obtain multiple arrays; traverse multiple arrays, and when there are two intersections between triangles in the array, delete the data of one triangle to obtain a new array;
[0025] Convert the triangular array containing scattered points into a two-dimensional array and delete the scattered points to obtain a new two-dimensional array; find the point closest to the scattered point in the new two-dimensional array, connect the scattered point and the point closest to the scattered point, and add relay nodes with a certain radius between the connecting lines;
[0026] Find the Fermat points in the new array, connect the Fermat points and the relay nodes, split the new array and convert it into a scattered point array, add the scattered points in the new array to the scattered point array where the points closest to the scattered points are located, find the vertex set of the convex polygon in the scattered point array after adding the scattered points according to the convex hull algorithm, find all triangles containing the vertex set in the array and convert them into a two-dimensional array, delete the connected points in the two-dimensional array and calculate the points closest to each vertex in the vertex set in the two-dimensional array, connect the vertex and the point closest to the vertex to realize relay connection.
[0027] The above-mentioned method, device, equipment and medium for automatic relay planning in a self-organizing network first perform Delaunay triangulation on all nodes to be connected to obtain multiple arrays; traverse the multiple arrays, and when there are two intersections between triangles in the array, delete the data of one triangle to obtain a new array. The use of Delaunay triangulation technology helps to ensure the optimization of the connection path between nodes and avoid redundant connections and excessive signal interference. The triangular network formed by triangulation has good geometric properties, so that the quality of signal transmission can be guaranteed, while minimizing the number of connected nodes and reducing the complexity of the network. Then, the triangular array containing scattered points in the array is converted into a two-dimensional array and the scattered points are deleted to obtain a new two-dimensional array; the point closest to the scattered point is found in the new two-dimensional array, the scattered point and the point closest to the scattered point are connected, and a relay node with a certain radius is added between the connecting lines; the Fermat point is found in the new array, the Fermat point and the relay node are connected, the new array is split and converted into a scattered point array, the scattered points in the new array are added to the scattered point array where the point closest to the scattered point is located, and the vertex set of the convex polygon in the scattered point array after adding the scattered points is found according to the convex hull algorithm, all triangles containing the vertex set are found in the array and converted into a two-dimensional array, the connected points in the two-dimensional array are deleted and the point closest to each vertex in the vertex set in the two-dimensional array is calculated, and the vertex and the point closest to the vertex are connected to realize the relay connection. By calculating and using the Fermat point to optimize the placement of the relay node, the total path distance between multiple points can be minimized. By placing the relay node in the optimal position, the transmission delay and signal attenuation between nodes are reduced, and the efficient signal quality is maintained. At the same time, such a relay placement scheme reduces the number of relay nodes that need to be added and optimizes resource allocation. In the process of connecting scattered points and the nearest nodes, by calculating the distance between nodes and setting reasonable relay nodes, excessive relay nodes are avoided, which not only guarantees the coverage and quality of the signal, but also effectively reduces the total number of relay nodes and reduces the overhead of network equipment. Finally, the convex hull algorithm is used to identify the outermost nodes, and the connection path is optimized through a reasonable connection method, which can further reduce unnecessary connections in the network. Through the planning of the optimal path, the signal interference between nodes is reduced, the network efficiency is improved, and the use of relay nodes is minimized. This application combines the automatic relay planning method with Delaunay triangulation, Fermat point calculation and convex hull algorithm, effectively reducing redundant connections and ensuring the stability of network signal quality. It can reduce the number of relay nodes while ensuring signal quality, thereby achieving efficient network optimization effects, and reducing the network construction cost by reducing the number of relay nodes, and improving the network's operating efficiency and robustness. This application has great advantages in the scalability and maintainability of large-scale ad hoc networks, especially in scenarios with high signal coverage requirements and limited equipment resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of a flow chart of an automatic relay planning method for a self-organizing network in an embodiment;
[0029] Figure 2 A schematic diagram of a Delaunay triangulated mesh in one embodiment;
[0030] Figure 3 is a schematic diagram of a triangle drawn according to Array1 in one embodiment;
[0031] Figure 4 A schematic diagram of connecting lines between points in the array PointArray and scattered points P in another embodiment;
[0032] Figure 5 A schematic diagram of a convex hull algorithm in one embodiment;
[0033] Figure 6 A schematic diagram of implementing a relay connection in an embodiment;
[0034] Figure 7 A structural block diagram of an automatic relay planning device for a self-organizing network in one embodiment;
[0035] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application 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 application and are not used to limit the present application.
[0037] In one embodiment, Figure 1 As shown, a method for automatic relay planning in a self-organizing network is provided, comprising the following steps:
[0038] Step 102, obtaining all nodes to be connected in the ad hoc network; if all the points to be connected are not connected, performing Delaunay triangulation on all the nodes to be connected to obtain multiple arrays; traversing the multiple arrays, when there are two intersections between triangles in the array, deleting the data of one triangle to obtain a new array.
[0039] Perform Delaunay triangulation on all nodes to be connected. This ensures that no vertex of a triangle is inside the circumcircle of another triangle. This triangulation is conducive to evenly distributed point connections. After triangulation, traverse the generated multiple triangle arrays and check the intersections between triangles. If two triangles have two intersections, delete one of the triangles. This is to avoid redundant connections and redundant topological structures.
[0040] Step 104, convert the triangular array containing scattered points in the array into a two-dimensional array and delete the scattered points to obtain a new two-dimensional array; find the point closest to the scattered point in the new two-dimensional array, connect the scattered point and the point closest to the scattered point, and add relay nodes with a certain radius between the connecting lines.
[0041] Convert the triangle array containing scattered points (points where the triangle vertices are not fully connected) into a two-dimensional array and remove the scattered points that are not connected (these scattered points may be isolated points or points that cannot participate in valid connections).
[0042] In the new two-dimensional array, find the point closest to each scattered point and connect these scattered points with the nearest point through a straight line. In the connection process, add relay nodes with a certain radius, which act as bridges to enhance the connectivity and signal coverage of the network.
[0043] Step 106, find the Fermat points in the new array, connect the Fermat points and the relay nodes, split the new array and convert it into a scattered point array, add the scattered points in the new array to the scattered point array where the points closest to the scattered points are located, find the vertex set of the convex polygon in the scattered point array after adding the scattered points according to the convex hull algorithm, find all triangles containing the vertex set in the array and convert them into a two-dimensional array, delete the connected points in the two-dimensional array and calculate the points closest to each vertex in the vertex set in the two-dimensional array, connect the vertex and the point closest to the vertex to realize the relay connection.
[0044] In the new array, find the Fermat points of each triangle group (the points that minimize the total distance to the vertices of the triangles). Re-divide these points by connecting the Fermat points with the relay nodes, and convert these newly divided areas into a scattered point array.
[0045] Specifically:
[0046] (1) First, determine all nodes to be connected in the ad hoc network, i.e., scattered points;
[0047] (2) Perform Delaunay triangulation on all scattered points to generate an n*3*2 array Array, where n is the number of triangles, 3 is the three vertices of the triangle, and 2 is the two coordinate values of the vertices. Delaunay triangulation has two characteristics: maximizing the minimum angle, being closest to a regularized triangulated network, and uniqueness (any four points cannot be in a circle).
[0048] (3) Traverse the Array. When there are two intersection points between triangles, delete the data of one triangle and form a new Array1. The triangles in Array1 are allowed to have one common point but not two. Otherwise, Figure 2 As shown, there will be redundancy of relay nodes.
[0049] (4) Figure 3 As shown, a triangle is drawn based on Array1.
[0050] (5) Figure 3 As shown, after the first three steps, there are independent scattered points and triangles in Array1.
[0051] (6) First process the independent scattered points, such as Figure 3 As shown, the marked point is the scattered point P. Find the triangle array containing the scattered point P in Array, convert it into a two-dimensional array, delete the scattered point P, and generate a new two-dimensional array PointArray.
[0052] (7) In PointArray, calculate the point Q that is closest to point P, and add a relay node with a radius of r between the straight line PQ, such as Figure 4 shown.
[0053] (8) Find the Fermat point in the triangle in Array1 and connect the relay node and the Fermat point. The Fermat point is the point in the triangle with the smallest sum of distances to the three vertices.
[0054] (9) The triangles in Array1 may be divided into several pieces (with no intersections between them), so they are split into several arrays, and each array is converted into a scattered point array subArray (3D to 2D, excluding repeated scattered points).
[0055] (10) In step 6, add the scattered point P to the subArray array where the scattered point Q is located.
[0056] (11) In multiple subArray scatter arrays, the number of scatter points is at least 3, and the array with the least number of points is used to connect to other arrays. Figure 5 As shown, first use the convex hull algorithm to find the vertex set X of the convex polygon in subArray; find all triangles containing point X in the Array array and convert it into a two-dimensional array PointArray (same as (5)); delete the connected points in the PointArray array, that is, delete the points contained in the subArray array, and then calculate the point Y with the shortest distance to point X. Each vertex of the convex polygon has a nearest Y, find the minimum Y value, and then connect XY.
[0057] (12) If two points on one side of a convex polygon are not in a triangle in the array, the uniqueness of Delaunay triangulation can be used to determine that the convex polygon contains scattered points of other convex polygons. Prioritize the calculation of all independent convex polygons that do not contain other convex polygons.
[0058] (13) Find a convex polygon whose edges are in the Array array. According to (10), find the point closest to the convex polygon and connect it. After the independent convex polygons are connected, the number of subArray scattered points will decrease. At this time, select the convex polygon with the least vertices to calculate the shortest distance. At this time, connect the scattered points with the shortest distance in the convex polygon. The final connection is as follows Figure 6 shown.
[0059] (14) According to step (7), the minimum relay connection of the triangles in Array1 is completed; according to (6), the minimum connection of independent scattered points is completed, and according to (12), the relay connection of multiple convex polygons is completed; thus, the minimum relay connection of all nodes to be connected is completed, and the point set in the final subArray is the point set of all nodes to be connected.
[0060] This application solves various scenarios through the above settings. When the signal of the ad hoc network radio station is poor or disconnected, a relay planning scheme is automatically recommended, specifically:
[0061] When all nodes are disconnected, just follow steps (1)-(12) to connect them.
[0062] When there is an independent scattered point O that is not connected to other ad hoc network nodes, first determine the scattered point set and the n*3*2 array Array after Delaunay triangulation according to (1) and (2), find all the triangle arrays PointArray containing O in Array, delete the duplicate nodes and the O node itself, calculate the distance between the nodes in PointArray and the O node, find the node T closest to O, and connect it to the OT nodes to deploy relay nodes. The whole process uses (1), (2), (5), and (6).
[0063] When several self-organizing network areas are disconnected, first determine the scattered point set and the n*3*2 array after Delaunay triangulation according to (1) and (2); for the disconnected self-organizing network areas, create each scattered point set, and calculate the vertex set of the convex polygon according to the convex hull algorithm. If each edge of the convex polygon is in the array, calculate according to (10) and find the shortest distance point for relay node connection. If the convex polygon contains other convex polygons, determine the vertex B of the other convex polygons contained, and the distance from the nearest point A is d. When the vertices of the convex polygon have the shortest distance greater than d, connect AB, otherwise connect the convex polygon vertex and the closest point.
[0064] In the above-mentioned method for automatic relay planning in a self-organizing network, firstly, Delaunay triangulation is performed on all nodes to be connected to obtain multiple arrays; the multiple arrays are traversed, and when there are two intersections between triangles in the array, the data of one triangle is deleted to obtain a new array. The use of Delaunay triangulation technology helps to ensure the optimization of the connection path between nodes and avoid redundant connections and excessive signal interference. The triangular network formed by triangulation has good geometric properties, so that the quality of signal transmission can be guaranteed, while the number of connected nodes is minimized, reducing the complexity of the network. Then, the triangular array containing scattered points in the array is converted into a two-dimensional array and the scattered points are deleted to obtain a new two-dimensional array; the point closest to the scattered point is found in the new two-dimensional array, the scattered point and the point closest to the scattered point are connected, and a relay node with a certain radius is added between the connecting lines; the Fermat point is found in the new array, the Fermat point and the relay node are connected, the new array is split and converted into a scattered point array, the scattered points in the new array are added to the scattered point array where the point closest to the scattered point is located, and the vertex set of the convex polygon in the scattered point array after adding the scattered points is found according to the convex hull algorithm, all triangles containing the vertex set are found in the array and converted into a two-dimensional array, the connected points in the two-dimensional array are deleted and the point closest to each vertex in the vertex set in the two-dimensional array is calculated, and the vertex and the point closest to the vertex are connected to realize the relay connection. By calculating and using the Fermat point to optimize the placement of the relay node, the total path distance between multiple points can be minimized. By placing the relay node in the optimal position, the transmission delay and signal attenuation between nodes are reduced, and the efficient signal quality is maintained. At the same time, such a relay placement scheme reduces the number of relay nodes that need to be added and optimizes resource allocation. In the process of connecting scattered points and the nearest nodes, by calculating the distance between nodes and setting reasonable relay nodes, excessive relay nodes are avoided, which not only guarantees the coverage and quality of the signal, but also effectively reduces the total number of relay nodes and reduces the overhead of network equipment. Finally, the convex hull algorithm is used to identify the outermost nodes, and the connection path is optimized through a reasonable connection method, which can further reduce unnecessary connections in the network. Through the planning of the optimal path, the signal interference between nodes is reduced, the network efficiency is improved, and the use of relay nodes is minimized. This application combines the automatic relay planning method with Delaunay triangulation, Fermat point calculation and convex hull algorithm, effectively reducing redundant connections and ensuring the stability of network signal quality. It can reduce the number of relay nodes while ensuring signal quality, thereby achieving efficient network optimization effects, and reducing the network construction cost by reducing the number of relay nodes, and improving the network's operating efficiency and robustness. This application has great advantages in the scalability and maintainability of large-scale ad hoc networks, especially in scenarios with high signal coverage requirements and limited equipment resources.
[0065] In one of the embodiments, if an independent scattered point is not connected to other self-organizing network nodes, all nodes to be connected in the self-organizing network are obtained; Delaunay triangulation is performed on all nodes to be connected to obtain multiple arrays, all triangular arrays containing the independent scattered point are found in the arrays, and duplicate nodes and the independent scattered point itself are deleted, and then the distance between the nodes in all triangular arrays and the independent scattered point is calculated, the node closest to the independent scattered point is found, and a relay node is deployed between the independent scattered point and the node closest to the independent scattered point.
[0066] In one of the embodiments, when several self-organizing network areas are disconnected, all nodes to be connected in the self-organizing network are obtained; Delaunay triangulation is performed on all nodes to be connected to obtain multiple arrays, and the scattered point set and the n*3*2 array after Delaunay triangulation are determined; for the disconnected self-organizing network areas, each scattered point set is created, and the vertex set of the convex polygon is calculated according to the convex hull algorithm; if each edge of the convex polygon is in the array, the vertex set of the convex polygon in the scattered point array after adding the scattered points is found according to the convex hull algorithm, all triangles containing the vertex set are found in the array and converted into a two-dimensional array, the connected points in the two-dimensional array are deleted, and the points closest to each vertex in the vertex set in the two-dimensional array are calculated, and the vertices are connected to the points closest to the vertices to realize relay connection, and if the convex polygon contains other convex polygons, it is determined that the vertex B of the other contained convex polygons is at a distance d from the nearest point A, and when the nearest distances of the vertices of the convex polygon are all greater than d, AB is connected, otherwise the convex polygon vertices and the nearest points are connected.
[0067] In one embodiment, the size of the array is n*3*2, where n is the number of triangles, 3 is the three vertices of the triangle, and 2 is the two coordinate values of the vertices.
[0068] In one embodiment, the Fermat point is a point in a triangle whose sum of distances to the three vertices is the smallest.
[0069] In one embodiment, the vertex set of the convex polygon in the scattered point array after adding scattered points is found according to the convex hull algorithm, all triangles containing the vertex set are found in the array and converted into a two-dimensional array, the connected points in the two-dimensional array are deleted and the point closest to each vertex in the vertex set in the two-dimensional array is calculated, and the vertex is connected to the point closest to the vertex to realize the relay connection, including:
[0070] If two points on one side of a convex polygon are not in a triangle in the array, it can be judged according to the uniqueness of Delaunay triangulation that the convex polygon contains scattered points of other convex polygons. Then, all independent convex polygons that do not contain other convex polygons are calculated first, and the vertex set of independent convex polygons that do not contain other convex polygons is found. All triangles containing the vertex set are found in the array and converted into a two-dimensional array. The connected points in the two-dimensional array are deleted and the points closest to each vertex in the vertex set in the two-dimensional array are calculated. The vertices are connected to the points closest to the vertices. After the independent convex polygons are connected, the number of scattered point arrays will decrease. The convex polygon with the least vertices is selected to calculate the shortest distance, and the scattered points with the shortest distance in the convex polygon are connected to realize relay connection.
[0071] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0072] In one embodiment, Figure 7 As shown, a self-organizing network automatic relay planning device is provided, including: a triangulation module 702, a fast relay module 704 and an automatic relay planning module 706, wherein:
[0073] The triangulation module 702 is used to obtain all nodes to be connected in the ad hoc network; if all the points to be connected are not connected, Delaunay triangulation is performed on all the nodes to be connected to obtain multiple arrays; the multiple arrays are traversed, and when there are two intersections between triangles in the array, the data of one triangle is deleted to obtain a new array;
[0074] The fast relay module 704 is used to convert the triangular array containing scattered points in the array into a two-dimensional array and delete the scattered points to obtain a new two-dimensional array; find the point closest to the scattered point in the new two-dimensional array, connect the scattered point and the point closest to the scattered point, and add a relay node with a certain radius between the connecting lines;
[0075] The automatic relay planning module 706 is used to find Fermat points in the new array, connect Fermat points and relay nodes, split the new array and convert it into a scattered point array, add the scattered points in the new array to the scattered point array where the points closest to the scattered points are located, find the vertex set of the convex polygon in the scattered point array after adding the scattered points according to the convex hull algorithm, find all triangles containing the vertex set in the array and convert them into a two-dimensional array, delete the connected points in the two-dimensional array and calculate the points closest to each vertex in the vertex set in the two-dimensional array, and connect the vertex with the point closest to the vertex to realize relay connection.
[0076] For the specific definition of an automatic relay planning device for a self-organizing network, please refer to the definition of an automatic relay planning method for a self-organizing network in the above text, which will not be repeated here. Each module in the above-mentioned automatic relay planning device for a self-organizing network can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0077] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for automatic relay planning of a self-organizing network is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0078] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0079] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0080] The technical features of the above embodiments may 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.
[0081] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for automatic relay planning in a self-organizing network, characterized in that: The method comprises: Obtain all nodes to be connected in the ad hoc network; if all the points to be connected are not connected, perform Delaunay triangulation on all the nodes to be connected to obtain multiple arrays; traverse the multiple arrays, and when there are two intersections between triangles in the array, delete the data of one triangle to obtain a new array; Convert the triangular array containing scattered points in the array into a two-dimensional array and delete the scattered points to obtain a new two-dimensional array; find the point closest to the scattered points in the new two-dimensional array, connect the scattered points and the points closest to the scattered points, and add relay nodes with a certain radius between the connecting lines; Find Fermat points in the new array, connect the Fermat points and the relay nodes, split the new array and convert it into a scattered point array, add the scattered points in the new array to the scattered point array where the points closest to the scattered points are located, find the vertex set of the convex polygon in the scattered point array after adding the scattered points according to the convex hull algorithm, find all triangles containing the vertex set in the array and convert them into a two-dimensional array, delete the connected points in the two-dimensional array and calculate the points closest to each vertex in the vertex set in the two-dimensional array, connect the vertex and the point closest to the vertex to realize relay connection.
2. The method according to claim 1, characterized in that The method further comprises: If an independent scattered point is not connected to other ad hoc network nodes, all nodes to be connected in the ad hoc network are obtained; Delaunay triangulation is performed on all nodes to be connected to obtain multiple arrays, all triangular arrays containing independent scattered points are found in the arrays, and duplicate nodes and the independent scattered points themselves are deleted. Then, the distances between the nodes in all triangular arrays and the independent scattered points are calculated, and the nodes closest to the independent scattered points are found. Relay nodes are deployed between the independent scattered points and the nodes closest to the independent scattered points.
3. The method according to claim 1, characterized in that The method further comprises: When several self-organizing network areas are disconnected, all nodes to be connected in the self-organizing network are obtained; Delaunay triangulation is performed on all nodes to be connected to obtain multiple arrays, and the scattered point set and the n*3*2 array after Delaunay triangulation are determined; for the disconnected self-organizing network areas, each scattered point set is created, and the vertex set of the convex polygon is calculated according to the convex hull algorithm; if each edge of the convex polygon is in the array, the vertex set of the convex polygon in the scattered point array after adding the scattered points is found according to the convex hull algorithm, all triangles containing the vertex set are found in the array and converted into a two-dimensional array, the connected points in the two-dimensional array are deleted, and the points closest to each vertex in the vertex set in the two-dimensional array are calculated, and the vertices are connected to the points closest to the vertices to realize relay connection. If the convex polygon contains other convex polygons, it is determined that the vertex B of the other contained convex polygons is at a distance d from the nearest point A. When the nearest distances of the vertices of the convex polygon are all greater than d, AB is connected, otherwise the convex polygon vertices and the nearest points are connected.
4. The method according to claim 1, characterized in that: The size of the array is n*3*2, where n is the number of triangles, 3 is the three vertices of the triangle, and 2 is the two coordinate values of the vertices.
5. The method according to claim 1, characterized in that The Fermat point is a point in a triangle whose sum of distances to the three vertices is the smallest.
6. The method according to claim 1, characterized in that According to the convex hull algorithm, the vertex set of the convex polygon in the scattered point array after adding the scattered points is found, all triangles containing the vertex set are found in the array and converted into a two-dimensional array, the connected points in the two-dimensional array are deleted, and the point closest to each vertex in the vertex set in the two-dimensional array is calculated, and the vertex is connected to the point closest to the vertex to realize the relay connection, including: If two points on one side of the convex polygon are not in a triangle in the array, it can be judged according to the uniqueness of Delaunay triangulation that the convex polygon contains scattered points of other convex polygons, then all independent convex polygons that do not contain other convex polygons are calculated first, and the vertex set of the independent convex polygon that does not contain other convex polygons is found, all triangles containing the vertex set are found in the array and converted into a two-dimensional array, the connected points in the two-dimensional array are deleted, and the points closest to each vertex in the vertex set in the two-dimensional array are calculated, and the vertices are connected to the points closest to the vertices. After the independent convex polygons are connected, the number of scattered point arrays will be reduced, and the convex polygon with the least vertices is selected to calculate the shortest distance, and the scattered points with the shortest distance in the convex polygon are connected to realize relay connection.
7. An automatic relay planning device for a self-organizing network, characterized in that: The device comprises: A triangulation module is used to obtain all nodes to be connected in the ad hoc network; if all the points to be connected are not connected, Delaunay triangulation is performed on all the nodes to be connected to obtain multiple arrays; the multiple arrays are traversed, and when there are two intersections between triangles in the array, the data of one triangle is deleted to obtain a new array; A fast relay module is used to convert the triangular array containing scattered points in the array into a two-dimensional array and delete the scattered points to obtain a new two-dimensional array; find the point closest to the scattered point in the new two-dimensional array, connect the scattered point and the point closest to the scattered point, and add a relay node with a certain radius between the connecting lines; The automatic relay planning module is used to find Fermat points in the new array, connect the Fermat points and the relay nodes, split the new array and convert it into a scattered point array, add the scattered points in the new array to the scattered point array where the points closest to the scattered points are located, find the vertex set of the convex polygon in the scattered point array after adding the scattered points according to the convex hull algorithm, find all triangles containing the vertex set in the array and convert it into a two-dimensional array, delete the connected points in the two-dimensional array and calculate the points closest to each vertex in the vertex set in the two-dimensional array, connect the vertex and the point closest to the vertex to realize relay connection.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, claims 1 to 6 are realized. The steps of any of the methods described above.
Citation Information
Patent Citations
Fermat point-based routing method and system in double sink mutual backup wireless sensor network (WSN)
CN102256325A
Minimum weight triangulation method and device based on spatial network coding
CN105933091A
A method and terminal for connecting a wireless sensor network
CN109905883A
Mobile Ad-Hoc network routing algorithm based on Fermat point
CN110167095A
K coverage method and device of target area, computer equipment and storage medium
CN113840296A
