Packet loss detection method, device, equipment, medium and program product

By matching the target transmission message with the pre-issued first flow table, determining the packet to be detected, and detecting the packet loss situation after the transmission is completed, the problems of low packet loss detection efficiency and limited applicable scenarios in the prior art are solved, and efficient packet loss detection is achieved.

CN120200940APending Publication Date: 2025-06-24CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510562780.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

The prior art is difficult to detect packet loss quickly and effectively during network communication, especially on complex and long transmission paths, and common tools such as traceroute and tcpdump are applicable to limited scenarios.

Method used

By matching the target transmission message with the pre-issued first flow table, the packet to be detected is determined, and after the transmission of the packet to be detected is completed, the packet loss is detected based on the number of packets to be detected through the network node interface.

Benefits of technology

It realizes real-time statistics on the number of packets to be detected without affecting the forwarding performance of target transmission packets, improving the efficiency of packet loss detection, and is suitable for a wider range of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120200940A_ABST
    Figure CN120200940A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a packet loss detection method and device, equipment, a medium and a program product. The method comprises the following steps: matching a target transmission message passing through each network node interface of a cloud network with a pre-issued first flow table to obtain a first matching result, a message header of the target transmission message carrying detection demand information; when the first matching result is successful matching, determining that the target transmission message is a to-be-detected message, and updating the number of the to-be-detected messages passing through the network node interface; after transmission of the to-be-detected messages is finished, detecting packet loss conditions of the to-be-detected messages during transmission in the cloud network according to the number of the to-be-detected messages passing through each network node interface in the cloud network; the scheme not only can be suitable for wide application scenes, but also can improve the detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a packet loss detection method, apparatus, device, medium, and program product. Background Art

[0002] During network communication, packet loss often occurs due to reasons such as network congestion, network instability, router or switch failures.

[0003] In a virtual network, network diagnostic tool traceroute and packet capture tool tcpdump are usually used to troubleshoot packet loss on the network path. However, neither the network diagnostic tool traceroute nor the packet capture tool tcpdump can support large-scale and rapid inspections. Moreover, the scenarios they adapt to are limited. For example, for some DPDK and P4 gateway products, network diagnosis cannot be performed through traceroute, and packet capture judgment cannot be performed through tcpdump. Summary of the Invention

[0004] To solve the above technical problems, the present disclosure provides a packet loss detection method, apparatus, device, medium, and program product.

[0005] In a first aspect, the present disclosure provides a packet loss detection method, the method including:

[0006] Matching a target transmission packet passing through an interface of each network node in a cloud network with a pre-distributed first flow table to obtain a first matching result, where detection requirement information is carried in the packet header of the target transmission packet; when the first matching result is a successful match, determining the target transmission packet as a packet to be detected, and updating the number of packets to be detected passing through the network node interface; after the packet to be detected finishes transmission, detecting the packet loss situation of the packet to be detected during transmission in the cloud network according to the number of packets to be detected passing through each network node interface in the cloud network.

[0007] In some optional embodiments, the packet header of the target transmission packet is defined by a user based on the requirements for packet loss detection.

[0008] In some optional embodiments, before matching the target transmission packet passing through an interface of each network node in the cloud network with the pre-distributed first flow table to obtain a first matching result, the method includes:

[0009] When the starting network node of the cloud network receives an original transmission packet, matching the original transmission packet with a pre-configured second flow table to obtain a second matching result; when the second matching result is a successful match, dyeing the original transmission packet to obtain the target transmission packet.

[0010] In some alternative embodiments, dyeing the original transmission message includes:

[0011] Assigning a value to a preset field in the message header of the original transmission message.

[0012] In some alternative embodiments, the network node interface includes an ingress interface and an egress interface. Matching the target transmission message passing through each network node interface of the cloud network with a pre-downloaded first flow table to obtain a first matching result, including:

[0013] Matching the first target transmission message passing through the network node ingress interface and the second target transmission message passing through the network node egress interface with the first flow table respectively to obtain a third matching result and a fourth matching result. The target transmission message includes the first target transmission message and the second target transmission message, and the first matching result includes the third matching result and the fourth matching result;

[0014] When the first matching result is a successful match, determining the target transmission message as a message to be detected, and updating the number of messages to be detected passing through the network node interface, including:

[0015] When the third matching result is a successful match, determining the first target transmission message as a message to be detected, and updating the first number of messages to be detected passing through the network node ingress interface; when the fourth matching result is a successful match, determining the second target transmission message as a message to be detected, and updating the second number of messages to be detected passing through the network node egress interface. The number of messages to be detected passing through the network node interface includes the first number and the second number.

[0016] In some alternative embodiments, the method further includes:

[0017] When it is determined that a packet loss occurs in the message to be detected, locating the packet loss position of the message to be detected.

[0018] In a second aspect, the present disclosure provides a packet loss detection device, the device includes:

