Network path detection method, device and electronic device

By using hash factor to process path detection data between the switch and server in the data center and generating shared paths, the problem of low path detection efficiency in the prior art is solved, and efficient detection and sharing of data center network paths is realized.

CN115396355BActive Publication Date: 2024-08-23BEIJING YOUZHUJU NETWORK TECH CO LTD +1
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202211029009.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-25
Publication Date
2024-08-23
Estimated Expiration
2042-08-25

AI Technical Summary

Technical Problem

In data centers, it is difficult for the existing technology to efficiently detect and share network paths, resulting in the data center needing to generate a large amount of path detection data during path detection, which is inefficient and time-consuming.

Method used

By hashing the path detection data between the switch and server in the data center using preconfigured hash factors, generating shared paths, enabling multiple servers to use the same path detection data, reducing the number of path detection data generation and Save detection time.

Benefits of technology

The sharing of path detection data is realized, reducing the amount of data required during path detection, and improving the efficiency and speed of data center network path detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115396355B
    Figure CN115396355B
Patent Text Reader

Abstract

The network path detection method, device and electronic device disclosed in the embodiments of the present disclosure can perform hash processing on the path detection data according to a preconfigured hash factor after receiving the path detection data sent by the server, and the path detection data after hash processing can be used to generate a shared path, so that a shared path generated by one path detection data can be used by multiple servers. In this way, the server can first obtain the shared path and then determine whether to generate the path detection data during the process of path construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet technology, and in particular to a network path detection method, device and electronic device. Background Art

[0002] Data centers usually include servers and switches. When information is transmitted between servers, switches are required to forward information. A data center may include multiple servers and multiple switches. Therefore, there may be many network paths when data is transmitted between servers. When each transmission path in the data center is clearly known, the network path for information transmission between servers can be selected according to the situation. Summary of the invention

[0003] This disclosure section is provided to introduce concepts in a brief form, which will be described in detail in the detailed description section below. This disclosure section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] The embodiments of the present disclosure provide a network path detection method, device and electronic device, which can build a shared path, thereby reducing the path detection data that needs to be generated during the path construction process and saving time for data center network path detection.

[0005] In a first aspect, an embodiment of the present disclosure provides a network path detection method, which is applied to any switch in a data center, wherein the data center includes at least two servers and at least two switches, and data is transmitted between the servers through the switches; the method includes: in response to receiving path detection data sent by a first server, hashing the received path detection data according to a preconfigured hash factor; sending the path detection data after hashing to a next node, wherein the next node is a server or a switch; wherein, after the path detection data after hashing reaches the destination server, a path construction device uses the path detection data after hashing to construct a shared path; wherein the shared path corresponds to at least one second server; wherein the starting point of the shared path is the switch and the end point is the server.

[0006] In a second aspect, an embodiment of the present disclosure provides a network path detection device, which is applied to any switch in a data center, wherein the data center includes at least two servers and at least two switches, and data is transmitted between the servers through the switches; the device includes: a processing unit, which is used to perform hash processing on the received path detection data according to a preconfigured hash factor in response to receiving the path detection data sent by the first server; a sending unit, which is used to send the path detection data after hash processing to the next node, wherein the next node is a server or a switch; wherein, after the path detection data after hash processing reaches the destination server, the path construction device uses the path detection data after hash processing to construct a shared path; wherein the shared path corresponds to at least one second server; wherein the starting point of the shared path is the switch and the end point is the server.

[0007] In a third aspect, an embodiment of the present disclosure provides a network path detection method, which is applied to a first server in a data center, wherein the data center includes at least two servers and at least two switches, and data is transmitted between the servers through the switches; wherein the first server is any one of the at least two servers; the method includes: in response to detecting a path generation instruction, generating new path detection data, and sending the generated new path detection data to a matching switch; wherein the path detection data is used to construct a shared path, the shared path corresponds to at least one second server, the starting point of the shared path is the switch, and the end point is the server.

[0008] In a fourth aspect, a first server is applied to a data center, wherein the data center includes at least two servers and at least two switches, and data is transmitted between the servers through the switches; wherein the first server is any one of the at least two servers; the device includes: a generation unit, which is used to generate new path detection data in response to detecting a path generation instruction, and send the generated new path detection data to a matching switch; wherein the path detection data is used to construct a shared path, the shared path corresponds to at least one second server, the starting point of the shared path is the switch, and the end point is the server.

