Method for constructing network topology structure, data transmission method, electronic device, and computer program product

By dividing the set of network nodes into six groups and connecting network elements based on the Mitsubishi column structure to form a network topology structure, the problem of excessive network diameter when there are many network nodes is solved, and the effect of reducing network diameter and improving communication efficiency is achieved.

CN119583431BActive Publication Date: 2025-05-13SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510136573.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2025-05-13
Estimated Expiration
2045-02-07

AI Technical Summary

Technical Problem

In the case of more network nodes, the network diameter of the constructed network topology is larger, resulting in larger communication delays and greater difficulty in wiring layout of the backend.

Method used

By dividing the set of network nodes into six groups, six network elements are constructed, and connecting these network elements based on the Mitsubishi column structure, a network topology structure is formed, and its network diameter is equal to four.

Benefits of technology

The network diameter of the network topology structure constructed by more network nodes is reduced, and the problem of excessive network diameter when there are more network nodes is solved, and communication efficiency and wiring layout are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583431B_ABST
    Figure CN119583431B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a method for constructing a network topology structure, a data sending method, an electronic device, and a computer program product, which relate to the field of data exchange, wherein the method for constructing a network topology structure comprises: dividing a first network node set to obtain six groups of network nodes, wherein the first network node set comprises N network nodes, and N is a positive integer greater than 16; constructing six network elements according to the six groups of network nodes, wherein the network elements comprise: one or more network nodes, wherein the multiple network nodes constitute a specified graphic structure, and the diameter of the specified graphic structure is equal to one; connecting the six network elements based on a triangular prism structure to obtain a first network topology structure, wherein the six network elements are respectively located at six vertices of the triangular prism structure, and the network diameter of the first network topology structure is equal to four.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data exchange, and specifically, to a method for constructing a network topology structure, a method for sending data, an electronic device, and a computer program product. Background Art

[0002] On a chip network, there are usually multiple network nodes, and multiple network nodes need to be connected using data lines so that multiple network nodes can communicate with each other. As the number of network nodes increases, the network diameter of the network topology structure constructed by related technologies is constantly increasing, and the out-degree and in-degree of each network node are also constantly increasing, which makes the communication delay larger and the back-end wiring layout more difficult. Therefore, it is necessary to propose a networking solution to reduce the network diameter and the in-degree and out-degree of network nodes.

[0003] In the related art, when there are many network nodes, the network topology structure constructed has a large network diameter, and no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a method for constructing a network topology structure, a data sending method, an electronic device, and a computer program product to at least solve the problem that in the related technology, when there are many network nodes, the network diameter of the constructed network topology structure is large.

[0005] According to an embodiment of the present application, a method for constructing a network topology structure is provided, comprising: dividing a first network node set to obtain six groups of network nodes, wherein the first network node set includes N network nodes, and N is a positive integer greater than 16; constructing six network elements according to the six groups of network nodes, wherein the i-th network element among the six network elements is constructed according to the i-th group of network nodes among the six groups of network nodes, and the network element includes: one or more network nodes, the multiple network nodes constitute a specified graphic structure, and the diameter of the specified graphic structure is equal to one; connecting the six network elements based on a triangular prism structure to obtain a first network topology structure, wherein the six network elements are respectively located at six vertices of the triangular prism structure, and the network diameter of the first network topology structure is equal to four.

[0006] In an exemplary embodiment, the method of connecting the six network elements based on a triangular prism structure to obtain a first network topology structure includes: respectively setting the six network elements at the six vertices of the triangular prism structure; directly connecting the network node in the i-th network element among the six network elements to three network elements in a network element set to obtain the first network topology structure; wherein the network element set includes three network elements corresponding to the three vertices closest to the vertex of the i-th network element in the triangular prism structure; wherein, in the case where the i-th network element has two network nodes, only one of the two network nodes is directly connected to the two network elements, in the case where the i-th network element has three network nodes, each of the three network nodes is directly connected to only one network element, and in the case where the i-th network element has Z network nodes, Z-3 of the Z network nodes are not directly connected to any network element in the network element set, and each of the remaining three network nodes is directly connected to only one network element, and Z is a positive integer greater than 3.

[0007] In an exemplary embodiment, when a first node is connected to a second node, the first node is not connected to other network nodes in the j-th network topology structure, the first node is a network node in the i-th network element, and the second node is a network node in the j-th network topology structure in the network element set.

[0008] In an exemplary embodiment, after obtaining the first network topology structure, the method further includes: numbering each network node in the six network elements so that each network node is numbered (k, i, j), wherein k is used to indicate the plane in which the network node is located, the plane comprising: the top surface of the triangular prism structure, the bottom surface of the triangular prism structure, i is used to indicate that the network node is a node in the i-th network element among the six network elements, and when i is equal to j, j is used to indicate that the network node is not connected to other network elements, and when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements.

[0009] In an exemplary embodiment, after obtaining the first network topology structure, the method further includes: constructing a second network topology structure based on a second network node set, wherein the second network node set includes N network nodes, and the second network topology structure has the same topological structure as the first network topology structure; connecting the network nodes with the same numbers in the first network topology structure and the second network topology structure to obtain a first target network topology structure, wherein the network nodes in the first network topology structure and the second network topology structure have the same numbering format.

[0010] In an exemplary embodiment, the six network elements are six first network elements, wherein the first network elements have three network nodes.

[0011] In an exemplary embodiment, the six network elements include: two of the first network elements, two of the second network elements, and two of the third network elements; wherein the first network element has three network nodes, the second network element has two network nodes, and the third network element has four network nodes.

[0012] In an exemplary embodiment, the six network elements include: four first network elements, one third network element, and one fourth network element; wherein the first network element has three network nodes, the third network element has four network nodes, and the fourth network element has one network node.

[0013] According to another embodiment of the present application, a data sending method is also provided, which is applied to the above-mentioned first network topology structure, including: when the current network node obtains a target data packet to be sent to the target network node, and the target network node is not the current network node, determining whether the target network node and the current network node correspond to the same network element, wherein the current network node and the target network node are both network nodes in the first network topology structure; when the target network node and the current network node correspond to the same network element, sending the target data packet directly to the target network node; when the target network node and the current network node do not correspond to the same network element, forwarding the target data packet according to the connection relationship between the current network element and the target network element, wherein the current network element is the network element corresponding to the current network node, and the target network element is the network element corresponding to the target network node.

