A cloud network data packet loss tracking method and related equipment
By acquiring and analyzing the forwarding information and shard length in the data packet records uploaded by network devices, the problem of low packet loss detection accuracy in the prior art is solved, and accurate tracking and positioning of packet loss in cloud networks is achieved.
Patent Information
- Application Number
- CN202411535599.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-10-31
AI Technical Summary
In the prior art, when detecting packet loss in a cloud network, it cannot accurately reflect the real data transmission and reception volume of the network equipment, especially when the data packet contains IP sharded data, resulting in a decrease in the accuracy of packet loss detection.
By obtaining the data packet records uploaded by the network device, the record contains the forwarding information of the dyed data packets and the slice length of each data fragment, the data transmission path is restored based on this information, and the accumulated data amount of each network device is calculated to determine the abnormal network device or data link that has lost packets in the data transmission path.
The accuracy of packet loss detection is improved, and the packet loss location can be accurately located when the data packet contains IP shard data, solving the problem of low detection accuracy in the prior art.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] The disclosed embodiments relate to the technical field of cloud computing, and in particular to a method for tracking packet loss in a cloud network and related equipment. Background Art
[0002] In a public cloud environment, each cloud tenant has an isolated virtual network. When processing computing tasks, if the tenant's computing resources (virtual machines / containers) want to access resources in other locations or provide services to the outside world, they need to communicate data packets with the outside world through the virtual network. When the data packets of tenant services are forwarded through network devices, if any network device in the data transmission link fails, data packets will be lost, causing damage to the tenant's services. Therefore, cloud service providers need to quickly locate the packet loss location so that they can take corresponding measures to restore network services in a timely manner.
[0003] In the prior art, cloud service providers use network devices to dye and detect data, and collect data packet records reported by network devices to restore the transmission path of the dyed data, thereby analyzing the abnormal network devices where packet loss occurs.
[0004] However, when the colored data includes IP fragment data, the solution in the prior art has the problem that the data packet record cannot reflect the actual data transmission and reception volume of the network device, thereby reducing the accuracy of packet loss detection. Summary of the invention
[0005] The disclosed embodiments provide a cloud network data packet loss tracking method and related devices to overcome the problem of reduced accuracy of packet loss detection.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for tracing packet loss in a cloud network, comprising:
[0007] Obtaining a data packet record uploaded by a network device, wherein the data packet record includes forwarding information of a dyed data packet and the fragment length of each data fragment of the dyed data packet, wherein the forwarding information is used to indicate the upstream and downstream network devices on which the network device depends for forwarding the dyed data packet, and the dyed data packet includes at least two data fragments;
[0008] According to the forwarding information of multiple network devices, the data transmission path is restored; according to the fragment length of each data fragment of the dyeing data packet corresponding to the multiple network devices, the cumulative data volume of the dyeing data packet forwarded by each of the network devices is obtained, and the cumulative data volume represents the sum of the fragment lengths of each data fragment in the dyeing data packet;
[0009] According to the accumulated data volume corresponding to each of the network devices, an abnormal network device or an abnormal data link where packet loss occurs in the data transmission path is determined.
[0010] In a second aspect, an embodiment of the present disclosure provides a cloud network data packet loss tracking device, comprising:
[0011] An acquisition module, used for acquiring a data packet record uploaded by a network device, wherein the data packet record includes forwarding information of a dyed data packet and the fragment length of each data fragment of the dyed data packet, wherein the forwarding information is used to indicate the upstream and downstream network devices on which the network device depends for forwarding the dyed data packet, and the dyed data packet includes at least two data fragments;
[0012] A restoration module, used to restore the data transmission path according to the forwarding information of multiple network devices;
[0013] A determination module is used to obtain the cumulative data volume of the colored data packets forwarded by each of the network devices according to the fragment length of each data fragment of the colored data packets corresponding to the multiple network devices, the cumulative data volume represents the sum of the fragment lengths of each data fragment in the colored data packets, and determine the abnormal network device or abnormal data link where packet loss occurs in the data transmission path according to the cumulative data volume corresponding to each of the network devices.
[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0015] The memory stores computer-executable instructions;
[0016] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud network data packet loss tracking method described in the first aspect and various possible designs of the first aspect.
[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the cloud network data packet loss tracking method described in the first aspect and various possible designs of the first aspect is implemented.
[0018] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the cloud network data packet loss tracking method described in the first aspect and various possible designs of the first aspect.
[0019] The present embodiment provides a cloud network data packet loss tracking method and related equipment, by obtaining a data packet record uploaded by a network device, the data packet record contains the forwarding information of the dyed data packet and the fragment length of each data fragment of the dyed data packet, wherein the forwarding information is used to indicate the upstream and downstream network devices that the network device relies on to forward the dyed data packet, and the dyed data packet includes at least two data fragments; according to the forwarding information of multiple network devices, the data transmission path is restored; according to the fragment length of each data fragment of the dyed data packet corresponding to the multiple network devices, the cumulative data volume of the dyed data packet forwarded by each network device is obtained, and the cumulative data volume represents the sum of the fragment lengths of each data fragment in the dyed data packet; according to the cumulative data volume corresponding to each network device, the abnormal network location where the packet loss occurs in the data transmission path is determined. The data transmission path is restored by obtaining the improved data packet record containing the forwarding information of the dyed data packet and the fragment length of each data fragment, and then the abnormal network location is determined based on the cumulative data volume of the dyed data packet forwarded by each network device, which solves the problem that the dyed data containing the data fragments cannot reflect the actual data transmission and reception volume of the network device, thereby improving the accuracy of packet loss detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0021] Figure 1 An application scenario diagram of the cloud network data packet loss tracking method provided by the embodiment of the present disclosure;
[0022] Figure 2 Schematic diagram of the process of tracing cloud network data packet loss provided by the embodiment of the present disclosure Figure 1 ;
[0023] Figure 3 A schematic diagram of a data packet record structure provided by an embodiment of the present disclosure;
[0024] Figure 4 for Figure 2 A flowchart of a specific implementation method of step S102 in the illustrated embodiment;
[0025] Figure 5 Schematic diagram of the process of tracing cloud network data packet loss provided by the embodiment of the present disclosure Figure 2 ;
[0026] Figure 6 for Figure 5A flowchart of a specific implementation method of step S203B in the illustrated embodiment;
[0027] Figure 7 A structural block diagram of a cloud network data packet loss tracking device provided by an embodiment of the present disclosure;
[0028] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;
[0029] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0031] The application scenarios of the embodiments of the present disclosure are explained below:
[0032] Figure 1 An application scenario diagram of the cloud network data packet loss tracking method provided in the embodiment of the present disclosure. The cloud network data packet loss tracking method provided in the embodiment of the present disclosure can be applied to the application scenario of network device fault detection. More specifically, the execution subject of this embodiment can be a server for detecting network device faults, or other electronic devices that perform similar functions. Among them, in some embodiments, the server can implement the cloud network data packet loss tracking method provided in the embodiment of the present application by running various computer executable instructions or computer programs. For example, computer executable instructions can be program-level commands, machine instructions or software instructions. The computer program can be a native program or software module in the operating system; it can be a local application, that is, a program that needs to be installed in the operating system to run. The above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form. The specific implementation form can be configured as needed. Furthermore, in some embodiments, the server can be an independent physical device, a device cluster or a distributed system composed of multiple physical devices, or a virtual device that provides basic cloud computing services such as cloud services, cloud storage, cloud communications, cloud databases, cloud computing, cloud functions, network services, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0033] refer to Figure 1 As shown in the figure, the data packets of the tenant services on the cloud (shown as unstained data) will be forwarded by multiple network devices (shown as network device A, network device B, etc.) during the transmission along the data transmission path. The network device can be a virtual network device or a physical network device. In this process, the network analysis server will send a data tracking task to the network controller. After that, the network controller will send a staining rule to the starting network device (i.e., network device A) corresponding to the starting node of the data transmission path. After that, the starting network device will mark the data passing through it, that is, the unstained data sent to the starting network device will be stained, and then the stained data will be generated and sent to the downstream network device, i.e., network device B. And so on, until the stained data is sent to the final target device, completing the data transmission. In this process, after receiving the above-mentioned stained data, each network device will encapsulate the forwarding information of the stained data packet into a data packet record and upload it to the network analysis server. After that, the network analysis center will restore the data transmission path through the data packet record, and locate the packet loss location according to the last location of the data, thereby achieving the purpose of fault locating of abnormal network devices.
[0034] In the prior art, reference Figure 1 As shown in , after obtaining the data packet records uploaded by the network device, the network analysis server restores the network path through which the colored data packet passes according to the data packet records, and counts the number of data packets at each network device in the path, thereby determining whether there is packet loss. For example, if the number of data packets passing through each network device is the same, there is no data packet loss. On the contrary, if the number of data packets passing through each network device is different, there is data packet loss.
[0035] However, the above-mentioned scheme in the prior art is only applicable to the scenario where the network device does not need to perform relevant fragmentation processing on the dyed data packet. In the scenario where the dyed data packet contains multiple data fragments, if the number of data packets received by the network device is greater than the maximum transmission unit (MTU) of the network device, or the network device needs to reassemble the data fragments after receiving the data packet, the data packet record cannot reflect the actual data transmission and reception volume of the network device, thereby causing the scheme of judging whether there is packet loss by counting the number of data packets at each network device in the path to fail, resulting in reduced accuracy of packet loss detection.
[0036] The disclosed embodiment provides a cloud network data packet loss tracking method to solve the above-mentioned problem.
[0037] refer to Figure 2 , Figure 2 Schematic diagram of the process of tracing cloud network data packet loss provided by the embodiment of the present disclosure Figure 1The method of this embodiment can be applied in a server, for example Figure 1 The network analysis server shown in FIG. 1 , the cloud network data packet loss tracking method includes:
[0038] Step S101: Obtain a data packet record uploaded by a network device, wherein the data packet record includes forwarding information of the dyed data packet and the fragment length of each data fragment of the dyed data packet, wherein the forwarding information is used to indicate the upstream and downstream network devices on which the network device depends for forwarding the dyed data packet, and the dyed data packet includes at least two data fragments.
[0039] For example, reference Figure 1 The application scenario diagram shown in the figure, in this embodiment, the network analysis server (hereinafter referred to as the server) is used as the execution body to introduce the cloud network data packet loss tracking method provided. As shown in the reference figure, the server sends a data tracking task to the network controller, and the network controller sends a coloring rule to the starting network device, so that the coloring information is inserted when a specific data packet passes through the initial network device to generate a colored data packet. After that, the colored data packet is forwarded in turn through each network device on the data transmission path and finally reaches the target device. In this process, after forwarding the above-mentioned colored data packet, the network device will generate a corresponding data packet record and upload the data packet record to the server, so that the server obtains the data packet record uploaded by the network device.
[0040] Among them, based on the previous introduction to the application scenario, when a data packet passes through a network device, the network device will perform transmission fragmentation on the data packet based on the Internet Protocol (IP). Specifically, when transmitting a data packet, if the length of the data packet exceeds the MTU (maximum transmission unit) of the forwarding interface, the data packet is divided into several smaller fragments for transmission, and the process of reassembling in the target system and device is performed. This process is a mechanism designed by the IP protocol to adapt to the MTU differences of different physical networks. In this embodiment, when the dyed data packet in the transmission process passes through the network device, the network device will fragment it to obtain at least two data fragments, that is, the dyed data packet includes at least two data fragments. Afterwards, after the network device performs data transmission based on the data fragments, on the one hand, the network device will record the data volume of each data fragment to form the fragment length of each data fragment of the dyed data packet, and the fragment length of the data fragment is recorded by the corresponding packet length information, that is, the packet length information represents the data volume of the data fragment, and each packet length information corresponds to a data fragment; then, a data packet record is formed based on the packet length information. For example, if a dyed data packet is composed of three data fragments, then the three data fragments correspond to a packet length information respectively. On the other hand, the network device will record the forwarding information of the dyed data packet. The forwarding information is used to characterize the position of the network device in the data transmission path. The forwarding information includes, for example, the tenant network identifier, the data packet address, port, transmission protocol, etc. Afterwards, the network device constructs a data packet record based on the forwarding information and the corresponding packet length information, and sends the data packet record to the server in a periodic upload or upload under specific trigger conditions, or the server periodically reads it from the network device.
[0041] Furthermore, in a possible implementation, the header of the dyed data packet has a dyeing identifier, which is written by the first network device on the data transmission path and is used to instruct the network device that receives the dyed data packet to generate a data packet record. After the first network device on the data transmission path receives the data packet, if it is identified as a data packet of the target tenant service, a dyeing identifier is added to it, that is, the message is dyed to form a dyed data packet. Thereafter, after other network devices receive the dyed data packet, they are configured to generate corresponding data packet records based on preset processing logic.
[0042] Furthermore, the packet header of the dyed data packet also has a first field and a second field, the first field represents the total length of the dyed data packet, and the second field represents the length of the packet header of the dyed data packet. The packet length information in the data packet record is generated based on the first field and the second field. More specifically, the first field is the Total Length field of the IP header of the data packet; the second field is the Internet Head Length (IHL) field of the IP header of the data packet, which indicates the length of the IP message header counted in 32-bit word length (4 bytes). Then the packet length information PayLoad Length = Total Length-Internet Head Length*4.
[0043] Figure 3 A schematic diagram of a data packet record structure provided by an embodiment of the present disclosure is shown below in conjunction with Figure 3 For a more detailed description of the process of the server obtaining data packet records, refer to Figure 3 As shown, exemplarily, after receiving the dyeing data packet D1 sent by the upstream network device A0, the network device A processes the dyeing data packet D1 to generate the dyeing data packet D2, and sends the dyeing data packet D2 to the downstream network device B; on the other hand, the network device A performs data volume statistics on the dyeing data packet D1 and the data slices in the dyeing data packet D2 to obtain the packet length information. Taking the case of performing statistics on the packet length information of the dyeing data packet D1 as an example, as shown in the figure, the dyeing data packet D1 includes data slices P1, data slices P2 and data slices P3 (shown as P1, P2, P3 in the figure), and the data volumes corresponding to the data slices P1, data slices P2 and data slices P3 are respectively counted. For example, the data volume of the data slice P1 is a_1, the data volume of the data slice P2 is a_2, and the data volume of the data slice P3 is a_3, then the corresponding packet length information Lr_1, Lr_2, Lr_3 are respectively formed according to a_1, a_2 and a_3.
[0044] Based on the same method, the data volume of each data fragment corresponding to the dyed data packet D2 is counted, and the packet length information corresponding to the dyed data packet D2 is obtained, which are Ls_1, Ls_2, Ls_3, and Ls_4. After that, the above-mentioned packet length information Lr_1, Lr_2, Lr_3 and the packet length information Ls_1, Ls_2, Ls_3, and Ls_4 obtained after statistics are used as all the packet length information corresponding to the network device A, and then the network device A forwards the forwarding information Info_1 corresponding to the dyed data packet and the above-mentioned packet length information to form a data packet record Rec_A corresponding to the network device A, and upload it to the server. In another possible implementation method, the above-mentioned packet length information can also be divided into multiple uploads to the server. For example, the above-mentioned packet length information Lr_1, Ls_1, etc., combined with the corresponding forwarding information, are sent to the server in sequence as data packet records, so that the server obtains the above-mentioned data packet records multiple times. Afterwards, the network device B downstream of the network device A receives the dyeing data packet D2, repeats the above process, further forwards the data packet, and generates a data packet record Rec_B corresponding to the network device B, and uploads it to the server. By analogy, the server obtains the data packet records uploaded by each network device on the data transmission path. In the steps of this embodiment, the fragmentation and reorganization of the dyeing data packet in the network path will result in an unpredictable number of dyeing data packets appearing at each position in the data transmission path, but the sum of the data length (byte number) of the data fragments (payload) is predictable, that is, the sum of the data volume of each data fragment is predictable. Based on this concept, the packet length information is designed and set in the data packet record, so as to achieve the tracking of dyeing data packets for multiple data fragments in the subsequent steps.
[0045] Step S102: restore the data transmission path according to the forwarding information of multiple network devices.
[0046] Exemplarily, after obtaining the above data packet record, the server first uses the forwarding information in the data packet record to restore the data transmission path, that is, the path for forwarding the dyed data packet between multiple network devices. In a possible implementation, the data transmission path can be a sequence composed of multiple network device identifiers arranged in order, or a sequence composed of network addresses corresponding to network devices. The specific implementation method can be set as needed.
[0047] In a possible implementation, the forwarding information includes the five-tuple information of the dyed data packet and the address information of the transmitting and receiving devices, such as Figure 4 As shown, the specific implementation of step S102 includes:
[0048] Step S1021: determining the network device in the data transmission path according to the five-tuple information;
[0049] Step S1022: Obtaining the node jump order corresponding to each network device according to the transceiver device address information of the network device in the data transmission path;
[0050] Step S1023: Generate a data transmission path according to the node jump order corresponding to each network device.
[0051] Exemplarily, the server first determines the network device with the same five-tuple information as the network device within the data transmission path based on the five-tuple information in the data packet record. Afterwards, the transceiver device address information of the network device located within the data transmission path is obtained, wherein the transceiver device address information includes the network address of the current network device itself, and the network address of the network device that sends data to the current network device, that is, the network address of the upstream network device; or the network address of the network device that receives the data sent by the current network device, that is, the network address of the downstream network device. It depends on whether the forwarding information uploaded by the current network device corresponds to the process of sending a dyed data packet or the process of receiving a dyed data packet. Further, afterward, by comparing each network address, the node jump order corresponding to each network device is obtained. Afterwards, based on the node jump order corresponding to each network device, a sequence consisting of device identifiers corresponding to the network devices, that is, the data transmission path, can be obtained.
[0052] Step S103: According to the fragment lengths of each data fragment of the colored data packet corresponding to multiple network devices, the cumulative data volume of the colored data packet forwarded by each network device is obtained, and the cumulative data volume represents the sum of the fragment lengths of each data fragment in the colored data packet, and according to the cumulative data volume corresponding to each network device, the abnormal network location where packet loss occurs in the data transmission path is determined.
[0053] Exemplarily, after receiving the data packet record sent by the target device, the server can determine that the data packet record uploaded by each network device in the data transmission path has been obtained, that is, the data packet record required for determining the abnormal network device. In this case, the server obtains the fragment length of each data fragment in the dyed data packet corresponding to each network device in the data transmission path, that is, the packet length information, and accumulates the packet length information corresponding to each network device to obtain the sum of the data volume of each data fragment, that is, the cumulative data volume, and determines the abnormal network device according to whether the cumulative data volume corresponding to each network device changes. For example, if the cumulative data volume corresponding to each network device in the data transmission path is equal, that is, at each network device, the sum of the data volume of each data fragment does not change, it means that no packet loss occurs in the entire data transmission path; and if the cumulative data volume corresponding to each network device in the data transmission path changes, for example, the cumulative data volume at network device A is L1, and the cumulative data volume at network device B downstream (next hop) of network device A is L2, for example, L2 is less than L1, it means that packet loss occurs. Network device A, network device B, and the link between network device A and network device B can be determined as abnormal network devices. Of course, in another possible implementation, the abnormal network location can be more accurately determined by further utilizing the relationship between the accumulated data volumes corresponding to each network device. For example, the accumulated data volume corresponding to the dyed data packets received by the network device and the accumulated data volume corresponding to the dyed data packets sent by the network device can be used to determine whether the network device is abnormal, that is, whether it is an abnormal network device, thereby improving the detection accuracy of abnormal network devices.
[0054] In a possible implementation, a specific implementation of determining the abnormal network location where packet loss occurs in the data transmission path according to the accumulated data volume corresponding to each network device includes:
[0055] Based on the accumulated data volume corresponding to each network device, a first consistency evaluation value corresponding to each network device in the data transmission path is calculated. The first consistency evaluation value represents the similarity of packet length information corresponding to data packets sent and received by the network device. The packet length information represents the data volume of the data fragments. Based on the first consistency evaluation value, the abnormal network device where packet loss occurs in the data transmission path is determined.
[0056] Among them, the cumulative data volume includes a first cumulative data volume and a second cumulative data volume, wherein the first cumulative data volume represents the sum of the data volumes of the data slices received by the network device; the second cumulative data volume represents the sum of the data volumes of the data slices sent by the network device; the specific implementation method of calculating the first consistency evaluation value corresponding to each network device in the data transmission path includes: obtaining the first consistency evaluation value of the network device according to the first cumulative data volume and the second cumulative data volume of the network device.
[0057] Furthermore, a specific implementation method of determining an abnormal network device where packet loss occurs in a data transmission path according to a consistency evaluation value includes: if a first consistency evaluation value is less than a first threshold, determining that the network device is an abnormal network device where packet loss occurs.
[0058] In another possible implementation, a specific implementation of determining the abnormal network location where packet loss occurs in the data transmission path according to the accumulated data volume corresponding to each network device includes:
[0059] According to the accumulated data volume corresponding to each network device, the second consistency evaluation value corresponding to each network device in the data transmission path is calculated, and the second consistency evaluation value represents the similarity between the packet length information corresponding to the network device and the packet length information of its upstream and downstream network devices, and the packet length information represents the data volume of the data fragment; according to the second consistency evaluation value, the abnormal data link where packet loss occurs in the data transmission path is determined. Wherein, exemplarily, the accumulated data volume includes the first accumulated data volume and the second accumulated data volume, wherein the first accumulated data volume represents the sum of the data volume of the data fragments received by the network device; the second accumulated data volume represents the sum of the data volume of the data fragments sent by the network device; accordingly, according to the accumulated data volume corresponding to each network device, the second consistency evaluation value corresponding to each network device in the data transmission path is calculated, and the specific implementation method includes:
[0060] A second consistency evaluation value of the network device is obtained based on a first accumulated data volume of the network device and a second accumulated data volume of an upstream network device of the network device. If the second consistency evaluation value is less than a second threshold, the upstream link of the network device is determined to be an abnormal data link where packet loss occurs. Alternatively, a third consistency evaluation value of the network device is obtained based on the second accumulated data volume of the network device and a first accumulated data volume of a downstream network device of the network device. If the third consistency evaluation value is less than a third threshold, the downstream link of the network device is determined to be an abnormal data link where packet loss occurs.
[0061] The solution provided in this embodiment determines the location of packet loss by tracking and analyzing the total data length processed by each network device in the data transmission path, thereby solving the problem that when the colored data packet contains IP fragment data, the existing tracking and positioning solution based on the number of data packets cannot determine and locate packet loss; at the same time, while realizing the tracking and positioning of IP fragmented data packets, it is compatible with the tracking and positioning of IP non-fragmented data packets.
[0062] In this embodiment, by obtaining a data packet record uploaded by a network device, the data packet record contains forwarding information of the dyed data packet and the fragment length of each data fragment of the dyed data packet, wherein the forwarding information is used to indicate the upstream and downstream network devices that the network device relies on to forward the dyed data packet, and the dyed data packet includes at least two data fragments, and according to the forwarding information of multiple network devices, the data transmission path is restored; according to the fragment length of each data fragment of the dyed data packet corresponding to the multiple network devices, the cumulative data volume of the dyed data packet forwarded by each network device is obtained, and the cumulative data volume represents the sum of the fragment lengths of each data fragment in the dyed data packet; according to the cumulative data volume corresponding to each network device, the abnormal network device or abnormal data link where packet loss occurs in the data transmission path is determined. The data transmission path is restored by obtaining an improved data packet record containing forwarding information and packet length information of the dyed data packet, and then the abnormal network device is determined based on the relationship between the packet length information in the data packet record corresponding to each network device, which solves the problem that the dyed data containing data fragments cannot reflect the actual data transmission and reception volume of the network device, thereby improving the accuracy of packet loss detection.
[0063] refer to Figure 5 , Figure 5 Schematic diagram of the process of tracing cloud network data packet loss provided by the embodiment of the present disclosure Figure 2 In this embodiment Figure 2 On the basis of the illustrated embodiment, step S103 is further refined, and the cloud network data packet loss tracking method includes:
[0064] Step S201: Obtain the data packet record uploaded by the network device, wherein the data packet record contains the forwarding information of the colored data packet and the fragment length of each data fragment of the colored data packet, wherein the forwarding information is used to indicate the upstream and downstream network devices that the network device depends on for forwarding the colored data packet, and the colored data packet includes at least two data fragments.
[0065] Step S202: restore the data transmission path according to the forwarding information of multiple network devices.
[0066] Step S203A: according to the fragment lengths of each data fragment of the dyed data packet corresponding to the multiple network devices, the cumulative data volume of the dyed data packet forwarded by each network device is obtained, and the cumulative data volume represents the sum of the fragment lengths of each data fragment in the dyed data packet.
[0067] Step S203B: Calculate the consistency evaluation value corresponding to each network device in the data transmission path based on the accumulated data volume corresponding to each network device, and determine the abnormal network device where packet loss occurs in the data transmission path based on the first consistency evaluation value. The consistency evaluation value represents the similarity between the packet length information corresponding to the network device and the packet length information of the upstream and downstream network devices.
[0068] Exemplarily, after restoring the data transmission path according to the forwarding information, the server obtains the cumulative data volume when each network device forwards the dyed data packet through the packet length information, and then calculates the consistency evaluation value corresponding to the network device in the data restoration path according to the cumulative data volume to determine whether there is an abnormal network device on the data transmission path. Specifically, the cumulative data volume is the sum of the data volume of the data fragments represented by the packet length information, and the consistency evaluation value is a numerical value representing the similarity between the packet length information corresponding to the network device and the packet length information of the upstream and downstream network devices. Exemplarily, the value range is, for example, [0,1], where 0 is completely inconsistent and 1 is completely consistent. Therefore, the closer the consistency evaluation value of the network device is to 1, the greater the similarity between the packet length information of the network device and other network devices on the data transmission path, and vice versa. In one possible situation, the consistency evaluation value of each network device in the data transmission path is 1, which means that in the data transmission path, each network device is operating normally and no packet loss occurs. If the consistency evaluation value of network device A on the data transmission path is lower than 1, it means that network device A has packet loss and is an abnormal network device. In another possible implementation, when the consistency evaluation value of the network device on the data transmission path is lower than a value less than 1 (for example, 0.9), the network device A may be determined as an abnormal network device with packet loss.
[0069] Furthermore, there are multiple ways to calculate the consistency evaluation value. Accordingly, for different ways to calculate the consistency evaluation value, corresponding judgment methods are used to judge abnormal network devices. In a possible implementation, the consistency evaluation value can be determined by the difference between the packet length information of the current network device and the packet length information of the previous hop network device. The calculation method is:
[0070] est=1-(Payload_A0-Payload_A1) / Payload_A0
[0071] Among them, est is the consistency evaluation value, Payload_A0 is the packet length information of network device A0, Payload_A1 is the packet length information of network device A1, and network device A0 is the upstream network device (the previous hop network device) of network device A1. Specifically, for example, if the packet length information of the current network device is 10, and the packet length information of the previous hop network device is also 10, then the consistency evaluation value is 1; if the packet length information of the current network device is 10, and the packet length information of the previous hop network device is 12, then the consistency evaluation value is 0.8.
[0072] Optionally, in another possible implementation, the consistency evaluation value can be based on preset mapping information, mapping the difference between the packet length information of the current network device and the packet length information of the previous network device to a consistency evaluation value. For example, when the difference between the packet length information Payload_A1 of the current network device and the packet length information Payload_A0 of the previous network device is 0, the consistency evaluation value obtained according to the mapping information is 1; when the difference between the packet length information Payload_A1 of the current network device and the packet length information Payload_A0 of the previous network device is greater than 0 and less than or equal to a, the consistency evaluation value obtained according to the mapping information is 0.8, and so on.
[0073] Furthermore, in a possible implementation, the abnormal network location refers to the location of the abnormal network device and / or the location of the abnormal data link. Therefore, determining the abnormal network location means determining the abnormal network device and / or the abnormal data link on the data transmission path; the accumulated data volume includes a first accumulated data volume and a second accumulated data volume, wherein the first accumulated data volume represents the sum of the data volumes of the data slices received by the network device; the second accumulated data volume represents the sum of the data volumes of the data slices sent by the network device; Figure 6 As shown, the specific implementation of step S203B includes:
[0074] Step S203B1: Obtain a first consistency evaluation value of the network device according to the similarity between the first accumulated data volume and the second accumulated data volume of the network device.
[0075] Step S203B2: If the first consistency evaluation value is less than the first threshold, the corresponding network device is determined to be an abnormal network device.
[0076] Exemplarily, the first cumulative data volume represents the sum of the data volumes of the data slices received by the network device, and the second cumulative data volume represents the sum of the data volumes of the data slices sent by the network device. In a possible implementation, by comparing the changes in the first cumulative data volumes and the second cumulative data volumes corresponding to the same network device, the overall change in the total forwarded data volume of the data slices passing through the network device can be determined, and then the corresponding consistency evaluation value, i.e., the first consistency evaluation value, can be obtained. The above steps can be implemented according to the mapping relationship between the preset similarity and the first consistency evaluation value. For example, when the similarity between the first cumulative data volume and the second cumulative data volume is greater than or equal to the first similarity threshold, the corresponding first consistency evaluation value est_1 is obtained; when the similarity between the first cumulative data volume and the second cumulative data volume is less than the first similarity threshold and greater than or equal to the second similarity threshold, the corresponding first consistency evaluation value est_2 is obtained.
[0077] Correspondingly, after obtaining the consistency evaluation value (first consistency evaluation value) in the above manner, the specific method of judging an abnormal network device includes: if the first consistency evaluation value is less than the first threshold value, it means that there is a large difference between the first cumulative data volume and the second cumulative data volume, that is, the sum of the data volumes of the data fragments received by the network device is inconsistent with the sum of the data volumes of the data fragments sent. In this case, it is judged that at the network device, data packet loss is caused due to reasons such as data packet reassembly, so the network device can be determined as an abnormal network device.
[0078] Furthermore, this embodiment may also include the following steps:
[0079] Step S204: Obtain a second consistency evaluation value of the network device according to the similarity between the first accumulated data volume of the network device and the second accumulated data volume of the upstream network device of the network device.
[0080] Step S205: If the second consistency evaluation value is less than the second threshold, it is determined that the upstream link of the network device is an abnormal data link where packet loss occurs.
[0081] In another possible implementation, by comparing the similarity of the sum of the fragment lengths of each data fragment of the dyed data packet received by the current network device (first cumulative data volume) and the sum of the fragment lengths of each data fragment of the dyed data packet sent by the upstream network device of the network device (second cumulative data volume), the consistency evaluation value of the current network device, i.e., the second consistency evaluation value, is obtained. The second consistency evaluation value represents the similarity between the packet length information corresponding to the network device and the packet length information of its upstream and downstream network devices, and the packet length information represents the data volume of the data fragment. In short, the second consistency evaluation value is a parameter for evaluating the similarity between the sum of the data volume of the data fragment sent by the previous hop network device and the sum of the data volume of the data fragment received by the current network device. If the similarity between the sum of the data volume of the data fragment sent by the previous hop network device and the sum of the data volume of the data fragment received by the current network device is high, for example, greater than a preset similarity threshold, it can be considered that the packet length information has not changed, that is, no packet loss has occurred; conversely, if the similarity is low, it is considered that the packet length information has changed, that is, packet loss has occurred. Furthermore, if packet loss occurs in this case, the node causing the packet loss is the data transmission link between the current network device and the previous network device, that is, the upstream link of the network device. Therefore, the upstream link of the network device is determined to be the abnormal data link where packet loss occurs.
[0082] Step S206: Obtain a third consistency evaluation value of the network device according to the similarity between the second accumulated data volume of the network device and the first accumulated data volume of the downstream network device of the network device.
[0083] Step S207: If the third consistency evaluation value is less than the third threshold, it is determined that the downstream link of the network device is an abnormal data link where packet loss occurs.
[0084] Exemplarily, in another possible implementation, by comparing the similarity of the sum of the fragment lengths of each data fragment of the dyed data packet sent by the current network device (the second cumulative data volume) and the sum of the fragment lengths of each data fragment of the dyed data packet received by the downstream network device of the network device (the first cumulative data volume), the consistency evaluation value of the current network device, i.e., the third consistency evaluation value, is obtained. The third consistency evaluation value is a parameter for evaluating the similarity between the sum of the data volume of the data fragments received by the next-hop network device and the sum of the data volume of the data fragments sent by the current network device. If the similarity between the sum of the data volume of the data fragments received by the next-hop network device and the sum of the data volume of the data fragments sent by the current network device is high, for example, greater than a preset similarity threshold, it can be considered that the packet length information has not changed, that is, no packet loss has occurred; conversely, if the similarity is low, it is considered that the packet length information has changed, that is, packet loss has occurred. Furthermore, if packet loss occurs in this case, the node causing the packet loss is the data transmission link between the current network device and the next-hop network device, that is, the downstream link of the network device. Therefore, the downstream link of the network device is determined to be the abnormal data link where packet loss occurs.
[0085] In this embodiment, abnormal network devices are determined by consistency evaluation values, which realizes accurate judgment of the fault status of network devices. In the scenario of tracking IP fragmented data packets, this embodiment can achieve a certain degree of abnormal judgment redundancy, that is, only after the consistency evaluation value corresponding to the network device is less than a certain level, it will be judged as an abnormal network device. In the process of data fragmentation transmission, accidental data packet loss will cause a slight change in the total data volume of the dyed data packet. However, in some possible cases, in order to improve the overall processing efficiency of the system, the situation where the consistency evaluation value is greater than the preset threshold value can be regarded as no packet loss. Therefore, through the solution provided by this embodiment, on the one hand, accurate detection of data packet loss can be achieved, and on the other hand, excessive detection false alarms can be avoided, the packet loss detection effect can be improved, and the system load can be reduced.
[0086] In this embodiment, the implementation method of step S201-step S202 is the same as that of the present disclosure. Figure 2 The implementation methods of step S101 to step S103 in the illustrated embodiment are the same and will not be described in detail here.
[0087] Corresponding to the cloud network data packet loss tracking method of the above embodiment, Figure 7A structural block diagram of a cloud network data packet loss tracking device provided in an embodiment of the present disclosure. The method described in the above embodiment can be executed by the cloud network data packet loss tracking device, which can be implemented by software and / or hardware, and can be integrated in an electronic device with certain data processing functions. The electronic device may include but is not limited to mobile terminals with big data processing capabilities, as well as fixed terminals with big data processing capabilities such as desktop computers and supercomputers.
[0088] For the sake of convenience, only the parts related to the embodiments of the present disclosure are shown. Figure 7 , the cloud network data packet loss tracking device 3 includes:
[0089] The acquisition module 31 is used to acquire a data packet record uploaded by a network device, wherein the data packet record includes forwarding information of the dyed data packet and the fragment length of each data fragment of the dyed data packet, wherein the forwarding information is used to indicate the upstream and downstream network devices that the network device depends on to forward the dyed data packet, and the dyed data packet includes at least two data fragments;
[0090] Restoration module 32, used for forwarding information of multiple network devices and restoring the data transmission path;
[0091] Determine module 33, which is used to determine the fragment length of each data fragment of the colored data packet corresponding to multiple network devices, and obtain the cumulative data volume of the colored data packet forwarded by each network device. The cumulative data volume represents the sum of the fragment lengths of each data fragment in the colored data packet, and according to the cumulative data volume corresponding to each network device, determine the abnormal network location where packet loss occurs in the data transmission path.
[0092] According to one or more embodiments of the present disclosure, the header of the dyed data packet has a dyeing identifier, which is written by the first network device in the data transmission path to instruct the network device that receives the dyed data packet to generate a data packet record.
[0093] According to one or more embodiments of the present disclosure, the forwarding information includes the five-tuple information of the colored data packet and the transceiver device address information, the transceiver device address information includes the network address of the current network device itself, and the network address of the network device that sends data to the current network device, and / or the network address of the network device that receives the data sent by the current network device. The restoration module 32 is specifically used to: determine the network devices within the data transmission path based on the five-tuple information; obtain the node jumping order corresponding to each network device based on the transceiver device address information of the network devices within the data transmission path; generate the data transmission path based on the node jumping order corresponding to each network device.
[0094] According to one or more embodiments of the present disclosure, when determining the abnormal network location where packet loss occurs in the data transmission path based on the accumulated data volume corresponding to each network device, the determination module 33 is specifically used to: calculate the first consistency evaluation value corresponding to each network device in the data transmission path based on the accumulated data volume corresponding to each network device, the first consistency evaluation value characterizing the degree of similarity of packet length information corresponding to data packets sent and received by the network device, the packet length information characterizing the data volume of the data fragment; and determine the abnormal network device where packet loss occurs in the data transmission path based on the first consistency evaluation value.
[0095] According to one or more embodiments of the present disclosure, the cumulative data amount includes a first cumulative data amount and a second cumulative data amount, wherein the first cumulative data amount represents the sum of the data amounts of the data slices received by the network device; the second cumulative data amount represents the sum of the data amounts of the data slices sent by the network device; when the determination module 33 calculates the first consistency evaluation value corresponding to each network device in the data transmission path, it is specifically used to: obtain the first consistency evaluation value of the network device according to the similarity between the first cumulative data amount and the second cumulative data amount of the network device; when the determination module 33 determines the abnormal network device where packet loss occurs in the data transmission path according to the consistency evaluation value, it is specifically used to: if the first consistency evaluation value is less than the first threshold, determine that the network device is an abnormal network device where packet loss occurs.
[0096] According to one or more embodiments of the present disclosure, when determining the abnormal network location where packet loss occurs in the data transmission path based on the accumulated data volume corresponding to each network device, the determination module 33 is specifically used to: calculate the second consistency evaluation value corresponding to each network device in the data transmission path based on the accumulated data volume corresponding to each network device, the second consistency evaluation value representing the degree of similarity between the packet length information corresponding to the network device and the packet length information of its upstream and downstream network devices, the packet length information representing the data volume of the data fragment; and determine the abnormal data link where packet loss occurs in the data transmission path based on the second consistency evaluation value.
[0097] According to one or more embodiments of the present disclosure, the cumulative data amount includes a first cumulative data amount and a second cumulative data amount, wherein the first cumulative data amount represents the sum of the data amounts of the data fragments received by the network device; the second cumulative data amount represents the sum of the data amounts of the data fragments sent by the network device; when the determination module 33 calculates the second consistency evaluation value corresponding to each network device in the data transmission path according to the cumulative data amount corresponding to each network device, it is specifically used to: obtain the second consistency evaluation value of the network device according to the first cumulative data amount of the network device and the second cumulative data amount of the upstream network device of the network device, if the second consistency evaluation value is less than the second threshold value, determine that the upstream link of the network device is an abnormal data link where packet loss occurs; and / or, obtain the third consistency evaluation value of the network device according to the second cumulative data amount of the network device and the first cumulative data amount of the downstream network device of the network device, if the third consistency evaluation value is less than the third threshold value, determine that the downstream link of the network device is an abnormal data link where packet loss occurs.
[0098] The acquisition module 31, the restoration module 32 and the determination module 33 are connected in sequence. The cloud network data packet loss tracking device 3 provided in this embodiment can implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.
[0099] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the electronic device 4 includes:
[0100] A processor 41, and a memory 42 communicatively connected to the processor 41;
[0101] The memory 42 stores computer executable instructions;
[0102] The processor 41 executes the computer execution instructions stored in the memory 42 to implement the following Figure 2-Figure 6 A cloud network data packet loss tracking method in the illustrated embodiment.
[0103] Optionally, the processor 41 and the memory 42 are connected via a bus 43 .
[0104] For related instructions, please refer to Figure 2-Figure 6 The relevant descriptions and effects corresponding to the steps in the corresponding embodiments can be understood, and no further elaboration is made here.
[0105] The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which are used to implement the present invention when executed by a processor. Figure 2-Figure 6 A cloud network data packet loss tracking method provided by any one of the corresponding embodiments.
[0106] The present invention provides a computer program product, including a computer program. When the computer program is executed by a processor, the present invention is realized. Figure 2-Figure 6 A cloud network data packet loss tracking method provided by any one of the corresponding embodiments.
[0107] In order to implement the above embodiment, the embodiment of the present disclosure also provides an electronic device.
[0108] refer to Fig. 9 , which shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure, and the electronic device 900 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle 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.
[0109] like Fig. 9 As shown, the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, 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 to a random access memory (RAM) 903. Various programs and data required for the operation of the electronic device 900 are also stored in the RAM 903. The processing device 901, the ROM 902, and the 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.
[0110] Typically, the following devices may be connected to the I / O interface 905: input devices 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 The electronic device 900 is shown with various devices, 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.
[0111] 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 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.
[0112] 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 one or more wires, 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, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, 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 appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0113] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0114] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0115] 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 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 the case of a remote computer, the remote computer may be connected to the user's computer via 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., via the Internet using an Internet service provider).
[0116] 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 square 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 one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0117] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit or module does not, in some cases, constitute a limitation on the unit itself.
[0118] The functions described above herein may be performed at least in part by one or more hardware logic components. 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 chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0119] 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 device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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.
[0120] In a first aspect, according to one or more embodiments of the present disclosure, a method for tracing packet loss in a cloud network is provided, comprising:
[0121] Obtain a data packet record uploaded by a network device, wherein the data packet record includes forwarding information of a dyed data packet and a fragment length of each data fragment of the dyed data packet, wherein the forwarding information is used to indicate upstream and downstream network devices on which the network device depends to forward the dyed data packet, and the dyed data packet includes at least two data fragments; restore the data transmission path according to the forwarding information of multiple network devices; obtain the cumulative data volume of the dyed data packets forwarded by each of the network devices according to the fragment lengths of each data fragment of the dyed data packet corresponding to the multiple network devices, wherein the cumulative data volume represents the sum of the fragment lengths of each data fragment in the dyed data packet; determine the abnormal network location where packet loss occurs in the data transmission path according to the cumulative data volume corresponding to each of the network devices.
[0122] According to one or more embodiments of the present disclosure, the header of the colored data packet has a coloring identifier, which is written by the first network device of the data transmission path to instruct the network device that receives the colored data packet to generate the data packet record.
[0123] According to one or more embodiments of the present disclosure, the forwarding information includes the quintuple information and transceiver device address information of the colored data packet, the transceiver device address information includes the network address of the current network device itself, the network address of the network device that sends data to the current network device, and / or the network address of the network device that receives data sent by the current network device, and the data transmission path is restored based on the forwarding information of multiple network devices, including: determining the network devices within the data transmission path based on the quintuple information; obtaining the node jumping order corresponding to each of the network devices based on the transceiver device address information of the network devices within the data transmission path; and generating the data transmission path based on the node jumping order corresponding to each of the network devices.
[0124] According to one or more embodiments of the present disclosure, determining the abnormal network location where packet loss occurs in the data transmission path based on the accumulated data volume corresponding to each of the network devices includes: calculating a first consistency evaluation value corresponding to each of the network devices in the data transmission path based on the accumulated data volume corresponding to each of the network devices, the first consistency evaluation value representing the degree of similarity of packet length information corresponding to data packets sent and received by the network devices, the packet length information representing the data volume of the data fragments; determining the abnormal network device where packet loss occurs in the data transmission path based on the first consistency evaluation value.
[0125] According to one or more embodiments of the present disclosure, the accumulated data volume includes a first accumulated data volume and a second accumulated data volume, wherein the first accumulated data volume represents the sum of the data volumes of the data slices received by the network device; the second accumulated data volume represents the sum of the data volumes of the data slices sent by the network device; the calculation of the first consistency evaluation value corresponding to each of the network devices in the data transmission path includes: obtaining the first consistency evaluation value of the network device according to the similarity between the first accumulated data volume and the second accumulated data volume of the network device; the determination of the abnormal network device where packet loss occurs in the data transmission path according to the consistency evaluation value includes: if the first consistency evaluation value is less than a first threshold, determining that the network device is an abnormal network device where packet loss occurs.
[0126] According to one or more embodiments of the present disclosure, determining the abnormal network location where packet loss occurs in the data transmission path based on the accumulated data volume corresponding to each of the network devices includes: calculating a second consistency evaluation value corresponding to each of the network devices in the data transmission path based on the accumulated data volume corresponding to each of the network devices, the second consistency evaluation value representing the degree of similarity between the packet length information corresponding to the network device and the packet length information of its upstream and downstream network devices, the packet length information representing the data volume of the data fragment; determining the abnormal data link where packet loss occurs in the data transmission path based on the second consistency evaluation value.
[0127] According to one or more embodiments of the present disclosure, the accumulated data volume includes a first accumulated data volume and a second accumulated data volume, wherein the first accumulated data volume represents the sum of the data volumes of the data fragments received by the network device; the second accumulated data volume represents the sum of the data volumes of the data fragments sent by the network device; the second accumulated data volume calculates the second consistency evaluation value corresponding to each of the network devices in the data transmission path according to the accumulated data volume corresponding to each of the network devices, including: obtaining the second consistency evaluation value of the network device according to the first accumulated data volume of the network device and the second accumulated data volume of the upstream network device of the network device, if the second consistency evaluation value is less than a second threshold value, determining that the upstream link of the network device is an abnormal data link where packet loss occurs; and / or, obtaining the third consistency evaluation value of the network device according to the second accumulated data volume of the network device and the first accumulated data volume of the downstream network device of the network device, if the third consistency evaluation value is less than a third threshold value, determining that the downstream link of the network device is an abnormal data link where packet loss occurs.
[0128] In a second aspect, according to one or more embodiments of the present disclosure, a cloud network data packet loss tracking device is provided, comprising:
[0129] An acquisition module is used to acquire a data packet record uploaded by a network device, wherein the data packet record contains forwarding information of the dyed data packet and the fragment length of each data fragment of the dyed data packet, wherein the forwarding information is used to indicate the upstream and downstream network devices that the network device depends on to forward the dyed data packet, and the dyed data packet includes at least two data fragments;
[0130] Restoration module, used for forwarding information of multiple network devices and restoring the data transmission path;
[0131] A determination module is used to determine the fragment length of each data fragment of a dyed data packet corresponding to multiple network devices, obtain the cumulative data volume of the dyed data packet forwarded by each network device, the cumulative data volume represents the sum of the fragment lengths of each data fragment in the dyed data packet, and determine the abnormal network location where packet loss occurs in the data transmission path based on the cumulative data volume corresponding to each network device.
[0132] According to one or more embodiments of the present disclosure, the header of the dyed data packet has a dyeing identifier, which is written by the first network device in the data transmission path to instruct the network device that receives the dyed data packet to generate a data packet record.
[0133] According to one or more embodiments of the present disclosure, the forwarding information includes quintuple information of the colored data packet and transceiver device address information, the transceiver device address information includes the network address of the current network device itself, and the network address of the network device that sends data to the current network device, and / or the network address of the network device that receives data sent by the current network device. The restoration module is specifically used to: determine the network devices within the data transmission path based on the quintuple information; obtain the node jumping order corresponding to each network device based on the transceiver device address information of the network devices within the data transmission path; generate the data transmission path based on the node jumping order corresponding to each network device.
[0134] According to one or more embodiments of the present disclosure, when the determination module determines the abnormal network location where packet loss occurs in the data transmission path based on the accumulated data volume corresponding to each network device, the determination module is specifically used to: calculate the first consistency evaluation value corresponding to each network device in the data transmission path based on the accumulated data volume corresponding to each network device, the first consistency evaluation value characterizing the degree of similarity of packet length information corresponding to data packets sent and received by the network device, the packet length information characterizing the data volume of the data fragments; and determine the abnormal network device where packet loss occurs in the data transmission path based on the first consistency evaluation value.
[0135] According to one or more embodiments of the present disclosure, the cumulative data amount includes a first cumulative data amount and a second cumulative data amount, wherein the first cumulative data amount represents the sum of the data amounts of the data slices received by the network device; the second cumulative data amount represents the sum of the data amounts of the data slices sent by the network device; when the determination module calculates the first consistency evaluation value corresponding to each network device in the data transmission path, it is specifically used to: obtain the first consistency evaluation value of the network device according to the similarity between the first cumulative data amount and the second cumulative data amount of the network device; when the determination module determines the abnormal network device where packet loss occurs in the data transmission path according to the consistency evaluation value, it is specifically used to: if the first consistency evaluation value is less than the first threshold, determine that the network device is an abnormal network device where packet loss occurs.
[0136] According to one or more embodiments of the present disclosure, when the determination module determines the abnormal network location where packet loss occurs in the data transmission path based on the accumulated data volume corresponding to each network device, the determination module is specifically used to: calculate the second consistency evaluation value corresponding to each network device in the data transmission path based on the accumulated data volume corresponding to each network device, the second consistency evaluation value represents the degree of similarity between the packet length information corresponding to the network device and the packet length information of its upstream and downstream network devices, the packet length information represents the data volume of the data fragment; and determine the abnormal data link where packet loss occurs in the data transmission path based on the second consistency evaluation value.
[0137] According to one or more embodiments of the present disclosure, the cumulative data amount includes a first cumulative data amount and a second cumulative data amount, wherein the first cumulative data amount represents the sum of the data amounts of the data fragments received by the network device; the second cumulative data amount represents the sum of the data amounts of the data fragments sent by the network device; when the determination module calculates the second consistency evaluation value corresponding to each network device in the data transmission path according to the cumulative data amount corresponding to each network device, it is specifically used to: obtain the second consistency evaluation value of the network device according to the first cumulative data amount of the network device and the second cumulative data amount of the upstream network device of the network device, if the second consistency evaluation value is less than the second threshold value, determine that the upstream link of the network device is an abnormal data link where packet loss occurs; and / or, obtain the third consistency evaluation value of the network device according to the second cumulative data amount of the network device and the first cumulative data amount of the downstream network device of the network device, if the third consistency evaluation value is less than the third threshold value, determine that the downstream link of the network device is an abnormal data link where packet loss occurs.
[0138] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0139] The memory stores computer-executable instructions;
[0140] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud network data packet loss tracking method described in the first aspect and various possible designs of the first aspect.
[0141] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the cloud network data packet loss tracking method described in the first aspect and various possible designs of the first aspect is implemented.
[0142] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the cloud network data packet loss tracking method described in the first aspect and various possible designs of the first aspect.
[0143] 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.
[0144] 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.
[0145] 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 cloud network data packet loss tracking method, characterized in that: include: Obtaining a data packet record uploaded by a network device, wherein the data packet record includes forwarding information of a dyed data packet and the fragment length of each data fragment of the dyed data packet, wherein the forwarding information is used to indicate the upstream and downstream network devices on which the network device depends to forward the dyed data packet, and the dyed data packet includes at least two data fragments; Restore the data transmission path based on the forwarding information of multiple network devices; According to the fragment lengths of the data fragments of the dyed data packets corresponding to the multiple network devices, the cumulative data volume of the dyed data packets forwarded by the network devices is obtained, wherein the cumulative data volume represents the sum of the fragment lengths of the data fragments in the dyed data packets; According to the accumulated data volume corresponding to each of the network devices, an abnormal network location where packet loss occurs in the data transmission path is determined.
2. The method according to claim 1, characterized in that: The header of the dyed data packet has a dye mark, and the dye mark is written by the first network device of the data transmission path to instruct the network device that receives the dyed data packet to generate the data packet record.
3. The method according to claim 1, characterized in that: The forwarding information includes the five-tuple information of the colored data packet and the transceiver device address information, the transceiver device address information includes the network address of the current network device itself, and the network address of the network device that sends data to the current network device, and / or the network address of the network device that receives the data sent by the current network device, and the data transmission path is restored according to the forwarding information of the multiple network devices, including: Determining the network device in the data transmission path according to the quintuple information; Obtaining a node jump order corresponding to each of the network devices according to the transceiver device address information of the network devices in the data transmission path; The data transmission path is generated according to the node jumping order corresponding to each of the network devices.
4. The method according to claim 1, characterized in that: The determining, according to the accumulated data volume corresponding to each of the network devices, the abnormal network location where packet loss occurs in the data transmission path comprises: Calculate, according to the accumulated data volume corresponding to each of the network devices, a first consistency evaluation value corresponding to each of the network devices in the data transmission path, wherein the first consistency evaluation value represents the similarity of packet length information corresponding to the data packets sent and received by the network devices, and the packet length information represents the data volume of the data fragments; An abnormal network device where packet loss occurs in the data transmission path is determined according to the first consistency evaluation value.
5. The method according to claim 4, characterized in that: The accumulated data volume includes a first accumulated data volume and a second accumulated data volume, wherein the first accumulated data volume represents the sum of the data volumes of the data slices received by the network device; the second accumulated data volume represents the sum of the data volumes of the data slices sent by the network device; The calculating a first consistency evaluation value corresponding to each of the network devices in the data transmission path includes: Obtaining a first consistency evaluation value of the network device according to a similarity between the first accumulated data volume and the second accumulated data volume of the network device; The step of determining, according to the consistency evaluation value, an abnormal network device where packet loss occurs in the data transmission path includes: If the first consistency evaluation value is less than a first threshold, it is determined that the network device is an abnormal network device where packet loss occurs.
6. The method according to claim 1, characterized in that: The determining, according to the accumulated data volume corresponding to each of the network devices, the abnormal network location where packet loss occurs in the data transmission path comprises: Calculate, according to the accumulated data volume corresponding to each of the network devices, a second consistency evaluation value corresponding to each of the network devices in the data transmission path, wherein the second consistency evaluation value represents the similarity between the packet length information corresponding to the network device and the packet length information of its upstream and downstream network devices, and the packet length information represents the data volume of the data fragment; An abnormal data link where packet loss occurs in the data transmission path is determined according to the second consistency evaluation value.
7. The method according to claim 6, characterized in that: The accumulated data volume includes a first accumulated data volume and a second accumulated data volume, wherein the first accumulated data volume represents the sum of the data volumes of the data slices received by the network device; the second accumulated data volume represents the sum of the data volumes of the data slices sent by the network device; The calculating, according to the accumulated data amount corresponding to each of the network devices, the second consistency evaluation value corresponding to each of the network devices in the data transmission path comprises: obtaining a second consistency evaluation value of the network device according to a first accumulated data volume of the network device and a second accumulated data volume of an upstream network device of the network device, If the second consistency evaluation value is less than a second threshold, determining that the upstream link of the network device is an abnormal data link where packet loss occurs; and / or, Based on the second accumulated data volume of the network device and the first accumulated data volume of the downstream network device of the network device, a third consistency evaluation value of the network device is obtained. If the third consistency evaluation value is less than a third threshold, it is determined that the downstream link of the network device is an abnormal data link where packet loss occurs.
8. A cloud network data packet loss tracking device, characterized in that: include: An acquisition module, used for acquiring a data packet record uploaded by a network device, wherein the data packet record includes forwarding information of a dyed data packet and the fragment length of each data fragment of the dyed data packet, wherein the forwarding information is used to indicate the upstream and downstream network devices on which the network device depends for forwarding the dyed data packet, and the dyed data packet includes at least two data fragments; A restoration module, used to restore the data transmission path according to the forwarding information of multiple network devices; A determination module is used to obtain the cumulative data volume of the colored data packets forwarded by each of the network devices according to the fragment length of each data fragment of the colored data packets corresponding to the multiple network devices, the cumulative data volume represents the sum of the fragment lengths of each data fragment in the colored data packets, and determine the abnormal network device or abnormal data link where packet loss occurs in the data transmission path according to the cumulative data volume corresponding to each of the network devices.
9. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the cloud network data packet loss tracking method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the cloud network data packet loss tracking method as described in any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the cloud network data packet loss tracking method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Failure positioning method and associated equipment
CN102868553A
Fragmented message flow rate limiting method, and DPU (Data Processing Unit) fragmented message forwarding method and device
CN115766591A