[0009] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, comprising: at least one processor; a storage device for storing at least one program, wherein when the at least one program is executed by the at least one processor, the at least one processor implements the network path detection method as described in the first and third aspects.

[0010] In a sixth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the network path detection method described in the first and third aspects.

[0011] The network path detection method, device, and electronic device provided by the embodiments of the present disclosure can perform hash processing on the path detection data according to a preconfigured hash factor after receiving the path detection data sent by the server, and the path detection data after hash processing can be used to generate a shared path, so that a shared path generated by one path detection data can be used by multiple servers. This method can not only reduce the amount of path detection data that the server needs to generate during the path detection process, but also save the time of the data center for network path detection because the shared path can be shared. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0013] Figure 1 is a flow chart of an embodiment of a network path detection method according to the present disclosure;

[0014] Figure 2 is a structural schematic diagram of a data center according to an embodiment of the network path detection method disclosed herein;

[0015] Figure 3 is a structural schematic diagram of a data center according to another embodiment of the network path detection method disclosed herein;

[0016] Figure 4 is a structural schematic diagram of a data center according to another embodiment of the network path detection method disclosed herein;

[0017] Figure 5 is a flow chart of another embodiment of the network path detection method according to the present disclosure;

[0018] Figure 6 is a structural schematic diagram of an embodiment of a network path detection device according to the present disclosure;

[0019] Figure 7 is a structural schematic diagram of another embodiment of the network path detection device according to the present disclosure;

[0020] Figure 8 is an exemplary system architecture in which the network path detection method of an embodiment of the present disclosure can be applied;

[0021] Fig. 9 It is a schematic diagram of the basic structure of an electronic device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0023] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0024] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0025] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0026] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0028] Please refer to Figure 1 , which shows the process of an embodiment of the network path detection method according to the present disclosure. The network path detection method can be applied to any switch in a data center. The data center may include at least two servers and at least two switches, and the servers transmit data through the switches. It should be noted that when data is transmitted between servers, it may pass through one switch or multiple switches. In order to better understand the data transmission process in the data center, it can be combined with Figure 2 To explain, Figure 2A possible structural diagram of a data center is shown in Figure 1. Figure 2 It can be seen that the paths between servers may pass through one switch or multiple switches, and there may be multiple paths between servers. Figure 1 As shown, the network path detection method disclosed in the present invention includes the following steps:

[0029] Step 101: In response to receiving path detection data sent by a first server, hash processing is performed on the received path detection data according to a preconfigured hash factor.

[0030] As an example, when the switch performs load balancing, the hash factor can be configured, so the received path detection data can be hashed according to the pre-configured hash factor. For example, the hash factor can be configured using only part of the path detection data, so that the path detection data after hashing can generate a shared path.

[0031] For example, the path detection data generated by the server can be understood as five-tuple data (source IP address, destination IP address, protocol number, source port number, destination port number). After the switch receives the path detection data and hashes the path detection data, the path detection data can only include: destination IP address, source port number, destination port number. In this way, the path detection data after hashing can be convenient for generating a shared path.

[0032] That is, it can be understood that by configuring the hash factor, the data indicating the source server address in the path detection data generated by the server can be not hashed. In this way, it is also convenient to use the path detection data after hashing to build a shared path.

[0033] To facilitate understanding, an example is given. Before the hash factor is configured, when path detection data is used for path detection, only the path between servers can be detected. This type of path obviously cannot be used by other servers when performing path detection. By pre-configuring the hash factor, the path detection data after hash processing does not include data used to indicate the source server address. In this way, it is convenient to use the path detection data to build a path between the switch and the server, and this type of path can be used by multiple servers.

[0034] Step 102: Send the path detection data after hash processing to the next node.

[0035] Here, the next node can be a server or a switch.

[0036] Here, after the path detection data after hash processing reaches the destination server, the path construction device uses the path detection data after hash processing to construct a shared path.

[0037] Here, the starting point of the shared path may be a switch, and the end point may be a server.

[0038] Here, the shared path may correspond to at least one second server.

[0039] It should be noted that, in a data center, a server currently performing path detection can be understood as a first server, and other servers in the data center except the first server can be understood as second servers.

[0040] As an example, the shared path may correspond to at least one second server, which may be understood as: the shared path may be used by other servers except the first server. For example, another server may directly use the shared path during the process of performing path detection.