[0014] In an exemplary embodiment, forwarding the target data packet according to the connection relationship between the current network element and the target network element includes: when the current network element is directly connected to the target network element, determining whether the current network node is directly connected to the target network element; when the current network node is directly connected to the target network element, forwarding the target data packet to a network node in the target network element that is directly connected to the current network element; when the current network node is not directly connected to the target network element, forwarding the target data packet to a network node in the current network element that is directly connected to the target network element.

[0015] In an exemplary embodiment, forwarding the target data packet according to the connection relationship between the current network element and the target network element includes: when the current network element is not directly connected to the target network element, determining whether the current network node is directly connected to a reference network element, wherein the reference network element is a network element that is directly connected to the target network element and directly connected to the current network element; when the current network node is directly connected to the reference network element structure, forwarding the target data packet to a network node in the reference network element that is directly connected to the current network element; when the current network node is not directly connected to the reference network element, forwarding the target data packet to a network node in the current network element that is directly connected to the reference network element.

[0016] In an exemplary embodiment, the determining whether the target network node and the current network node correspond to the same network element includes: when the number of the current network node is , the target network node is numbered In the case of and Are they equal? and When they are equal, it is determined that the target network node and the current network node are located in the same network element; wherein each network node in the first network topology structure is numbered (i, j), wherein i is used to indicate that the network node is a node in the i-th network element among the six network elements, and when i is equal to j, j is used to indicate that the network node is not connected to other network elements, and when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements.

[0017] In an exemplary embodiment, the method further includes: when the number of the current network node is , the target network node is numbered In the case of and Are they equal? and If they are equal, determining that the current network element is directly connected to the target network element; and If they are not equal, determine Is it equal to ;exist equal In the case where the current network element is directly connected to the target network element, each network node in the first network topology structure is numbered (k, i, j), wherein k is used to indicate the plane where the network node is located, and the plane includes: the top surface of the triangular column structure, and the bottom surface of the triangular column structure; i is used to indicate that the network node is a node in the i-th network element among the six network elements; when i is equal to j, j is used to indicate that the network node is not connected to other network elements; when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements, and the i-th network element among the six network elements is directly connected to the i+3-th network element.

[0018] In an exemplary embodiment, determining whether the current network node is directly connected to the target network element includes: when the number of the current network node is , the target network node is numbered In the case of and Are they equal? and When the current network node and the target network element are equal, it is determined that the current network node is directly connected to the target network element; wherein each network node in the first network topology structure is numbered (i, j), wherein i is used to indicate that the network node is a node in the i-th network element among the six network elements, and when i is equal to j, j is used to indicate that the network node is not connected to other network elements, and when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements.

[0019] In an exemplary embodiment, forwarding the target data packet to a network node in the target network element that is directly connected to the current network element includes: forwarding the target data packet to a network node numbered ( , ) network nodes.

[0020] In an exemplary embodiment, forwarding the target data packet to a network node in the current network element that is directly connected to the target network element includes: forwarding the target data packet to a network node numbered ( , ) network nodes.

[0021] According to another embodiment of the present application, a device for constructing a network topology structure is also provided, including: a division module, used to divide a first network node set to obtain six groups of network nodes, wherein the first network node set includes N network nodes, and N is a positive integer greater than 16; a construction module, used to construct six network elements according to the six groups of network nodes, wherein the i-th network element among the six network elements is constructed according to the i-th group of network nodes among the six groups of network nodes, and the network element includes: one or more network nodes, the multiple network nodes constitute a specified graphic structure, and the diameter of the specified graphic structure is equal to one; a connection module, used to connect the six network elements based on a triangular prism structure to obtain a first network topology structure, wherein the six network elements are respectively located at six vertices of the triangular prism structure, and the network diameter of the first network topology structure is equal to four.

[0022] According to another embodiment of the present application, a data sending device is also provided, which is applied to the above-mentioned first network topology structure, including: a determination module, which is used to determine whether the target network node and the current network node correspond to the same network element when the current network node obtains the target data packet to be sent to the target network node and the target network node is not the current network node, wherein the current network node and the target network node are both network nodes in the first network topology structure; a first sending module, which is used to send the target data packet directly to the target network node when the target network node and the current network node correspond to the same network element; and a second sending module, which is used to forward the target data packet according to the connection relationship between the current network element and the target network element when the target network node and the current network node do not correspond to the same network element, wherein the current network element is the network element corresponding to the current network node, and the target network element is the network element corresponding to the target network node.

[0023] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0024] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0025] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0026] Through the present application, the first network node set is divided to obtain six groups of network nodes, and six network elements are constructed based on the six groups of network nodes, wherein the network elements include: one or more network nodes, and multiple network nodes constitute a specified graphic structure with a diameter of one, and then the six network elements are connected based on the triangular prism structure to obtain a first network topology structure with a network diameter equal to four, thereby reducing the network diameter of the network topology structure constructed using more network nodes, and solving the problem that the network diameter of the network topology structure constructed in the related technology is large when there are more network nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0028] Figure 1 It is a hardware structure block diagram of a server device according to a method for constructing a network topology structure and a method for sending data in an embodiment of the present application;

[0029] Figure 2 It is a schematic diagram of a four-dimensional cube network topology in the related art;

[0030] Figure 3 is a flow chart of a method for constructing a network topology structure according to an embodiment of the present application;

[0031] Figure 4 is a schematic diagram of a ring network topology according to an embodiment of the present application;

[0032] Figure 5 is a schematic diagram of a triangular pyramid network topology according to an embodiment of the present application;

[0033] Figure 6 is a schematic diagram of a triangular prism network topology according to an embodiment of the present application;

[0034] Figure 7 is a schematic diagram of a first network topology structure according to an embodiment of the present application;

[0035] Figure 8 is a flow chart of a data sending method according to an embodiment of the present application;

[0036] Fig. 9 is a routing schematic diagram based on a first network topology structure according to an embodiment of the present application;

[0037] Fig.10 is a structural block diagram of a device for constructing a network topology structure according to an embodiment of the present application;

[0038] Fig.11 is a structural block diagram of a data sending device according to an embodiment of the present application;

[0039] Fig.12 is a schematic structural diagram of an optional electronic device according to an embodiment of the present application;

[0040] Among them, 102 in the above figure is a processor, 104 is a memory, 106 is a transmission device, 108 is an input and output device, 1002 is a division module, 1004 is a construction module, 1006 is a connection module, 1102 is a determination module, 1104 is a first sending module, 1106 is a second sending module, 1208 is a display, and 1210 is a connection bus. DETAILED DESCRIPTION

