An ad hoc network automatic relay planning method, device, equipment and medium
By optimizing the location of relay nodes in ad hoc networks using Delaunay triangulation, Fermat points, and convex hull algorithms, the problem of limited radio coverage in ad hoc networks is solved. This achieves efficient relay node planning, reduces redundant connections and signal interference, and improves network efficiency and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 湖南智领通信科技有限公司
- Filing Date
- 2024-09-14
- Publication Date
- 2026-06-09
AI Technical Summary
Existing self-organizing network radios have limited coverage. When large-area coverage is required, multiple radios need to be deployed. Furthermore, existing relay solutions cannot reduce the number of relay nodes while ensuring signal quality, resulting in low efficiency.
The nodes are initially segmented using Delaunay triangulation, and duplicate triangles at intersections are removed. The result is converted into a two-dimensional array, and scattered points are removed. The nearest points of the scattered points are connected to add relay nodes. The Fermat point and convex hull algorithms are used to optimize the position of the relay nodes and reduce redundant connections.
By optimizing the location of relay nodes, the number of relay nodes can be reduced, signal quality can be guaranteed, network complexity and equipment costs can be reduced, and network efficiency and robustness can be improved.
Smart Images

Figure CN119155766B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of ad hoc network technology, and in particular to an automatic relay planning method, apparatus, equipment and medium for ad hoc networks. Background Technology
[0002] The coverage of a single ad hoc network radio is limited. When the area to be covered is larger than that of a single ad hoc network radio, multiple ad hoc network radios need to be deployed.
[0003] When multiple radio nodes are present and the coverage area is insufficient, some radios may lose connection. Currently, there is no relay solution for connecting more than three nodes, and existing relay solutions cannot guarantee signal quality while reducing the number of relay nodes required, resulting in low efficiency. Summary of the Invention
[0004] Therefore, it is necessary to provide an automatic relay planning method, device, equipment, and medium for self-organizing networks that can ensure signal quality while requiring fewer relay nodes, in order to address the aforementioned technical problems.
[0005] An automatic relay planning method for ad hoc networks, the method comprising:
[0006] Get all nodes to be connected in the ad hoc network; if all nodes to be connected are not connected, perform Delaunay triangulation on all 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 and get 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 points in the new two-dimensional array, connect the scattered points to the point closest to the scattered points, and add relay nodes of a certain radius between the connecting points;
[0008] Find the Fermat point in the new array, connect the Fermat point to the relay node, split the new array and convert it into a scatter array, add the scatter points in the new array to the scatter array containing the point closest to the scatter point, find the vertex set of the convex polygon in the scatter array after adding the scatter 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 points that have been connected in the two-dimensional array and calculate the point closest to each vertex in the vertex set of the two-dimensional array, connect the vertex to the point closest to the vertex to realize the relay connection.
[0009] In one embodiment, if an independent node is unable to communicate with 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 the independent node are found and duplicate nodes and the independent node itself are deleted; the distance between the nodes in all triangular arrays and the independent node is calculated; the node closest to the independent node is found; and a relay node is deployed between the independent node and the node closest to the independent node.
[0010] In one embodiment, when several ad hoc network regions are disconnected, 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, and the scatter set and the n*3*2 array after Delaunay triangulation are determined; for disconnected ad hoc network regions, each scatter set is created, and the vertex set of the convex polygon is calculated according to the convex hull algorithm; if every edge of the convex polygon is in the array, the vertex set of the convex polygon in the scatter array after adding scatter 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 of the two-dimensional array is calculated. The vertex is connected to the point closest to the vertex to achieve a relay connection. If the convex polygon contains other convex polygons, it is determined that the vertex B of the contained other convex polygon is d away from the nearest point A. If the distance between the vertex B and the nearest point A of the convex polygon is greater than d, then AB can be connected; otherwise, the vertex of the convex polygon is connected to the nearest point A.
[0011] In one embodiment, the size of the array is n*3*2, where n is the number of triangles, 3 is the 3 vertices of the triangles, and 2 is the two coordinate values of the vertices.
[0012] In one embodiment, the Fermat point is the point in the 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 scatter array after adding scatter 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. Points already connected in the two-dimensional array are deleted, and the point closest to each vertex in the vertex set of the two-dimensional array is calculated. A relay connection is established by connecting the vertex to the point closest to the vertex, including:
[0014] If two points on one side of a convex polygon are not in a triangle in the array, the uniqueness of Delaunay triangulation indicates that the convex polygon contains scattered points of other convex polygons. Therefore, we first calculate all independent convex polygons that do not contain other convex polygons, find the vertex set of these independent convex polygons, find all triangles containing these vertex sets in the array and convert them to a two-dimensional array, delete the already connected points in the two-dimensional array, and calculate the point closest to each vertex in the vertex set of the two-dimensional array. Connect the vertex to the point closest to the vertex. After connecting the independent convex polygons, the number of scattered points in the array will decrease. We then select the convex polygon with the fewest vertices, calculate the shortest distance, and connect the scattered points with the shortest distance in the convex polygon to achieve relay connections.
[0015] An automatic relay planning device for self-organizing networks, the device comprising:
[0016] The triangulation module is used to obtain all nodes to be connected in the ad hoc network. If all nodes to be connected are not connected, 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 the 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 a triangular array containing scattered points into a two-dimensional array and remove the scattered points to obtain a new two-dimensional array; in the new two-dimensional array, find the point that is closest to the scattered points, connect the scattered points to the point that is closest to the scattered points, and add relay nodes of a certain radius between the connecting lines;
[0018] The automatic relay planning module is used to find Fermat points in a new array, connect Fermat points to relay nodes, split the new array and convert it into a scatter array, add the scatter points in the new array to the scatter array containing the points closest to the scatter points, find the vertex set of the convex polygons in the scatter array after adding scatter 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 points that have been connected in the two-dimensional array, calculate the point closest to each vertex in the vertex set of the two-dimensional array, and connect the vertex to the point closest to the vertex to realize the relay connection.
[0019] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:
[0020] Get all nodes to be connected in the ad hoc network; if all nodes to be connected are not connected, perform Delaunay triangulation on all 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 and get 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 points in the new two-dimensional array, connect the scattered points to the point closest to the scattered points, and add relay nodes of a certain radius between the connecting points;
[0022] Find the Fermat point in the new array, connect the Fermat point to the relay node, split the new array and convert it into a scatter array, add the scatter points in the new array to the scatter array containing the point closest to the scatter point, find the vertex set of the convex polygon in the scatter array after adding the scatter 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 points that have been connected in the two-dimensional array and calculate the point closest to each vertex in the vertex set of the two-dimensional array, connect the vertex to the point closest to the vertex to realize the relay connection.
[0023] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0024] Get all nodes to be connected in the ad hoc network; if all nodes to be connected are not connected, perform Delaunay triangulation on all 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 and get 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 points in the new two-dimensional array, connect the scattered points to the point closest to the scattered points, and add relay nodes of a certain radius between the connecting points;
[0026] Find the Fermat point in the new array, connect the Fermat point to the relay node, split the new array and convert it into a scatter array, add the scatter points in the new array to the scatter array containing the point closest to the scatter point, find the vertex set of the convex polygon in the scatter array after adding the scatter 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 points that have been connected in the two-dimensional array and calculate the point closest to each vertex in the vertex set of the two-dimensional array, connect the vertex to the point closest to the vertex to realize the relay connection.
[0027] The aforementioned method, apparatus, device, and medium for automatic relay planning in ad hoc networks first perform Delaunay triangulation on all nodes to be connected, resulting in multiple arrays. Then, iterating through these arrays, when two triangles in an array intersect, one triangle's data is deleted, resulting in a new array. Using Delaunay triangulation helps ensure optimized connection paths between nodes, avoiding redundant connections and excessive signal interference. The triangular network formed through triangulation possesses good geometric properties, guaranteeing signal transmission quality while minimizing the number of connected nodes and reducing network complexity. Then, the triangle array containing scattered points is converted into a two-dimensional array, and the scattered points are removed, resulting in a new two-dimensional array. In this new two-dimensional array, the point closest to the scattered points is found, and a line is drawn between the scattered points and their closest points. A relay node with a certain radius is added between these lines. Fermat points are found in the new array, and they are connected to the relay nodes. The new array is then split and converted into a scattered point array. The scattered points from the new array are added to the scattered point array containing the point closest to the scattered points. Using the convex hull algorithm, the vertex set of the convex polygons in the scattered point array after adding scattered points is found. All triangles containing these vertex sets are found in the array and converted into two-dimensional arrays. Points already connected in the two-dimensional array are removed, and the point closest to each vertex in the vertex set of the two-dimensional array is calculated. A relay connection is established by connecting vertices to their closest points. By calculating and using Fermat points to optimize the placement of relay nodes, the total path distance between multiple points can be minimized. By placing relay nodes in optimal positions, transmission delay and signal attenuation between nodes are reduced, maintaining high signal quality. Simultaneously, this relay placement scheme reduces the number of relay nodes that need to be added, optimizing resource allocation. In connecting scattered points and the nearest node, by calculating the distance between nodes and setting up reasonable relay nodes, excessive relay nodes are avoided. This ensures signal coverage and quality while effectively reducing the total number of relay nodes and thus reducing network equipment overhead. Finally, the convex hull algorithm is used to identify the outermost nodes, and the connection path is optimized through reasonable connection methods, further reducing unnecessary connections in the network. By planning the optimal path, signal interference between nodes is reduced, network efficiency is improved, and the use of relay nodes is minimized. This application combines Delaunay triangulation, Fermat point calculation, and the convex hull algorithm in the automatic relay planning method, effectively reducing redundant connections and ensuring stable network signal quality. It can reduce the number of relay nodes while ensuring signal quality, thereby achieving efficient network optimization. Furthermore, reducing the number of relay nodes lowers network construction costs and improves network operating efficiency and robustness. This application has significant advantages in the scalability and maintainability of large-scale ad hoc networks, especially in scenarios with high signal coverage requirements and limited equipment resources. Attached Figure Description
[0028] Figure 1 This is a flowchart illustrating an automatic relay planning method for ad hoc networks in one embodiment;
[0029] Figure 2 This is a schematic diagram of a Delaunay triangular mesh in one embodiment;
[0030] Figure 3 Here is a schematic diagram of a triangle drawn based on Array1 in one embodiment;
[0031] Figure 4 This is a schematic diagram of the connecting lines between points and scatter points P in the array PointArray in another embodiment;
[0032] Figure 5 This is a schematic diagram of the convex hull algorithm in one embodiment;
[0033] Figure 6 This is a schematic diagram illustrating the implementation of a relay connection in one embodiment;
[0034] Figure 7 This is a structural block diagram of an automatic relay planning device for self-organizing networks in one embodiment;
[0035] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0037] In one embodiment, such as Figure 1 As shown, an automatic relay planning method for ad hoc networks is provided, including the following steps:
[0038] Step 102: Obtain all nodes to be connected in the ad hoc network; if all nodes to be connected are not connected, perform Delaunay triangulation on all 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.
[0039] Perform Delaunay triangulation on all nodes to be connected. This ensures that no triangle has any vertex inside the circumcircle of another triangle. This triangulation is beneficial for connecting evenly distributed points. After triangulation, iterate through the generated array of triangles, checking the intersections between them. If two triangles have two intersections, delete one of them. This is to avoid redundant connections and redundant topology.
[0040] Step 104: 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 points in the new two-dimensional array, connect the scattered points to the point closest to the scattered points, and add relay nodes of 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 a valid connection).
[0042] In the new two-dimensional array, find the point closest to each scattered point and connect these scattered points to the nearest point with straight lines. During the connection process, relay nodes of a certain radius are added. These nodes act as bridges, enhancing network connectivity and signal coverage.
[0043] Step 106: Find the Fermat point in the new array, connect the Fermat point and the relay node, split the new array and convert it into a scatter array, add the scatter points in the new array to the scatter array containing the point closest to the scatter point, find the vertex set of the convex polygon in the scatter array after adding the scatter 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 points that have been connected in the two-dimensional array and calculate the point closest to each vertex in the vertex set of the two-dimensional array, connect the vertex to the point closest to the vertex to realize the relay connection.
[0044] In the new array, find the Fermat point for each triangle (the point that minimizes the total distance to all vertices of the triangle). By connecting the Fermat point to the relay node, redivide these points and convert these newly divided regions into a scatter array.
[0045] Specifically:
[0046] (1) First, determine all the nodes to be connected in the self-organizing network, i.e., scattered nodes;
[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 3 vertices of the triangles, and 2 is the two coordinate values of the vertices. Delaunay triangulation has two characteristics: maximizing the minimum angle, being closest to a regular triangulation network, and uniqueness (no four points can be concyclic).
[0048] (3) Traverse the Array. When two triangles intersect, delete the data of one triangle and form a new Array1. Triangles in Array1 are allowed to have one common point, but not two; otherwise, the result will be as follows: Figure 2 As shown, relay node redundancy may occur.
[0049] (4) such as Figure 3 As shown, this is a triangle drawn based on Array1.
[0050] (5) such as Figure 3 As shown, after the first 3 steps, there are now independent scattered points and triangles in Array1.
[0051] (6) First process the independent scattered points, such as Figure 3 As shown, the marked points are scattered points P. Find the triangle array containing scattered point P in the Array, convert it to a two-dimensional array, delete 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 radius r between the lines P and Q, such as... Figure 4 As shown.
[0053] (8) Find the Fermat point in the triangle in Array1 and connect the relay node to the Fermat point. The Fermat point is the point in the triangle whose sum of distances to the three vertices is the smallest.
[0054] (9) The triangle in Array1 may be divided into several pieces (without intersections). Then split it into several arrays, and convert each array into a scatter array subArray (three-dimensional to two-dimensional, without duplicate scatter points).
[0055] (10) In step 6, add the scatter point P to the subArray array where the scatter point Q is located.
[0056] (11) In multiple subArray scatter arrays, the minimum number of scatter points is 3. The array with the fewest points is used to connect the other arrays. For example... Figure 5 As shown, first use the convex hull algorithm to find the vertex set X of the convex polygon in the subArray; find all triangles containing point X in the Array array and convert them into a two-dimensional array PointArray (same as (5)); the points that have been connected need to be deleted from the PointArray array, that is, the points contained in the subArray array are deleted, and then the point Y with the shortest distance from point X is calculated. 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 any triangle of the array, it can be determined by the uniqueness of Delaunay triangulation that the convex polygon contains scattered points of other convex polygons. Prioritize calculating all independent convex polygons that do not contain other convex polygons.
[0058] (13) Find a convex polygon where each side is in the Array array. Following (10), find the point closest to this convex polygon and connect them. After connecting the individual convex polygons, the number of points in the subArray will decrease. At this point, select the convex polygon with the fewest vertices to calculate the shortest distance. Then connect the points with the shortest distance in the convex polygon. The final connection is as follows: Figure 6 As shown.
[0059] (14) According to step (7), the minimum relay connection of triangles in Array1 array is completed; according to (6), the minimum connection of independent scattered points is completed; 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 at this time, the point set in the final subArray is the point set of all nodes to be connected.
[0060] This application addresses various scenarios through the above settings, automatically recommending a relay planning scheme when the self-organizing network radio signal is poor or disconnected, specifically:
[0061] When all nodes are disconnected, connect them according to steps (1)-(12).
[0062] When there is an independent scatter point O that is not connected to other ad hoc network nodes, first, according to (1) and (2), determine the scatter point set and the n*3*2 array Array after Delaunay triangulation. Find all the triangle arrays PointArray that contain O in Array, and delete duplicate nodes and the O node itself. Then calculate the distance between the nodes in PointArray and the O node, find the node T that is closest to O, and deploy a relay node between the O and T nodes. The whole process uses (1), (2), (5), and (6).
[0063] When several ad hoc network regions are disconnected, first determine the scattered point set and the n*3*2 array Array after Delaunay triangulation according to (1) and (2); for the disconnected ad hoc network regions, create each scattered point set, and calculate the vertex set of the convex polygon according to the convex hull algorithm. If every edge of the convex polygon is in the Array, calculate according to (10) and find the shortest distance point to connect the relay nodes. If the convex polygon contains other convex polygons, determine that the vertex B of the contained other convex polygon is d away from the nearest point A. If the nearest distance of the vertex of the convex polygon is greater than d, then connect AB; otherwise, connect the vertex of the convex polygon to the nearest point.
[0064] In the aforementioned automatic relay planning method for ad hoc networks, all nodes to be connected are first decomposed using Delaunay triangulation, resulting in multiple arrays. These arrays are then iterated through; when two triangles in an array intersect, the data of one triangle is deleted, resulting in a new array. Using Delaunay triangulation helps ensure optimal connection paths between nodes, avoiding redundant connections and excessive signal interference. The triangular network formed through triangulation possesses good geometric properties, guaranteeing signal transmission quality while minimizing the number of connected nodes, thus reducing network complexity. Then, the triangle array containing scattered points is converted into a two-dimensional array, and the scattered points are removed, resulting in a new two-dimensional array. In this new two-dimensional array, the point closest to the scattered points is found, and a line is drawn between the scattered points and their closest points. A relay node with a certain radius is added between these lines. Fermat points are found in the new array, and they are connected to the relay nodes. The new array is then split and converted into a scattered point array. The scattered points from the new array are added to the scattered point array containing the point closest to the scattered points. Using the convex hull algorithm, the vertex set of the convex polygons in the scattered point array after adding scattered points is found. All triangles containing these vertex sets are found in the array and converted into two-dimensional arrays. Points already connected in the two-dimensional array are removed, and the point closest to each vertex in the vertex set of the two-dimensional array is calculated. A relay connection is established by connecting vertices to their closest points. By calculating and using Fermat points to optimize the placement of relay nodes, the total path distance between multiple points can be minimized. By placing relay nodes in optimal positions, transmission delay and signal attenuation between nodes are reduced, maintaining high signal quality. Simultaneously, this relay placement scheme reduces the number of relay nodes that need to be added, optimizing resource allocation. In connecting scattered points and the nearest node, by calculating the distance between nodes and setting up reasonable relay nodes, excessive relay nodes are avoided. This ensures signal coverage and quality while effectively reducing the total number of relay nodes and thus reducing network equipment overhead. Finally, the convex hull algorithm is used to identify the outermost nodes, and the connection path is optimized through reasonable connection methods, further reducing unnecessary connections in the network. By planning the optimal path, signal interference between nodes is reduced, network efficiency is improved, and the use of relay nodes is minimized. This application combines Delaunay triangulation, Fermat point calculation, and the convex hull algorithm in the automatic relay planning method, effectively reducing redundant connections and ensuring stable network signal quality. It can reduce the number of relay nodes while ensuring signal quality, thereby achieving efficient network optimization. Furthermore, reducing the number of relay nodes lowers network construction costs and improves network operating efficiency and robustness. This application has significant 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 embodiment, if an independent node is unable to communicate with 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 the independent node are found and duplicate nodes and the independent node itself are deleted; the distance between the nodes in all triangular arrays and the independent node is calculated; the node closest to the independent node is found; and a relay node is deployed between the independent node and the node closest to the independent node.
[0066] In one embodiment, when several ad hoc network regions are disconnected, 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, and the scatter set and the n*3*2 array after Delaunay triangulation are determined; for disconnected ad hoc network regions, each scatter set is created, and the vertex set of the convex polygon is calculated according to the convex hull algorithm; if every edge of the convex polygon is in the array, the vertex set of the convex polygon in the scatter array after adding scatter 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 of the two-dimensional array is calculated. The vertex is connected to the point closest to the vertex to achieve a relay connection. If the convex polygon contains other convex polygons, it is determined that the vertex B of the contained other convex polygon is d away from the nearest point A. If the distance between the vertex B and the nearest point A of the convex polygon is greater than d, then AB can be connected; otherwise, the vertex of the convex polygon is connected to the nearest point A.
[0067] In one embodiment, the size of the array is n*3*2, where n is the number of triangles, 3 is the 3 vertices of the triangles, and 2 is the two coordinate values of the vertices.
[0068] In one embodiment, the Fermat point is the point in the 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 scatter array after adding scatter 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. Points already connected in the two-dimensional array are deleted, and the point closest to each vertex in the vertex set of the two-dimensional array is calculated. A relay connection is established by connecting the vertex to the point closest to the vertex, including:
[0070] If two points on one side of a convex polygon are not in a triangle in the array, the uniqueness of Delaunay triangulation indicates that the convex polygon contains scattered points of other convex polygons. Therefore, we first calculate all independent convex polygons that do not contain other convex polygons, find the vertex set of these independent convex polygons, find all triangles containing these vertex sets in the array and convert them to a two-dimensional array, delete the already connected points in the two-dimensional array, and calculate the point closest to each vertex in the vertex set of the two-dimensional array. Connect the vertex to the point closest to the vertex. After connecting the independent convex polygons, the number of scattered points in the array will decrease. We then select the convex polygon with the fewest vertices, calculate the shortest distance, and connect the scattered points with the shortest distance in the convex polygon to achieve relay connections.
[0071] It should be understood that, although Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed 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 some of the sub-steps or stages of other steps.
[0072] In one embodiment, such as Figure 7 As shown, an automatic relay planning device for self-organizing networks is provided, comprising: 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 nodes to be connected are not connected, 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 the 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 a triangular array containing scattered points into a two-dimensional array and delete the scattered points to obtain a new two-dimensional array; in the new two-dimensional array, find the point closest to the scattered points, connect the scattered points and the points closest to the scattered points, and add relay nodes of a certain radius between the connecting lines;
[0075] The automatic relay planning module 706 is used to find Fermat points in a new array, connect Fermat points and relay nodes, split the new array and convert it into a scatter array, add the scatter points in the new array to the scatter array containing the points closest to the scatter points, find the vertex set of the convex polygons in the scatter array after adding scatter 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 points that have been connected in the two-dimensional array and calculate the point closest to each vertex in the vertex set of the two-dimensional array, and connect the vertex to the point closest to the vertex to realize the relay connection.
[0076] For specific limitations regarding the automatic relay planning device for ad hoc networks, please refer to the limitations of the automatic relay planning method for ad hoc networks described above, and will not be repeated here. Each module in the aforementioned automatic relay planning device for ad hoc networks can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0077] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an automatic relay planning method for self-organizing networks. The display screen can be an LCD screen or an e-ink display screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0078] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0079] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, 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. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0080] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for automatic relay planning in self-organizing networks, characterized in that, The method includes: Obtain all nodes to be connected in the ad hoc network; if all nodes to be connected are not connected, perform Delaunay triangulation on all nodes to be connected to obtain multiple arrays; traverse the multiple arrays, and when there are two intersections between the triangles in the array, delete the data of one triangle to obtain a new array Array1; Convert the triangular array containing scattered points into a two-dimensional array and delete the scattered points to obtain a new two-dimensional array PointArray; find the point closest to the scattered points in the new two-dimensional array PointArray, connect the scattered points and the point closest to the scattered points, and add relay nodes of a certain radius between the connecting lines; In each triangle of the new array Array1, find the Fermat point, connect the Fermat point to the relay node, split the new array Array1 and convert it into a scatter array, add the independent scattered points that are not involved in the triangle formation to the scatter array containing the scattered point closest to the independent scattered point, find the vertex set of the convex polygon in the scatter array after adding scattered points according to the convex hull algorithm, find all triangles containing the vertex set in the array 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 of the two-dimensional array, connect the vertex to the point closest to the vertex to realize the relay connection; each vertex refers to any single vertex in the vertex set of the convex polygon, and the vertex set refers to the set of all vertices of the convex polygon.
2. The method according to claim 1, characterized in that, The method further includes: If an isolated node becomes disconnected from other ad hoc network nodes, obtain all nodes to be connected in the ad hoc network; perform Delaunay triangulation on all nodes to be connected to obtain multiple arrays; find all triangular arrays containing the isolated node and remove duplicate nodes and the isolated node itself; calculate the distance between nodes in all triangular arrays and the isolated node; find the node closest to the isolated node; and deploy a relay node between the isolated node and the node closest to the isolated node.
3. The method according to claim 1, characterized in that, The method further includes: When several ad hoc network areas become disconnected, obtain all nodes in the ad hoc network that are to be connected; perform Delaunay triangulation on all nodes to be connected to obtain multiple arrays, and determine the scatter set and the n after Delaunay triangulation. 3 An array of 2; for different self-organizing network regions, create various scatter point sets, and calculate the vertex set of the convex polygon according to the convex hull algorithm; if every edge of the convex polygon is in the array, find the vertex set of the convex polygon in the scatter point array after adding scatter 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 points that have been connected in the two-dimensional array, and calculate the point closest to each vertex in the vertex set of the two-dimensional array, and connect the vertex with the point closest to the vertex to realize the relay connection.
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 number of vertices of the triangles, and 2 is the coordinate value of the two vertices.
5. The method according to claim 1, characterized in that, The Fermat point is the point in the triangle whose sum of distances to the three vertices is the smallest.
6. The method according to claim 1, characterized in that, The convex hull algorithm is used to find the vertex set of the convex polygon in the scatter array after adding scattered points. All triangles containing the vertex set are found in the array and converted into a two-dimensional array. Points that are already connected in the two-dimensional array are deleted, and the point closest to each vertex in the vertex set of the two-dimensional array is calculated. A relay connection is established by connecting each vertex to its nearest point, including: If two points on one side of the convex polygon are not in a triangle in the array, the uniqueness of the Delaunay triangulation indicates that the convex polygon contains scattered points of other convex polygons. Therefore, we first calculate all independent convex polygons that do not contain other convex polygons, find the vertex set of these independent convex polygons, find all triangles containing these vertex sets in the array and convert them into a two-dimensional array, delete the already connected points in the two-dimensional array, and calculate the point closest to each vertex in the vertex set of the two-dimensional array. Connect the vertex to the point closest to the vertex. After the independent convex polygons are connected, the number of scattered points in the array will decrease. Select the convex polygon with the fewest vertices among all convex polygons, calculate the shortest distance between all scattered points in the convex polygon with the fewest vertices, and connect the two scattered points corresponding to the shortest distance to achieve relay connection.
7. An automatic relay planning device for self-organizing networks, characterized in that, The device includes: The triangulation module is used to obtain all nodes to be connected in the ad hoc network; if all the nodes 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 the triangles in the array, the data of one triangle is deleted to obtain a new array Array1; 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 PointArray; find the point closest to the scattered points in the new two-dimensional array PointArray, connect the scattered points and the point closest to the scattered points, and add relay nodes of a certain radius between the connecting lines; An automatic relay planning module is used to find the Fermat point in each triangle of the new array Array1, connect the Fermat point to the relay node, split the new array Array1 into a scatter array, add the independent scattered points that are not involved in the triangle formation to the scatter array containing the scattered point closest to the independent scattered point, find the vertex set of the convex polygon in the scatter array after adding 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 of the two-dimensional array, and connect the vertex to the point closest to the vertex to achieve a relay connection; each vertex refers to any single vertex in the vertex set of the convex polygon, and the vertex set refers to the set of all vertices of the convex polygon.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the 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, it implements the steps of the method according to any one of claims 1 to 6.