[0041] To better understand the shared paths, you can combine Figure 3 For example, shared path a indicates that the server is from switch a to server D; any server that indicates reaching server D and can be connected to switch a can share shared path a. For example, server B can be connected to switch a, and server B needs to exchange data with server D. When server B performs path detection, it can use shared path a. Correspondingly, if server C can be connected to switch a, and server C needs to exchange data with server D, server C can also use shared path a.

[0042] As an example, the path detection data after hash processing is sent to the next node, and the data received by the next node is the path detection data after hash processing, so that it is convenient to build a shared path.

[0043] As an example, the path building device may be a separate device; the path building device may be connected to the switch and receive information sent by the switch (eg, information sent by the switch for building a path).

[0044] As an example, if you need to build a path between server A and server B, server A needs to generate path detection data and then send the path detection data to server B. However, when data is transmitted between server A and server B, it may pass through one switch or multiple switches. Therefore, the execution subject can send the path detection data after hashing to the next node. The next node may be a switch or a server. The path construction device can know which switches the path detection data passes through, and since the path detection data after hashing may not contain the address of the source server, the path construction device can build a shared path.

[0045] It can be seen that the path construction device uses the path detection data after hash processing to construct a shared path. In this way, a shared path generated by a path detection data can be shared by multiple servers. In this way, the number of path detection data that needs to be generated during the path detection process can be saved.

[0046] In the related art, the switch does not configure the hash factor, so that when constructing a path, only the path between servers can be obtained. In this way, during the network path detection process, a path detected by a path detection data generated by a server can only be used by the server. That is, during the path detection process, the server will generate a large amount of path detection data.

[0047] In the present application, after receiving the path detection data sent by the server, the path detection data can be hashed according to the preconfigured hash factor, and the path detection data after hashing can be used to generate a shared path, so that a shared path generated by one path detection data can be used by multiple servers. This method can not only reduce the amount of path detection data that the server needs to generate during the path detection process, but also save the time of the data center for network path detection because the shared path can be shared.

[0048] In some embodiments, path construction data is generated based on the received path detection data, and the path construction data is sent to the path construction device.

[0049] Here, the path construction device constructs a shared path according to the path construction data sent by the switch.

[0050] Here, the path construction data includes the address of the switch and the received path detection data.

[0051] As an example, the path construction data may include path detection data and addresses of switches; in this way, the path construction device may generate a shared path.

[0052] For ease of understanding, you can combine Figure 4 To explain, Figure 4 It can be understood as a schematic diagram of information transmission in one of the application scenarios of the present disclosure; Figure 4 As shown, the switch can be connected to the path construction device. After receiving the path detection data, the switch can generate path construction data and send the path construction data to the path construction device. Since the path construction data includes the IP address of the switch and the path construction data, the path construction device can also know which switches the path construction data passes through, so as to build a shared path.

[0053] As an example, in a specific implementation, when server A sends path detection data to server B, it may pass through multiple switches, for example, switch a, switch b, and switch c; when the path detection data a generated by server A is transmitted to switch a, it can be hashed by switch a. At this time, the path detection data b after hashing (at this time, the path detection data b does not include the address of the source server A), and the path detection data b can be sent to switch b, and switch a can also generate path construction data a from the path detection data a and the address of switch a, and send the path construction data a to the path construction device; accordingly, when switch b receives the path detection data b, it also performs hashing, and sends the path detection data c after hashing to switch c, and generates path construction data b and sends it to the path construction device. Accordingly, after receiving the path detection data c, switch c generates path construction data c and path detection data d, and can send the path construction data c to the path construction device, and sends the path detection data d to server B.

[0054] At this time, the path construction device can generate a path from server A to server B, a path from switch a to server B, a path from switch b to server B, and a path from switch c to server B based on the received path construction data a, path construction data b, and path construction data c. The path from switch a to server B, the path from switch b to server B, and the path from switch c to server B can be understood as a shared path.

[0055] It should be noted that, in a specific implementation manner, the specific shared paths generated can be set according to actual conditions.

[0056] That is, it can be understood that after receiving the path detection data, the switch can first use the switch monitoring tool (for example, it can mirror the same path detection data for ERSPAN (Encapsulated Remote Switch Port Analyzer)), and then generate the path construction data according to the IP address of the switch.

[0057] It can be seen that after receiving the path detection data, the switch generates path construction data and sends it to the path construction device, and the path construction device can use the path construction data to build a path; in this way, not only can the detection efficiency of the path detection process be further improved; but also by using the method of generating path construction data by mirroring, the applicability of the network path detection method provided in the present application can be made higher; that is, a data center with a relatively complex network topology can also use the method provided in the present application to perform network path detection.