[0019] A first matching module, configured to match the target transmission message passing through each network node interface of the cloud network with a pre-downloaded first flow table to obtain a first matching result, and the detection requirement information is carried in the message header of the target transmission message; an update module, configured to determine the target transmission message as a message to be detected when the first matching result is a successful match, and update the number of messages to be detected passing through the network node interface; a detection module, configured to detect the packet loss situation of the message to be detected during transmission in the cloud network according to the number of messages to be detected passing through each network node interface in the cloud network after the message to be detected is transmitted.

[0020] In a third aspect, the present disclosure provides a computer device, including:

[0021] A memory and a processor are communicatively connected to each other. Computer instructions are stored in the memory. The processor executes the computer instructions to perform the packet loss detection method according to the first aspect and any of its embodiments.

[0022] In a fourth aspect, the present disclosure provides a computer-readable storage medium with computer instructions stored thereon. The computer instructions are used to cause a computer to execute the packet loss detection method according to the first aspect and any of its embodiments.

[0023] In a fifth aspect, the present disclosure provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the packet loss detection method according to the first aspect and any of its embodiments are implemented.

[0024] The technical solutions provided by the embodiments of the present disclosure have the following advantages compared with the prior art:

[0025] In the packet loss detection method provided in this embodiment, a target transmission packet passing through the interface of each network node in the cloud network is matched with a pre-distributed first flow table to obtain a first matching result. The detection requirement information is carried in the packet header of the target transmission packet. When the first matching result is a successful match, it is determined that the target transmission packet is a packet to be detected, and the number of packets to be detected passing through the network node interface is updated. After the transmission of the packet to be detected ends, the packet loss situation of the packet to be detected during transmission in the cloud network is detected according to the number of packets to be detected passing through the interfaces of each network node in the cloud network. Through the above scheme, by matching the target transmission packet with the first flow table, the real-time statistics of the number of packets to be detected passing through the network node interface is realized without affecting the forwarding performance of the target transmission packet. Even in the face of a complex and long transmission path, the packet loss situation of the target transmission packet during transmission in the cloud network can be detected immediately after the transmission of the target transmission packet ends, greatly improving the efficiency of packet loss detection. In addition, this scheme is not restricted by protocols and is applicable to a wider range of application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure.

[0027] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0028] Figure 1 It is a schematic flowchart of the packet loss detection method provided by the embodiment of the present disclosure;

[0029] Figure 2 Schematic diagram of the packet to be detected transmitted between network nodes provided by the embodiments of the present disclosure;

[0030] Figure 3 Structural connection diagram of the packet loss detection device provided by the embodiments of the present disclosure;

[0031] Figure 4 Structural connection diagram of the computer device provided by the embodiments of the present disclosure. Detailed implementation manners

[0032] In order to more clearly understand the above objects, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.

[0033] In the following description, many specific details are set forth in order to fully understand the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.

[0034] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, the element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0035] Before elaborating on the embodiments of the present disclosure in detail, a brief description of the professional knowledge and current background involved in this case will be given here.

[0036] (1) Professional knowledge

[0037] Open vSwitch, abbreviated as OVS, is a high-quality virtual switch that supports multi-layer data forwarding and is mainly deployed on servers. Compared with traditional switches, it has good programming scalability. At the same time, it also has the network isolation and data forwarding functions implemented by traditional switches. It runs on each physical machine that realizes virtualization and provides remote management. OVS provides two protocols for remote management in a virtualized environment: one is OpenFlow, which manages the behavior of the switch through flow tables, and the other is the OVSDB management protocol, which is used to expose the port status of the switch. Among them, the OpenFlow protocol can be used to define the SDN network and realize the separation of the network forwarding plane and the control plane.

[0038] The flow table of OVS is the key data structure for its packet forwarding, and its functions are as follows:

[0039] 1. Define forwarding rules

[0040] The flow table contains multiple flow entries. Each flow entry defines a set of matching conditions and corresponding actions. When a packet arrives at OVS, OVS will match according to the rules in the flow table and execute the corresponding actions, such as forwarding to a specified port, discarding, etc. This mechanism enables OVS to flexibly handle various network traffic and realize complex network functions.

[0041] 2. Accelerate packet processing

[0042] The flow table of OVS adopts a caching mechanism. When a packet arrives for the first time, OVS will perform flow table matching and cache the matching result. For subsequent identical packets that arrive, OVS can directly process them quickly according to the cached matching result without performing flow table matching again. This mechanism greatly improves the packet processing speed and reduces network latency.

[0043] 3. Support multi-layer data forwarding

[0044] The flow table of OVS not only supports forwarding based on MAC addresses, but also supports forwarding at multiple levels such as IP addresses and port numbers. This enables OVS to handle various complex network protocols and traffic patterns and meet the requirements of different application scenarios.