[0041] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0042] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0043] The network topology structure construction method and data transmission method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a network topology construction method and a data transmission method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0044] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the method for constructing the network topology structure and the method for sending data in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0045] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0046] Optionally, the technical solution of the present application can be applied to on-chip networks, which have overcome the various limitations brought by the bus structure, fully borrowed relevant network technologies in existing computer networks, and introduced them into on-chip systems for development and utilization, and have good development prospects. Compared with , its advantages are reflected in:

[0047] (1) The on-chip network borrows the network structure of computer networks. The entire network is connected by multiple point-to-point lines, which will not interfere with each other and can meet the communication requirements of multiple users.

[0048] (2) Unlike the system-on-chip, the network-on-chip adopts a global asynchronous and local synchronous approach to solve the clock synchronization problem. The local network works at its own clock frequency, which avoids the global synchronization problem of the clock, solves the clock offset problem, and greatly reduces the power consumption of the network.

[0049] (3) The utilization rate of bandwidth in the on-chip network is relatively high. Since the on-chip network supports multi-point parallel transmission, it can complete data transmission on multiple lines at the same time, and the communication efficiency is relatively high. In addition, the addressing of the on-chip network is completed within the local network. The expansion of the network scale has a relatively small impact on the addressing. In this way, the number of bits occupied by addressing in the bandwidth will not increase, and the bandwidth will not become a bottleneck for the expansion of the network scale.

[0050] (4) Since the bus structure uses a central decision unit to uniformly manage the use rights of the lines, and the on-chip network uses a random arbitration mechanism, there is no large delay problem.

[0051] (5) The on-chip network adopts the core concept. As the network scale expands, the decision delay of each core will become larger and larger, which will have a greater impact on the performance of the system. The on-chip network adopts a local decision strategy to complete an independent functional unit in the line in a distributed manner, which has good reusability. At the same time, the routing equipment in the network can also be used in a variety of environments, and the reusability is very high. Due to the good reusability of network components, the on-chip network has the characteristics of high cohesion, high scalability and portability, which greatly shortens the system development time and improves the development efficiency. It is particularly important in the current ultra-large-scale network design.

[0052] It should be noted that as the number of interconnected nodes increases, the aggregate bandwidth of the entire system will also increase. The interconnection topology is usually defined by the following four main properties: (1) Node degree: the number of channels connecting a node to its neighboring nodes, or the number of ports in the router in the node. (2) Network diameter: the maximum value of the shortest distance between two nodes in the network. The smaller the network diameter, the smaller the network communication delay. (3) Number of links: the number of links in the entire network. Since the topology is fixed, the number of links is also determined. (4) Bisection bandwidth: the link bandwidth corresponding to the minimum cut set of all nodes in the network divided into two equally divided subnets is the bisection bandwidth. The higher the bisection bandwidth, the stronger the network communication capability.

[0053] In related technologies, when the number of nodes is large, a cube network topology is usually used. Figure 2 A four-dimensional cube network topology is illustrated, which contains 16 nodes and a network diameter of 4. However, if a topology with 18 network nodes needs to be constructed, a five-dimensional cube network topology needs to be adopted. The five-dimensional cube contains 32 routing nodes and a network diameter of 5. The out-degree and in-degree of each routing node are 5, and 14 routing nodes are idle, resulting in a waste of resources.

[0054] In this regard, a method for constructing a network topology structure is provided in this embodiment. Figure 3is a flow chart of a method for constructing a network topology structure according to an embodiment of the present application. Figure 3 As shown, the process includes the following steps S302-S306:

[0055] Step S302: Divide the first network node set into six groups of network nodes, wherein the first network node set includes N network nodes, where N is a positive integer greater than 16;

[0056] Step S304: constructing six network elements according to the six groups of network nodes, wherein the i-th network element among the six network elements is constructed according to the i-th group of network nodes among the six groups of network nodes, and the network element includes: one or more network nodes, the plurality of network nodes constitute a specified graph structure, and the diameter of the specified graph structure is equal to one;

[0057] In an exemplary embodiment, the six network elements are six first network elements, wherein the first network elements have three network nodes.

[0058] For example, the first network element may be Figure 4 The ring network topology shown has a network diameter of 1, and the out-degree and in-degree of each network node are both 2.

[0059] In an exemplary embodiment, the six network elements include: two first network elements, two second network elements, and two third network elements; wherein the first network elements have three network nodes, the second network elements have two network nodes, and the third network elements have four network nodes.

[0060] It should be noted that the two network nodes in the second network element are connected in a straight line.

[0061] For example, the third network element may be Figure 5 The triangular pyramid network topology shown has a network diameter of 1, and the out-degree and in-degree of each network node are both 3.

[0062] In an exemplary embodiment, the six network elements include: four first network elements, one third network element, and one fourth network element; wherein the first network element has three network nodes, the third network element has four network nodes, and the fourth network element has one network node.

[0063] Step S306: Connect the six network elements based on the triangular prism structure to obtain a first network topology structure, wherein the six network elements are respectively located at six vertices of the triangular prism structure, and the network diameter of the first network topology structure is equal to four.

[0064] For example, the triangular column structure is as follows Figure 6 Optionally, the out-degree and in-degree of each network node in the first network topology structure are both no more than 3.

[0065] In the above steps, the first network node set is divided into six groups of network nodes, and six network elements are constructed based on the six groups of network nodes, wherein the network elements include: one or more network nodes, and multiple network nodes constitute a specified graphic structure with a diameter of one, and then the six network elements are connected based on the triangular prism structure to obtain a first network topology structure with a network diameter equal to four, thereby reducing the network diameter of the network topology structure constructed using more network nodes, and solving the problem that the network diameter of the network topology structure constructed in the related technology is large when there are more network nodes.

[0066] In an exemplary embodiment, the above step S306 includes steps S11-S12:

[0067] Step S11: setting the six network elements at the six vertices of the triangular prism structure respectively;

[0068] Step S12: directly connecting the network node in the ith network element among the six network elements to three network elements in the network element set to obtain a first network topology structure;

[0069] It should be noted that the network element set includes three network elements corresponding to the three vertices closest to the vertex where the i-th network element is located in the triangular prism structure;

[0070] For example, if six network elements are Figure 7 The network elements numbered 0-5 are shown, the i-th network element is the network element numbered 0, and the network element set corresponding to the i-th network element includes: the network element numbered 1, the network element numbered 2, and the network element numbered 3.