[0058] In the related art, there are usually two methods for network path detection. The first is to use route tracking (for example, traceroute under Windows system) for full path detection. Traceroute is a network tool that can display the IP addresses of nodes that a data packet passes through on the network. Its principle can be roughly understood as using the time to live (TTL) value of the data packet. Every time a data packet passes through a router, its time to live will be reduced by 1. When its time to live is 0, the host cancels the data packet and sends an ICMP TTL data packet to the source host, so the source host knows the IP of the node on the path. The second is a path detection method based on ACPP (ACCL probing protocol, transmission protocol). ACPP requires the extension of the traditional IP network protocol. An ACPP packet is encapsulated into a UDP packet (protocol packet), and the DSCP field of the IP packet header is used to mark the ACCP message. The source host sends a detection packet with DSCP=X. After receiving the detection packet, the switch with ID N will update DSCP=X+N. After receiving the packet, the destination host will construct a detection response packet with content N and DSCP=Y to the source host. The source host detects the ID of the switch, thus realizing the construction of the path.

[0059] However, in the related art, the implementation principle of the first method will cause the switch to generate a large number of ICMP packets. In order to prevent being attacked, the switch has a strict rate limit for generating and replying ICMP packets. Not responding to ICMP packets leads to low detection efficiency and long detection time. When the second method performs full-path detection, it is necessary to extend the IP network protocol and require all nodes in the path to support it, which is difficult to deploy and has high implementation costs. In addition, the expansion of ACPP depends on recording a switch ID information in the dscp header. Due to the limited length of the dscp header field, the network scale supported by ACPP is also limited.

[0060] It can be seen that the present application provides a new network path detection method, which can not only improve the efficiency of the path detection process, but also detect the network path of a relatively complex data center without extending the IP network protocol. That is, the new network path detection method provided by the present disclosure has the advantages of high detection efficiency and high applicability.

[0061] At the same time, since the path construction data is sent to the path construction device in a mirroring manner, the problem of the switch responding too slowly in order to prevent being attacked can also be avoided, that is, this can further improve the efficiency of the path detection process.

[0062] In some embodiments, the path detection data generated by the server is a five-tuple data, wherein the five-tuple data includes first data for indicating the address of the first server; at this time, hashing the received path detection data according to the preconfigured hash factor in step 101 may specifically include: hashing the data in the five-tuple data except the first data.

[0063] As an example, the five-tuple data is hashed except for the first data indicating the first server address, so that the obtained hashed path detection data does not include the data indicating the first server address, which makes it easier to build a shared path.

[0064] As an example, the five-tuple data may include the IP address of the source server, the IP address of the destination server, the communication protocol number, the port number of the source server, and the port number of the destination server; if the hash factor is configured based on the IP address of the source server, the IP address of the destination server, the port number of the source server, and the port number of the destination server, the path detection data after hashing will not include the IP address of the source server.

[0065] Therefore, in the present disclosure, the hash factor can be configured according to the IP address of the destination server, the port number of the source server, and the port number of the destination server, so that the path detection data after hashing does not have the IP address of the source server. In this way, it is also convenient to generate a shared path.

[0066] In some embodiments, the path detection data may be determined as follows:

[0067] Whether the data is path detection data may be determined according to a value indicating a service type in the received data.

[0068] As an example, the value used to indicate the service type in the data may be understood as a DSCP value (Differentiated Services Code Point).

[0069] As an example, setting the DSCP value to a specific value can facilitate the switch to determine which data among the received data is path detection data.

[0070] In some implementations, when the server generates the path detection data, the DSCP value may be set to a predefined value, so that the switch can be facilitated to screen the data and thereby determine the path detection data used to detect the path.

[0071] In some embodiments, you can continue to refer to Figure 5 , Figure 5 This is a flow chart of an embodiment of the network path detection method disclosed in the present invention. The network path detection method can be applied to a first server in a data center, wherein the data center includes at least two servers and at least two switches, and data is transmitted between the servers through the switches; wherein the first server is any one of the at least two servers. Figure 5 As shown, the network path detection method includes the following steps:

[0072] Step 501: In response to detecting a path generation instruction, new path detection data is generated, and the generated new path detection data is sent to a matching switch.