[0045] 4. Implement network isolation and communication

[0046] By configuring the flow table, OVS can achieve network isolation and communication between virtual machines. For example, in a cloud computing environment, OVS can isolate the network traffic between different virtual machines by dividing VLANs (Virtual Local Area Networks) to ensure the security of their communication. At the same time, OVS also supports various network tunneling technologies (such as VXLAN, GRE, etc.), enabling virtual machines to communicate across physical networks.

[0047] 5. Dynamic Management and Optimization

[0048] The flow table of OVS can communicate with other network devices and controllers through protocols such as OpenFlow to achieve dynamic management and optimization of the network. For example, the controller can dynamically adjust the rules in the flow table according to changes in network traffic to optimize network performance and resource utilization. This mechanism enables OVS to adapt to the ever-changing network environment and provide efficient and flexible network services.

[0049] In summary, the flow table of OVS plays an important role in defining forwarding rules, accelerating packet processing, supporting multi-layer data forwarding, implementing network isolation and communication, and dynamic management and optimization. It is one of the key components for OVS to achieve efficient and flexible network functions.

[0050] (2) Current Background

[0051] In related technologies, network diagnostic tool traceroute and packet capture tool tcpdump are usually used to troubleshoot packet loss on the network path.

[0052] Among them, traceroute traces the transmission path of packets in the network by sending a series of packets with incrementing Time To Live (TTL) values to the target host. Whenever a packet passes through a router, the TTL value is decremented by 1. When the TTL reaches 0, the router discards the packet and returns an Internet Control Message Protocol (ICMP) timeout message. However, this hop-by-hop tracing method takes a long time, especially when the transmission path is long, the detection efficiency is even lower. Moreover, traceroute relies on ICMP or UDP protocols to send probe packets. If these protocols are restricted or disabled in some network environments, such as DPDK and P4 gateway products, it will cause traceroute to malfunction. Therefore, its application scenarios are also very limited.

[0053] For tcpdump, tcpdump is used to capture packets on the network interface and detect packet loss problems by analyzing the content of the packets in detail. In order to capture packets, network administrators need to log in to these network nodes and use the tcpdump tool for packet capture analysis. Therefore, when the transmission path is too long, its detection efficiency will be greatly reduced. Moreover, for gateway products using technologies such as Data Plane Development Kit (DPDK) or Programming Protocol Independent Forwarding (P4), the traditional tcpdump packet capture method may not be applicable.

[0054] Therefore, when detecting packet loss through tools such as traceroute and tcpdump, there are disadvantages such as low detection efficiency and limited applicable scenarios.

[0055] To this end, the embodiments of the present disclosure provide a packet loss detection method, device, equipment, medium and program product. By matching the target transmission packet with the first flow table, the real-time statistics of the number of packets to be detected passing through the network node interface is realized without affecting the forwarding performance of the target transmission packet. Even in the face of a complex and long transmission path, the packet loss situation during the transmission of the target transmission packet in the cloud network can be detected immediately after the transmission of the target transmission packet ends, greatly improving the efficiency of packet loss detection. In addition, this solution is not restricted by protocols and is applicable to a wider range of application scenarios.

[0056] According to an embodiment of the present invention, an embodiment of a packet loss detection method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0057] In this embodiment, a packet loss detection method is provided, which is applicable to the scenario where data packets are transmitted at the network layer and can be used for network nodes running OVS in the cloud network. Figure 1 It is a flowchart of the packet loss detection method according to an embodiment of the present invention. As Figure 1 shown, the process includes the following steps:

[0058] S101, match the target transmission packet passing through each network node interface of the cloud network with the pre-downloaded first flow table to obtain a first matching result.

[0059] Among them, the network node is a node running OVS in the cloud network. The network node interface refers to at least one of the interface entering the network node (i.e., the network node ingress interface) and the interface leaving the network node (i.e., the network node egress interface). The target transmission packet is a packet transmitted from a device outside the cloud. The target transmission packet can be an Ipv4 packet directly generated by the system automatically and without detection requirement information in the packet header, or an Ipv4 packet obtained by modifying the packet automatically generated by the system and with detection requirement information in the packet header. The detection requirement information can be information of "having packet loss detection requirement" or information of "not having packet loss detection requirement". The first flow table is a flow table issued by the control plane and stored in each network node. All target transmission packets passing through the network node interface need to be matched with the first flow table. The first flow table includes a match field (match) and an action field (action). The target transmission packet corresponds to the first flow table. When the target transmission packet is an Ipv4 packet directly generated by the system automatically and without detection requirement information in the packet header, the match field of the first flow table is the five-tuple information corresponding to the packet of "having packet loss detection requirement", and the action field is to update the number of packets of "having packet loss detection requirement" passing through the network node interface. When the target transmission packet is an Ipv4 packet obtained by modifying the packet automatically generated by the system and with detection requirement information in the packet header, the match field of the first flow table is to update the number of packets of "having packet loss detection requirement" passing through the network node interface.