[0071] It should be noted that, when the i-th network element has one network node, the network node is directly connected to the three network elements in the network element set; when the i-th network element has two network nodes, only one of the two network nodes is directly connected to the two network elements; when the i-th network element has three network nodes, each of the three network nodes is directly connected to only one network element; when the i-th network element has Z network nodes, Z-3 of the Z network nodes are not directly connected to any network element in the network element set, and each of the remaining three network nodes is directly connected to only one network element, and Z is a positive integer greater than 3.

[0072] In an exemplary embodiment, when a first node is connected to a second node, the first node is not connected to other network nodes in the j-th network topology structure, the first node is a network node in the i-th network element, and the second node is a network node in the j-th network topology structure in the network element set.

[0073] That is, in this embodiment, when a network node is directly connected to a network element, the network node is directly connected to only one network node in the network element.

[0074] Exemplarily, when N is equal to 18 and the six network elements are all first network elements, the constructed first network topology structure may be as follows: Figure 7 shown.

[0075] In an exemplary embodiment, after obtaining the first network topology structure, the method further includes: numbering each network node in the six network elements so that each network node is numbered (k, i, j), wherein k is used to indicate the plane in which the network node is located, the plane comprising: the top surface of the triangular prism structure, the bottom surface of the triangular prism structure, i is used to indicate that the network node is a node in the i-th network element among the six network elements, and when i is equal to j, j is used to indicate that the network node is not connected to other network elements, and when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements.

[0076] For example, Figure 7 The number of each network node in the first network topology is illustrated.

[0077] It should be noted that a network node is directly connected to a network node to indicate that the two network nodes are directly connected via a data line; a network node is directly connected to a network element to indicate that the network node is directly connected to the network node in the network element; when a network node is directly connected to a network element, the network element is directly connected to the network element corresponding to the network node.

[0078] It should be noted that, when a network node is directly connected to multiple network elements, the network node has multiple j values.

[0079] For a better understanding, the following is an explanation with a specific example (in the following example, N is equal to 18):

[0080] 1. Construction of the ring-shaped and triangular prism-combined topological structure (R-TP):

[0081] Step 1: Follow Figure 4Construct 6 ring topologies containing three network nodes in this way;

[0082] Step 2: Follow Figure 6 Construct a triangular prism topology in this way;

[0083] Step 3: Replace the six ring topologies with three network nodes Figure 6 The six network nodes in the middle triangular prism have a well-constructed network topology structure as follows: Figure 7 As shown, it should be noted that Figure 7 Each line in .

[0084] It should be noted that, in the network topology structure constructed using the above steps, the out-degree and in-degree of each network node are 3, which is more conducive to back-end layout and routing.

[0085] 2. Coding method of each network node of the ring and triangular prism topology (R-TP):

[0086] like Figure 7 As shown in the figure, the ring and triangular prism combined topology (R-TP) is a triangular prism structure, and each network node is numbered as ,

[0087] 1. The value is 0 or 1. Represents the three network nodes located on the top surface of the triangular prism. Represents three network nodes located at the bottom of the triangular prism;

[0088] 2. is the number of the ring topology, ;

[0089] 3. Indicates which ring the network node is connected to. ;

[0090] 4. Number The network nodes are numbered For example: network nodes Network nodes located in the 0th ring (top layer) and the 2nd ring (top layer) Also for example: network node Network nodes located in the 2nd ring (top layer) and the 5th ring (lower layer) are connected.

[0091] In an exemplary embodiment, after obtaining the first network topology structure, the method further includes steps S21-S22:

[0092] Step S21: constructing a second network topology structure according to a second network node set, wherein the second network node set includes N network nodes, and the second network topology structure has the same topology structure as the first network topology structure;

[0093] Step S22: connecting the network nodes with the same number in the first network topology structure and the second network topology structure to obtain a first target network topology structure, wherein the network nodes in the first network topology structure and the second network topology structure have the same numbering format.

[0094] It should be noted that the first target network topology structure constructed in the above manner has a lower corresponding network diameter than the network topology structure constructed by the traditional method.

[0095] In an exemplary embodiment, after obtaining the first network topology structure, the method further includes steps S31 and S32:

[0096] Step S31: constructing a second network topology structure according to the second network node set, and constructing a third network topology structure according to the third network node set, wherein the second network node set and the third network node set each include 24 network nodes, the second network topology structure and the third network node set both have the same topology structure as the first network topology structure, and the six network elements in the first network topology structure include six third network elements;

[0097] Step S32: The network nodes numbered (i, i) shown in the first network topology structure, the second network topology structure and the third network topology structure are connected to each other to obtain a second target network topology structure, wherein (i, i) is used to indicate that the network node is a node in the i-th network element among the six network elements, and the network node is not connected to any other network elements, wherein the network nodes in the first network topology structure, the second network topology structure and the third network topology structure are numbered in the same format.

[0098] It should be noted that the second target network topology structure constructed in the above manner has 72 network nodes, and its corresponding network diameter is lower than that of the traditional construction method.

[0099] In addition, in this embodiment, a data sending method is provided, which is applied to the first network topology structure. Figure 8 is a flow chart of a data sending method according to an embodiment of the present application, such as Figure 8 As shown, the process includes the following steps S802-S806:

[0100] Step S802: when the current network node obtains a target data packet to be sent to a target network node, and the target network node is not the current network node, determining whether the target network node and the current network node correspond to the same network element, wherein both the current network node and the target network node are network nodes in the first network topology structure;

[0101] In an exemplary embodiment, the above-mentioned determination of whether the target network node and the current network node correspond to the same network element includes: when the number of the current network node is , the target network node is numbered In the case of and Are they equal? and If they are equal, determining that the target network node and the current network node are located in the same network element;

[0102] It should be noted that each network node in the first network topology structure is numbered (i, j), wherein i is used to indicate that the network node is a node in the i-th network element among the six network elements, and when i is equal to j, j is used to indicate that the network node is not connected to other network elements, and when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements.

[0103] Step S804: When the target network node and the current network node correspond to the same network element, directly sending the target data packet to the target network node;

[0104] It should be noted that, since the target network node and the current network node correspond to the same network element, the target network node and the current network node are directly connected, and the target data packet can be directly sent to the target network node.

[0105] Step S806: When the target network node and the current network node do not correspond to the same network element, forward the target data packet according to the connection relationship between the current network element and the target network element, wherein the current network element is the network element corresponding to the current network node, and the target network element is the network element corresponding to the target network node.

[0106] Optionally, the execution subject of the above steps S802-S806 is the current network node.

[0107] Through the above steps, the current network node in the first network topology structure can quickly forward the target data packet when obtaining the target data packet to be sent to the target network node, so that the target data packet can be quickly sent to the target network node, thereby reducing network latency.