[0073] Here, the path detection data is used to construct a shared path, the shared path corresponds to at least one second server, the starting point of the shared path is the switch, and the end point is the server.

[0074] As an example, the first server may be understood as a server that is performing path detection, and the second server may be understood as a server other than the first server among the at least two servers.

[0075] Here, after receiving the path detection data, the switch processes the received path detection data according to the above processing steps of step 101 to step 102. For the sake of brevity of the specification, it will not be described in detail here.

[0076] As an example, a switch that can be matched with a server can be understood as a switch that can directly exchange information with the server. Figure 2 As shown, the switches matching the server A include switch a and switch b.

[0077] As an example, when a path generation instruction is detected, it can be indicated that the server needs to generate new path detection data to perform path detection.

[0078] As an example, the new path detection data generated by the server may also be five-tuple data.

[0079] As an example, the server includes a path generation unit, and the path generation unit can generate path detection data according to instructions of the path generation instruction.

[0080] In some embodiments, whether to generate a path generation instruction may be determined in the following manner:

[0081] According to the total number of paths that have been acquired and the preset number of paths, it is determined whether to generate a path generation instruction.

[0082] As an example, a monitoring agent may be deployed on a server, and the monitoring agent is used to determine whether path detection data needs to be generated and to generate path generation instructions.

[0083] In some implementations, the monitoring agent may control the path generation unit to generate the path detection data. That is, after generating the path generation instruction, the monitoring agent may directly control the path generation unit to generate the path detection data according to the generated path generation instruction.

[0084] As an example, the number of preset paths may be determined based on the total number of paths that the server may be able to communicate with other servers. Of course, how to determine the number of preset paths may be limited according to actual conditions.

[0085] As an example, the server may determine whether to generate a path generation instruction based on the total number of paths that have been acquired and the number of preset paths. In this way, the server may be prevented from generating too much path detection data and sending too much path detection data. This may save computing resources consumed during the path detection process.

[0086] In some embodiments, the total number of paths may be determined as follows:

[0087] Acquire a shared path matching the first server; generate a separate path corresponding to the first server based on the acquired shared path; and determine the total number of paths according to the generated separate path and the detection result of the path detection data generated by the first server.

[0088] As an example, the shared path constructed by the path construction device can be stored in a server (target server). When the first server needs to perform path detection, it can first go to the target server to obtain the shared path that matches the first server. Then, a separate path corresponding to the first server is generated. When the number of generated separate paths is insufficient, path detection data can be generated to continue detecting the path corresponding to the first server.

[0089] As an example, a separate path can be understood as a path that can only be used by the first server. That is, a path that other servers cannot share with the first server can be understood as a separate path.

[0090] As an example, the generated path detection data can detect a separate path corresponding to the first server. The specific path detection process has been described in detail above, and for the sake of brevity of the specification, it will not be repeated here.

[0091] It should be noted that the path detection data generated by the server can generate a shared path or a separate path, but the separate path can only be used by the server.

[0092] As an example, the total number of paths that the current server has detected may be determined by adding the individual paths generated by the acquired shared paths to the detection results of the path detection data.

[0093] In some implementations, when a server needs to perform path detection, it can first obtain a shared path (a shared path generated when other servers perform path detection). After obtaining the shared path, a separate path can be generated. When it is detected that the number of generated separate paths is insufficient, path detection data can be generated to continue path detection.

[0094] It should be noted that after the server obtains the shared path, the server can generate a separate path based on the shared path.

[0095] As an example, when a shared path generates a separate path, the source port number and the destination port number need to be determined; at this time, path detection data can be generated, and the source port number and the destination port number in the detection data can be randomly generated (for example, the destination server is server B). If the source port number and the destination port number in the detection data are correct (if the separate path can be generated normally, it can be represented that the source port number and the destination port number in the detection data are correct), then the shared path indicating the end point as server B can directly use the source port number and the destination port number to generate the corresponding separate path. It can be seen that this method can quickly generate a separate path. In other words, it can be understood that when server A needs to detect the path with server B, server A can randomly generate the source port number and the destination port number. When one of the paths is detected, the shared path used to indicate server B can also be converted into a separate path.

[0096] It should be noted here that if the server is the first server to perform path detection, the shared path obtained may be zero (because there may be no shared path at this time). Therefore, in some implementations, if it is determined that the server is the first server to perform path detection, the total number of paths can be determined directly based on the detection results of the path detection data generated by the server.