[0060] Specifically, after the target transmission packet enters the cloud network, it will pass through at least one network node in the cloud network. Here, it is illustrated by the target transmission packet passing through a certain network node. When the target transmission packet passes through the network node interface, the target transmission packet is matched with the first flow table stored in the network node. The matching process is as follows: obtain the field information from the packet header of the target transmission packet, and perform a consistency comparison between the obtained field information and the field information provided in the match field of the first flow table. If the field information obtained from the packet header of the target transmission packet is exactly the same as the field information provided in the match field of the first flow table, the first matching result is determined to be a match success; if the field information obtained from the packet header of the target transmission packet is inconsistent with the field information provided in the match field of the first flow table, the first matching result is determined to be a match failure.

[0061] It should be noted that in the embodiments of the present disclosure, the network node interface refers to at least one of the network node ingress interface and the network node egress interface. That is to say, the network node interface can be the network node ingress interface, can be the network node egress interface, or can be both the network node ingress interface and the network node egress interface. When the network node interface in S101 is the network node ingress interface, it means that when the target transmission packet passes through the current network node, it only needs to match the target transmission packet with the first flow table when passing through the network node ingress interface. When the network node interface in S101 is the network node egress interface, it means that when the target transmission packet passes through the current network node, it only needs to match the target transmission packet with the first flow table when passing through the network node egress interface. And when the network node interface in S101 includes both the network node ingress interface and the network node egress interface, it means that the target transmission packet needs to be matched with the first flow table once when passing through the network node ingress interface, and the target transmission packet also needs to be matched with the first flow table once when passing through the network node egress interface.

[0062] In some optional embodiments, when the network node interface includes an ingress interface and an egress interface, S101 includes: respectively matching the first target transmission packet passing through the network node ingress interface and the second target transmission packet passing through the network node egress interface with the first flow table to obtain a third matching result and a fourth matching result.

[0063] Wherein, the target transmission packet includes the first target transmission packet and the second target transmission packet, and the first matching result includes the third matching result and the fourth matching result.

[0064] Specifically, in an example where the network node interface includes an ingress interface and an egress interface, the target transmission packet passing through the network node ingress interface is used as the first target transmission packet, and the target transmission packet when passing through the network node egress interface is used as the second target transmission packet. When the first target transmission packet passes through the network node ingress interface, the first target transmission packet is matched with the first flow table to obtain a third matching result. When the second target transmission packet passes through the network node egress interface, the second target transmission packet is matched with the first flow table to obtain a fourth matching result. That is to say, each target transmission packet passing through the network node ingress interface needs to be matched with the first flow table once, and each target transmission packet passing through the network node egress interface also needs to be matched with the first flow table once. The foregoing first target transmission packet and the second target transmission packet may be the same packet or different transmission packets.

[0065] S102, when the first matching result is a successful match, determine that the target transmission packet is a packet to be detected, and update the number of packets to be detected passing through the network node interface.

[0066] Among them, the packet to be detected is the packet for which the user wants to perform packet loss detection, that is, the packet with detection requirements.

[0067] Specifically, when the target transmission packet matches the first flow table successfully, it indicates that the target transmission packet is the packet to be detected for which the user wants to perform packet loss detection. Therefore, according to the update operation in the action field of the first flow table, the quantity of the packet to be detected passing through the network node interface is updated. It should be noted that the quantity of the packet to be detected passing through the network node interface is stored in the memory of the corresponding network node.

[0068] Exemplarily, if the network node interface refers to the network node ingress interface, when the target transmission packet Y passes through the network node ingress interface, the target transmission packet Y is matched with the first flow table, and the first matching result is a successful match. At this time, it is determined that the target transmission packet Y is the packet to be detected. Therefore, the quantity of the target transmission packet Y passing through this network node ingress interface needs to be updated from 0 to 1.

[0069] In some optional implementation manners, when the network node interface includes an ingress interface and an egress interface, S102 includes: when the third matching result is a successful match, determining the first target transmission packet as the packet to be detected and updating the first quantity of the packet to be detected passing through the network node ingress interface; when the fourth matching result is a successful match, determining the second target transmission packet as the packet to be detected and updating the second quantity of the packet to be detected passing through the network node egress interface.

[0070] Among them, the quantity of the packet to be detected passing through the network node interface includes the first quantity and the second quantity.

[0071] Specifically, when the network node interface includes an ingress interface and an egress interface, the third matching result of the first target transmission packet and the first flow table and the fourth matching result of the second target transmission packet and the first flow table are obtained. When the third matching result is a successful match, it indicates that the first target transmission packet passing through the network node ingress interface is the packet to be detected for which the user wants to perform packet loss detection. At this time, the quantity of the packet to be detected passing through the network node ingress interface (i.e., the first quantity) is updated. When the fourth matching result is a successful match, it indicates that the second target transmission packet passing through the network node egress interface is the packet to be detected for which the user wants to perform packet loss detection. At this time, the quantity of the packet to be detected passing through the network node egress interface (i.e., the second quantity) is updated.