[0108] In an exemplary embodiment, when the target network node and the current network node do not correspond to the same network element, the method further includes the following steps S41-S43:

[0109] Step S41: When the number of the current network node is , the target network node is numbered In the case of and whether they are equal;

[0110] Step S42: and If they are equal, determining that the current network element is directly connected to the target network element;

[0111] Step S43: and If they are not equal, determine Is it equal to ;exist equal In the case of , determining that the current network element is directly connected to the target network element;

[0112] Among them, each network node in the first network topology structure is numbered (k, i, j), wherein k is used to indicate the plane where the network node is located, and the plane includes: the top surface of the triangular column structure, and the bottom surface of the triangular column structure; i is used to indicate that the network node is a node in the i-th network element among the six network elements; when i is equal to j, j is used to indicate that the network node is not connected to other network elements; when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements, and the i-th network element among the six network elements is directly connected to the i+3-th network element.

[0113] In an exemplary embodiment, the forwarding of the target data packet according to the connection relationship between the current network element and the target network element includes the following steps S51-S53:

[0114] Step S51: when the current network element is directly connected to the target network element, determining whether the current network node is directly connected to the target network element;

[0115] In an exemplary embodiment, determining whether the current network node is directly connected to the target network element includes: when the number of the current network node is , the target network node is numbered In the case of and Are they equal? and When the current network node and the target network element are equal, it is determined that the current network node is directly connected to the target network element; wherein each network node in the first network topology structure is numbered (i, j), wherein i is used to indicate that the network node is a node in the i-th network element among the six network elements, and when i is equal to j, j is used to indicate that the network node is not connected to other network elements, and when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements.

[0116] Step S52: when the current network node is directly connected to the target network element, forwarding the target data packet to a network node in the target network element that is directly connected to the current network element;

[0117] In an exemplary embodiment, forwarding the target data packet to a network node in the target network element that is directly connected to the current network element includes: forwarding the target data packet to a network node numbered ( , ) network nodes.

[0118] Step S53: when the current network node is not directly connected to the target network element, forward the target data packet to a network node in the current network element that is directly connected to the target network element.

[0119] In an exemplary embodiment, forwarding the target data packet to a network node in the current network element that is directly connected to the target network element includes: forwarding the target data packet to a network node numbered ( , ) network nodes.

[0120] In an exemplary embodiment, the method of forwarding the target data packet according to the connection relationship between the current network element and the target network element further includes the following steps S61-S64:

[0121] Step S61: forwarding the target data packet according to the connection relationship between the current network element and the target network element, including:

[0122] Step S62: when the current network element is not directly connected to the target network element, determining whether the current network element is directly connected to a reference network element, wherein the reference network element is a network element that is directly connected to the target network element and directly connected to the current network element;

[0123] Optionally, the method for determining whether the current network node is directly connected to the reference network element is the same as the above method for determining whether the current network node is directly connected to the target network element.

[0124] Step S63: when the current network node is directly connected to the reference network element structure, forwarding the target data packet to a network node in the reference network element that is directly connected to the current network element;

[0125] Step S64: when the current network node is not directly connected to the reference network element, forward the target data packet to a network node in the current network element that is directly connected to the reference network element.

[0126] For a better understanding, the above routing algorithm is described below, where the source network node , target network node :

[0127] Step 1: Judgement and Are they equal?

[0128] if ,show and Located together on the top or bottom surface of the triangular prism, proceed to the second step;

[0129] if ,show and One is located on the top surface of the triangular prism and the other is located on the bottom surface, so it needs to be routed to The routing rule for the surface is: ,show and The surface where it is located has a direct connection and routing path ;if ,show and The surface where the router is located has no direct connection. ;in, The value of is taken with the value of the current routing node, and then enters the second step;

[0130] Step 2: At this time and Located on the top or bottom of the triangular prism, judge and Are they equal?

[0131] if ,show and In the same ring topology: and Are they equal? ​​If , then S is the end of D routing; if , One-step routing within the ring topology can reach , routing method: , the routing ends;

[0132] if ,show and If they are not in the same ring topology, go to step 3;

[0133] Step 3: Judgement and Are they equal?

[0134] if ,show and The ring is directly connected and goes to step 5; if ,show No and The ring where it is located is directly connected and goes to step 4;

[0135] Step 4: Routing: , that is, in Routing is performed within the ring, and routing is performed to The ring has a directly connected routing node ,renew Values: , proceed to step 5;

[0136] Step 5: At this time and The rings are directly connected, then from Directly routed to The ring where it is located, routing method: ,renew Values: , proceed to step 6;

[0137] Step 6: Judgement and Are they equal?

[0138] if Equal, routing ends; if , for routing , that is, in Routing is performed within the ring, routing to , the routing ends.

[0139] For better understanding, the following description is given with reference to specific examples.

[0140] Example 1, such as Fig. 9 As shown, the source network node , target network node :

[0141] Step 1: Judgement and Are they equal?

[0142] ,show and One is located on the top surface of the triangular prism and the other is located on the bottom surface, so it needs to be routed to The routing rules for the surface: ,show and The surface is not directly connected, routing path: ;renew The value of , and then proceed to the second step;

[0143] Step 2: At this time and Located on the top or bottom of the triangular prism, judge and Are they equal?

[0144] ,show and If they are not in the same ring topology, go to step 3;

[0145] Step 3: Judgement and Are they equal?

[0146] ,show No and The ring where it is located is directly connected and goes to step 4;

[0147] Step 4: Routing: : , that is, in Routing is performed within the ring, and routing is performed to The ring has a directly connected routing node ,renew Values: , proceed to step 5;

[0148] Step 5: At this time and The rings are directly connected, then from Directly routed to The ring where it is located, routing method: : ,renew Values: , go to step 6;

[0149] Step 6: Judgement and Are they equal?

[0150] , for routing , that is, in Routing is performed within the ring, routing to , the routing ends.

[0151] Example 2: Source network node , target network node :

[0152] Step 1: Judgement and Are they equal?

[0153] ,show and Located together on the top or bottom surface of the triangular prism, proceed to the second step;

[0154] Step 2: At this time and Located on the top or bottom of the triangular prism, judge and Are they equal?

[0155] if ,show and If they are not in the same ring topology, go to step 3;

[0156] Step 3: Judgement and Are they equal?

[0157] ,show and The ring where it is located is directly connected and goes to step 4;

[0158] Step 4: At this time and The rings are directly connected, then from Directly routed to The ring in which it is located, routing method: : ,renew Values: , proceed to step 5;

[0159] Step 5: Judgement and Are they equal?