[0097] In some implementations, the number of preset paths may be determined in the following manner: the number of preset paths may be determined based on network topology information of the data center.

[0098] In some embodiments, the number of paths corresponding to the server and other servers can also be determined based on the network topology information of the data center. For example, if the server can interact with three other servers (server A, server B, and server C), the number of paths corresponding to each of the server and other servers can be determined based on the network topology information of the data center, and accordingly, the total number of paths that the server can interact with can also be known.

[0099] In some embodiments, the path detection data includes source port data and destination port data, and the 'generating new path detection data' in step 501 may specifically include: randomly generating source port data and destination port data.

[0100] As an example, by randomly generating source port data and destination port data, path detection data can be quickly generated, thereby saving time for generating path detection data.

[0101] In order to better understand the present application, the whole process of path detection in the present application is briefly described below:

[0102] Before performing path detection, the switch can be configured first, including configuring the hash factor of the switch and configuring the monitoring tool of the switch (to facilitate mirroring the received path detection data); the path detection data generated by the server is sent to the switch. After receiving the path detection data, the switch hashes the path detection data according to the configured hash factor. The switch also generates path construction data based on the received path detection data and sends the path construction data to the path construction device. The path construction device can store the completed shared paths in a unified manner (for example, in one of the servers). In this way, when a server needs to build a path, it first obtains the corresponding shared path, and then determines whether to generate path detection data to continue path detection based on the situation of the generated individual path. This method can also improve the efficiency of the path construction process.

[0103] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a network path detection device. Figure 1 Corresponding to the network path detection method embodiment shown, the device can be specifically applied to various electronic devices.

[0104] like Figure 6 As shown, the network path detection device of this embodiment is applied to any switch in a data center, and the above-mentioned data center includes at least two servers and at least two switches, and data is transmitted between the servers through the switches; the network path detection device includes: a processing unit 601, which is used to respond to the path detection data sent by the first server and perform hash processing on the received path detection data according to a preconfigured hash factor; a sending unit 602, which is used to send the path detection data after hash processing to the next node, wherein the next node is a server or a switch; wherein, after the path detection data after hash processing reaches the destination server, the path construction device uses the path detection data after hash processing to construct a shared path; wherein, the shared path corresponds to at least one second server; wherein, the starting point of the shared path is the switch and the end point is the server.

[0105] In some embodiments, the network path detection apparatus is further configured to generate path construction data based on the received path detection data, and send the path construction data to the path construction device; wherein the path construction data includes the address of the switch and the received path detection data.

[0106] In some embodiments, the path detection data generated by the server is five-tuple data, wherein the five-tuple data includes first data for indicating the first server address; and the processing unit 601 is specifically used to hash the data in the five-tuple data except the first data.

[0107] In some embodiments, the network path detection device is further used to determine the path detection data in the following manner: determine whether the data is path detection data according to a value indicating a service type in the received data.

[0108] Further references Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a network path detection device. Figure 5 Corresponding to the network path detection method embodiment shown, the device can be specifically applied to various electronic devices.

[0109] like Figure 7 As shown, the network path detection device of this embodiment is applied to the first switch of a data center, the data center includes at least two servers and at least two switches, and data is transmitted between the servers through the switches; wherein the first server is any one of the at least two servers; the network path detection device includes: a generation unit, which is used to generate new path detection data in response to detecting a path generation instruction, and send the generated new path detection data to a matching switch; wherein the path detection data is used to construct a shared path, the shared path corresponds to at least one second server, the starting point of the shared path is the switch, and the end point is the server.

[0110] In some embodiments, the apparatus further includes a determining unit 702 for determining whether to generate a path generation instruction in the following manner: determining whether to generate a path generation instruction according to the total number of paths that have been acquired and the number of preset paths.

[0111] In some embodiments, the above-mentioned determination unit 702 is also specifically used to determine the total number of paths in the following manner: obtaining a shared path matching the first server; generating a separate path corresponding to the first server based on the obtained shared path; and determining the total number of paths based on the generated separate path and the detection results of the path detection data generated by the first server.

[0112] In some embodiments, the determination unit 702 is further configured to determine the number of preset paths in the following manner: determining the number of preset paths according to the network topology information of the data center.

[0113] In some embodiments, the path detection data includes source port data and destination port data, and the generating unit 701 is specifically further configured to randomly generate the source port data and the destination port data.

