Ad hoc network topology graph layout method and device, computer device and storage medium
By standardizing the location information and density clustering of self-organizing network nodes, and adaptively adjusting the scaling of node regions and blank areas, the problems of inaccurate node distribution and wasted space in the self-organizing network topology graph are solved, thereby improving the space utilization and analysis efficiency of the topology graph.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 湖南智领通信科技有限公司
- Filing Date
- 2022-10-31
- Publication Date
- 2026-06-09
Smart Images

Figure CN115795750B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of topology layout technology, and in particular to a method, apparatus, computer device and storage medium for self-organizing network topology layout. Background Technology
[0002] A wireless ad hoc network (ANR) is a distributed network composed of multiple wireless communication devices (referred to as "nodes"). It is characterized by being decentralized, dynamically changing its topology, self-organizing, and capable of multi-hop routing, but its bandwidth resources are limited. In ANR development and application scenarios, it is necessary to display real-time network topology information of the ANR radios (including the connection status of each node, the signal-to-noise ratio of each connection, the noise floor of each node, and data traffic), in order to determine the current network status within the ANR. The routing path between any two points in an ANR will constantly switch and be selected based on the network signal-to-noise ratio and the number of hops, resulting in continuous changes in the overall network connection status.
[0003] In network management software, topology diagrams are used to display this connection status in real time, allowing technicians and users to understand the connectivity of devices within the ad hoc network. Ad hoc network radios can be used for multi-point networking within a short distance within the same street, or for networking between distant areas. However, as the number of radios in the ad hoc network increases, the topology diagram, within a limited, immovable canvas area, shows radio nodes evenly distributed on a circle. This fails to reflect the relative geographical positions of each radio and distinguish between radios located in geographically distant areas. Even if the distribution of nodes in the topology diagram is determined based on the geographical information of their corresponding radios, several radios distributed in geographically distant areas, and multiple radios clustered together within the same geographical area, will appear on the topology diagram as clusters of nodes in the same area that cannot be separated under the same scale coordinates, while nodes in different areas will be far apart, resulting in many blank areas. This significantly wastes the limited canvas space and hinders technicians from analyzing the network connectivity within the ad hoc network in conjunction with the actual geographical environment.
[0004] The traditional approach involves manual determination, dragging nodes belonging to the same geographical region together in the topology map, and manually adjusting each node's position to roughly match the corresponding radio station's geographical location in the real environment. This method requires manual rearrangement whenever nodes are added or removed from the topology map, severely impacting work efficiency.
[0005] To address the second problem, a common approach is to add a collision volume radius to each node, dispersing nodes clustered within the same geographical region. However, as the collision volume radius increases, this disrupts the relative positions of nodes determined by their geographical locations, potentially causing points from different geographical regions to merge. Another approach is to perform a logarithmic calculation on the distances between nodes. Based on the characteristics of the logarithmic function, smaller distances are amplified more, while larger distances result in more stable regions. This method preserves the relative positional information of the nodes, but it can lead to insufficient amplification of distances between clustered nodes, leaving large blank areas between nodes in geographically distant regions. Summary of the Invention
[0006] Therefore, it is necessary to provide a method, apparatus, and computer device for layout of self-organizing network topology that can achieve adaptive scaling of node areas and blank areas, in order to address the above-mentioned technical problems.
[0007] A method for layouting a self-organizing network topology, characterized in that the method includes:
[0008] Obtain standardized location information of all nodes in the ad hoc network, and perform density-based clustering on multiple nodes based on the standardized location information to obtain a location distribution map of node groups; the standardized location information includes standardized longitude and standardized latitude; the location distribution map contains multiple node regions and blank areas between adjacent node groups; each node group corresponds to one node region;
[0009] The location distribution map is divided into several intervals, and the number of node intervals allocated to each node group is determined according to the preset node area ratio parameter.
[0010] In the location distribution map, the number of blank intervals allocated between the current node group and the previous adjacent node group is determined by comparing the node region positions of the current node group and the previous adjacent node group; wherein the minimum standardized longitude or minimum standardized latitude in the previous adjacent node group is not greater than the minimum standardized longitude or minimum standardized latitude in the current node group.
[0011] The node interval endpoint of the current node group is obtained based on the number of node intervals allocated, the number of blank intervals allocated, and the node interval endpoint of the previous adjacent node group.
[0012] Based on the endpoint of the node interval and the number of node intervals allocated to the current node group, the node region of the current node group is scaled to obtain the optimized node region of the current node group in the topology graph.
[0013] A self-organizing network topology layout device, the device comprising:
[0014] The location distribution map calculation module is used to obtain the standardized location information of all nodes in the ad hoc network, and to perform density-based clustering on multiple nodes based on the standardized location information to obtain a location distribution map of node groups; the standardized location information includes standardized longitude and standardized latitude; the location distribution map contains multiple node regions and blank areas between adjacent node groups; each node group corresponds to one node region;
[0015] The node interval allocation quantity calculation module is used to divide the location distribution map into several intervals and determine the node interval allocation quantity of each node group according to the preset node area ratio parameter.
[0016] The blank interval allocation quantity calculation module is used to determine the blank interval allocation quantity between the current node group and the previous adjacent node group by comparing the node region positions of the current node group and the previous adjacent node group in the location distribution map; wherein the minimum standardized longitude or minimum standardized latitude in the previous adjacent node group is not greater than the minimum standardized longitude or minimum standardized latitude in the current node group.
[0017] The node interval endpoint calculation module is used to obtain the node interval endpoint of the current node group based on the number of node intervals allocated, the number of blank intervals allocated, and the node interval endpoint of the previous adjacent node group.
[0018] The node region scaling module is used to scale the node region of the current node group according to the node interval endpoint and the number of node intervals allocated to the current node group, so as to obtain the optimized node region of the current node group in the topology graph.
[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] Obtain standardized location information of all nodes in the ad hoc network, and perform density-based clustering on multiple nodes based on the standardized location information to obtain a location distribution map of node groups; the standardized location information includes standardized longitude and standardized latitude; the location distribution map contains multiple node regions and blank areas between adjacent node groups; each node group corresponds to one node region;
[0021] The location distribution map is divided into several intervals, and the number of node intervals allocated to each node group is determined according to the preset node area ratio parameter.
[0022] In the location distribution map, the number of blank intervals allocated between the current node group and the previous adjacent node group is determined by comparing the node region positions of the current node group and the previous adjacent node group; wherein the minimum standardized longitude or minimum standardized latitude in the previous adjacent node group is not greater than the minimum standardized longitude or minimum standardized latitude in the current node group.
[0023] The node interval endpoint of the current node group is obtained based on the number of node intervals allocated, the number of blank intervals allocated, and the node interval endpoint of the previous adjacent node group.
[0024] Based on the endpoint of the node interval and the number of node intervals allocated to the current node group, the node region of the current node group is scaled to obtain the optimized node region of the current node group in the topology graph.
[0025] The aforementioned ad hoc network topology layout method, apparatus, and computer equipment first obtain a node group location distribution map through standardized node location information. This allows each interval of the subsequent location distribution map to be considered a unit quantity, and the interval allocation quantity can represent the interval width / height. Next, by sequentially comparing the positional relationship between each node group and its previous adjacent node group, the width / height of the blank interval between them is determined. Based on the node interval endpoint of the previous adjacent node group, the blank interval width / height, and the current node interval width / height, the node interval endpoint of the current node group can be obtained. Then, based on the node interval endpoint and interval width / height of the current node group, the location distribution of the optimized node region in the location distribution map can be determined. Appropriate scaling down or up scaling up completes the layout optimization of the current node group. Since the solution for the interval endpoint of the current node group includes the blank interval width / height information, the final step of solving the location distribution of the optimized node region also includes the scaling of the blank interval; that is, when the current node region is scaled down, the corresponding blank region is scaled up. It is understandable that this method achieves adaptive scaling of each node group, solving the following problems existing in topology map layout methods: 1) Limited, immovable canvas areas cannot be fully utilized; nodes in the same geographical area cluster together and cannot be clearly displayed independently on the topology map, or nodes in the same geographical area cannot be reasonably allocated to appropriate diffusion space for diffusion between nodes; 2) There is no sufficient blank space between nodes in different geographical areas, making it impossible to distinguish between different geographical areas, or the blank space between nodes in different geographical areas is too wide, failing to fully utilize limited canvas resources, resulting in clustered nodes having no space to effectively disperse. Furthermore, this invention eliminates the need to simultaneously adjust the node area and its corresponding blank area to achieve the optimal ratio, reducing complexity; and by scaling each node area sequentially according to its position information, it does not affect the presentation of the calculation results of the previous node area, thus exhibiting a certain degree of independence. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating a method for layouting an ad hoc network topology in one embodiment.
[0027] Figure 2 This is a location distribution map drawn based on raw geographic data in one embodiment;
[0028] Figure 3 This is a location distribution map drawn based on standardized data in one embodiment;
[0029] Figure 4 This is a location distribution map after classification processing in one embodiment;
[0030] Figure 5 This is a distribution diagram of the final results location in one embodiment;
[0031] Figure 6 This is a structural block diagram of an ad hoc network topology layout device in one embodiment;
[0032] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0033] 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.
[0034] In one embodiment, such as Figure 1 As shown, a method for layouting an ad hoc network topology is provided, including the following steps:
[0035] Step 102: Obtain the standardized location information of all nodes in the ad hoc network, and perform density-based clustering on multiple nodes based on the standardized location information to obtain the location distribution map of the node groups.
[0036] Standardized location information includes standardized longitude and standardized latitude. Since longitude and latitude features have different dimensions and numerical magnitudes, directly using the raw data values during grouping and clustering algorithms will result in varying degrees of influence on the results. This will emphasize the role of indicators with higher numerical values in the comprehensive analysis, relatively weakening the role of indicators with lower numerical levels; excessively large numbers may also cause numerical problems. Standardization, however, ensures that different features have the same scale. The raw data is transformed into dimensionless indicator evaluation values, with each indicator value at the same order of magnitude, balancing the contribution of each feature. Simultaneously, the relative positional distribution of each node remains unchanged, preserving geographical location information.
[0037] The location distribution map contains multiple node regions and blank areas between adjacent node groups, with each node group corresponding to one node region. It can be understood that the node regions here are the initial node regions. Within the initial node regions, there may be clusters of internal nodes that are difficult to identify, and the blank areas between the initial node regions may be too large, wasting canvas space.
[0038] Step 104: Divide the location distribution map into several intervals and determine the number of node intervals allocated to each node group according to the preset node area ratio parameters.
[0039] As shown in step 102, the x-axis coordinate of the location distribution map is standardized longitude, and the y-axis coordinate is standardized latitude. Dividing the location distribution map into several intervals involves dividing the x-axis into several horizontal intervals and the y-axis into several vertical intervals. Using the same interval division algorithm, the data on both the x-axis and y-axis are divided into intervals, reducing the two-dimensional interval division to one dimension, thus simplifying the algorithm.
[0040] The node region ratio parameter is the average of the number of horizontal or vertical intervals allocated to a node group. For example, if the x-axis of the location distribution map is divided into several horizontal intervals, each node group can be allocated c horizontal intervals on average to place its nodes. Due to standardization, the number of horizontal / vertical intervals can be understood as the width / height of the horizontal / vertical intervals.
[0041] It's understandable that the number of node intervals allocated is related to the number of nodes in a node group. This is because the more nodes in a node group, the greater the probability of node clustering and difficulty in identification within the corresponding node area, thus requiring more node intervals to meet the scaling needs of the node area.
[0042] Step 106: In the location distribution map, by comparing the node region positions of the current node group and the previous adjacent node group, determine the number of blank intervals allocated between the current node group and the previous adjacent node group.
[0043] Specifically, the minimum standardized longitude or minimum standardized latitude in the previous adjacent node group is not greater than the minimum standardized longitude or minimum standardized latitude in the current node group. In other words, when allocating the horizontal intervals of node groups, taking the x-axis as an example, this method first obtains the standardized longitude of the leftmost node in each node group, which is the minimum standardized longitude in each node group. Then, it sorts the multiple minimum standardized longitudes in descending order to obtain the corresponding node group processing order.
[0044] The positional relationship between the current node group and the previous adjacent node group includes disjoint, intersecting, and contained relationships. The positional relationship compared here is the initial positional relationship of the node regions. Different positional relationships result in different numbers of blank areas, i.e., the intervals between the two. For example, the greater the degree of disjointness, the larger the initial blank area, resulting in a more serious waste of canvas space resources, and thus requiring the reduction of the blank area based on the obtained number of blank intervals allocated.
[0045] Step 106: Obtain the node interval endpoint of the current node group based on the number of node intervals allocated, the number of blank intervals allocated, and the node interval endpoint of the previous adjacent node group.
[0046] This is understandable. For example, when dividing intervals on the x-axis, if the current node group is the first node group, that is, the node group with the smallest minimum standardized longitude, then the node group has no previous adjacent node group. The interval of the node group can be 0 as the interval start point and the number of node intervals it is assigned as the interval end point.
[0047] Step 108: Based on the endpoint of the node interval and the number of node intervals allocated to the current node group, scale the node region of the current node group to obtain the optimized node region of the current node group in the topology graph.
[0048] This method first obtains a positional distribution map of node groups using standardized node location information. This allows each interval derived from the subsequent positional distribution map to be considered a unit quantity, and the interval allocation quantity can represent the interval width / height. Next, by comparing the positional relationship between each node group and its preceding adjacent node group, the width / height of the blank interval between them is determined. Based on the node interval endpoint of the preceding adjacent node group, the blank interval width / height, and the current node interval width / height, the node interval endpoint of the current node group can be obtained. Then, based on the node interval endpoint and interval width / height of the current node group, the positional distribution of the optimized node region in the positional distribution map can be determined. Appropriate scaling down or up scaling up completes the layout optimization of the current node group. Since the solution for the interval endpoint of the current node group includes the blank interval width / height information, the final step of solving the positional distribution of the optimized node region also includes scaling down the blank interval; that is, when the current node region is scaled down, the corresponding blank region is scaled up. Understandably, this method achieves adaptive scaling of each node group, solving the following problems in existing topology layout methods: 1) Limited, immovable canvas areas cannot be fully utilized; nodes in the same geographical area cluster together and cannot be clearly displayed independently on the topology map, or nodes in the same geographical area cannot be reasonably allocated to appropriate diffusion space for diffusion between nodes; 2) There is no sufficient blank space between nodes in different geographical areas, making it impossible to distinguish between different geographical areas, or the blank space between nodes in different geographical areas is too wide, failing to fully utilize limited canvas resources, resulting in clustered nodes not having enough space to effectively disperse. Furthermore, this method does not require simultaneous adjustment of node areas and corresponding blank areas to achieve the optimal ratio, reducing complexity; and scaling each node area sequentially according to location information does not affect the presentation of the calculation results of the previous node area, thus exhibiting a certain degree of independence.
[0049] In one embodiment, the location distribution map is divided into several intervals, and the number of node intervals allocated to each node group is determined according to a preset node region ratio parameter, including:
[0050] Divide the location distribution map into several horizontal intervals on the x-axis and several vertical intervals on the y-axis, and calculate the proportion of the number of nodes in each node group to the total number of nodes.
[0051] The product of the preset node region ratio parameter, the total number of node groups, and the corresponding ratio is rounded down to obtain the number of horizontal and vertical intervals allocated to the corresponding node groups.
[0052] In one embodiment, determining the number of blank intervals allocated between the current node group and the previous adjacent node group by comparing the node region positions of the current node group and the previous adjacent node group includes:
[0053] Calculate the total width of all node distribution areas mapped onto the x-axis and the total height mapped onto the y-axis.
[0054] If the current node group is geographically separated from the node region of the previous adjacent node group, the separation distance and preset separation control parameters are obtained. Separation refers to the horizontal or vertical node region of the current node group being separated from the node region of the previous adjacent node group. The corresponding separation distance is the separation width of the horizontal node region or the separation height of the vertical node region. By comparing the proportion of the separation distance to the total width or total height, blank intervals in the blank areas are first allocated, mainly to solve the problem of excessive blank intervals occupied by two node groups that are far apart.
[0055] Calculate the product of the phase separation control parameter and the total width or total height.
[0056] When the distance between nodes is not less than the first preset multiple of the product, the number of blank intervals allocated between the current node group and the previous adjacent node group is obtained according to the second preset multiple of the preset blank area ratio parameter.
[0057] When the distance between nodes is less than the first preset multiple of the product but not less than the third preset multiple of the product, the number of blank intervals allocated between the current node group and the previous adjacent node group is obtained according to the fourth preset multiple of the preset blank area ratio parameter.
[0058] When the distance between nodes is less than the third preset multiple of the product, the number of blank intervals allocated between the current node group and the previous adjacent node group is obtained according to the fifth preset multiple of the preset blank area ratio parameter.
[0059] It is understandable that the first preset multiplier is greater than the third preset multiplier, the second preset multiplier is greater than the fourth preset multiplier, and the fourth preset multiplier is greater than the fifth preset multiplier.
[0060] In one embodiment, if the node regions of the current node group and the previous adjacent node group are not separated, the number of blank intervals allocated is 0; not separated means that the horizontal or vertical node regions of the current node group and the previous adjacent node group overlap.
[0061] The condition that the node regions of the current node group and the previous adjacent node group are not separated includes: the node region of the current node group is contained in the node region of the previous adjacent node group, or the node region of the current node group intersects with the node region of the previous adjacent node group.
[0062] In one embodiment, if the node region of the current node group is included in the node region of the previous adjacent node group, the difference between the number of node intervals allocated to the current node group and the number of node intervals allocated to the previous adjacent node group is calculated.
[0063] When the difference is not less than 0, the node interval endpoint of the current node group is obtained based on the difference and the node interval endpoint of the previous adjacent node group.
[0064] When the difference is less than 0, the number of node intervals allocated to the current node group is expanded to be consistent with the number of node intervals allocated to the previous adjacent node group, and the endpoint of the node interval of the current node group is the same as the endpoint of the node interval of the previous adjacent node group.
[0065] In one embodiment, if the node region of the current node group intersects with the node region of the previous adjacent node group, the intersection distance and the preset intersection control parameters are obtained; the intersection distance is the intersection width of the horizontal node region or the intersection height of the vertical node region.
[0066] When the intersection distance is less than the product of the intersection control parameter and the width of the node region of the current node group, the node interval endpoint of the current node group is obtained according to the number of node intervals allocated and the sum of the node interval endpoints of the previous adjacent node group.
[0067] When the intersection distance is not less than the product of the intersection control parameter and the node region width of the current node group, calculate the difference between the number of node intervals allocated to the current node group and the number of node intervals allocated to the previous adjacent node group.
[0068] When the difference is not less than 0, the node interval endpoint of the current node group is obtained based on the difference and the node interval endpoint of the previous adjacent node group.
[0069] When the difference is less than 0, the number of node intervals allocated to the current node group is expanded to be consistent with the number of node intervals allocated to the previous adjacent node group, and the endpoint of the node interval of the current node group is the same as the endpoint of the node interval of the previous adjacent node group.
[0070] In one embodiment, the node interval endpoint includes a horizontal interval endpoint and a vertical interval endpoint;
[0071] Based on the endpoint of the node intervals in the current node group and the number of node intervals allocated, the node region of the current node group is scaled to obtain the optimized node region of the current node group in the topology graph, including:
[0072] Obtain the actual width and actual height of the topology drawing canvas;
[0073] The width of a single horizontal interval is calculated by the ratio of its actual width to the total number of horizontal intervals, and the height of a single vertical interval is calculated by the ratio of its actual height to the total number of vertical intervals. It's understandable that the previous interval division did not determine the specific dimensions of each interval, but rather calculated the proportions of each interval.
[0074] The left endpoint of the optimized horizontal interval of the current node group in the topology graph is obtained by multiplying the difference between the endpoint of the horizontal interval of the current node group and the number of node intervals allocated, and the width of a single horizontal interval. The right endpoint of the optimized horizontal interval is obtained by multiplying the width of a single horizontal interval and the endpoint of the horizontal interval of the current node group.
[0075] The lower endpoint of the optimized vertical interval of the current node group in the topology graph is obtained by multiplying the difference between the endpoint of the vertical interval of the current node group and the number of node intervals allocated, and the width of a single vertical interval. The upper endpoint of the optimized vertical interval is obtained by multiplying the width of a single vertical interval and the endpoint of the vertical interval of the current node group.
[0076] The node region of the current node group is scaled based on the left, right, top, and bottom endpoints to obtain the optimized node region of the current node group in the topology graph.
[0077] As can be seen, this method supports outputting new node layout data for canvases of any custom size.
[0078] 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 in this document, there is no strict order in which these steps are executed, and they can be performed in other orders. Furthermore, 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.
[0079] Here, a specific example will be used to explain the process of this method in detail.
[0080] (1) Obtain geographic location data.
[0081] The geographical coordinates of all radio stations are obtained through the radio network protocol, including the longitude and latitude of each radio station. The data structure is then formed as shown in Table 1 below. Each row of the list represents a radio station node, the first column represents the longitude information, and the second column represents the latitude information.
[0082] Table 1. Radio Station Geographic Location Data
[0083]
[0084] Based on the original geographical data of each radio station (Table 1), the effect is plotted on a two-dimensional canvas, as shown below. Figure 2 As shown. From Figure 2 As can be seen from the data, there are a total of 18 self-organizing network stations in this case, distributed in 5 different geographical regions. The stations in regions 3 and 4 are very dense and need to be spread out. Regions 3 and 4 are far apart and occupy a lot of space, so the two regions need to be brought closer together. Region 5 has only one node and does not need to occupy scaling space.
[0085] (2) Data standardization processing
[0086] After standardizing the data obtained in the first step, it conforms to a distribution with a mean of 0 and a variance of 1.
[0087] The processing steps are as follows:
[0088] a. Calculate the arithmetic mean (mathematical expectation) and standard deviation of the longitude and latitude characteristics respectively;
[0089] b. Standardize the process:
[0090] New longitude data = (Original longitude data – Longitude mean) / Longitude standard deviation
[0091] New latitude data = (Original latitude data – Latitude mean) / Latitude standard deviation
[0092] After processing, a two-dimensional list (named scaleds) is obtained, where the first column is the data after standardization of longitude feature values (named xaxis), the second column is the data after standardization of latitude feature values (named yaxis), and each row represents the data of a radio station node.
[0093] After standardizing the data in Table 1, we obtain the standardized data in Table 2.
[0094] Table 2. Data after standardization
[0095]
[0096] The effect of drawing on a two-dimensional canvas based on standardized data, such as Figure 3 As shown. Combined with Figure 3 As can be seen from Table 1, the previously large latitude and longitude data have been transformed into a distribution with a mean of 0 and a variance of 1. The dimensional differences between latitude and longitude have been eliminated, and at the same time, they are consistent with... Figure 2 Compared to the previous method, the relative positions of the nodes were not changed, meaning that the geographical location information was preserved.
[0097] (3) Node grouping
[0098] This step utilizes a classification algorithm to group nodes across different geographical regions. Given the application scenario, when the geographic location data of each radio station is obtained, it's unknown how many geographical regions each station is assigned to, nor is it possible to verify the accuracy of the classification results. Therefore, an unsupervised classification algorithm is required, and the total number of categories cannot be predetermined. In this method, the DBSCAN algorithm, a density-based clustering algorithm, is chosen. (Most other clustering methods cluster based on distance between objects, resulting in spherical clusters.) Density-based clustering identifies high-density regions separated by low-density regions (a cluster is defined as the largest set of density-connected points). It can divide regions with sufficiently high density into clusters and can discover clusters of arbitrary shapes in noisy spatial databases.
[0099] This algorithm utilizes the idea of density-based clustering, which requires that the number of objects contained within a certain region of the cluster space is not less than a given threshold. Therefore, this algorithm requires two input parameters:
[0100] Parameter 1: Neighborhood radius of the core object: Eps
[0101] Parameter 2: Minimum number of points within the neighborhood radius: MinPts
[0102] If the number of points in the neighborhood of point P with radius Eps is not less than MinPts, then point P is called a core point. If MinPts remains unchanged, and Eps is too large, most points will cluster together in the same cluster. If Eps is too small, it will cause a cluster to split. If Eps remains unchanged, and MinPts is too large, points in the same cluster will be marked as noise points. If MinPts is too small, a large number of core points will be found.
[0103] After extensive testing, the best default parameter values were determined to be:
[0104] Eps = 0.2
[0105] MinPts = 1
[0106] Setting MinPts to 1 allows us to categorize cases where a geographic region has only one node.
[0107] After configuring the parameters, input the scaleds data obtained from the standardization process in step 2 into the DBSCAN algorithm to obtain a one-dimensional list (named cluster). Each value in cluster corresponds to a node in scaleds, representing the group ID of that node. Therefore, merge scaleds and cluster in the column direction to obtain a new three-dimensional list (named group_data), and name the column containing the cluster data as group.
[0108] After classifying the data in Table 2, the cluster list data is obtained as follows:
[0109] [0,0,0,0,1,1,2,2,1,1,1,1,3,3,4,3,3,3]
[0110] It can be seen that in the cluster, the 18 self-organizing network nodes are divided into 5 groups, represented by id (0 to 4); then the scaleds list in (2) is merged with the cluster in the column direction to obtain the group_data list, as shown in Table 3 below:
[0111] Table 3. Data after classification
[0112]
[0113] Based on the categorized data, i.e., Table 3, a two-dimensional canvas is plotted, where each point is colored with five different colors according to its group ID feature value, such as... Figure 4 As shown. From Figure 4 As can be seen, the points in each region have been accurately identified, and isolated points at a distance have been marked as a separate group, successfully achieving the purpose of grouping.
[0114] (4) Adaptive region division
[0115] (3) Each node in the ad hoc network is grouped according to geographical region. Next, it is necessary to allocate a reasonable scaling interval to each geographical region, that is, to divide the scaling area of each node group and the proportion of the interval between each group. Note that this step does not determine the specific size of each interval, but calculates the ratio of each interval.
[0116] Since the data units of the xaxis and yaxis columns in the group_data list have been standardized, xaxis can be mapped to the x-axis and yaxis to the y-axis. Using the same interval partitioning algorithm, the data on the x-axis and y-axis can be partitioned into intervals respectively, reducing the two-dimensional interval partitioning to one-dimensional, thus simplifying the algorithm.
[0117] Since the interval partitioning algorithms for the x-axis and y-axis are exactly the same, the following explanation uses the x-axis as an example to illustrate the interval partitioning algorithm:
[0118] a. Data preparation:
[0119] The `group_data` list is grouped by the `group` column, and the maximum value `xmax`, minimum value `xmin`, and number of nodes `count` for each group are calculated. This results in a new list `data_group_mm_xaxis` with three columns: `xmin`, `xmax`, and `count`. Each row represents a group, and the number of rows equals the total number of groups. Each row has a key value, which is the group's ID.
[0120] Finally, sort the data_group_mm_xaxis by column xmin (minimum value) from smallest to largest. This way, when allocating intervals in the next step, the allocation will start from the leftmost end of the x-axis and proceed to the right.
[0121] After processing the group_data data in Table 3 as described above, the data_group_mm_xaxis data in Table 4 is obtained as follows:
[0122] Table 4 Grouped Extreme Values Table
[0123]
[0124] b. Parameter settings:
[0125] delta_obtain: Controls the allocation when two adjacent groups have overlapping regions.
[0126] duration_obtain: Controls the allocation of time intervals between two adjacent packets.
[0127] contant_scale_factor: Controls the proportion of intervals with nodes.
[0128] blank_scale_factor: Controls the percentage of interval ranges.
[0129] After extensive testing, these parameters work best when set to the following values:
[0130] delta_obtain = 0.2
[0131] duration_obtain = 0.2
[0132] contant_scale_factor = 300
[0133] blank_scale_factor = 50.
[0134] c. Interval partitioning
[0135] The data_group_mm_xaxis is iterated through one by one, that is, intervals are allocated according to the maximum value xmax, minimum value xmin, and the number of nodes count for each interval, according to the following rules:
[0136] The entire x-axis is divided into several small intervals. Each group is allocated an average of `contant_scale_factor` intervals to place the nodes, and each blank interval is allocated an average of `blank_scale_factor` intervals to serve as the spacing between groups. Therefore, the ratio between `contant_scale_factor` and `blank_scale_factor` determines the proportion of blank areas and node-containing areas. The specific allocation of each group and blank interval is as follows:
[0137] 1) Based on the proportion of the current group's nodes to the total number of nodes, obtain the number of intervals (one_scale_factor) that the current group should be assigned from the current_scale_factor intervals. The calculation formula is as follows:
[0138] one_scale_factor = round(contant_scale_factor Total number of groups (Number of nodes in the current group / Total number of nodes)
[0139] 2) By comparing the position of the current group with that of the previous adjacent group on the x-axis, the endpoint of the interval assigned to the current group and the size of the interval to be assigned between the two adjacent groups are determined. This endpoint is named xrange_index.
[0140] Since the data_group_mm_xaxis has already been sorted by the minimum value xmin in step (1), the minimum value xmin of the previous adjacent group must be to the left of the minimum value xmin of the current group. Therefore, there are several ways to determine the endpoint of the interval:
[0141] Case 1: During the first traversal, there are no adjacent groups to compare. The first group's interval starts at 0, and the endpoint xrange_index is equal to the interval width one_scale_factor assigned to this group.
[0142] Scenario 2: If the group is disjoint from the previous adjacent group, the interval is allocated first by comparing the proportion of the disjoint distance to the total width of group_data mapped to the x-axis, and then the endpoint of the current group's interval is allocated. This mainly solves the problem of two groups being far apart and occupying too much blank interval space.
[0143] When the distance width is greater than or equal to (2) duration_obtain When group_data is mapped to the total width of the x-axis:
[0144] First, allocate 7 times the blank_scale_factor of small intervals as the interval intervals, and then start allocating intervals for the current group. The calculation formula is as follows:
[0145] xrange_index (endpoint) = (xrange_index of the previous group) + (1 one_scale_factor) +(7 blank_scale_factor)
[0146] When the distance width is greater than or equal to (duration_obtain) When group_data is mapped to the total width of the x-axis:
[0147] First, allocate 6 times the blank_scale_factor of smaller intervals as the intervals, and then start allocating the current interval. The calculation formula is as follows:
[0148] xrange_index = (xrange_index of the previous group) + (1 one_scale_factor) + (6 blank_scale_factor)
[0149] In other cases where the distance between adjacent segments is not too great, we can first allocate three times the blank_scale_factor of smaller intervals as the intervals, and then start allocating the current interval. The calculation formula is as follows:
[0150] xrange_index = (xrange_index of the previous group) + one_scale_factor + (3 blank_scale_factor)
[0151] Case 3: If the current group is contained within the previous adjacent group, then the same interval is assigned to the current group, and xrange_index remains unchanged.
[0152] However, there is a special case where the number of nodes in the current group exceeds the number of nodes in the previous adjacent group, meaning the one_scale_factor of the previous adjacent group is less than the one_scale_factor of the current group; in this case, xrange_index needs to be expanded to the current region, calculated as follows:
[0153] xrange_index = (xrange_index of the previous group) + (one_scale_factor – one_scale_factor of the previous group)
[0154] Case 4: The case intersects with the previous adjacent group. In this case, the determination depends on the size of the intersecting interval.
[0155] When the width of the intersecting interval is less than delta_obtain times the width of the current group, the intersecting interval accounts for a small proportion of the total width of the current group. In this case, the current group is assigned to the next interval without adding an intermediate interval. The calculation formula is as follows:
[0156] xrange_index = (xrange_index of the previous group) + one_sc ale_factor
[0157] In other cases, the width of the intersecting interval is relatively large compared to the total width of the current group. Therefore, the current group and the previous group are assigned to the same interval, and xrange_index remains unchanged. However, similar to case 3, there is a special case where the number of nodes in the current group exceeds the number of nodes in the previous adjacent group (i.e., the one_scale_factor of the previous adjacent group is less than the one_scale_factor of the current group). In this case, xrange_index needs to be expanded to the current region, calculated as follows:
[0158] xrange_index = (xrange_index of the previous group) + (one_scale_factor – one_scale_factor of the previous group)
[0159] d. Store the endpoint position `xrange_index` and the allocated interval width `one_scale_factor`. In `data_group_mm_xaxis`, add two new columns: endpoint position `xrange_index` and interval size `xrange_duration`.
[0160] Example: After processing the data_group_mm_xaxis data in Table 4 as described above, the data_group_mm_xaxis data in Table 5 is obtained as follows:
[0161] Table 5 x-axis interval allocation table
[0162]
[0163] Using the same algorithm as above, the interval allocation list data_group_mm_yaxis in the y-axis direction can be obtained: After mapping the group_data data in Table 3 to the y-axis and processing it using the interval partitioning algorithm described above, the data_group_mm_yaxis data in Table 6 is obtained as follows:
[0164] Table 6. Y-axis Interval Allocation Table
[0165]
[0166] (5) Independent scaling of each area
[0167] Input the lengths of the x-axis and y-axis of the actual canvas. These can be set arbitrarily according to the actual canvas size. Then, divide the actual canvas coordinate axes into equal parts based on the total number of small intervals obtained in step 4. This yields the actual lengths of a single small interval on the x-axis and y-axis, respectively: x_one_duration and y_one_duration. The calculation formula is:
[0168] x_one_duration = total length of the x-axis / total score of the intervals divided by the x-axis;
[0169] y_one_duration = total length of the y-axis / total score of the intervals divided by the y-axis;
[0170] The group_data list in (3) is traversed according to the group column, that is, all node data belonging to this group are traversed each time. Then, this group of data is scaled to the interval allocated in (4) using a normalization algorithm to achieve the effect of spreading the points of the same group as much as possible within the given area. The specific steps are as follows:
[0171] Calculate the scaling range coordinates of the current group on the canvas using the following formula:
[0172] The interval (x_min, x_max) on the x-axis =
[0173] (x_one_duration (xrange_index - xrange_duration), x_one_duration xrange_index)
[0174] The interval (y_min, y_max) on the Y-axis =
[0175] (y_one_duration (yrange_index - yrange_duration), y_one_duration yrange_index)
[0176] Based on the scaling interval calculated in step (a), the (xaxis, yaxis) of each node are normalized and scaled along the x-axis and y-axis respectively. The scaling calculation formula is as follows:
[0177] Applying this to each column, max is the maximum value of a column, min is the minimum value of a column, then X'' is the final result, mx and mi are the default values of the specified interval, and (mx, mi) is (x_min, x_max) in step (a);
[0178] The y-axis is calculated in exactly the same way as the x-axis.
[0179] By following the steps above, you can obtain the new coordinates of all points in the current group on the canvas.
[0180] (6) Store the result data
[0181] The new coordinate data of each node calculated in step 5 is stored in the list trans, and a group ID information is added. The data structure of trans is: [x, y, group]. Then the trans data is passed to the topology graph drawing module to draw a topology graph that not only contains location information but also can be grouped according to color.
[0182] Example: Set the canvas size to a total x-axis length of 100 and a total y-axis length of 100; after processing the group_data list from step 3 through steps 4 and 5, obtain the trans result list, as shown in Table 7 below:
[0183] Table 7 Final Results Data Table
[0184]
[0185] Based on the final data, i.e., Table 7, a two-dimensional canvas is created, where each point is painted with five different colors according to the group ID feature value, such as... Figure 5 As shown.
[0186] from Figure 5 It can be seen that the relative geographical location information of each node has not changed, the clustered nodes have been successfully separated by a sufficient distance, a certain proportion of blank intervals are maintained between nodes in different geographical areas, and each node is intuitively distinguished by color.
[0187] (7) Optimize and make up for deficiencies
[0188] The trans data obtained in step 6 is passed to the topology graph drawing module. The topology graph drawing module will draw the nodes on the canvas of the size specified in step 5, with the x-axis coordinate of the trans feature value and the y-axis coordinate. The nodes are colored according to the feature value group. Nodes with the same group value are considered to be in the same group and will be colored with the same color. At the same time, each node of the topology graph can be manually dragged by the user.
[0189] In this way, when there is insufficient canvas space and too many nodes, resulting in insufficient blank space between different groups, the different colors of the different groups can make it very intuitive to see the nodes of different geographical areas. When there is insufficient canvas space and too many nodes within a group, resulting in some nodes not being able to be fully dispersed, the user can manually drag the nodes to separate the nodes that are close to each other.
[0190] In one embodiment, such as Figure 6 As shown, a self-organizing network topology map layout device is provided, including: a location distribution map calculation module 602, a node interval allocation quantity calculation module 604, a blank interval allocation quantity calculation module 606, a node interval endpoint calculation module 608, and a node area scaling module 610, wherein:
[0191] The location distribution map calculation module 602 is used to obtain the standardized location information of all nodes in the ad hoc network, and to perform density-based clustering on multiple nodes based on the standardized location information to obtain the location distribution map of the node groups; the standardized location information includes standardized longitude and standardized latitude; the location distribution map contains multiple node regions and blank areas between adjacent node groups; each node group corresponds to a node region;
[0192] The node interval allocation number calculation module 604 is used to divide the location distribution map into several intervals and determine the number of node intervals allocated to each node group according to the preset node area ratio parameter.
[0193] The blank interval allocation quantity calculation module 606 is used to determine the blank interval allocation quantity between the current node group and the previous adjacent node group by comparing the node area positions of the current node group and the previous adjacent node group in the location distribution map; wherein the minimum standardized longitude or minimum standardized latitude in the previous adjacent node group is not greater than the minimum standardized longitude or minimum standardized latitude in the current node group.
[0194] The node interval endpoint calculation module 608 is used to obtain the node interval endpoint of the current node group based on the number of node intervals allocated, the number of blank intervals allocated, and the node interval endpoint of the previous adjacent node group.
[0195] The node region scaling module 610 is used to scale the node region of the current node group according to the node interval endpoint and the number of node intervals allocated to the current node group, so as to obtain the optimized node region of the current node group in the topology graph.
[0196] Specific limitations regarding the ad hoc network topology layout device can be found in the limitations of the ad hoc network topology layout method described above, and will not be repeated here. Each module in the aforementioned ad hoc network topology layout device 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.
[0197] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 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 a self-organizing network topology layout method. The display screen can be an LCD screen or an e-ink 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.
[0198] Those skilled in the art will understand that Figure 7 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.
[0199] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method described above.
[0200] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0201] 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. When executed, the computer program 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 may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of 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.
[0202] 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.
[0203] 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 layouting a self-organizing network topology, characterized in that, The method includes: Obtain standardized location information of all nodes in the ad hoc network, and perform density-based clustering on multiple nodes based on the standardized location information to obtain a location distribution map of node groups; the standardized location information includes standardized longitude and standardized latitude, and the standardized longitude and standardized latitude have the same data units; the location distribution map contains multiple node regions and blank areas between adjacent node groups; each node group corresponds to one node region; The location distribution map is divided into several intervals. The number of node intervals allocated to each node group is determined according to the preset node area ratio parameter. Dividing the map into several intervals is used to reduce the two-dimensional interval division to a one-dimensional interval. The interval division algorithm is exactly the same in the longitude and latitude directions. In the location distribution map, the number of blank intervals allocated between the current node group and the previous adjacent node group is determined by comparing the node region positions of the current node group and the previous adjacent node group; wherein the minimum standardized longitude or minimum standardized latitude in the previous adjacent node group is not greater than the minimum standardized longitude or minimum standardized latitude in the current node group. The node interval endpoint of the current node group is obtained based on the number of node intervals allocated, the number of blank intervals allocated, and the node interval endpoint of the previous adjacent node group. Based on the endpoint of the node interval and the number of node intervals allocated to the current node group, the node region of the current node group is scaled to obtain the optimized node region of the current node group in the topology graph.
2. The method according to claim 1, characterized in that, The location distribution map is divided into several intervals, and the number of node intervals allocated to each node group is determined according to a preset node region ratio parameter, including: The location distribution map is divided into several horizontal intervals on the x-axis and several vertical intervals on the y-axis. Calculate the proportion of nodes in each node group to the total number of nodes; The product of the preset node region ratio parameter, the total number of node groups, and the corresponding ratio is rounded to obtain the horizontal interval allocation number and vertical interval allocation number of the corresponding node group; the node region ratio parameter is the average of the horizontal interval allocation number or the vertical interval allocation number of the node group.
3. The method according to claim 2, characterized in that, By comparing the node region positions of the current node group with those of the previous adjacent node group, the number of blank intervals allocated between the current node group and the previous adjacent node group is determined, including: Calculate the total width of all node distribution areas mapped onto the x-axis and the total height mapped onto the y-axis, respectively; If the current node group is separated from the node region of the previous adjacent node group, obtain the separation distance and the preset separation control parameters; separation means that the current node group is separated from the horizontal or vertical node region of the previous adjacent node group, and the corresponding separation distance is the separation width of the horizontal node region or the separation height of the vertical node region. Calculate the product of the phase separation control parameter and the total width or the total height; When the distance between the nodes is not less than the first preset multiple of the product, the number of blank intervals allocated between the current node group and the previous adjacent node group is obtained according to the second preset multiple of the preset blank area ratio parameter. When the distance between the nodes is less than a first preset multiple of the product but not less than a third preset multiple of the product, the number of blank intervals allocated between the current node group and the previous adjacent node group is obtained according to a fourth preset multiple of the preset blank area ratio parameter. When the distance between nodes is less than the third preset multiple of the product, the number of blank intervals allocated between the current node group and the previous adjacent node group is obtained according to the fifth preset multiple of the preset blank area ratio parameter.
4. The method according to claim 2, characterized in that, The method of determining the number of blank intervals allocated between the current node group and the previous adjacent node group by comparing the node region positions of the current node group and the previous adjacent node group also includes: If the node region of the current node group is not separated from the node region of the previous adjacent node group, the number of blank intervals allocated is 0; not separated means that there is an overlap between the horizontal or vertical node regions of the current node group and the previous adjacent node group.
5. The method according to claim 4, characterized in that, The condition that the node regions of the current node group and the previous adjacent node group are not separated includes: the node region of the current node group is contained in the node region of the previous adjacent node group, or the node region of the current node group intersects with the node region of the previous adjacent node group.
6. The method according to claim 5, characterized in that, The node interval endpoint of the current node group is obtained based on the number of node intervals allocated, the number of blank intervals allocated, and the node interval endpoint of the previous adjacent node group, including: If the node region of the current node group is contained in the node region of the previous adjacent node group, calculate the difference between the number of node intervals allocated to the current node group and the number of node intervals allocated to the previous adjacent node group. When the difference is not less than 0, the node interval endpoint of the current node group is obtained based on the difference and the node interval endpoint of the previous adjacent node group. When the difference is less than 0, the number of node intervals allocated in the current node group is expanded to be consistent with the number of node intervals allocated in the previous adjacent node group, and the endpoint of the node interval in the current node group is the same as the endpoint of the node interval in the previous adjacent node group.
7. The method according to claim 5, characterized in that, The node interval endpoint of the current node group is obtained based on the number of node intervals allocated, the number of blank intervals allocated, and the node interval endpoint of the previous adjacent node group, including: If the node region of the current node group intersects with the node region of the previous adjacent node group, obtain the intersection distance and the preset intersection control parameters; the intersection distance is the intersection width of the horizontal node region or the intersection height of the vertical node region. When the intersection distance is less than the product of the intersection control parameter and the node region width of the current node group, the node interval endpoint of the current node group is obtained according to the number of node intervals allocated and the sum of the node interval endpoints of the previous adjacent node group. When the intersection distance is not less than the product of the intersection control parameter and the node region width of the current node group, calculate the difference between the number of node intervals allocated to the current node group and the number of node intervals allocated to the previous adjacent node group. When the difference is not less than 0, the node interval endpoint of the current node group is obtained based on the difference and the node interval endpoint of the previous adjacent node group. When the difference is less than 0, the number of node intervals allocated in the current node group is expanded to be consistent with the number of node intervals allocated in the previous adjacent node group, and the endpoint of the node interval in the current node group is the same as the endpoint of the node interval in the previous adjacent node group.
8. The method according to claim 2, characterized in that, The endpoint of the node interval includes the endpoint of the horizontal interval and the endpoint of the vertical interval; Based on the endpoint of the node intervals in the current node group and the number of node intervals allocated, the node region of the current node group is scaled to obtain the optimized node region of the current node group in the topology graph, including: Obtain the actual width and actual height of the topology drawing canvas; The width of a single horizontal interval is obtained by the ratio of the actual width to the total number of horizontal intervals, and the height of a single vertical interval is obtained by the ratio of the actual height to the total number of vertical intervals. The left endpoint of the optimized horizontal interval of the current node group in the topology graph is obtained by multiplying the difference between the endpoint of the horizontal interval of the current node group and the number of node intervals allocated, and the width of the single horizontal interval. The right endpoint of the optimized horizontal interval is obtained by multiplying the width of the single horizontal interval and the endpoint of the horizontal interval of the current node group. The lower endpoint of the optimized vertical interval of the current node group in the topology graph is obtained by multiplying the difference between the endpoint of the vertical interval of the current node group and the number of node intervals allocated, and the height of the single vertical interval. The upper endpoint of the optimized vertical interval is obtained by multiplying the height of the single vertical interval and the endpoint of the vertical interval of the current node group. The node region of the current node group is scaled based on the left endpoint, right endpoint, top endpoint, and bottom endpoint to obtain the optimized node region of the current node group in the topology graph.
9. A self-organizing network topology layout device, characterized in that, The device includes: The location distribution map calculation module is used to obtain the standardized location information of all nodes in the ad hoc network, and to perform density-based clustering on multiple nodes based on the standardized location information to obtain a location distribution map of node groups; the standardized location information includes standardized longitude and standardized latitude, and the standardized longitude and standardized latitude have the same data units; the location distribution map contains multiple node regions and blank areas between adjacent node groups; each node group corresponds to one node region; The node interval allocation number calculation module is used to divide the location distribution map into several intervals and determine the number of node intervals allocated to each node group according to the preset node area ratio parameter; dividing into several intervals is used to reduce the two-dimensional interval division to a one-dimensional interval, and the interval division algorithm is exactly the same in the longitude and latitude directions. The blank interval allocation quantity calculation module is used to determine the blank interval allocation quantity between the current node group and the previous adjacent node group by comparing the node region positions of the current node group and the previous adjacent node group in the location distribution map; wherein the minimum standardized longitude or minimum standardized latitude in the previous adjacent node group is not greater than the minimum standardized longitude or minimum standardized latitude in the current node group. The node interval endpoint calculation module is used to obtain the node interval endpoint of the current node group based on the number of node intervals allocated, the number of blank intervals allocated, and the node interval endpoint of the previous adjacent node group. The node region scaling module is used to scale the node region of the current node group according to the node interval endpoint and the number of node intervals allocated to the current node group, so as to obtain the optimized node region of the current node group in the topology graph.
10. 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 8.