[0160] , for routing : , that is, in Routing is performed within the ring, routing to , the routing ends.

[0161] It should be noted that the present application proposes a topology structure combining a ring and a triangular prism, whose network diameter is 4. The network diameter is small, which reduces the network latency, but the out-degree and in-degree of each routing node are 3, which is more conducive to the back-end layout and wiring.

[0162] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0163] In the present embodiment, a construction device and a data transmission device of a network topology structure are also provided to realize the above-mentioned embodiment and the preferred implementation mode, and the descriptions which have been made are omitted. As used below, the term "module" can realize the combination of software and / or hardware of the predetermined function. Although the modules described in the following embodiments are preferably realized by software, the realization of hardware, or the combination of software and hardware is also possible and conceived.

[0164] Fig.10 is a structural block diagram of a device for constructing a network topology structure according to an embodiment of the present application, such as Fig.10 As shown, the device comprises:

[0165] A division module 1002 is used to divide the first network node set into six groups of network nodes, wherein the first network node set includes N network nodes, and N is a positive integer greater than 16;

[0166] A construction module 1004 is configured to construct six network elements according to the six groups of network nodes, wherein the i-th network element among the six network elements is constructed according to the i-th group of network nodes among the six groups of network nodes, and the network element includes: one or more network nodes, the plurality of network nodes constitute a specified graph structure, and the diameter of the specified graph structure is equal to one;

[0167] The connection module 1006 is used to connect the six network elements based on the triangular prism structure to obtain a first network topology structure, wherein the six network elements are respectively located at six vertices of the triangular prism structure, and the network diameter of the first network topology structure is equal to four.

[0168] The above-mentioned device divides the first network node set to obtain six groups of network nodes, and constructs six network elements based on the six groups of network nodes, wherein the network elements include: one or more network nodes, and multiple network nodes constitute a specified graphic structure with a diameter of one, and then connect the six network elements based on the triangular prism structure to obtain a first network topology structure with a network diameter equal to four, thereby reducing the network diameter of the network topology structure constructed using more network nodes, and solving the problem that the network diameter of the constructed network topology structure is large when there are more network nodes in the related technology.

[0169] In an exemplary embodiment, the connection module 1006 is further used to respectively set the six network elements at the six vertices of the triangular prism structure; directly connect the network node in the i-th network element among the six network elements to three network elements in the network element set to obtain a first network topology structure; wherein the network element set includes three network elements corresponding to the three vertices closest to the vertex of the i-th network element in the triangular prism structure; wherein, in the case where the i-th network element has two network nodes, only one of the two network nodes is directly connected to the two network elements, in the case where the i-th network element has three network nodes, each of the three network nodes is directly connected to only one network element, and in the case where the i-th network element has Z network nodes, Z-3 of the Z network nodes are not directly connected to any network element in the network element set, and each of the remaining three network nodes is directly connected to only one network element, and Z is a positive integer greater than 3.

[0170] In an exemplary embodiment, when a first node is connected to a second node, the first node is not connected to other network nodes in the j-th network topology structure, the first node is a network node in the i-th network element, and the second node is a network node in the j-th network topology structure in the network element set.

[0171] In an exemplary embodiment, the device also includes: a numbering module, which is used to number each network node in the six network elements after obtaining the first network topology structure, so that each network node is numbered (k, i, j), wherein k is used to indicate the plane where the network node is located, and the plane includes: the top surface of the triangular prism structure, the bottom surface of the triangular prism structure, i is used to indicate that the network node is a node in the i-th network element among the six network elements, and when i is equal to j, j is used to indicate that the network node is not connected to other network elements, and when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements.

[0172] In an exemplary embodiment, the device also includes: a processing module, which is used to construct a second network topology structure based on a second network node set after obtaining the first network topology structure, wherein the second network node set includes N network nodes, and the second network topology structure has the same topological structure as the first network topology structure; connect the network nodes with the same numbers in the first network topology structure and the second network topology structure to obtain a first target network topology structure, wherein the network nodes in the first network topology structure and the second network topology structure have the same numbering format.

[0173] In an exemplary embodiment, the six network elements are six first network elements, wherein the first network elements have three network nodes.

[0174] In an exemplary embodiment, the six network elements include: two of the first network elements, two of the second network elements, and two of the third network elements; wherein the first network element has three network nodes, the second network element has two network nodes, and the third network element has four network nodes.

[0175] In an exemplary embodiment, the six network elements include: four first network elements, one third network element, and one fourth network element; wherein the first network element has three network nodes, the third network element has four network nodes, and the fourth network element has one network node.

[0176] Fig.11is a structural block diagram of a data sending device according to an embodiment of the present application, which is applied to the above-mentioned first network topology structure, such as Fig.11 As shown, the device comprises:

[0177] A determination module 1102 is used to determine whether the target network node and the current network node correspond to the same network element when the current network node obtains a target data packet to be sent to the target network node and the target network node is not the current network node, wherein the current network node and the target network node are both network nodes in the first network topology structure;

[0178] A first sending module 1104, configured to send the target data packet directly to the target network node when the target network node and the current network node correspond to the same network element;

[0179] The second sending module 1106 is used to forward the target data packet according to the connection relationship between the current network element and the target network element when the target network node and the current network node do not correspond to the same network element, wherein the current network element is the network element corresponding to the current network node, and the target network element is the network element corresponding to the target network node.

[0180] Through the above-mentioned device, the current network node in the first network topology structure can quickly forward the target data packet when obtaining the target data packet to be sent to the target network node, so that the target data packet can be quickly sent to the target network node, thereby reducing network delay.

[0181] In an exemplary embodiment, the second sending module 1106 is also used to determine whether the current network node is directly connected to the target network element when the current network element is directly connected to the target network element; when the current network node is directly connected to the target network element, forward the target data packet to the network node in the target network element that is directly connected to the current network element; when the current network node is not directly connected to the target network element, forward the target data packet to the network node in the current network element that is directly connected to the target network element.

[0182] In an exemplary embodiment, the second sending module 1106 is also used to determine whether the current network node is directly connected to a reference network element when the current network element is not directly connected to the target network element, wherein the reference network element is a network element that is directly connected to the target network element and directly connected to the current network element; when the current network node is directly connected to the reference network element structure, forward the target data packet to a network node in the reference network element that is directly connected to the current network element; when the current network node is not directly connected to the reference network element, forward the target data packet to a network node in the current network element that is directly connected to the reference network element.