[0114] Please refer to Figure 8 , Figure 8 An exemplary system architecture is shown in which the network path detection method according to an embodiment of the present disclosure can be applied.

[0115] like Figure 8 As shown, the system architecture may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 may be used to provide a medium for a communication link between the terminal devices 801, 802, 803 and the server 805. The network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0116] The terminal devices 801, 802, and 803 can interact with the server 805 through the network 804 to receive or send messages, etc. Various client applications, such as web browser applications, search applications, and news information applications, can be installed on the terminal devices 801, 802, and 803. The client applications in the terminal devices 801, 802, and 803 can receive user instructions and perform corresponding functions according to the user instructions, such as adding corresponding information to the information according to the user instructions.

[0117] Terminal devices 801, 802, and 803 can be hardware or software. When terminal devices 801, 802, and 803 are hardware, they can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) players, laptop computers, and desktop computers, etc. When terminal devices 801, 802, and 803 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0118] The server 805 may be a server that provides various services, such as receiving information acquisition requests sent by the terminal devices 801, 802, and 803, acquiring display information corresponding to the information acquisition requests in various ways according to the information acquisition requests, and sending the relevant data of the display information to the terminal devices 801, 802, and 803.

[0119] It should be noted that the information processing method provided in the embodiment of the present disclosure can be executed by a terminal device, and accordingly, the network path detection device can be set in the terminal devices 801, 802, and 803. In addition, the information processing method provided in the embodiment of the present disclosure can also be executed by a server 805, and accordingly, the information processing device can be set in the server 805.

[0120] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0121] Reference below Fig. 9 , which shows an electronic device (eg, Figure 8 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0122] like Fig. 9 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. In RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0123] Typically, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0124] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0125] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with at least one wire, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0126] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0127] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0128] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: in response to receiving the path detection data sent by the first server, according to the preconfigured hash factor, performs hash processing on the received path detection data; sends the path detection data after hash processing to the next node; wherein the next node is a server or a switch; wherein, after the path detection data after hash processing reaches the destination server, the path construction device uses the path detection data after hash processing to construct a shared path; wherein the shared path corresponds to at least one second server; wherein the starting point of the shared path is the switch and the end point is the server.

[0129] In some embodiments, path construction data is generated based on the received path detection data, and the path construction data is sent to the path construction device; wherein the path construction data includes the address of the switch and the received path detection data.

[0130] In some embodiments, the path detection data generated by the server is a five-tuple data, wherein the five-tuple data includes first data for indicating the first server address; and the above-mentioned hash processing of the received path detection data according to the preconfigured hash factor includes: hashing the data in the five-tuple data except the first data.

[0131] In some embodiments, the path detection data is determined in the following manner: determining whether the data is path detection data according to a value indicating a service type in the received data.

[0132] In some embodiments, in response to detecting a path generation instruction, new path detection data is generated, and the generated new path detection data is sent to a matching switch; wherein the path detection data is used to construct a shared path, the shared path corresponds to at least one second server, the starting point of the shared path is the switch, and the end point is the server.

[0133] In some embodiments, whether to generate a path generation instruction is determined in the following manner: determining whether to generate a path generation instruction is determined based on the total number of paths that have been acquired and the number of preset paths.

[0134] In some embodiments, the total number of paths is determined by: obtaining a shared path that matches the first server; generating a separate path corresponding to the first server based on the obtained shared path; and determining the total number of paths based on the generated separate path and the detection results of the path detection data generated by the first server.

[0135] In some embodiments, the preset number of paths is determined in the following manner: the preset number of paths is determined based on the network topology information of the data center.

[0136] In some embodiments, the path detection data includes source port data and destination port data, and the generating of new path detection data includes: randomly generating source port data and destination port data

[0137] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0138] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains at least one executable instruction for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0139] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the processing unit 601 may also be described as a "unit for performing hash processing on received path detection data".

[0140] The functions described above herein may be performed at least in part by at least one hardware logic component. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0141] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on at least one line, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0142] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0143] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0144] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A network path detection method, characterized in that: Any switch used in a data center, wherein the data center includes at least two servers and at least two switches, and data is transmitted between the servers through the switches; In response to receiving the path detection data sent by the first server, performing hash processing on the received path detection data according to a preconfigured hash factor; Sending the hashed path detection data to the next node; wherein the next node is a server or a switch; wherein after the hashed path detection data reaches the destination server, the path construction device uses the hashed path detection data to construct a shared path; wherein the shared path corresponds to at least one second server; wherein the starting point of the shared path is the switch and the end point is the server; The method further comprises: Based on the received path detection data, path construction data is generated and sent to the path construction device; wherein the path construction device constructs a shared path according to the path construction data sent by the switch; the path construction data includes the address of the switch and the received path detection data.