[0072] Exemplarily, as Figure 2 shown, the target transmission packet 1 matches the first flow table successfully, and the target transmission packet 1 is the packet to be detected. The transmission path of the target transmission packet 1 in the cloud network is network node A and network node B. The interfaces corresponding to network node A are network node ingress interface r1 and network node egress interface r2. The interfaces corresponding to network node B are network node ingress interface r3 and network node egress interface r4.

[0073] If there is no packet loss when the target transmission message 1 is transmitted between network node A and network node B, then, after S102, it can be determined that the number of target transmission messages 1 passing through r1, r2, r3, and r4 is updated to 1 respectively.

[0074] If packet loss occurs after the target transmission message 1 enters network node A, then the target transmission message 1 naturally cannot pass through network node B and subsequent transmission cannot be carried out. Therefore, in this scenario, the number of target transmission messages 1 passing through r1 is 1, and since the target transmission message 1 is lost in network node A, after S102, it can be determined that the number of target transmission messages 1 passing through r2, r3, and r4 is 0 respectively.

[0075] If packet loss occurs when the target transmission message 1 is transmitted between network node A and network node B, then, after S102, it can be determined that the number of target transmission messages 1 passing through r1 and r2 is 1, and the number of target transmission messages 1 passing through r3 and r4 is 0 respectively.

[0076] S103, after the transmission of the message to be detected ends, detect the packet loss situation of the message to be detected during its transmission in the cloud network according to the number of messages to be detected passing through each network node interface in the cloud network.

[0077] Specifically, after the transmission of the message to be detected ends, obtain the number of messages to be detected passing through the network node interfaces from the network nodes passed through during the transmission of the message to be detected. When the number of messages to be detected passing through each network node interface during the transmission of the message to be detected is 1, it indicates that there is no packet loss when the message to be detected is transmitted in the current cloud network. When the number of messages to be detected passing through at least one network node interface during the transmission of the message to be detected is 0, it indicates that there is packet loss when the message to be detected is transmitted in the current cloud network. Thus, the packet loss detection result corresponding to the message to be detected can be obtained.

[0078] In some alternative embodiments, when it is determined that the message to be detected has packet loss, locate the packet loss position of the message to be detected.

[0079] Specifically, since the transmission process of the message to be detected has timing, there is a sequential relationship between the network nodes it passes through. Sort the number of messages to be detected passing through each network node interface in the order of the network nodes passed through by the message to be detected. Determine the position between the network node where the last 1 is located and the network node where the first 0 is located as the packet loss position of the message to be detected.

[0080] Exemplarily, still taking the previous embodiment as an example, the packet to be detected (i.e., the target transmission packet 1 in the above example) passes through network node A and network node B in sequence. In this example, the network node interfaces are the network node ingress interface and the network node egress interface. Therefore, according to the transmission path of the packet to be detected, the order of the network node interfaces it passes through is r1, r2, r3, r4.

[0081] If the number of packets to be detected passing through r1 is 1, the number of packets to be detected passing through r2 is 1, the number of packets to be detected passing through r3 is 0, and the number of packets to be detected passing through r4 is 0. Therefore, the packet loss location of the packet to be detected can be determined between r2 (i.e., the egress interface of network node A) and r3 (i.e., the ingress interface of network node B), that is to say, the packet to be detected is lost during the transmission between network node A and network node B.

[0082] If the number of packets to be detected passing through r1 is 1, the number of packets to be detected passing through r2 is 0, the number of packets to be detected passing through r3 is 0, and the number of packets to be detected passing through r4 is 0. Therefore, the packet loss location of the packet to be detected can be determined between r1 (i.e., the ingress interface of network node A) and r2 (i.e., the egress interface of network node B), that is to say, the packet to be detected is lost during the transmission in network node A.

[0083] The packet loss detection method provided in this embodiment matches the target transmission packet passing through each network node interface of the cloud network with the pre - issued first flow table to obtain the first matching result. The detection requirement information is carried in the packet header of the target transmission packet; when the first matching result is a successful match, the target transmission packet is determined as the packet to be detected, and the number of packets to be detected passing through the network node interface is updated; after the transmission of the packet to be detected ends, the packet loss situation of the packet to be detected during the transmission in the cloud network is detected according to the number of packets to be detected passing through each network node interface in the cloud network. The above - mentioned solution realizes the real - time statistics of the number of packets to be detected passing through the network node interface by matching the target transmission packet with the first flow table, and without affecting the forwarding performance of the target transmission packet. Even in the face of a complex and long transmission path, the packet loss situation of the target transmission packet during the transmission in the cloud network can be detected immediately after the transmission of the target transmission packet ends, greatly improving the efficiency of packet loss detection. In addition, this solution is not restricted by protocols and is applicable to a wider range of application scenarios.

