A method and apparatus for determining an information transmission path, an electronic device, and a storage medium
By constructing a transmission tree topology and utilizing the transmission bandwidth and latency data of nodes, the information transmission path is optimized, solving the problem of network connection complexity between nodes in distributed computing and achieving efficient information synchronization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 新奥新智科技有限公司
- Filing Date
- 2021-12-14
- Publication Date
- 2026-04-10
AI Technical Summary
In distributed computing, due to differences in geographical location or network service providers, the network connection status between nodes is complex and variable, making it difficult to control information transmission efficiency and synchronization.
By acquiring network transmission speed data from multiple nodes, a transmission bandwidth matrix and a transmission delay matrix are constructed to determine the information transmission time matrix. A transmission tree topology is then generated, and the path with the shortest transmission time is selected for information transmission.
In unstable network conditions, the information transmission path was optimized, the information transmission time between nodes was shortened, and information synchronization was achieved.
Smart Images

Figure CN116319820B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of Internet, and particularly relates to a method and device for determining information transmission path, electronic equipment and storage medium. BACKGROUND
[0002] Since federated learning can not only break the traditional data silos, but also well protect the data privacy and security of users, it has become a popular learning method in the field of machine learning.
[0003] However, the essence of federated learning is distributed machine learning, which adopts a distributed computing manner. Distributed computing usually involves synchronizing parameters or any type of messages of multiple nodes.
[0004] In distributed computing, multiple nodes (clusters) are usually connected by the Internet. However, due to the different geographical locations of multiple nodes (clusters) or different network service providers, the network connection state between two nodes is not available, and the whole distributed network transmission environment is complex and variable, and it is difficult to control the transmission efficiency of information and to achieve the synchronization of information of each node. SUMMARY
[0005] Therefore, the present disclosure provides a method and device for determining information transmission path, electronic equipment and storage medium to solve the problem that the network connection state between two nodes is not available due to the different geographical locations of multiple nodes (clusters) or different network service providers, and the whole distributed network transmission environment is complex and variable, and it is difficult to control the transmission efficiency of information and to achieve the synchronization of information of each node.
[0006] In a first aspect, the present disclosure provides a method for determining information transmission path, comprising:
[0007] obtaining network transmission speed data uploaded by multiple nodes, wherein the network transmission speed data comprises transmission bandwidth and transmission delay between nodes;
[0008] processing the network transmission speed data to obtain a transmission bandwidth matrix and a transmission delay matrix;
[0009] determining an information transmission time matrix according to the transmission bandwidth matrix and the transmission delay matrix and the information length of to-be-transmitted information;
[0010] generating multiple transmission tree topology structures according to the information transmission time matrix and a plurality of node sequences, and calculating the transmission time of each transmission tree topology structure;
[0011] The node connection path of the transmission tree topology with the shortest transmission time is determined as the transmission path of the information to be transmitted.
[0012] In a second aspect, the present disclosure provides a device for determining an information transmission path, comprising:
[0013] a data acquisition module configured to acquire network transmission speed data uploaded by a plurality of nodes, the network transmission speed data comprising transmission bandwidth and transmission delay between the nodes;
[0014] a data processing module configured to process the network transmission speed data to obtain a transmission bandwidth matrix and a transmission delay matrix;
[0015] a transmission time determination module configured to determine an information transmission time matrix according to the transmission bandwidth matrix and the transmission delay matrix and an information length of information to be transmitted;
[0016] a topology generation module configured to generate a plurality of transmission tree topologies according to the information transmission time matrix and a plurality of node sequences and calculate transmission time of each transmission tree topology;
[0017] a transmission path determination module configured to determine a node connection path of a transmission tree topology with the shortest transmission time as the transmission path of the information to be transmitted.
[0018] In a third aspect, the present disclosure provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0019] In a fourth aspect, the present disclosure provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the steps of the above method.
[0020] The beneficial effects of the embodiments of the present disclosure compared with the prior art at least include: obtaining network transmission speed data uploaded by multiple nodes, the network transmission speed data including transmission bandwidth and transmission delay between the nodes; processing the network transmission speed data to obtain a transmission bandwidth matrix and a transmission delay matrix; determining an information transmission time matrix according to the transmission bandwidth matrix and the transmission delay matrix and an information length of to-be-transmitted information; generating multiple transmission tree topology structures according to the information transmission time matrix and a preset multiple node sequence, and calculating transmission time of each transmission tree topology structure; and determining a node connection path of a transmission tree topology structure with the shortest transmission time as a transmission path of the to-be-transmitted information, which can make full use of the transmission bandwidth, transmission delay and other information uploaded by each node, construct a transmission tree topology structure that can dynamically change under different network states through coordination, and determine a node connection path with the shortest transmission time according to the transmission tree topology structure and the information transmission time matrix, thereby shortening the information transmission time between each node and achieving information synchronization between each node. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0022] Figure 1 is a scene schematic diagram of an application scenario of the embodiments of the present disclosure;
[0023] Figure 2 is a flow schematic diagram of a method for determining an information transmission path provided by the embodiments of the present disclosure;
[0024] Figure 3 is a structure schematic diagram of a transmission tree topology structure in the method for determining an information transmission path provided by the embodiments of the present disclosure;
[0025] Figure 4 is a schematic diagram of an information transmission path in the method for determining an information transmission path provided by the embodiments of the present disclosure;
[0026] Figure 5 is a flow schematic diagram of a current node testing and determining network transmission speed data between the current node and a to-be-tested node in the method for determining an information transmission path provided by the embodiments of the present disclosure;
[0027] Figure 6 is a schematic diagram of a node ② placement mode of scheme one in the method for determining an information transmission path provided by the embodiments of the present disclosure;
[0028] Figure 7 FIG. 2 is a schematic diagram of a placement mode of node ② in scheme two of the method for determining an information transmission path according to an embodiment of the present disclosure;
[0029] Figure 8 FIG. 3 is a structural schematic diagram of a transmission tree topology structure in which the node sequence is [4, 3, 2, 1, 5] in the method for determining an information transmission path according to an embodiment of the present disclosure;
[0030] Figure 9 FIG. 4 is a structural schematic diagram of an apparatus for determining an information transmission path according to an embodiment of the present disclosure;
[0031] Figure 10 FIG. 5 is a structural schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] In the following description, specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. However, persons skilled in the art will understand that the present disclosure can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, methods, algorithms and devices are omitted so as not to obscure the description of the present disclosure with unnecessary detail.
[0033] Hereinafter, a method and an apparatus for determining an information transmission path according to an embodiment of the present disclosure will be described in detail with reference to the accompanying drawings.
[0034] Figure 1 FIG. 1 is a scenario schematic diagram of an application scenario according to an embodiment of the present disclosure. The application scenario can include node ends 101, 102 and 103, a service end 104 and a network.
[0035] The node ends (i.e. terminal devices) 101, 102 and 103 can be hardware or software. When the node ends 101, 102 and 103 are hardware, they can be various electronic devices with a display screen and supporting communication with the service end 104, including but not limited to smart phones, tablet computers, laptop computers and desktop computers, etc. When the node ends 101, 102 and 103 are software, they can be installed in the electronic devices as above. The node ends 101, 102 and 103 can be implemented as multiple software or software modules, or as a single software or software module, and the present disclosure does not limit this. Further, various applications can be installed on the node ends 101, 102 and 103, such as data processing applications, instant messaging tools, etc.
[0036] The service end 104 can be a server providing various services, for example, a background server receiving a request sent by a terminal device establishing a communication connection therewith. The background server can receive and analyze the request sent by the terminal device, and generate a processing result. The service end 104 can be a server, a server cluster composed of a plurality of servers, or a cloud computing service center. The embodiments of the present disclosure do not limit the service end 104.
[0037] It should be noted that the service end 104 can be hardware or software. When the service end 104 is hardware, it can be various electronic devices providing various services for the node ends 101, 102, and 103. When the service end 104 is software, it can be a plurality of software or software modules providing various services for the node ends 101, 102, and 103, or a single software or software module providing various services for the node ends 101, 102, and 103. The embodiments of the present disclosure do not limit the service end 104.
[0038] The network can be a wired network connected by coaxial cables, twisted pairs, and optical fibers, or a wireless network that can realize interconnection of various communication devices without wiring, for example, Bluetooth, Near Field Communication (NFC), Infrared, etc. The embodiments of the present disclosure do not limit the network.
[0039] The node ends 101, 102, and 103 can establish a communication connection with the service end 104 via the network to receive or send information, etc. Specifically, after receiving the network transmission speed data uploaded by the node ends, the service end 104 processes the network transmission speed data to obtain a transmission bandwidth matrix and a transmission delay matrix; determines an information transmission time matrix according to the transmission bandwidth matrix and the transmission delay matrix and the information length of the information to be transmitted; generates a plurality of transmission tree topologies according to the information transmission time matrix and a plurality of preset node sequences, and calculates the transmission time of each transmission tree topology; and determines the node connection path of the transmission tree topology with the shortest transmission time as the transmission path of the information to be transmitted. The above method can fully utilize the transmission bandwidth, transmission delay, etc. uploaded by each node, and construct a transmission tree topology that can dynamically change under different network states through coordination, and determine the node connection path with the shortest transmission time according to the transmission tree topology and the information transmission time matrix, thereby shortening the information transmission time between nodes and achieving information synchronization between nodes.
[0040] It should be noted that the specific types, quantities, and combinations of the node ends 101, 102, and 103, the service end 104, and the network can be adjusted according to the actual needs of the application scenario. The embodiments of the present disclosure do not limit the node ends 101, 102, and 103, the service end 104, and the network.
[0041] Figure 2 FIG. 1 is a flowchart of a method for determining an information transmission path according to an embodiment of the present disclosure. Figure 2 The method for determining an information transmission path can be executed by Figure 1 a server 104. As shown in FIG. 1, the method for determining an information transmission path includes the following steps. Figure 2
[0042] In step S201, network transmission speed data uploaded by multiple nodes is acquired, the network transmission speed data including transmission bandwidth and transmission delay between nodes.
[0043] As an example, assuming that there are three nodes a, b and c, the three nodes a, b and c will upload network transmission speed data tested by themselves to the server, at this time, the server can acquire the network transmission speed data uploaded by each node. Taking node a as an example, the network transmission speed data uploaded by node a includes transmission bandwidth and transmission delay between a and b, and transmission bandwidth and transmission delay between a and c.
[0044] Transmission bandwidth, also known as transmission frequency width, refers to the amount of data that can be transmitted in a fixed time, that is, the ability to transfer data in a transmission pipeline. In digital devices, frequency width is usually expressed in bps, that is, the number of bits that can be transmitted per second. In analog devices, frequency width is usually expressed in cycles per second or hertz (Hz).
[0045] Transmission delay, also known as transmission latency, refers to the time taken between a change being made on one node and the change appearing on another node. For example, the time between making a change on a publishing node and the change appearing on a subscribing node.
[0046] In step S202, the network transmission speed data is processed to obtain a transmission bandwidth matrix and a transmission delay matrix.
[0047] As an example, the network transmission speed data acquired by the server can be key-value data uploaded by each node in the following form: (k, j):(transmission bandwidth, transmission delay). Wherein, k represents the current node (i.e. the uploading node itself), and j represents the node to be tested, i.e. other nodes other than the uploading node itself. For example, assuming that there are three nodes a, b and c in total, the current node is node a, and the node to be tested can be b and / or c. (k, j) represents a key, and (transmission bandwidth, transmission delay) represents the key value corresponding to the key. For example, (a, b):(w1, t1) represents that the transmission bandwidth between node a and b is w1, and the transmission delay is t1.
[0048] In an embodiment, the server processes the received network transmission speed data of each node to obtain a transmission bandwidth matrix and a transmission delay matrix. Specifically, the transmission bandwidth and the transmission delay in the network transmission speed data uploaded by each node are extracted respectively, and a transmission bandwidth matrix is constructed with the extracted transmission bandwidth as elements, and a transmission delay matrix is constructed with the extracted transmission delay as elements.
[0049] In step S203, the information transmission time matrix is determined according to the transmission bandwidth matrix and the transmission delay matrix and the information length of the information to be transmitted.
[0050] As an example, the information transmission time between each pair of nodes can be calculated according to a preset information transmission time calculation formula: information transmission time between each pair of nodes = information length of information to be transmitted / transmission bandwidth + transmission delay, and the information transmission time matrix can be constructed according to the obtained information transmission time.
[0051] The information to be transmitted can be character information such as numbers and characters. The unit of the information length is usually the same as that of the transmission bandwidth, for example, the unit of the transmission bandwidth is bps (bits per second), and the unit of the information length can be the number of bits of a character.
[0052] Generally, the information length of the information to be transmitted can be determined according to the information entered by the user, or the user directly enters the information length.
[0053] In step S204, a plurality of transmission tree topologies are generated according to the information transmission time matrix and a plurality of preset node sequences, and the transmission time of each transmission tree topology is calculated.
[0054] As an example, assuming that there are five node terminals ①, ②, ③, ④, and ⑤, and the preset node sequences include 5! = 120 permutation sequences of the five nodes, for example, [1, 2, 3, 4, 5], [1, 3, 2, 4, 5], [1, 4, 2, 3, 5], …, and a total of 120 sequences.
[0055] In a preferred embodiment, 2-Opt heuristic algorithm, genetic algorithm, or ant colony algorithm can be used to search for node sequences from the above five node terminals one by one.
[0056] The transmission tree topology specifically refers to a tree diagram in which the nodes are connected in a certain order. For example, the five node terminals are connected in the order of ①→②, ③, ②→④, and ⑤ to form a transmission tree topology as shown in FIG. 1. Figure 3
[0057] Then, the transmission time between each pair of nodes in the information transmission time matrix of the five node terminals constructed in the above steps is calculated. Figure 3 The transmission time of the tree-like topology.
[0058] Step S205: Determine the node connection path of the transmission tree topology with the shortest transmission time as the transmission path of the information to be transmitted.
[0059] Referring to the example of step S204 above, the information X to be transmitted is in Figure 3 The transmission path of the tree-like topology shown is as follows: information x1 to be transmitted is transmitted from node ④ to node ②; information x2 to be transmitted is transmitted from node ⑤ to node ②; node ② integrates information x1 and x2 into information x3 and transmits it to node ①; simultaneously, information x4 to be transmitted is transmitted from node ③ to node ①; node ① integrates information x3 and information x4 to obtain information X to be transmitted; then node ① broadcasts information X, that is, it first transmits information X to nodes ② and ③ respectively, and then transmits information X to nodes ④ and ⑤ via node ②. In this entire transmission process, the information transmission process includes: from node ④→②, node ⑤→②, node ②→①, node ③→①, and node ① broadcasting the integrated information X to each node.
[0060] The shortest transmission time refers to finding a tree-like transmission topology that minimizes the time required to broadcast a message X to be transmitted. This topology will also have a shorter time during tree reduction. In other words, the topology that minimizes the time required to broadcast a message X minimizes the synchronization time between nodes.
[0061] Based on the above method, the transmission time of multiple transmission tree topologies generated for each node sequence is calculated. Finally, the node connection path of the transmission tree topology with the shortest transmission time (i.e., the shortest time required for node ① to broadcast a message to nodes ②, ③, ④, and ⑤) is determined as the transmission path for the information to be transmitted. Assume the calculated transmission tree topology corresponding to the above node sequence [1,2,3,4,5] is... Figure 3 The tree diagram shown below illustrates the connection paths between these five nodes as follows: Figure 4 As shown, this is the transmission path of the information to be transmitted. Following this path, the information of each node can be synchronized most quickly.
[0062] The technical scheme provided by the embodiments of the present disclosure comprises: acquiring network transmission speed data uploaded by multiple nodes, wherein the network transmission speed data comprises transmission bandwidth and transmission delay between the nodes; processing the network transmission speed data to obtain a transmission bandwidth matrix and a transmission delay matrix; determining an information transmission time matrix according to the transmission bandwidth matrix and the transmission delay matrix and the information length of to-be-transmitted information; generating multiple transmission tree topology structures according to the information transmission time matrix and a preset node sequence, and calculating the transmission time of each transmission tree topology structure; and determining the node connection path of the transmission tree topology structure with the shortest transmission time as the transmission path of the to-be-transmitted information. The transmission bandwidth, transmission delay and other information uploaded by each node can be fully utilized to construct a transmission tree topology structure that can dynamically change under different network states, and the node connection path with the shortest transmission time is determined according to the transmission tree topology structure and the information transmission time matrix, so that the information transmission time between nodes can be shortened, and the information synchronization time between nodes can be shortened.
[0063] In some embodiments, the step S201 comprises:
[0064] The preset network hyperparameters are issued to each node, so that each node tests and determines the network transmission speed data between the node and the to-be-tested node according to the network hyperparameters, wherein the network hyperparameters comprise node bandwidth, node delay and node quantity of high-speed connection nodes, node IP and node total quantity of all nodes, and node number of the current node.
[0065] The network transmission speed data uploaded by each node is received.
[0066] The node bandwidth and the node delay of the high-speed connection nodes can be flexibly set according to different application scenarios, which are not limited herein. For example, in a deep learning scenario (such as an application neural network learning scenario), the node bandwidth of the high-speed connection nodes is generally greater than 100 MB / S, and the node delay is less than 200 ms. In a general machine learning scenario, the node bandwidth of the high-speed connection nodes is generally greater than 10 MB / S, and the node delay is less than 200 ms.
[0067] In addition, the node quantity of the high-speed nodes can also be flexibly set according to actual conditions, which can be 1, 2, 3, etc.
[0068] The node IP is the IP (Internet Protocol Address) address of the node, that is, the Internet protocol address, which is a unique logical address configured for each network and each host (such as a node end) on the Internet, and is used to distinguish from the physical address.
[0069] As an example, assuming that there are 6 node terminals ①, ②, ③, ④, ⑤, and ⑥, the total number of nodes of all nodes is 6. In actual application, each node terminal can be pre-assigned a node number, for example, the node terminals ①, ②, ③, ④, ⑤, and ⑥ can be pre-assigned node numbers 01, 02, 03, 04, 05, and 06 respectively. That is, the node number of node ① is 01, the node number of node ② is 02, the node number of node ③ is 03, and so on. The node number of node ⑥ is 06. If node ① reports network transmission speed data to the server, the node number 01 of itself is the current node number, and at least one of nodes ②, ③, ④, ⑤, and ⑥ is a node to be tested.
[0070] The high-speed connection node is any one or more of all nodes, and the number of high-speed connection nodes is not more than the total number of all nodes.
[0071] In some embodiments, each node determines the network transmission speed data between itself and the node to be tested according to the network hyperparameters, specifically including the following steps:
[0072] Each node determines the total number of remaining nodes and the number of remaining high-speed connection nodes.
[0073] Each node determines the network transmission speed data between itself and the node to be tested according to the node number of the current node, the number of remaining high-speed connection nodes, and the total number of remaining nodes.
[0074] In some embodiments, the determination of the network transmission speed data between itself and the node to be tested according to the node number of the current node, the number of remaining high-speed connection nodes, and the total number of remaining nodes includes:
[0075] When the number of remaining high-speed connection nodes is greater than 0 and the total number of remaining nodes is greater than 0, a network connection between the node and the node to be tested is established using a preset network testing tool, and the network transmission speed data between the node and the node to be tested is tested.
[0076] If the network transmission speed data meets the preset upload data condition, the network transmission speed data is uploaded to the server.
[0077] Figure 5 is each step in the method for determining the information transmission path provided by the embodiments of the present disclosure, in which each node determines the network transmission speed data between itself and the node to be tested according to the network hyperparameters obtained from the server.
[0078] In combination with Figure 5, step S501, first, each node can obtain the network hyperparameters issued by the server (including the node IP of all nodes, the total number of nodes N of all nodes, the node number k of the current node, the node bandwidth W of the high-speed connection node, the node delay t and the node number n).
[0079] Step S502, let the node to be tested j=(k+1)mod N, the number of remaining high-speed nodes I=n, and the number of remaining nodes m=N-1.
[0080] Step S503, determine whether the number of remaining high-speed nodes I is <0 or the number of remaining nodes m is <0.
[0081] Step S504, when the number of remaining high-speed nodes I>0 and the number of remaining nodes m>0, use the preset network test tool (such as iperf) to establish the network connection between the current node (node ①) and the node to be tested (node ②), and test the network transmission speed data (transmission bandwidth and transmission delay) between node ① and node ②, and record as (k, j):(transmission bandwidth, transmission delay), and write (k, j):(transmission bandwidth, transmission delay) into the initialized speed dictionary.
[0082] Step S505, let the number of remaining nodes m=m-1, and the node to be tested j=(j+1)mod N.
[0083] Step S506, if the transmission bandwidth W1 between the current node ① and the node to be tested ② is greater than the preset bandwidth threshold W (i.e. the node bandwidth of the high-speed connection node), and the transmission delay t1 is less than the preset delay threshold t (i.e. the node delay of the high-speed connection node), then let the number of remaining high-speed nodes I=I-1, and return to the above step S503.
[0084] Step S507, when the judgment result is I<0 or m<0 (i.e. the preset upload data condition), the current node ① uploads the speed dictionary written in (k, j):(transmission bandwidth, transmission delay) in step S504 to the server.
[0085] Similarly, the test and determination steps of the network transmission speed data between other nodes (such as nodes ②③④⑤⑥, etc.) and the node to be tested are basically the same as those of node ①, which will not be repeated here.
[0086] In actual application, the user can specify the number of high-speed nodes n. When establishing the network connection between nodes, the network test tool can find the corresponding node address according to the node IP of each node, and then build a network connection bridge between the current node and the node to be tested by binding the node IP of the current node with the node IP of the node to be tested.
[0087] Iperf is a network performance testing tool. Iperf can test the maximum TCP and UDP bandwidth performance. Iperf has multiple parameters and UDP features that can be adjusted as needed. Iperf can report bandwidth, delay jitter and packet loss.
[0088] In some embodiments, the above step S202 comprises:
[0089] The network transmission speed data uploaded by each node is subjected to data splitting processing to obtain the transmission bandwidth of all nodes and the transmission delay of all nodes;
[0090] According to the transmission bandwidth of all nodes, a transmission bandwidth matrix is constructed;
[0091] According to the transmission delay of all nodes, a transmission delay matrix is constructed.
[0092] As an example, assume that there are ①②③④⑤⑥ a total of 6 node ends, and the server obtains the network transmission speed data uploaded by the 6 node ends, and subjects the network transmission data of each node to data splitting processing to obtain the transmission bandwidth uploaded by the 6 node ends and the transmission delay uploaded by the 6 node ends.
[0093] For example, assume that according to the network transmission speed data uploaded by each node, the transmission bandwidth of all nodes is obtained as follows: the transmission bandwidth between node ① and nodes ②③④⑤⑥ is A 12 , A 13 , A 14 , A 15 , A 16 ; the transmission bandwidth between node ② and nodes ①③④⑤⑥ is A 21 , A 23 , A 24 , A 25 , A 26 ; the transmission bandwidth between node ③ and nodes ①②④⑤⑥ is A 31 , A 32 , A 34 , A 35 , A 36 ; the transmission bandwidth between node ④ and nodes ①②③⑤⑥ is A 41 , A 42 , A 43 , A 45 , A 46 ; the transmission bandwidth between node ⑤ and nodes ①②③④⑥ is A 51 , A 52 , A 53 , A 54 , A 56 ; the transmission bandwidth between node ⑥ and nodes ①②③④⑤ is A61 62 63 64 65 The transmission delay of all nodes is as follows: the transmission delay between node 1 and nodes 2, 3, 4, 5 and 6 is B 12 13 14 15 16 the transmission delay between node 2 and nodes 1, 3, 4, 5 and 6 is B 21 23 24 25 26 the transmission delay between node 3 and nodes 1, 2, 4, 5 and 6 is B 31 32 34 35 36 the transmission delay between node 4 and nodes 1, 2, 3, 5 and 6 is B 41 42 43 45 46 the transmission delay between node 5 and nodes 1, 2, 3, 4 and 6 is B 51 52 53 54 56 the transmission delay between node 6 and nodes 1, 2, 3, 4 and 5 is B 61 62 63 64 65 .
[0094] In an embodiment, the transmission bandwidth matrix can be constructed according to the transmission bandwidth between nodes as follows:
[0095] wherein the 0 element in the transmission bandwidth matrix indicates that the transmission bandwidth of the current node to itself is 0, the elements in each row of the transmission bandwidth matrix indicate the transmission bandwidth between a node and other nodes, and the elements in each column indicate the transmission bandwidth between other elements and the same node. For example, A 12 indicates the transmission bandwidth between node 1 (current node) and node 2 (test node), and A 21 indicates the transmission bandwidth between node 2 (current node) and node 1 (test node).
[0096] According to the transmission delay between each node, a transmission delay matrix can be constructed as follows:
[0097] In the transmission delay matrix, the 0 element indicates that the transmission delay from the current node to itself is 0. The elements in each row of the transmission delay matrix respectively indicate the transmission delay between a node and other nodes. The elements in each column of the transmission delay matrix respectively indicate the transmission delay between other nodes and the same node. For example, B 12 in the first row and the second column indicates the transmission delay between node 1 (the current node) and node 2 (the test node). B 21 in the second row and the first column indicates the transmission delay between node 2 (the current node) and node 1 (the test node).
[0098] In actual applications, the network transmission speed data in the speed dictionary uploaded by each node can not include the transmission bandwidth and the transmission delay between the node and each other node. For example, the network transmission speed data uploaded by node 1 only includes the transmission bandwidth and the transmission delay between node 1 and node 2, and the transmission bandwidth and the transmission delay between node 1 and node 3, that is, the values in the positions of A 14 , A 15 , and A 16 in the transmission bandwidth matrix are empty, and the values in the positions of B 14 , B 15 , and B 16 in the transmission delay matrix are empty. At this time, the average of the elements A 12 and A 13 in the same row with values can be calculated, and the average is filled in the positions of A 14 , A 15 , and A 16 . Similarly, the average of the elements B 12 and B 13 in the same row with values can be calculated, and the average is filled in the positions of B 14 , B 15 , and B 16 . Finally, a transmission bandwidth matrix without empty values and a transmission delay matrix without empty values can be obtained.
[0099] In some embodiments, the step S203 includes:
[0100] According to the transmission bandwidth matrix and the transmission delay matrix, and the information length of the information to be transmitted, the information transmission time between each node and other nodes is calculated.
[0101] According to the information transmission time between each node and other nodes, an n*n information transmission time matrix is constructed, where n is the total number of nodes.
[0102] As an example, assuming the information length of the information to be transmitted is y, the information transmission time between each node and other nodes can be calculated according to the formula: information transmission time = information length of the information to be transmitted / transmission bandwidth + transmission delay.
[0103] For example, the information transmission time between node 1 and node 2 can be calculated according to the above formula as follows: The information transmission time between node 1 and node 3 is: Similarly, the information transmission time between each node and other nodes can be calculated.
[0104] Then, a 6*6 (n=6 at this time) information transmission time matrix is constructed according to the information transmission time between each node and other nodes calculated above, as follows:
[0105] In the information transmission time matrix, the 0 element indicates that the information transmission time from the current node to itself is 0.
[0106] As a preferred embodiment, the information transmission time matrix can be diagonalized first, and the average of the symmetric elements is used to replace the elements. Taking the 2*2 information transmission time matrix between node 1 and node 2 as an example, the matrix can be diagonalized to obtain that is, the element (T 12 +T 21 ) / 2 after diagonalization is used to replace the element T 12 in the original matrix, and the element (T 21 +T 12 ) / 2 after diagonalization is used to replace the element T 21 in the original matrix.
[0107] In an embodiment, the 6*6 information transmission time matrix can be diagonalized based on the existing matrix diagonalization calculation method to obtain a 6*6 diagonalized information transmission time matrix.
[0108] In some embodiments, the step S204 includes:
[0109] Obtaining a node sequence including a plurality of nodes, taking the first node of the node sequence as a root node of a transmission tree topology, and taking the remaining nodes as branch nodes;
[0110] According to the order of the node sequence, the branch nodes are sequentially added to the root node to obtain a plurality of transmission tree topologies;
[0111] According to the information transmission time matrix, the transmission time of each transmission tree topology is calculated.
[0112] As an example, assuming that there are currently five nodes ①, ②, ③, ④ and ⑤ in common, the node sequence is [4, 3, 2, 1, 5], then node ④ (i.e. the first node of the node sequence) can be taken as the root node of the transmission tree topology, and the remaining nodes ①, ②, ③ and ⑤ are taken as branch nodes. In accordance with the following two principles, they are sequentially placed in the order of the above node sequence, i.e. ③→②→①→⑤, and a transmission tree topology is constructed. Among them, principle one: heuristic, i.e. the newly added node does not affect the existing nodes, and can only become a self node of the existing nodes; principle two: greedy principle, i.e. the position of a new node to be added is to make the shortest broadcast speed after being added. And set the information transmission time matrix of the above five nodes according to the above steps:
[0113]
[0114] Specifically, node ④ is placed first as the root node, and its information transmission time is 0; then node ③ is placed, as a branch node of node ④, its information transmission time is 2, and then node ② is placed, at this time, according to the above principle one, there are two possible position placement schemes, i.e. scheme one (as shown in Figure 6 ): node ④→node ③→node ②, the total information transmission time of this scheme is 0+2+1=3; scheme two (as shown in Figure 7 ): node ④→node ③, node ④→node ②, the total information transmission time of this scheme is 0+2+5=7. It can be seen that the transmission time of scheme one is shorter than that of scheme two, and the node connection mode of scheme one can be adopted. Then, nodes ① and ⑤ are sequentially placed in the above manner, and finally the transmission tree topology as shown in Figure 8 is constructed, and the total transmission time is 4.
[0115] All the above optional technical solutions can be combined to form optional embodiments of the present application, which will not be described one by one here.
[0116] The following is an embodiment of the device of the present disclosure, which can be used to execute the method embodiment of the present disclosure. For details not disclosed in the device embodiment of the present disclosure, please refer to the method embodiment of the present disclosure.
[0117] Figure 9 is a schematic diagram of a device for determining an information transmission path provided by an embodiment of the present disclosure. As shown in Figure 9 , the device for determining an information transmission path comprises:
[0118] The data acquisition module 901 is configured to acquire network transmission speed data uploaded by a plurality of nodes, and the network transmission speed data comprises transmission bandwidth and transmission delay between nodes;
[0119] The data processing module 902 is configured to process the network transmission speed data to obtain a transmission bandwidth matrix and a transmission delay matrix.
[0120] The transmission time determination module 903 is configured to determine an information transmission time matrix according to the transmission bandwidth matrix and the transmission delay matrix and an information length of the information to be transmitted.
[0121] The topology generation module 904 is configured to generate a plurality of transmission tree topologies according to the information transmission time matrix and a plurality of preset node sequences, and calculate transmission times of each transmission tree topology.
[0122] The transmission path determination module 905 is configured to determine a node connection path of a transmission tree topology with the shortest transmission time as a transmission path of the information to be transmitted.
[0123] The technical scheme provided by the embodiments of the present disclosure can obtain network transmission speed data uploaded by a plurality of nodes through the data acquisition module 901, the network transmission speed data including transmission bandwidth and transmission delay between nodes; the data processing module 902 processes the network transmission speed data to obtain a transmission bandwidth matrix and a transmission delay matrix; the transmission time determination module 903 determines an information transmission time matrix according to the transmission bandwidth matrix and the transmission delay matrix and an information length of the information to be transmitted; the topology generation module 904 generates a plurality of transmission tree topologies according to the information transmission time matrix and a plurality of preset node sequences, and calculates transmission times of each transmission tree topology; and the transmission path determination module 905 determines a node connection path of a transmission tree topology with the shortest transmission time as a transmission path of the information to be transmitted, which can make full use of information such as transmission bandwidth and transmission delay uploaded by each node, construct a transmission tree topology that can dynamically change under different network states, and determine a node connection path with the shortest transmission time according to the transmission tree topology and the information transmission time matrix, thereby shortening the information transmission time between nodes and achieving information synchronization between nodes.
[0124] In some embodiments, the data acquisition module 901 includes:
[0125] The issuing unit is configured to issue a preset network hyperparameter to each node, so that each node tests and determines network transmission speed data between the node and a node to be tested according to the network hyperparameter, wherein the network hyperparameter includes node bandwidth, node delay and node quantity of a high-speed connection node, node IP and node total quantity of all nodes, and node number of a current node.
[0126] The receiving unit is configured to receive network transmission speed data uploaded by each node.
[0127] In some embodiments, each of the above nodes determines the network transmission speed data between itself and the node to be tested according to network hyperparameter testing, comprising:
[0128] determining the total number of remaining nodes and the number of remaining high-speed connection nodes;
[0129] determining the network transmission speed data between itself and the node to be tested according to the node number of the current node, the number of remaining high-speed connection nodes, and the total number of remaining nodes.
[0130] In some embodiments, the above determination of the network transmission speed data between itself and the node to be tested according to the node number of the current node, the number of remaining high-speed connection nodes, and the total number of remaining nodes, comprises:
[0131] when the number of remaining high-speed connection nodes is greater than 0 and the total number of remaining nodes is greater than 0, using a preset network testing tool to establish a network connection with the node to be tested and testing the network transmission speed data between itself and the node to be tested;
[0132] if the network transmission speed data meets the preset upload data condition, uploading the network transmission speed data to the server.
[0133] In some embodiments, the above data processing module 902 comprises:
[0134] a data splitting unit configured to perform data splitting processing on the network transmission speed data uploaded by each node to obtain the transmission bandwidth of all nodes and the transmission delay of all nodes;
[0135] a bandwidth matrix construction unit configured to construct a transmission bandwidth matrix according to the transmission bandwidth of all nodes;
[0136] a delay matrix construction unit configured to construct a transmission delay matrix according to the transmission delay of all nodes.
[0137] In some embodiments, the above transmission time determination module 903 comprises:
[0138] a transmission time determination unit configured to calculate the information transmission time between each node and other nodes according to the transmission bandwidth matrix, the transmission delay matrix, and the information length of the information to be transmitted;
[0139] a time matrix construction unit configured to construct an n*n information transmission time matrix according to the information transmission time between each node and other nodes, wherein the value of n is the total number of nodes.
[0140] In some embodiments, the above topology generation module 904 comprises:
[0141] a sequence obtaining unit configured to obtain a node sequence comprising a plurality of nodes, take a first node of the node sequence as a root node of a transmission tree topology, and take the remaining nodes as branch nodes;
[0142] a topology generating unit configured to sequentially add the branch nodes to the root node according to an order of the node sequence, and obtain a plurality of transmission tree topologies;
[0143] a calculating unit configured to calculate a transmission time of each transmission tree topology according to the information transmission time matrix.
[0144] It should be understood that the size of the sequence number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
[0145] Figure 10 is a schematic diagram of an electronic device 1000 provided by the embodiments of the present disclosure. As shown in the figure, the electronic device 1000 of the embodiments includes a processor 1001, a memory 1002, and a computer program 1003 stored in the memory 1002 and executable on the processor 1001. The processor 1001 implements the steps in each of the above method embodiments when executing the computer program 1003. Alternatively, the processor 1001 implements the functions of each module / unit in each of the above device embodiments when executing the computer program 1003. Figure 10
[0146] Exemplarily, the computer program 1003 can be divided into one or more modules / units, which are stored in the memory 1002 and executed by the processor 1001 to complete the present disclosure. The one or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program 1003 in the electronic device 1000.
[0147] The electronic device 1000 can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The electronic device 1000 can include but is not limited to the processor 1001 and the memory 1002. Those skilled in the art can understand that the electronic device 1000 is only an example of the electronic device 1000 and does not constitute a limitation on the electronic device 1000, and can include more or fewer components than the figure, or combine certain components, or different components, for example, the electronic device can also include an input / output device, a network access device, a bus, and the like. Figure 10 The electronic device 1000 is only an example of the electronic device 1000 and does not constitute a limitation on the electronic device 1000, and can include more or fewer components than the figure, or combine certain components, or different components, for example, the electronic device can also include an input / output device, a network access device, a bus, and the like.
[0148] The processor 1001 can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like. The general-purpose processor can be a microprocessor, or the processor can be any conventional processor.
[0149] The memory 1002 can be an internal storage unit of the electronic device 1000, for example, a hard disk or a memory of the electronic device 1000. The memory 1002 can also be an external storage device of the electronic device 1000, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, or the like, equipped in the electronic device 1000. Further, the memory 1002 can include both the internal storage unit and the external storage device of the electronic device 1000. The memory 1002 is used to store a computer program and other programs and data required by the electronic device. The memory 1002 can also be used to temporarily store data that has been output or will be output.
[0150] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit, and the integrated unit can be realized in the form of hardware or in the form of software. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the system can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0151] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.
[0152] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present disclosure.
[0153] In the embodiments provided by the present disclosure, it should be understood that the disclosed apparatus / equipment and method can be implemented in other ways. For example, the apparatus / equipment embodiments described above are merely schematic, for example, the division of the modules or units is merely a logical function division, and there can be another division manner in actual implementation, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0154] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.
[0155] In addition, each functional unit in each embodiment of the present disclosure can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0156] The integrated modules / units, if implemented in the form of software functional units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. The computer program can include computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electric carrier signal and telecommunication signal.
[0157] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure.
Claims
1. A method of determining an information transmission path, characterized by, The method comprises the following steps: obtaining network transmission speed data of a plurality of nodes, wherein the network transmission speed data comprises transmission bandwidth and transmission delay between nodes; the step of obtaining network transmission speed data of a plurality of nodes comprises the following steps: issuing a preset network hyperparameter to each node, so that each node tests and determines the network transmission speed data between the node and a to-be-tested node according to the network hyperparameter, wherein the network hyperparameter comprises node bandwidth, node delay and node quantity of high-speed connection nodes, node IP and node total quantity of all nodes, and node number of a current node; receiving the network transmission speed data uploaded by each node; the step that each node tests and determines the network transmission speed data between the node and a to-be-tested node according to the network hyperparameter comprises the following steps: each node determines the total quantity of remaining nodes and the quantity of remaining high-speed connection nodes; each node determines the network transmission speed data between the node and a to-be-tested node according to the node number of a current node, the quantity of remaining high-speed connection nodes and the total quantity of remaining nodes; the step of determining the network transmission speed data between the node and a to-be-tested node according to the node number of a current node, the quantity of remaining high-speed connection nodes and the total quantity of remaining nodes comprises the following steps: when the quantity of remaining high-speed connection nodes is greater than 0 and the total quantity of remaining nodes is greater than 0, a network connection between the node and the to-be-tested node is established by using a preset network testing tool, and the network transmission speed data between the node and the to-be-tested node is tested out; if the network transmission speed data meets a preset uploading data condition, the network transmission speed data is uploaded to a server; processing the network transmission speed data to obtain a transmission bandwidth matrix and a transmission delay matrix; determining an information transmission time matrix according to the transmission bandwidth matrix, the transmission delay matrix and information length of to-be-transmitted information; generating a plurality of transmission tree topologies according to the information transmission time matrix and a plurality of preset node sequences, and calculating transmission time of each transmission tree topology; the step of generating a plurality of transmission tree topologies according to the information transmission time matrix and a plurality of preset node sequences, and calculating transmission time of each transmission tree topology comprises the following steps:
2. The method of claim 1, wherein, obtaining a node sequence comprising the plurality of nodes, taking a first node of the node sequence as a root node of a transmission tree topology, and taking the remaining nodes as branch nodes; in the order of the node sequence, a branch node is sequentially added on the basis of the root node to obtain a plurality of transmission tree topologies; calculating transmission time of each transmission tree topology according to the information transmission time matrix; determining a node connection path of a transmission tree topology with the shortest transmission time as a transmission path of the to-be-transmitted information. the step of processing the network transmission speed data to obtain a transmission bandwidth matrix and a transmission delay matrix comprises the following steps: Data splitting processing is performed on the network transmission speed data uploaded by each node to obtain transmission bandwidth of all nodes and transmission delay of all nodes; A transmission bandwidth matrix is constructed according to the transmission bandwidth of all nodes; A transmission delay matrix is constructed according to the transmission delay of all nodes.
3. The method of claim 1, wherein, The information transmission time matrix is determined according to the transmission bandwidth matrix and the transmission delay matrix and the information length of the information to be transmitted, including: The information transmission time between each node and other nodes is calculated according to the transmission bandwidth matrix, the transmission delay matrix and the information length of the information to be transmitted; An n*n information transmission time matrix is constructed according to the information transmission time between each node and other nodes, wherein n is the total number of nodes.
4. An apparatus for determining an information transmission path, characterized by It includes: A data acquisition module configured to acquire network transmission speed data of a plurality of nodes, the network transmission speed data including transmission bandwidth and transmission delay between nodes; A preset network hyperparameter is issued to each node to enable each node to test and determine the network transmission speed data between itself and the node to be tested according to the network hyperparameter, wherein the network hyperparameter includes node bandwidth, node delay and node number of high-speed connection nodes, node IP and node total number of all nodes, and node number of the current node; The network transmission speed data uploaded by each node is received; Each node determines the total number of remaining nodes and the number of remaining high-speed connection nodes; Each node determines the network transmission speed data between itself and the node to be tested according to the node number of the current node, the number of remaining high-speed connection nodes and the total number of remaining nodes; When the number of remaining high-speed connection nodes is greater than 0 and the total number of remaining nodes is greater than 0, a network connection between the node to be tested and the node to be tested is established using a preset network test tool, and the network transmission speed data between the node to be tested and the node to be tested is tested; If the network transmission speed data meets the preset uploading data condition, the network transmission speed data is uploaded to the server; A data processing module configured to process the network transmission speed data to obtain a transmission bandwidth matrix and a transmission delay matrix; A transmission time determination module configured to determine an information transmission time matrix according to the transmission bandwidth matrix and the transmission delay matrix and the information length of the information to be transmitted; A topology generation module configured to generate a plurality of transmission tree-like topology structures according to the information transmission time matrix and a plurality of node sequences and calculate transmission time of each transmission tree-like topology structure; A node sequence containing the plurality of nodes is obtained, the first node of the node sequence is taken as a root node of a transmission tree-like topology structure, and the remaining nodes are taken as branch nodes; According to the order of the node sequence, branch nodes are sequentially added to the root node to obtain a plurality of transmission tree-like topology structures; According to the information transmission time matrix, the transmission time of each transmission tree-like topology structure is calculated; A transmission path determination module is configured to determine a node connection path of a transmission tree topology with the shortest transmission time as the transmission path of the information to be transmitted.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 3.
6. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 5. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 3.
Citation Information
Patent Citations
Power information transmission time delay analysis method, device and equipment and storage medium
CN111030883A