[0183] In an exemplary embodiment, the determining module 1102 is further configured to: , the target network node is numbered In the case of and Are they equal? and When they are equal, it is determined that the target network node and the current network node are located in the same network element; wherein each network node in the first network topology structure is numbered (i, j), wherein i is used to indicate that the network node is a node in the i-th network element among the six network elements, and when i is equal to j, j is used to indicate that the network node is not connected to other network elements, and when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements.

[0184] In an exemplary embodiment, the determining module 1102 is further configured to: , the target network node is numbered In the case of and Are they equal? and If they are equal, determining that the current network element is directly connected to the target network element; and If they are not equal, determine Is it equal to ;exist equal In the case where the current network element is directly connected to the target network element, each network node in the first network topology structure is numbered (k, i, j), wherein k is used to indicate the plane where the network node is located, and the plane includes: the top surface of the triangular column structure, and the bottom surface of the triangular column structure; i is used to indicate that the network node is a node in the i-th network element among the six network elements; when i is equal to j, j is used to indicate that the network node is not connected to other network elements; when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements, and the i-th network element among the six network elements is directly connected to the i+3-th network element.

[0185] In an exemplary embodiment, the second sending module 1106 is further configured to: , the target network node is numbered In the case of and Are they equal? and When the current network node and the target network element are equal, it is determined that the current network node is directly connected to the target network element; wherein each network node in the first network topology structure is numbered (i, j), wherein i is used to indicate that the network node is a node in the i-th network element among the six network elements, and when i is equal to j, j is used to indicate that the network node is not connected to other network elements, and when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements.

[0186] In an exemplary embodiment, the second sending module 1106 is further configured to forward the target data packet to the target network element numbered ( , ) network nodes.

[0187] In an exemplary embodiment, the second sending module 1106 is further configured to forward the target data packet to a network node in the current network element that is directly connected to the target network element, including: forwarding the target data packet to a network node in the current network element numbered ( , ) network nodes.

[0188] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0189] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0190] Optionally, in this embodiment, the computer program may be configured to perform the following steps by means of the computer program:

[0191] S1, dividing the first network node set to obtain six groups of network nodes, wherein the first network node set includes N network nodes, and N is a positive integer greater than 16;

[0192] S2, constructing six network elements according to the six groups of network nodes, wherein the i-th network element among the six network elements is constructed according to the i-th group of network nodes among the six groups of network nodes, and the network element includes: one or more network nodes, the plurality of network nodes constitute a specified graph structure, and the diameter of the specified graph structure is equal to one;

[0193] S3, connecting the six network elements based on a triangular prism structure to obtain a first network topology structure, wherein the six network elements are respectively located at six vertices of the triangular prism structure, and the network diameter of the first network topology structure is equal to four.

[0194] Optionally, in this embodiment, the computer program may also be configured to execute the following steps through the computer program:

[0195] S1, when the current network node obtains a target data packet to be sent to a target network node, and the target network node is not the current network node, determining whether the target network node and the current network node correspond to the same network element, wherein the current network node and the target network node are both network nodes in the first network topology structure;

[0196] S2, when the target network node and the current network node correspond to the same network element, directly sending the target data packet to the target network node;

[0197] S3: when the target network node and the current network node do not correspond to the same network element, forward the target data packet according to the connection relationship between the current network element and the target network element.

[0198] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0199] The embodiment of the present application also provides an electronic device, such as Fig.12 As shown, the electronic device includes a memory 104 and a processor 102. The memory 104 stores a computer program, and the processor 102 is configured to execute the steps in any of the above method embodiments through the computer program.

[0200] Optionally, in this embodiment, the processor 102 may be configured to perform the following steps through a computer program:

[0201] S1, dividing the first network node set to obtain six groups of network nodes, wherein the first network node set includes N network nodes, and N is a positive integer greater than 16;

[0202] S2, constructing six network elements according to the six groups of network nodes, wherein the i-th network element among the six network elements is constructed according to the i-th group of network nodes among the six groups of network nodes, and the network element includes: one or more network nodes, the plurality of network nodes constitute a specified graph structure, and the diameter of the specified graph structure is equal to one;

[0203] S3, connecting the six network elements based on a triangular prism structure to obtain a first network topology structure, wherein the six network elements are respectively located at six vertices of the triangular prism structure, and the network diameter of the first network topology structure is equal to four.

[0204] Optionally, in this embodiment, the processor 102 may also be configured to perform the following steps through a computer program:

[0205] S1, when the current network node obtains a target data packet to be sent to a target network node, and the target network node is not the current network node, determining whether the target network node and the current network node correspond to the same network element, wherein the current network node and the target network node are both network nodes in the first network topology structure;

[0206] S2, when the target network node and the current network node correspond to the same network element, directly sending the target data packet to the target network node;

[0207] S3: when the target network node and the current network node do not correspond to the same network element, forward the target data packet according to the connection relationship between the current network element and the target network element.

[0208] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0209] Alternatively, a person skilled in the art may understand that: Fig.12 The structure shown is for illustration only. Fig.12 The structure of the electronic device is not limited. For example, the electronic device may also include Fig.12 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.12 Different configurations are shown.

[0210] Among them, the memory 104 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for constructing the network topology structure or the method and device for sending data in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the method for constructing the network topology structure or the method for sending data. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 104 can be specifically, but not limited to, used to store information such as system configuration files. As an example, such as Fig.12 As shown, the memory 104 may include but is not limited to the division module 1002, the construction module 1004, and the connection module 1006 in the device for constructing the network topology structure. In addition, other module units in the device for constructing the network topology structure may also be included but are not limited to, which will not be repeated in this example.

[0211] In addition, the electronic device mentioned above further includes: a transmission device 106, a display 1208; and a connection bus 1210, which is used to connect various module components in the electronic device mentioned above.

[0212] In other embodiments, the electronic device may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. The nodes may form a peer-to-peer network, and any form of computing device, such as a server, terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.

[0213] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0214] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0215] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.