[0084] According to the description of the target transmission packet in S101, the target transmission packet can be an Ipv4 packet obtained by modifying the packet automatically generated by the system and carrying the detection requirement information in the packet header. The following will elaborate on the generation process of the target transmission packet through two implementation manners.

[0085] In some optional implementation manners, the header of the target transmission message is defined by the user based on the requirement for packet loss detection.

[0086] Specifically, the header of the target transmission message is defined by the user based on the requirement for packet loss detection. That is, before sending the target transmission message, that is, before S101, the user himself / herself determines whether to perform packet loss detection on the current transmission message. If the user wants to perform packet loss detection on the current transmission message, it means that the user has a requirement for packet loss detection on the current transmission message. Then, the user himself / herself sets the field value of the field carrying the detection requirement information in the header, and uses the set transmission message as the target transmission message for transmission. If the user believes that there is no need to perform packet loss detection on the current transmission message, then the transmission message automatically generated by the system can be directly used as the target transmission message for transmission. The field carrying the detection requirement information in the header can be the Type of Service (TOS) field or the Differentiated Services (DS) field, or the Flags field.

[0087] It should be noted that for an IPv4 message, the TOS field in its header is 8 bits in total. The first 3 bits are the fields representing the message precedence information, and the last 5 bits are reserved bits that can be set by the user himself / herself. Therefore, when the field carrying the detection requirement in the header is the TOS field, the user can set the last 5 reserved bits. 00000 is the default value of the 5 reserved bits, and the user can also have 31 (2 5 - 1) possible values. The user can determine the default value as the value of "no detection requirement", and determine any one of the remaining 31 values as the value of "having a detection requirement".

[0088] In the network protocol standard RFC2474, the TOS field is re-planned as the DS field. The first 6 bits of the DS field are used for Differentiated Services Code Point (DSCP) marking, and the remaining 2 bits of reserved bits can be set by oneself. Therefore, when the field carrying the detection requirement information in the packet header is the DS field, the user can only set the 2 bits of reserved bits in the DS field. The default value of the 2 bits of reserved bits is 00. That is to say, if the user has no packet loss detection requirement for the transmitted packet, then the system will automatically generate the packet header of the packet to be transmitted, and the user does not need to modify the DS field in the packet header, and directly use the packet transmitted by the system automatically as the target transmitted packet for transmission. If the user has a packet loss detection requirement for the transmitted packet, the user can set the 2 bits of reserved bits in the DS field to any one of 01, 10, and 11, and determine the set transmitted packet as the target transmitted packet for transmission.

[0089] For the Flags field, there is only 1 bit of reserved bit, and the default value of the 1 bit of reserved bit is 0. Therefore, when the field carrying the detection requirement information in the packet header is the Flags field, if the user has no packet loss detection requirement for the transmitted packet, then the system will automatically generate the packet header of the packet to be transmitted, and the user does not need to modify the Flags field in the packet header, and directly use the packet transmitted by the system automatically as the target transmitted packet for transmission. If the user has a packet loss detection requirement for the transmitted packet, then the user needs to set the 1 bit of reserved bit in the Flags field to 1, and determine the set transmitted packet as the target transmitted packet for transmission.

[0090] It should be noted that if the user has a packet loss detection requirement for the same transmitted packet in different transmission directions (i.e., from the off-cloud device to the cloud network and from the cloud network to the off-cloud device), the DS field can be determined as the field carrying the detection requirement information in the packet header. The reason is that there are 2 bits of reserved bits in the DS field, that is, 4 value cases: 00, 01, 10, and 11, and each transmission direction requires two different values to represent the requirement for packet loss detection. Therefore, using the DS field as the field carrying the detection requirement information in the packet header is more convenient to distinguish the same transmitted packet in two directions and can also improve the detection efficiency.

[0091] In some optional implementation manners, before S101, the method further includes: when the starting network node of the cloud network receives the original transmitted packet, matching the original transmitted packet with a pre-configured second flow table to obtain a second matching result; when the second matching result is a successful match, dyeing the original transmitted packet to obtain a target transmitted packet.

[0092] Among them, the starting network node is the first network node that the transmitted message passes through when entering the cloud network. The original transmitted message is a transmitted message automatically generated by the system without carrying detection requirement information. The matching field of the second flow table is the five-tuple information corresponding to the message with the "packet loss detection requirement", and the action field is to color the original transmitted message so as to obtain a transmitted message carrying detection requirement information (i.e., the target transmitted message) through coloring. The five-tuple information includes source IP address, destination IP address, source port number, destination port number, transport protocol, etc.