2. The method according to claim 1, characterized in that The path detection data generated by the server is five-tuple data, wherein the five-tuple data includes first data for indicating the address of the first server; And, performing hash processing on the received path detection data according to the preconfigured hash factor includes: The data in the quintuple data except the first data is hashed.

3. The method according to claim 1, characterized in that: Path detection data is determined as follows: According to the value indicating the service type in the received data, it is determined whether the data is path detection data.

4. A network path detection method, characterized in that: A first server applied to a data center, the data center comprising at least two servers and at least two switches, data transmission between the servers is performed via the switches; wherein the first server is any one of the at least two servers; In response to detecting a path generation instruction, new path detection data is generated, and the generated new path detection data is sent to a matching switch; wherein, in response to receiving the path detection data sent by the first server, the switch performs hash processing on the received path detection data according to a preconfigured hash factor; and, the path detection data after hash processing is sent to the next node; and, based on the received path detection data, path construction data is generated, and the path construction data is sent to a path construction device; wherein the next node is a server or a switch; wherein, after the path detection data after hash processing reaches the destination server, the path construction device uses the path detection data after hash processing to construct a shared path; the shared path corresponds to at least one second server, and the starting point of the shared path is the switch and the end point is the server.

5. The method according to claim 4, characterized in that Whether to generate a path generation instruction is determined by the following method: Whether to generate a path generation instruction is determined based on the total number of paths that have been acquired and the number of preset paths.

6. The method according to claim 5, characterized in that The total number of paths is determined as follows: Acquire a shared path matching the first server; Based on the acquired shared path, generating a separate path corresponding to the first server; The total number of paths is determined according to the generated individual paths and the detection results of the path detection data generated by the first server.

7. The method according to claim 5, characterized in that The number of preset paths is determined as follows: The preset number of paths is determined according to the network topology information of the data center.

8. The method according to claim 4, characterized in that The path detection data includes source port data and destination port data, and the generating of new path detection data includes: Randomly generate source port data and destination port data.

9. A network path detection device, characterized in that: Any switch used in a data center, the data center includes at least two servers and at least two switches, and data is transmitted between the servers through the switches; the device includes: a processing unit, configured to, in response to receiving the path detection data sent by the first server, perform hash processing on the received path detection data according to a preconfigured hash factor; A sending unit, used to send the path detection data after hash processing to a next node, wherein the next node is a server or a switch; wherein after the path detection data after hash processing reaches the destination server, the path construction device uses the path detection data after hash processing to construct a shared path; wherein the shared path corresponds to at least one second server; wherein the starting point of the shared path is the switch and the end point is the server; The device is also used to: generate path construction data based on the received path detection data, and send the path construction data to the path construction device; wherein the path construction device builds a shared path according to the path construction data sent by the switch; and the path construction data includes the address of the switch and the received path detection data.

10. A network path detection device, characterized in that: A first server applied to a data center, the data center includes at least two servers and at least two switches, and data is transmitted between the servers through the switches; wherein the first server is any one of the at least two servers; the device includes: A generation unit, for generating new path detection data in response to detecting a path generation instruction, and sending the generated new path detection data to a matching switch; wherein the switch, in response to receiving the path detection data sent by the first server, performs hash processing on the received path detection data according to a preconfigured hash factor; and sends the hashed path detection data to the next node; and, based on the received path detection data, generates path construction data, and sends the path construction data to a path construction device; wherein the next node is a server or a switch; wherein, after the hashed path detection data reaches the destination server, the path construction device uses the hashed path detection data to construct a shared path; the shared path corresponds to at least one second server, the starting point of the shared path is the switch, and the end point is the server.

11. An electronic device, characterized in that: include: at least one processor; a storage device for storing at least one program, When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 8.

12. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Multipath TCP (transmission control protocol) congestion control method based on continuous message marks

    CN104796350A

  • Path detection method and device

    CN112350938A

  • Network detection method and platform and computer readable storage medium

    CN113055238A

  • Network path detection method and device, data center and computing equipment

    CN113765788A

  • Fault detection method and device of data center network based on in-band network telemetering system

    CN113938407A