[0216] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0217] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for constructing a network topology structure, characterized in that: include: Dividing the first network node set to obtain six groups of network nodes, wherein the first network node set includes N network nodes, where N is a positive integer greater than 16; Constructing six network elements according to the six groups of network nodes, wherein the i-th network element among the six network elements is constructed according to the i-th group of network nodes among the six groups of network nodes, and the network element comprises: one or more network nodes, the plurality of network nodes forming a specified graph structure, the diameter of the specified graph structure being equal to one; Connecting the six network elements based on a triangular prism structure to obtain a first network topology structure, wherein the six network elements are respectively located at six vertices of the triangular prism structure, and a network diameter of the first network topology structure is equal to four; The six network elements are connected based on the triangular column structure to obtain a first network topology structure, including: The six network elements are respectively arranged at six vertices of the triangular prism structure; Directly connecting a network node in an i-th network element among the six network elements to three network elements in the network element set to obtain a first network topology structure; Among them, the network element set includes three network elements corresponding to the three vertices that are closest to the vertex of the i-th network element at the vertex of the triangular column structure; when the i-th network element has two network nodes, only one of the two network nodes is directly connected to the two network elements; when the i-th network element has three network nodes, each of the three network nodes is directly connected to only one network element; when the i-th network element has Z network nodes, Z-3 of the Z network nodes are not directly connected to any network element in the network element set, and each of the remaining three network nodes is directly connected to only one network element, and Z is a positive integer greater than 3.

2. The method according to claim 1, characterized in that When a first node is connected to a second node, the first node is not connected to other network nodes in the jth network topology structure, the first node is a network node in the i-th network element, and the second node is a network node in the j-th network topology structure in the network element set.

3. The method according to claim 2, characterized in that After obtaining the first network topology structure, the method further includes: Each network node in the six network elements is numbered so that each network node is numbered (k, i, j), wherein k is used to indicate a plane where the network node is located, the plane comprising: a top surface of a triangular prism structure, a bottom surface of a triangular prism structure, i is used to indicate that the network node is a node in the i-th network element among the six network elements, when i is equal to j, j is used to indicate that the network node is not connected to other network elements, and when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements.

4. The method according to claim 1, characterized in that After obtaining the first network topology structure, the method further includes: Constructing a second network topology structure according to a second network node set, wherein the second network node set includes N network nodes, and the second network topology structure has the same topology structure as the first network topology structure; The network nodes with the same number in the first network topology structure and the second network topology structure are connected to obtain a first target network topology structure, wherein the network nodes in the first network topology structure and the second network topology structure have the same numbering format.

5. The method according to claim 1, characterized in that The six network elements are six first network elements, wherein the first network elements have three network nodes.

6. The method according to claim 1, characterized in that The six network elements include: two first network elements, two second network elements, and two third network elements; wherein the first network elements have three network nodes, the second network elements have two network nodes, and the third network elements have four network nodes.

7. The method according to claim 1, characterized in that The six network elements include: four first network elements, one third network element, and one fourth network element; wherein the first network element has three network nodes, the third network element has four network nodes, and the fourth network element has one network node.

8. A data transmission method, characterized in that: Applied to the first network topology structure described in claim 1, include: When the current network node obtains a target data packet to be sent to a target network node, and the target network node is not the current network node, determining whether the target network node and the current network node correspond to the same network element, wherein both the current network node and the target network node are network nodes in the first network topology structure; When the target network node and the current network node correspond to the same network element, directly sending the target data packet to the target network node; In the case that the target network node and the current network node do not correspond to the same network element, the target data packet is forwarded according to the connection relationship between the current network element and the target network element, wherein the current network element is the network element corresponding to the current network node, and the target network element is the network element corresponding to the target network node.

9. The method according to claim 8, characterized in that The forwarding of the target data packet according to the connection relationship between the current network element and the target network element includes: In a case where the current network element is directly connected to the target network element, determining whether the current network element is directly connected to the target network element; In the case where the current network node is directly connected to the target network element, forwarding the target data packet to a network node in the target network element that is directly connected to the current network element; In the case that the current network node is not directly connected to the target network element, the target data packet is forwarded to a network node in the current network element that is directly connected to the target network element.

10. The method according to claim 8, characterized in that The forwarding of the target data packet according to the connection relationship between the current network element and the target network element includes: In the case that the current network element is not directly connected to the target network element, determining whether the current network element is directly connected to a reference network element, wherein the reference network element is a network element that is directly connected to the target network element and directly connected to the current network element; In the case where the current network node is directly connected to the reference network element structure, forwarding the target data packet to a network node in the reference network element that is directly connected to the current network element; In a case where the current network node is not directly connected to the reference network element, the target data packet is forwarded to a network node in the current network element that is directly connected to the reference network element.

11. The method according to claim 8, characterized in that The determining whether the target network node and the current network node correspond to the same network element includes: The number of the current network node is , the target network node is numbered In the case of and whether they are equal; exist and If they are equal, determining that the target network node and the current network node are located in the same network element; Among them, each network node in the first network topology structure is numbered (i, j), wherein i is used to indicate that the network node is a node in the i-th network element among the six network elements, and when i is equal to j, j is used to indicate that the network node is not connected to other network elements, and when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements.

12. The method according to claim 8, characterized in that The method further comprises: The number of the current network node is , the target network node is numbered In the case of and whether they are equal; exist and If they are equal, determining that the current network element is directly connected to the target network element; exist and If they are not equal, determine Is it equal to ;exist equal In the case of , determining that the current network element is directly connected to the target network element; Among them, each network node in the first network topology structure is numbered (k, i, j), wherein k is used to indicate the plane where the network node is located, and the plane includes: the top surface of the triangular column structure, and the bottom surface of the triangular column structure; i is used to indicate that the network node is a node in the i-th network element among the six network elements; when i is equal to j, j is used to indicate that the network node is not connected to other network elements; when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements, and the i-th network element among the six network elements is directly connected to the i+3-th network element.

13. The method according to claim 9, characterized in that The determining whether the current network node is directly connected to the target network element includes: The number of the current network node is , the target network node is numbered In the case of and whether they are equal; exist and If they are equal, determining that the current network node is directly connected to the target network element; Among them, each network node in the first network topology structure is numbered (i, j), wherein i is used to indicate that the network node is a node in the i-th network element among the six network elements, and when i is equal to j, j is used to indicate that the network node is not connected to other network elements, and when i is not equal to j, j is used to indicate that the network node is directly connected to the j-th network element among the six network elements.

14. The method according to claim 13, characterized in that The step of forwarding the target data packet to a network node in the target network element that is directly connected to the current network element includes: Forward the target data packet to the target network element numbered ( , ) network nodes.

15. The method according to claim 13, characterized in that The step of forwarding the target data packet to a network node in the current network element that is directly connected to the target network element comprises: Forward the target data packet to the current network element numbered ( , )) network node.

16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 15 are implemented.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 15 are implemented.

Citation Information

Patent Citations

  • Three-dimensional network topology structure and routing algorithm thereof

    CN109561034A

  • Network-on-chip communication method and device, computer equipment and storage medium

    CN118714019A

  • Routing path determination method and device, medium and product

    CN119135593A