[0093] Specifically, after the device outside the cloud sends the original transmitted message to the cloud network, in the first network node (i.e., the starting network node) that the original transmitted message passes through, the original transmitted message is matched with the pre-configured second flow table. The matching process is to obtain the five-tuple information from the message header of the original transmitted message and perform a consistency comparison between the obtained five-tuple information and the five-tuple information in the matching field of the second flow table. When the five-tuple information in the message header of the original transmitted message is exactly the same as the five-tuple information in the matching field, the second matching result is determined to be a successful match. When the five-tuple information in the message header of the original transmitted message is inconsistent with the five-tuple information in the matching field, the second matching result is determined to be a failed match. When the second matching result is a successful match, it means that the original transmitted message is the message for which the user wants to perform packet loss detection. At this time, the original transmitted message is colored based on the coloring instruction in the action field of the second flow table. The coloring process is the process of writing the detection information into the original transmitted message. The specific coloring method is to assign values to the preset fields in the message header of the original transmitted message. The preset fields are the fields carrying detection requirement information in the previous embodiment, such as the TOS field, DS field, and Flags field, etc. The assignment process is the process of taking values for the reserved bits in the preset fields. For specific reference, please refer to the relevant description in the previous embodiment and will not be elaborated here. After coloring the original transmitted message, the original transmitted message carrying the detection requirement is determined as the target transmitted message. The target transmitted message can be the message specified by the user for which packet loss detection is to be performed, or it can be a message for which no packet loss detection is required. In this embodiment, the target transmitted message is obtained by matching the original transmitted message with the second flow table, which improves the accuracy and speed of converting the original transmitted message into the target transmitted message.

[0094] It can be understood that in this embodiment, when the original transmitted message reaches the starting network node of the cloud network, the original transmitted message needs to be matched twice. That is, first, the original transmitted message is matched with the second flow table to write the detection requirement into the original transmitted message to obtain the target transmitted message. Then, the target transmitted message is matched with the first flow table again to update the number of messages with packet loss detection requirements passing through the current network node. And when the target transmitted message passes through other intermediate network nodes in the cloud network except the starting network node, only the target transmitted message needs to be matched with the first flow table.

[0095] Exemplarily, in one example, the second flow table matching field is quintuple information, and the second flow table action field is to set the reserved bit in the DS field of the packet header to 01. When the original transmission packet successfully matches the second flow table, the original transmission packet is dyed according to the instruction in the second flow table action field, that is, the reserved bit in the DS field of the packet header of the original transmission packet is modified from the default 00 to 01, and the dyed original transmission packet is determined as the target transmission packet. When the original transmission packet fails to match the second flow table, there is no need to perform the dyeing operation, and the original transmission packet is directly used as the target transmission packet, and then the target transmission packet is matched with the first flow table.

[0096] In this embodiment, a packet loss detection device is further provided. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0097] This embodiment provides a packet loss detection device, as Figure 3 shown, including:

[0098] A first matching module 301, configured to match the target transmission packet passing through the network node interfaces of the cloud network with a pre-downloaded first flow table to obtain a first matching result, and the detection requirement information is carried in the packet header of the target transmission packet.

[0099] An update module 302, configured to determine the target transmission packet as a packet to be detected when the first matching result is a successful match, and update the number of packets to be detected passing through the network node interface.

[0100] A detection module 303, configured to detect the packet loss situation of the packet to be detected during transmission in the cloud network according to the number of packets to be detected passing through the network node interfaces in the cloud network after the packet to be detected finishes transmission.

[0101] In some optional implementation manners, the packet header of the target transmission packet is defined by the user based on the requirements for packet loss detection.

[0102] In some optional implementation manners, the device further includes:

[0103] A second matching module, configured to match an original transmission message with a pre-distributed second flow table to obtain a second matching result when the starting network node of the cloud network receives the original transmission message, before matching the target transmission message at each network node interface of the cloud network with the pre-distributed first flow table to obtain a first matching result; a coloring module, configured to color the original transmission message to obtain a target transmission message when the second matching result is a successful match.

[0104] In some optional embodiments, the coloring module includes:

[0105] An assignment sub-module, configured to assign a value to a preset field in the message header of the original transmission message.

[0106] In some optional embodiments, the network node interface includes an ingress interface and an egress interface. The first matching module 301 includes:

[0107] A matching sub-module, configured to separately match a first target transmission message passing through the network node ingress interface and a second target transmission message passing through the network node egress interface with the first flow table to obtain a third matching result and a fourth matching result. The target transmission message includes the first target transmission message and the second target transmission message, and the first matching result includes the third matching result and the fourth matching result;

[0108] The update module 302 includes:

[0109] A first update sub-module, configured to determine that the first target transmission message is a message to be detected and update a first quantity of messages to be detected passing through the network node ingress interface when the third matching result is a successful match; a second update sub-module, configured to determine that the second target transmission message is a message to be detected and update a second quantity of messages to be detected passing through the network node egress interface when the fourth matching result is a successful match. The quantity of messages to be detected passing through the network node interface includes the first quantity and the second quantity.

