Network topology determination method and device, computer equipment and storage medium
By clustering network nodes and determining the center position of the target node cluster, the problem of too close distance caused by randomly generated nodes is solved, and the authenticity and efficiency of the simulated communication network are improved.
Patent Information
- Application Number
- CN202411168598.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-13
AI Technical Summary
The network nodes generated by the existing random network topology model cannot control density and spacing, which affects the authenticity of the simulated communication network.
By clustering the candidate network nodes in the target area, a preset number of target node clusters are obtained, and the target network nodes are determined according to the center position of the cluster, and the network topology structure is determined, avoiding the node distance too close due to random generation. question.
It realizes network node deployment that is more in line with the actual situation, reduces construction costs, and improves the authenticity and forwarding efficiency of the simulated communication network.
Smart Images

Figure CN119135546A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network technology and security, and in particular to a method, apparatus, computer equipment and storage medium for determining network topology. Background Art
[0002] In research on routing simulation, traffic scheduling, path planning, etc., because building a real network topology test environment is costly and not flexible enough, graph models in graph theory are generally used to simulate actual communication networks.
[0003] The existing technology can realize random generation of network topology through random network topology model. However, the random network topology model generates network nodes in a random manner, so the density and spacing of network nodes cannot be controlled. However, nodes that are too close do not conform to the actual situation of the network, affecting the authenticity of the simulated communication network. Summary of the invention
[0004] Based on this, it is necessary to provide a network topology determination method, apparatus, computer equipment and storage medium that can ensure the communication authenticity of a simulated communication network in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for determining a network topology. The method comprises:
[0006] Perform clustering on the candidate network nodes contained in the target area to obtain a preset number of target node clusters;
[0007] According to the central position of the cluster center of each target node cluster, the target network node corresponding to each target node cluster is determined;
[0008] The network topology structure of the target area is determined according to the target network nodes and the topological connection relationship between the target network nodes.
[0009] In one embodiment, clustering the candidate network nodes contained in the target area to obtain a preset number of target node clusters includes:
[0010] Get a preset number of initial cluster parameters;
[0011] For each initial cluster parameter, based on the likelihood function, according to the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameter and the initial cluster parameter, determine the likelihood function value;
[0012] Determining target cluster parameters according to the likelihood function value and the initial cluster parameters;
[0013] The target node cluster is determined from each candidate network node according to the target cluster parameter.
[0014] In one embodiment, determining the target cluster parameters according to the likelihood function value and the initial cluster parameters includes:
[0015] If the likelihood function value meets the preset function value convergence condition, the initial cluster parameters are used as target cluster parameters.
[0016] In one embodiment, the method further comprises:
[0017] If the likelihood function value does not meet the function value convergence condition, the initial cluster parameters are updated to obtain new initial cluster parameters, and based on the new initial cluster parameters, the step of returning to execute the likelihood function based on the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameters and the initial cluster parameters is determined.
[0018] In one of the embodiments, the initial cluster parameters include: at least one of an initial mixing coefficient, an initial mean vector, and an initial covariance matrix.
[0019] In one of the embodiments, determining the target network node corresponding to each target node cluster according to the center position of the cluster center of each target node cluster includes:
[0020] For each target node cluster, determining the interval distance between the node position of each candidate network node and the central position;
[0021] The candidate network node corresponding to the minimum interval distance is used as the target network node corresponding to the target node cluster.
[0022] In one of the embodiments, determining the target network node corresponding to each target node cluster according to the center position of the cluster center of each target node cluster includes:
[0023] For each target node cluster, the center position of the cluster center of the target node cluster is used as the node position of the target network node corresponding to the target node cluster;
[0024] According to the node position, a target network node corresponding to the target node cluster is determined from the target area.
[0025] In a second aspect, the present application also provides a network topology determination device. The device comprises:
[0026] A clustering module is used to cluster the candidate network nodes contained in the target area to obtain a preset number of target node clusters;
[0027] A first determination module is used to determine the target network node corresponding to each target node cluster according to the center position of the cluster center of each target node cluster;
[0028] The second determining module is used to determine the network topology structure of the target area according to each target network node and the topological connection relationship between each target network node.
[0029] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0030] Perform clustering on the candidate network nodes contained in the target area to obtain a preset number of target node clusters;
[0031] According to the central position of the cluster center of each target node cluster, the target network node corresponding to each target node cluster is determined;
[0032] The network topology structure of the target area is determined according to the target network nodes and the topological connection relationship between the target network nodes.
[0033] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0034] Perform clustering on the candidate network nodes contained in the target area to obtain a preset number of target node clusters;
[0035] According to the central position of the cluster center of each target node cluster, the target network node corresponding to each target node cluster is determined;
[0036] The network topology structure of the target area is determined according to the target network nodes and the topological connection relationship between the target network nodes.
[0037] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0038] Perform clustering on the candidate network nodes contained in the target area to obtain a preset number of target node clusters;
[0039] According to the central position of the cluster center of each target node cluster, the target network node corresponding to each target node cluster is determined;
[0040] The network topology structure of the target area is determined according to the target network nodes and the topological connection relationship between the target network nodes.
[0041] The above-mentioned network topology determination method, device, computer equipment and storage medium obtain a preset number of target node clusters by clustering candidate network nodes, and determine the target network nodes corresponding to each target node cluster based on the central position of the cluster center of each target node cluster, and then determine the network topology structure of the target area based on the topological connection relationship between each target network node and each target network node. According to the above content, it can be seen that in the process of determining the network topology results, the present application does not adopt the method of randomly generating target network nodes in the prior art, but clusters the randomly generated candidate network nodes in the target area, and then determines the target network nodes corresponding to each target node cluster according to the preset number of target node clusters obtained by clustering; since each target node cluster can only determine one corresponding target network node, therefore, compared with the method of randomly generating target network nodes in the prior art, the present application can effectively avoid the problem of the distance between two target network nodes being too close. Since in the actual network communication environment, each network node has its coverage service range, therefore, considering the construction cost and forwarding efficiency, new network nodes are usually not set up within the coverage range of the network node. Therefore, the target network nodes determined by the present application are more in line with the actual situation of network node deployment, and the authenticity of the simulated communication network is ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 An application environment diagram of a network topology determination method provided in an embodiment of the present application;
[0043] Figure 2 A schematic diagram of a flow chart of a first network topology determination method provided in an embodiment of the present application;
[0044] Figure 3 A schematic diagram of a flow chart of a second network topology determination method provided in an embodiment of the present application;
[0045] Figure 4 A schematic diagram of a flow chart of a third network topology determination method provided in an embodiment of the present application;
[0046] Figure 5 A schematic diagram of a flow chart of a fourth network topology determination method provided in an embodiment of the present application;
[0047] Figure 6 A schematic diagram of a flow chart of a fifth network topology determination method provided in an embodiment of the present application;
[0048] Figure 7 A structural block diagram of a network topology determination device provided in an embodiment of the present application;
[0049] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] The network topology determination method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. By clustering the candidate network nodes, a preset number of target node clusters are obtained, and the target network nodes corresponding to each target node cluster are determined according to the central position of the cluster center of each target node cluster, and then, according to the topological connection relationship between each target network node and each target network node, the network topology structure of the target area is determined. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0052] In one embodiment, Figure 2 As shown, a network topology determination method is provided, and the method is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:
[0053] S201, clustering the candidate network nodes contained in the target area to obtain a preset number of target node clusters.
[0054] Among them, candidate network nodes refer to data points randomly generated in the target area.
[0055] It should be noted that when a preset number of target node clusters needs to be determined, multiple candidate network nodes may be randomly generated in the target area in advance, and the preset number of target node clusters may be obtained by clustering the candidate network nodes.
[0056] In one embodiment of the present application, when clustering processing is required for each candidate network node, the node positions of the candidate network nodes can be determined in advance, and based on the interval distance between the node positions of each candidate network node, two candidate network nodes with an interval distance less than a preset distance threshold are taken as candidate network nodes in the same target node cluster, thereby achieving clustering processing for each candidate network node.
[0057] Specifically, in order to prevent the number of target node clusters obtained by clustering from being not equal to a preset number threshold, the maximum number of candidate network nodes included in each target node cluster can be specified; if the number of candidate network nodes included in a target node cluster is greater than the maximum number of candidate network nodes, the distance threshold corresponding to the target node cluster can be lowered so that the number of candidate network nodes included in the target node cluster is equal to the maximum number of candidate network nodes; if the number of candidate network nodes included in a target node cluster is less than the maximum number of candidate network nodes, the distance threshold corresponding to the target node cluster can be increased so that the number of candidate network nodes included in the target node cluster is equal to the maximum number of candidate network nodes.
[0058] Further explanation: in order to ensure that a preset number of target node clusters can be successfully clustered, the quantity correspondence between the candidate network nodes and the target node clusters can be pre-specified. Then, when it is necessary to obtain a preset number of target node clusters, the quantity correspondence can be used to determine the number of candidate network nodes required when the preset number of target node clusters is required.
[0059] In another embodiment of the present application, if the quantitative correspondence between candidate network nodes and target node clusters is predetermined to be 1:50, this quantitative correspondence indicates that when a target node cluster needs to be acquired, fifty candidate network nodes need to be randomly generated in the target area. If the preset number corresponding to the target node cluster is five, two hundred and fifty candidate network nodes need to be randomly generated in the target area.
[0060] S202: Determine the target network node corresponding to each target node cluster according to the center position of the cluster center of each target node cluster.
[0061] In one embodiment of the present application, when it is necessary to determine the target network node corresponding to each target node cluster, the candidate network node closest to the center position can be selected as the target network node from the candidate network nodes in each target node cluster based on the center position of the cluster center of each target node cluster.
[0062] In another embodiment of the present application, when it is necessary to determine the target network node corresponding to each target node cluster, the center position of the cluster center of each target node cluster can be directly used as the target network node position corresponding to each target node cluster, and then, based on the target network node position, the target network node corresponding to each target node cluster can be determined.
[0063] S203: Determine the network topology structure of the target area according to the target network nodes and the topological connection relationship between the target network nodes.
[0064] It should be noted that, since the topological connection relationship between each target network node refers to the topological connection line connecting each target network node, when it is necessary to determine the topological connection relationship between each target network node, the network parameters corresponding to each target network node can be determined, and then the network parameters are substituted into the calculation formula (1) to obtain the topological connection relationship between each target network node output by the calculation formula (1), wherein the calculation formula (1) is as follows:
[0065] (1)
[0066] Wherein, α>0, β≤1; further, α refers to the ratio between long topological links and short topological links; β refers to the network degree; l(u, v) refers to the geometric distance between the target network node u and the target network node v; L refers to the maximum distance between each target network node; k refers to a preset constant; V refers to the number of target network nodes; Refers to the network degree.
[0067] It is further explained that by determining the topological connection relationship between each target network node and each target network node, and then realizing the topological connection relationship between each target network node and each target network node, each target network node is connected in sequence using topological connections, thereby obtaining the network topology structure of the target area.
[0068] The above network topology determination method obtains a preset number of target node clusters by clustering candidate network nodes, and determines the target network nodes corresponding to each target node cluster according to the central position of the cluster center of each target node cluster, and then determines the network topology structure of the target area according to the topological connection relationship between each target network node and each target network node. According to the above content, the present application does not adopt the method of randomly generating target network nodes in the prior art in the process of determining the network topology result, but clusters the randomly generated candidate network nodes in the target area, and then determines the target network nodes corresponding to each target node cluster according to the preset number of target node clusters obtained by clustering; since each target node cluster can only determine one corresponding target network node, therefore, compared with the method of randomly generating target network nodes in the prior art, the present application can effectively avoid the problem of the distance between two target network nodes being too close, because in the actual network communication environment, each network node has its covered service range, so considering the construction cost and forwarding efficiency, new network nodes are usually not set up within the coverage range of the network node, therefore, the target network nodes determined by the present application are more in line with the actual situation of network node deployment, and the authenticity of the simulated communication network is guaranteed.
[0069] In one embodiment, if Figure 3 As shown, when it is necessary to cluster the candidate network nodes contained in the target area to obtain a preset number of target node clusters, the following contents may be specifically included:
[0070] S301, obtaining a preset number of initial cluster parameters.
[0071] The initial cluster parameters include: at least one of an initial mixing coefficient, an initial mean vector, and an initial covariance matrix.
[0072] In one embodiment of the present application, when a preset number of initial cluster parameters need to be obtained, the initial mixing coefficient, the initial mean vector and the initial covariance matrix in the initial cluster parameters may be obtained in a randomly generated form.
[0073] S302 , for each initial cluster parameter, based on a likelihood function, determining a likelihood function value according to the probability that each candidate network node in the target area belongs to the target node cluster corresponding to the initial cluster parameter and the initial cluster parameter.
[0074] It should be noted that, in order to further ensure the subsequent clustering effect for the target node cluster and prevent improper node generation distribution, a penalty term can be introduced into the likelihood function to optimize the update of the Gaussian mixing coefficient in the algorithm. Specifically, based on the likelihood function, the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameters and the initial cluster parameters are used to determine the likelihood function value, which may include the following:
[0075] Determine the probability density formula (2) corresponding to each target node cluster, where the probability density formula (2) is as follows:
[0076] (2)
[0077] Among them, x refers to the input vector corresponding to the target node cluster; μ refers to the two-dimensional initial mean vector; Σ refers to the 2×2 initial covariance matrix.
[0078] Further explanation: According to the probability density formula (2), the calculation formula (3) for calculating the probability of each candidate network node belonging to the target node cluster corresponding to the initial cluster parameter is determined, and then the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameter can be determined by the calculation formula (3), wherein the calculation formula (3) is as follows;
[0079] (3)
[0080] in, refers to the GMM (Gaussian Mixed Model) mixture model; πj refers to the initial mixing coefficient, and, ; N refers to the total number of candidate network nodes; γ ij It refers to the probability that the jth candidate network node belongs to the target node cluster corresponding to the initial cluster parameters.
[0081] The penalty term can be determined according to the probability that each candidate network node in the target area belongs to the target node cluster corresponding to the initial cluster parameter; the calculation formula (4) of the penalty term is as follows:
[0082] (4)
[0083] Among them, γ ij It refers to the probability that the jth candidate network node belongs to the target node cluster corresponding to the initial cluster parameters; πj refers to the initial mixing coefficient; K refers to the preset number of target node clusters.
[0084] Furthermore, the calculation formula (5) corresponding to β is as follows:
[0085] (5)
[0086] Here, K refers to the preset number of target node clusters; πj refers to the initial mixing coefficient.
[0087] From the above, we can see that by introducing the penalty term into the likelihood function, we can get the likelihood function as shown in the calculation formula (6):
[0088] (6)
[0089] Among them, L refers to the likelihood function value, K refers to the preset number of target node clusters; πj refers to the initial mixing coefficient; γ refers to the probability that the candidate network node belongs to the target node cluster corresponding to the initial cluster parameter; Σj refers to the row initial covariance matrix; G refers to the penalty term.
[0090] Furthermore, according to the above process, the likelihood function value can be obtained by determining the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameters and the initial cluster parameters, and substituting the belonging probability and the initial cluster parameters into the calculation formula (6).
[0091] S303: Determine target cluster parameters according to the likelihood function value and the initial cluster parameters.
[0092] It should be noted that in order to ensure that the target node cluster determined according to the target cluster parameters can successfully determine the target network nodes without overlap or too close distance, it is possible to determine whether the likelihood function value meets the function value convergence condition, and then, according to the compliance of the likelihood function value, different methods are used to determine the target cluster parameters.
[0093] In one embodiment, if the likelihood function value meets a preset function value convergence condition, the initial cluster parameters are used as target cluster parameters.
[0094] In another embodiment, if the likelihood function value does not meet the function value convergence condition, the initial cluster parameters are updated to obtain new initial cluster parameters, and based on the new initial cluster parameters, the step of returning to execute based on the likelihood function, according to the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameters, and the initial cluster parameters, determines the likelihood function value.
[0095] Among them, the function value convergence condition can be set or adjusted according to the actual situation and the historical experience of the operation and maintenance personnel. The specific content of the function value convergence condition is not limited here. The following will describe two function value convergence conditions in the form of examples:
[0096] As an example: the function value convergence condition can specify the maximum number of parameter updates of the initial cluster parameters. If the number of parameter updates of the initial cluster parameters reaches the maximum number of parameter updates, it is determined that the likelihood function value meets the preset function value convergence condition; if the number of parameter updates of the initial cluster parameters does not reach the maximum number of parameter updates, it is determined that the likelihood function value does not meet the function value convergence condition.
[0097] As another example: the function value convergence condition may stipulate that if the difference between the likelihood function values determined in two adjacent rounds corresponds to a difference threshold; if the difference between the likelihood function value determined in this round and the likelihood function value determined in the previous round is greater than the difference threshold, then it is determined that the likelihood function value does not meet the function value convergence condition; if the difference between the likelihood function value determined in this round and the likelihood function value determined in the previous round is not greater than the difference threshold, then it is determined that the likelihood function value meets the function value convergence condition.
[0098] Further explanation: when the initial cluster parameters need to be updated, the initial mixing coefficients can be updated according to calculation formula (7), where calculation formula (7) is as follows:
[0099] (7)
[0100] Among them, γ ij It refers to the probability that the jth candidate network node belongs to the target node cluster corresponding to the initial cluster parameters.
[0101] Further explanation: when the initial cluster parameters need to be updated, the initial mean vector can be updated according to the calculation formula (8), where the calculation formula (8) is as follows:
[0102] (8)
[0103] Among them, γ ij It refers to the probability that the j-th candidate network node belongs to the target node cluster corresponding to the initial cluster parameters, and x refers to the input vector corresponding to the target node cluster.
[0104] Further explanation: when the initial cluster parameters need to be updated, the initial covariance matrix can be updated according to the calculation formula (9), where the calculation formula (9) is as follows:
[0105] (9)
[0106] Among them, γ ij refers to the probability that the jth candidate network node belongs to the target node cluster corresponding to the initial cluster parameter, x refers to the input vector corresponding to the target node cluster; μ j Refers to the two-dimensional initial mean vector;.
[0107] S304: Determine a target node cluster from each candidate network node according to the target cluster parameters.
[0108] In one embodiment of the present application, a node cluster training model may be pre-trained by inputting target cluster parameters and target region into the node cluster training model and obtaining an output result of the node cluster training model, wherein the output result determines a target region of the target node cluster.
[0109] The above-mentioned network topology determination method obtains a preset number of initial cluster parameters to determine the likelihood function value corresponding to each initial cluster parameter, and then determines the target cluster parameters based on the likelihood function value and the initial cluster parameters, so as to determine the target node cluster from each candidate network node based on the target cluster parameters, thereby ensuring that the target network node determined in this application is more in line with the actual situation of network node deployment and ensuring the authenticity of the simulated communication network.
[0110] In one embodiment, if Figure 4 As shown, when it is necessary to determine the target network node corresponding to each target node cluster according to the central position of the cluster center of each target node cluster, the following contents may be specifically included:
[0111] S401 : for each target node cluster, determine the interval distance between the node position of each candidate network node and the center position.
[0112] It should be noted that in order to further prevent different target network nodes from being too close to each other, a candidate network node located in the central area of the target node cluster can be selected as the target network node; since the closer a candidate network node is to the center position, the farther the candidate network node is from the edge of the target node cluster, therefore, the subsequent steps of determining the target network node can be implemented according to the interval distance between the node position of each candidate network node and the center position.
[0113] In one embodiment of the present application, the first coordinates of the node position in the target area and the second coordinates of the center position of the cluster center of the target node cluster in the target area can be determined respectively, and then, the coordinate distance is calculated by the first coordinates and the second coordinates to obtain the interval distance between the node position and the center position of each candidate network node.
[0114] S402 , taking the candidate network node with the smallest distance between the node position and the center position as the target network node corresponding to the target node cluster.
[0115] In one embodiment of the present application, when the target network node needs to be determined, the candidate network nodes can be sorted in order of interval distance from small to large, and then the candidate network node ranked first is used as the target network node corresponding to the target node cluster.
[0116] The above-mentioned network topology determination method, by determining the interval distance between the node position and the center position of each candidate network node, realizes that the candidate network node with the smallest interval distance between the node position and the center position is used as the target network node corresponding to the target node cluster; since each target node cluster can only determine one corresponding target network node, therefore, compared with the method of randomly generating target network nodes in the prior art, the present application can effectively avoid the problem of the distance between two target network nodes being too close.
[0117] In one embodiment, if Figure 5 As shown, when it is necessary to determine the target network node corresponding to each target node cluster according to the central position of the cluster center of each target node cluster, the following contents may be specifically included:
[0118] S501 : For each target node cluster, the center position of the cluster center of the target node cluster is used as the node position of the target network node corresponding to the target node cluster.
[0119] In one embodiment of the present application, in order to prevent the distance between the node position and the center position of each candidate network node in the target node cluster from being large, and to further increase the interval distance between adjacent target network nodes, the center position of the cluster center can be used as the node position of the target network node corresponding to the target node cluster.
[0120] S502: Determine a target network node corresponding to a target node cluster from a target area according to the node position.
[0121] In one embodiment of the present application, after determining the node position, the node position may be located in the target area, and then a new candidate network node is generated at the node position, and the candidate network node generated at the node position is used as the target network node.
[0122] The above-mentioned network topology determination method, by taking the central position of the cluster center of the target node cluster as the node position of the target network node corresponding to the target node cluster, realizes determining the target network node corresponding to the target node cluster from the target area according to the node position; since each target node cluster can only determine one corresponding target network node, therefore, compared with the method of randomly generating target network nodes in the prior art, the present application can effectively avoid the problem of the distance between two target network nodes being too close.
[0123] In one embodiment, if Figure 6 As shown, when it is necessary to determine the network topology of the target area, the following contents may be included:
[0124] S601: Obtain a preset number of initial cluster parameters.
[0125] S602, for each initial cluster parameter, based on a likelihood function, according to the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameter and the initial cluster parameter, determine a likelihood function value.
[0126] S603: Determine target cluster parameters according to the likelihood function value and the initial cluster parameters.
[0127] S604: Determine a target node cluster from each candidate network node according to the target cluster parameters.
[0128] S605 , for each target node cluster, taking the center position of the cluster center of the target node cluster as the node position of the target network node corresponding to the target node cluster.
[0129] S606: Determine a target network node corresponding to the target node cluster from the target area according to the node position.
[0130] S607: Determine the network topology structure of the target area according to the target network nodes and the topological connection relationship between the target network nodes.
[0131] The above network topology determination method obtains a preset number of target node clusters by clustering candidate network nodes, and determines the target network nodes corresponding to each target node cluster according to the central position of the cluster center of each target node cluster, and then determines the network topology structure of the target area according to the topological connection relationship between each target network node and each target network node. According to the above content, the present application does not adopt the method of randomly generating target network nodes in the prior art in the process of determining the network topology result, but clusters the randomly generated candidate network nodes in the target area, and then determines the target network nodes corresponding to each target node cluster according to the preset number of target node clusters obtained by clustering; since each target node cluster can only determine one corresponding target network node, therefore, compared with the method of randomly generating target network nodes in the prior art, the present application can effectively avoid the problem of the distance between two target network nodes being too close, because in the actual network communication environment, each network node has its covered service range, so considering the construction cost and forwarding efficiency, new network nodes are usually not set up within the coverage range of the network node, therefore, the target network nodes determined by the present application are more in line with the actual situation of network node deployment, and the authenticity of the simulated communication network is guaranteed.
[0132] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0133] Based on the same inventive concept, the embodiment of the present application also provides a network topology determination device for implementing the network topology determination method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more network topology determination device embodiments provided below can refer to the limitations of the network topology determination method above, and will not be repeated here.
[0134] In one embodiment, Figure 7 As shown, a network topology determination device is provided, comprising: a clustering module 10, a first determination module 20 and a second determination module 30, wherein:
[0135] A clustering module 10 is used to perform clustering processing on the candidate network nodes contained in the target area to obtain a preset number of target node clusters;
[0136] The first determination module 20 is used to determine the target network node corresponding to each target node cluster according to the center position of the cluster center of each target node cluster.
[0137] The second determining module 30 is used to determine the network topology structure of the target area according to the target network nodes and the topological connection relationship between the target network nodes.
[0138] In one embodiment, a preset number of initial cluster parameters are obtained; for each initial cluster parameter, based on the likelihood function, a likelihood function value is determined according to the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameter, and the initial cluster parameters; based on the likelihood function value and the initial cluster parameters, the target cluster parameters are determined; based on the target cluster parameters, the target node cluster is determined from each candidate network node.
[0139] In one embodiment, if the likelihood function value meets a preset function value convergence condition, the initial cluster parameters are used as target cluster parameters.
[0140] In one embodiment, if the likelihood function value does not meet the function value convergence condition, the initial cluster parameters are updated to obtain new initial cluster parameters, and based on the new initial cluster parameters, the step of returning to execute based on the likelihood function, according to the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameters, and the initial cluster parameters, determines the likelihood function value.
[0141] In one embodiment, the initial cluster parameters include: at least one of an initial mixing coefficient, an initial mean vector, and an initial covariance matrix.
[0142] In one embodiment, for each target node cluster, the distance between the node position of each candidate network node and the center position is determined; the candidate network node with the smallest distance between the node position and the center position is used as the target network node corresponding to the target node cluster.
[0143] In one embodiment, for each target node cluster, the center position of the cluster center of the target node cluster is used as the node position of the target network node corresponding to the target node cluster; based on the node position, the target network node corresponding to the target node cluster is determined from the target area.
[0144] The above-mentioned network topology determination device obtains a preset number of target node clusters by clustering candidate network nodes, and determines the target network nodes corresponding to each target node cluster according to the central position of the cluster center of each target node cluster, and then determines the network topology structure of the target area according to the topological connection relationship between each target network node and each target network node. According to the above content, the present application does not adopt the method of randomly generating target network nodes in the prior art in the process of determining the network topology result, but clusters the randomly generated candidate network nodes in the target area, and then determines the target network nodes corresponding to each target node cluster according to the preset number of target node clusters obtained by clustering; since each target node cluster can only determine one corresponding target network node, therefore, compared with the method of randomly generating target network nodes in the prior art, the present application can effectively avoid the problem of the distance between two target network nodes being too close, because in the actual network communication environment, each network node has its covered service range, so considering the construction cost and forwarding efficiency, new network nodes are usually not set up within the coverage range of the network node, therefore, the target network nodes determined by the present application are more in line with the actual situation of network node deployment, and the authenticity of the simulated communication network is guaranteed.
[0145] Each module in the above network topology determination device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0146] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a network topology determination method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0147] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0148] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0149] Perform clustering on the candidate network nodes contained in the target area to obtain a preset number of target node clusters;
[0150] According to the central position of the cluster center of each target node cluster, the target network node corresponding to each target node cluster is determined;
[0151] The network topology structure of the target area is determined according to the target network nodes and the topological connection relationship between the target network nodes.
[0152] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0153] Get a preset number of initial cluster parameters;
[0154] For each initial cluster parameter, based on the likelihood function, the likelihood function value is determined according to the probability that each candidate network node in the target area belongs to the target node cluster corresponding to the initial cluster parameter and the initial cluster parameter;
[0155] Determine the target cluster parameters according to the likelihood function value and the initial cluster parameters;
[0156] According to the target cluster parameters, a target node cluster is determined from each candidate network node.
[0157] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0158] If the likelihood function value meets the preset function value convergence condition, the initial cluster parameters are used as the target cluster parameters.
[0159] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0160] If the likelihood function value does not meet the function value convergence condition, the initial cluster parameters are updated to obtain new initial cluster parameters, and based on the new initial cluster parameters, the step of returning to execute the likelihood function based on the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameters and the initial cluster parameters is determined.
[0161] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0162] The initial cluster parameters include: at least one of an initial mixing coefficient, an initial mean vector, and an initial covariance matrix.
[0163] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0164] For each target node cluster, determine the interval distance between the node position of each candidate network node and the center position;
[0165] The candidate network node with the smallest distance between the node position and the center position is used as the target network node corresponding to the target node cluster.
[0166] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0167] For each target node cluster, the center position of the cluster center of the target node cluster is used as the node position of the target network node corresponding to the target node cluster;
[0168] According to the node position, the target network node corresponding to the target node cluster is determined from the target area.
[0169] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0170] Perform clustering on the candidate network nodes contained in the target area to obtain a preset number of target node clusters;
[0171] According to the central position of the cluster center of each target node cluster, the target network node corresponding to each target node cluster is determined;
[0172] The network topology structure of the target area is determined according to the target network nodes and the topological connection relationship between the target network nodes.
[0173] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0174] Get a preset number of initial cluster parameters;
[0175] For each initial cluster parameter, based on the likelihood function, the likelihood function value is determined according to the probability that each candidate network node in the target area belongs to the target node cluster corresponding to the initial cluster parameter and the initial cluster parameter;
[0176] Determine the target cluster parameters according to the likelihood function value and the initial cluster parameters;
[0177] According to the target cluster parameters, a target node cluster is determined from each candidate network node.
[0178] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0179] If the likelihood function value meets the preset function value convergence condition, the initial cluster parameters are used as the target cluster parameters.
[0180] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0181] If the likelihood function value does not meet the function value convergence condition, the initial cluster parameters are updated to obtain new initial cluster parameters, and based on the new initial cluster parameters, the step of returning to execute the likelihood function based on the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameters and the initial cluster parameters is determined.
[0182] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0183] The initial cluster parameters include: at least one of an initial mixing coefficient, an initial mean vector, and an initial covariance matrix.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0185] For each target node cluster, determine the interval distance between the node position of each candidate network node and the center position;
[0186] The candidate network node with the smallest distance between the node position and the center position is used as the target network node corresponding to the target node cluster.
[0187] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0188] For each target node cluster, the center position of the cluster center of the target node cluster is used as the node position of the target network node corresponding to the target node cluster;
[0189] According to the node position, the target network node corresponding to the target node cluster is determined from the target area.
[0190] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0191] Perform clustering on the candidate network nodes contained in the target area to obtain a preset number of target node clusters;
[0192] According to the central position of the cluster center of each target node cluster, the target network node corresponding to each target node cluster is determined;
[0193] The network topology structure of the target area is determined according to the target network nodes and the topological connection relationship between the target network nodes.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0195] Get a preset number of initial cluster parameters;
[0196] For each initial cluster parameter, based on the likelihood function, the likelihood function value is determined according to the probability that each candidate network node in the target area belongs to the target node cluster corresponding to the initial cluster parameter and the initial cluster parameter;
[0197] Determine the target cluster parameters according to the likelihood function value and the initial cluster parameters;
[0198] According to the target cluster parameters, a target node cluster is determined from each candidate network node.
[0199] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0200] If the likelihood function value meets the preset function value convergence condition, the initial cluster parameters are used as the target cluster parameters.
[0201] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0202] If the likelihood function value does not meet the function value convergence condition, the initial cluster parameters are updated to obtain new initial cluster parameters, and based on the new initial cluster parameters, the step of returning to execute the likelihood function based on the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameters and the initial cluster parameters is determined.
[0203] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0204] The initial cluster parameters include: at least one of an initial mixing coefficient, an initial mean vector, and an initial covariance matrix.
[0205] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0206] For each target node cluster, determine the interval distance between the node position of each candidate network node and the center position;
[0207] The candidate network node with the smallest distance between the node position and the center position is used as the target network node corresponding to the target node cluster.
[0208] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0209] For each target node cluster, the center position of the cluster center of the target node cluster is used as the node position of the target network node corresponding to the target node cluster;
[0210] According to the node position, the target network node corresponding to the target node cluster is determined from the target area.
[0211] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0212] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0213] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0214] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining network topology, It is characterized in that The method comprises: Perform clustering on the candidate network nodes contained in the target area to obtain a preset number of target node clusters; According to the central position of the cluster center of each target node cluster, the target network node corresponding to each target node cluster is determined; The network topology structure of the target area is determined according to the target network nodes and the topological connection relationship between the target network nodes.
2. The method according to claim 1, It is characterized in that The clustering process is performed on the candidate network nodes contained in the target area to obtain a preset number of target node clusters, including: Get a preset number of initial cluster parameters; For each initial cluster parameter, based on the likelihood function, according to the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameter and the initial cluster parameter, determine the likelihood function value; Determining target cluster parameters according to the likelihood function value and the initial cluster parameters; The target node cluster is determined from each candidate network node according to the target cluster parameters.
3. The method according to claim 2, It is characterized in that The step of determining target cluster parameters according to the likelihood function value and the initial cluster parameters includes: If the likelihood function value meets the preset function value convergence condition, the initial cluster parameters are used as target cluster parameters.
4. The method according to claim 3, It is characterized in that The method further comprises: If the likelihood function value does not meet the function value convergence condition, the initial cluster parameters are updated to obtain new initial cluster parameters, and based on the new initial cluster parameters, the step of returning to execute the likelihood function based on the probability of each candidate network node in the target area belonging to the target node cluster corresponding to the initial cluster parameters and the initial cluster parameters is determined.
5. The method according to claim 4, It is characterized in that The initial cluster parameters include: at least one of an initial mixing coefficient, an initial mean vector and an initial covariance matrix.
6. The method according to claim 1, It is characterized in that The step of determining the target network node corresponding to each target node cluster according to the center position of the cluster center of each target node cluster includes: For each target node cluster, determining the interval distance between the node position of each candidate network node and the central position; The candidate network node corresponding to the minimum interval distance is used as the target network node corresponding to the target node cluster.
7. The method according to claim 1, It is characterized in that The step of determining the target network node corresponding to each target node cluster according to the center position of the cluster center of each target node cluster includes: For each target node cluster, the center position of the cluster center of the target node cluster is used as the node position of the target network node corresponding to the target node cluster; According to the node position, a target network node corresponding to the target node cluster is determined from the target area.
8. A network topology determination device, It is characterized in that The device comprises: A clustering module is used to cluster the candidate network nodes contained in the target area to obtain a preset number of target node clusters; A first determination module is used to determine the target network node corresponding to each target node cluster according to the center position of the cluster center of each target node cluster; The second determining module is used to determine the network topology structure of the target area according to each target network node and the topological connection relationship between each target network node.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