[0110] In some optional embodiments, the apparatus further includes:

[0111] A positioning module, configured to locate the packet loss position of the message to be detected when it is determined that the message to be detected has a packet loss.

[0112] The further function descriptions of the above-mentioned various modules and units are the same as those in the corresponding above embodiments, and will not be elaborated here.

[0113] The packet loss detection device in this embodiment is presented in the form of a functional unit. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0114] An embodiment of the present invention further provides a computer device having the above Figure 3 shown packet loss detection device.

[0115] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of a computer device provided by an alternative embodiment of the present invention. As Figure 4 shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a set of blade servers, or a multi-processor system). Figure 4 In

[0116] this example, one processor 10 is taken as an example.

[0117] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0118] The memory 20 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely disposed relative to the processor 10, and these remote memories may be connected to the computer device through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0119] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 may further include a combination of the above types of memories.

[0120] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0121] Embodiments of the present invention also provide a computer-readable storage medium. The methods according to the embodiments of the present invention may be implemented in hardware, firmware, or may be implemented as computer code recorded on a storage medium, or may be implemented as computer code originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and to be stored in a local storage medium, so that the methods described herein may be stored as such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium may also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods shown in the above embodiments are implemented.

[0122] In addition to the above-mentioned computer device and computer-readable storage medium, embodiments of the present application may also be a computer program product, which includes computer program instructions that, when run by a processor, cause the processor to execute the steps of the sound source localization method provided in any embodiment of the present application.

[0123] A computer program product may be written in any combination of one or more programming languages for executing the program code of the operations of the embodiments of the present application. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0124] The above are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments described herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.

Claims

1. A packet loss detection method, characterized in that: The method comprises: Matching the target transmission message passing through each network node interface of the cloud network with the pre-issued first flow table to obtain a first matching result, wherein the message header of the target transmission message carries the detection requirement information; When the first matching result is a successful match, determining that the target transmission message is a message to be detected, and updating the number of the messages to be detected passing through the network node interface; After the transmission of the message to be detected is completed, according to the number of the message to be detected passing through each network node interface in the cloud network, the packet loss situation of the message to be detected when being transmitted in the cloud network is detected.

2. The method according to claim 1, characterized in that The message header of the target transmission message is defined by the user based on the demand for packet loss detection.

3. The method according to claim 1, characterized in that Before matching the target transmission message passing through each network node interface of the cloud network with the pre-issued first flow table to obtain a first matching result, the method includes: When the starting network node of the cloud network receives the original transmission message, the original transmission message is matched with the preconfigured second flow table to obtain a second matching result; When the second matching result is a successful match, the original transmission message is dyed to obtain the target transmission message.

4. The method according to claim 3, characterized in that The coloring of the original transmission message includes: Assign a value to a preset field in the message header of the original transmission message.

5. The method according to any one of claims 1 to 4, characterized in that The network node interface includes an input interface and an output interface, and the target transmission message passing through each network node interface of the cloud network is matched with the pre-issued first flow table to obtain a first matching result, including: Matching a first target transmission message passing through an inbound interface of a network node and a second target transmission message passing through an outbound interface of a network node with the first flow table respectively, to obtain a third matching result and a fourth matching result, wherein the target transmission message includes the first target transmission message and the second target transmission message, and the first matching result includes the third matching result and the fourth matching result; When the first matching result is a successful match, determining that the target transmission message is a message to be detected, and updating the number of the messages to be detected passing through the network node interface, comprises: When the third matching result is a successful match, determining that the first target transmission message is a message to be detected, and updating a first number of messages to be detected passing through the inbound interface of the network node; When the fourth matching result is a successful match, the second target transmission message is determined to be a message to be detected, and the second number of messages to be detected passing through the network node output interface is further determined, and the number of messages to be detected passing through the network node interface includes the first number and the second number.

6. The method according to claim 1, characterized in that The method further comprises: When it is determined that packet loss occurs in the message to be detected, the packet loss position of the message to be detected is located.

7. A packet loss detection device, characterized in that: The device comprises: A first matching module is used to match the target transmission message passing through each network node interface of the cloud network with the pre-issued first flow table to obtain a first matching result, wherein the message header of the target transmission message carries the detection requirement information; An updating module, configured to determine, when the first matching result is a successful match, that the target transmission message is a message to be detected, and update the number of the messages to be detected passing through the network node interface; The detection module is used to detect the packet loss situation of the message to be detected when it is transmitted in the cloud network according to the number of the message to be detected passing through each network node interface in the cloud network after the transmission of the message to be detected is completed.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the packet loss detection method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the packet loss detection method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the packet loss detection method according to any one of claims 1 to 6 are implemented.