Data message processing method and device and packet loss information analysis method and device
By updating the status identifier of the data message and mirroring the data message in the FPGA scenario, the problem of difficulty in determining the cause of data flow loss in complex networks is solved, and the processing efficiency and accuracy of the packet loss node are improved.
Patent Information
- Application Number
- CN202410501476.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-10-24
AI Technical Summary
In FPGA programmable scenarios, where network traffic is complex and multiple data streams experience packet loss, existing technologies have difficulty accurately determining the cause of packet loss for a particular data stream, resulting in complex positioning and high resource consumption.
By updating the state identifier of the target data message to the target state identifier when the target data message meets the packet loss detection event, and mirroring the data message when the message mirroring condition is met, the data message is sent to the target processor for parsing to determine the packet loss node.
It improves the processing efficiency of packet loss nodes, reduces complexity and resource consumption, and achieves more accurate packet loss information troubleshooting.
Smart Images

Figure CN120835017A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present specification relate to the technical field of computer technology, and particularly relate to a data packet processing method and device. BACKGROUND
[0002] In the programmable scene of FPGA (Fie ld Programmab le Gate Array), as a forwarding device, packet processing of FPGA will inevitably exist packet loss. The general processing logic is to count the number of packet loss by counting information. However, in a complex scene, the packet loss point and the number of packet loss will change more, and it is more complex to locate.
[0003] In addition, network traffic is complex, and multiple data streams (in the transmission process, in order to adapt to the network hierarchical structure and transmission mechanism, a data stream will be divided into several data packets for transmission) may exist packet loss at the same time. In this scenario, it is difficult to accurately determine the packet loss reason of a specific data stream by counting. SUMMARY
[0004] Therefore, the embodiments of the present specification provide a data packet processing method. One or more embodiments of the present specification also relate to a data packet processing device, a computing device, a computer readable storage medium and a computer program product to solve the technical defects in the prior art.
[0005] According to a first aspect of the embodiments of the present specification, a data packet processing method is provided, applied to a data packet forwarding device, comprising:
[0006] receiving a target data packet, wherein the target data packet carries data packet attribute information;
[0007] performing packet loss detection on the target data packet according to a packet loss detection event, and updating an initial state identifier of the target data packet to a target state identifier in a case where it is determined that the target data packet meets the packet loss detection event, wherein the target state identifier corresponds to the packet loss detection event;
[0008] mirroring the target data packet to obtain a mirror data packet carrying a target state identifier in a case where it is determined that the target data packet meets a packet mirroring condition according to the data packet attribute information and the target state identifier;
[0009] sending the mirror data packet carrying the target state identifier to a target processor.
[0010] According to a second aspect of the embodiments of the present specification, a packet loss information analysis method is provided, applied to a target processor, comprising:
[0011] receiving a mirror data packet carrying a target state identifier sent by the data packet forwarding device, wherein the mirror data packet is generated according to the data packet attribute information and the target state identifier information;
[0012] parsing the mirror data packet, obtaining the target state identifier carried by the mirror data packet, and determining a packet loss node of the target data packet based on the target state identifier carried by the mirror data packet.
[0013] According to a third aspect of an embodiment of the present specification, a data packet processing apparatus is provided, applied to a data packet forwarding device, and includes:
[0014] a receiving module configured to receive a target data packet, wherein the target data packet carries data packet attribute information;
[0015] an updating module configured to perform packet loss detection on the target data packet according to a packet loss detection event, and update an initial state identifier of the target data packet to a target state identifier in a case where it is determined that the target data packet meets the packet loss detection event, wherein the target state identifier corresponds to the packet loss detection event;
[0016] a mirroring module configured to mirror the target data packet to obtain a mirror data packet carrying a target state identifier in a case where it is determined that the target data packet meets a packet mirroring condition according to the data packet attribute information and the target state identifier;
[0017] a sending module configured to send the mirror data packet carrying the target state identifier to a target processor.
[0018] According to a fourth aspect of an embodiment of the present specification, a packet loss information analysis apparatus is provided, applied to a target processor, and includes:
[0019] a receiving module configured to receive a mirror data packet carrying a target state identifier sent by a data packet forwarding device, wherein the mirror data packet is generated according to data packet attribute information and the target state identifier information;
[0020] a determining module configured to parse the mirror data packet, obtain the target state identifier carried by the mirror data packet, and determine a packet loss node of the target data packet based on the target state identifier carried by the mirror data packet.
[0021] According to a fifth aspect of an embodiment of the present specification, a computing device is provided, including:
[0022] a memory and a processor;
[0023] The memory is configured to store computer programs / instructions, and the processor is configured to execute the computer programs / instructions, which realize the steps of the data packet processing method.
[0024] According to a sixth aspect of an embodiment of the present specification, a computer readable storage medium is provided, which stores computer programs / instructions, which realize the steps of the data packet processing method when executed by a processor.
[0025] According to a seventh aspect of an embodiment of the present specification, a computer program product is provided, which includes computer programs / instructions, which realize the steps of the data packet processing method when executed by a processor.
[0026] An embodiment of the present specification provides a data packet processing method applied to a data packet forwarding device, including: receiving a target data packet, wherein the target data packet carries data packet attribute information; performing packet loss detection on the target data packet according to a packet loss detection event, and updating an initial state identifier of the target data packet to a target state identifier in a case where it is determined that the target data packet meets the packet loss detection event, wherein the target state identifier corresponds to the packet loss detection event; mirroring the target data packet to obtain a mirrored data packet carrying the target state identifier in a case where it is determined that the target data packet meets a packet mirroring condition according to the data packet attribute information and the target state identifier; and sending the mirrored data packet carrying the target state identifier to a target processor.
[0027] Based on this, the method updates the initial state identifier of the target data packet to the target state identifier in a case where the target data packet meets the packet loss detection event, so that the target data packet is mirrored when it is determined that the target data packet meets the packet mirroring condition, and the mirrored data packet obtained is consistent with the target data packet, that is, the state identifier carried by the mirrored data packet is also the target state identifier, and in a case where the mirrored data packet carrying the target state identifier is sent to the target processor, the target processor can determine the packet loss detection event corresponding to the target state identifier through the target state identifier carried by the mirrored data packet, so as to accurately determine the packet loss node of the target data packet; and in a case where it is determined whether the target data packet meets the packet mirroring condition based on the data packet attribute information of the target data packet, the complexity is reduced, the consumption of resources is reduced, the packet loss information is more accurate and simple to troubleshoot, and the processing efficiency of determining the packet loss node is improved. BRIEF DESCRIPTION OF DRAWINGS
[0028] Figure 1 is an application scenario diagram of a data packet processing method provided by an embodiment of the present specification;
[0029] Figure 2 is a flow chart of a data packet processing method applied to a data packet forwarding device according to an embodiment of the present specification;
[0030] Figure 3 is a flow chart of a packet loss information analysis method applied to a target processor according to an embodiment of the present specification;
[0031] Figure 4 is a flow chart of a processing procedure of a data packet processing method according to an embodiment of the present specification;
[0032] Figure 5 is a schematic diagram of a VLAN data frame structure according to an embodiment of the present specification;
[0033] Figure 6 is a schematic diagram of a data packet processing device applied to a data packet forwarding device according to an embodiment of the present specification;
[0034] Figure 7 is a schematic diagram of a packet loss information analysis device applied to a target processor according to an embodiment of the present specification;
[0035] Figure 8 is a structural block diagram of a computing device according to an embodiment of the present specification. DETAILED DESCRIPTION
[0036] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present specification. However, the present specification can be practiced without the specific details, which are not described in the present specification, and it is understood that the scope of the present specification is not limited to the details below. In other instances, well-known methods, procedures, components, and circuits have not been described in detail since it is understood that persons of ordinary skill in the art are already very familiar with the same.
[0037] The terminology used in one or more embodiments of the present specification is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present specification. As used in one or more embodiments of the present specification and the accompanying claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in one or more embodiments of the present specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0038] It should be understood that, although the terms first, second, etc. can be employed in this specification to describe various information, these information should not be limited to these terms. These terms are only used to differentiate one piece of information from another piece of information. For example, without departing from the scope of one or more embodiments of the present specification, first can also be referred to as second, and similarly, second can also be referred to as first. Depending on the context, the word "if' as used herein can be interpreted as "when" or "upon" or "in response to determining".
[0039] In addition, it should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of the present specification are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.
[0040] Firstly, the nomenclature involved in one or more embodiments of the present specification is explained.
[0041] FPGA: Field Programmable Gate Array, field programmable gate array, which is a semi-custom circuit in the field of application-specific integrated circuit, which solves the shortcomings of custom circuit and overcomes the limitation of the number of gate circuits of the original programmable device.
[0042] Five-tuple: source address, destination address, protocol, source port, destination port.
[0043] CPU: Central Processing Unit, central processing unit.
[0044] VLAN: Virtual Local Area Network, virtual local area network; virtual local area network (VLAN) is a group of logical devices and users, which are not limited by physical location, and can be organized according to function, department and application, etc. The communication between them is as if they are in the same network segment.
[0045] A method for determining the reason for data packet loss based on a five-tuple flow statistics (network traffic statistics, real-time or periodic statistical analysis of data traffic transmitted in the network) exists, but the single flow statistics cannot accurately determine the reason for packet loss, only whether the data packet is lost. If the exact reason for packet loss needs to be determined, multiple flow statistics need to be performed, consuming a large amount of resources, and all flow statistics points need to start statistics at the same time, which is also complex to configure.
[0046] In the present specification, a data packet processing method is provided, and the present specification also relates to a data packet processing method, a computing device, a computer readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.
[0047] Referring to Figure 1 , Figure 1 An application scenario schematic diagram of a data packet processing method according to one embodiment of the present specification is shown.
[0048] Specifically, the data packet processing method is implemented by an end-side device 102 and a server 104, the end-side device 102 is configured to send a target data packet to the server 104, and the end-side device 102 can send a prompt text of "check the reason for packet loss" or a user selects a function option of "check the reason for packet loss" in the interface of the control console in the case of sending the target data packet. In actual application, the user can input the prompt text in the end-side device 102 in the form of text or voice, if the voice is used, the end-side device 102 also includes a corresponding voice processing part, such as a voice analysis module, a voice to text conversion module, a voice synthesis module, etc., which is used to convert the question input by the user in the form of voice into text, and the present specification does not limit this.
[0049] The server 104 includes a data packet forwarding device and a target processor. In the case of receiving a target data packet, the data packet forwarding device performs packet loss detection on the target data packet according to a packet loss detection event, updates an initial state identifier of the target data packet to a target state identifier in the case of determining that the target data packet meets the packet loss detection event, and can mirror the target data packet to obtain a mirror data packet carrying a target state identifier in the case of determining that the target data packet meets a packet mirroring condition according to the data packet attribute information and the target state identifier; and sends the mirror data packet carrying the target state identifier to the target processor, so that the target processor determines a packet loss node of the target data packet based on the target state identifier of the mirror data packet. In the case of determining the packet loss node, the corresponding packet loss detection event can be determined, and then the packet loss reason can be determined. For example, in the case of determining that the packet loss node is packet loss node 1, it is determined that the packet loss detection event corresponding to the packet loss node 1 is rate limiting detection, and then it is determined that the packet loss reason is “rate limiting packet loss”, and the packet loss information containing the packet loss node and the packet loss reason is returned to the end-side device 102.
[0050] The end-side device 102 can include a browser, an APP (Application), or a web application such as an H5 (Hyper Text Markup Language 5) application, or a light application (also known as a small program, a lightweight application), or a cloud application, etc. The end-side device can be developed based on a software development kit (SDK) of a corresponding service provided by a server, such as an RTC (Real Time Communication) SDK, etc. The end-side device can be deployed in an electronic device, and needs to be run in dependence on a device or some APP in the device, etc. The electronic device can have a display screen and support information browsing, etc., and can be a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can also be configured in the electronic device, such as man-machine dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant communication tools, mailbox clients, social platform software, etc.
[0051] The server 104 can be understood as a server providing various services, including a physical server, a cloud server, for example, a server providing a communication service for multiple clients, for example, a server for background training supporting a model used on a client, for example, a server processing data sent by a client, and the like. It should be noted that the server 104 can be implemented as a distributed server cluster composed of multiple servers, or as a single server. The server 104 can also be a server of a distributed system, or a server combined with a blockchain. The server 104 can also be a cloud server of a cloud service, a cloud database, cloud computing, cloud functions, cloud storage, a network service, cloud communication, middleware service, domain name service, security service, content distribution network (CDN, Content Delivery Network), and big data and artificial intelligence platform, and the like. Basic cloud computing services of artificial intelligence technology, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0052] It should be noted that the data message processing method provided in the embodiments of the present specification can be executed by the server 104. In other embodiments of the present specification, a data message forwarding device and a target processor can be included in the end-side device 102, so that the end-side device 102 also has similar functions as the server 104, thereby executing the data message processing method provided in the embodiments of the present specification. In other embodiments, the data message processing method provided in the embodiments of the present specification can also be executed by the end-side device 102 and the server 104 together.
[0053] The data message processing method provided in the embodiments of the present specification updates the initial state identifier of the target data message to the target state identifier when the target data message meets the packet loss detection event, so that the target data message is mirrored when it is determined that the target data message meets the message mirroring condition. The obtained mirrored data message is consistent with the target data message, that is, the state identifier carried by the mirrored data message is also the target state identifier. When the mirrored data message carrying the target state identifier is sent to the target processor, the target processor can determine the packet loss detection event corresponding to the target state identifier through the target state identifier carried by the mirrored data message, thereby accurately determining the packet loss node of the target data message. In addition, when it is determined whether the target data message meets the message mirroring condition based on the data message attribute information of the target data message, the complexity is reduced, the resource consumption is reduced, the packet loss information is more accurate and simple to troubleshoot, and the processing efficiency of determining the packet loss node is improved.
[0054] Referring to Figure 2 , Figure 2 A flowchart of a data message processing method applied to a data message forwarding device is shown, which specifically includes the following steps.
[0055] Step 202: receiving a target data packet, wherein the target data packet carries data packet attribute information.
[0056] The data packet forwarding device includes, but is not limited to, a switch, a router, a network card and the like, and in the case of programmable FPGA, the FPGA can also be programmed to realize specific logic functions, and therefore the FPGA can also be used as a data packet forwarding device. In actual application, the data packet forwarding device can be a cloud data packet forwarding device.
[0057] The target data packet can be understood as a data block carrying user data and control information, and contains complete data information to be sent, such as actual content (such as web page data, file content, email body, etc.) to be sent and essential metadata, such as source IP address (Internet Protocol Address), destination IP address, protocol type (such as Transmission Control Protocol, User Datagram Protocol), port number, sequence number, checksum and the like of network layer, transport layer and data link layer header information.
[0058] The data packet attribute information can be understood as data describing the target data packet, such as the above-mentioned metadata. The data packet attribute information can include the source address (i.e. the above-mentioned source IP address) of the target data packet, the destination address (i.e. the above-mentioned destination IP address), the target protocol (i.e. the transmission protocol), the source port and / or the destination port.
[0059] The above-mentioned source IP address, destination IP address, transmission protocol, source port number and destination port number can be used to determine a specific target data packet.
[0060] Specifically, the data packet forwarding device can receive a target data packet sent from other clients or other servers, and the target data packet carries data packet attribute information, so as to determine whether the target data packet meets the packet mirroring condition through the data packet attribute information of the target data packet.
[0061] In one or more embodiments of the present specification, a packet loss detection event is also configured between receiving the target data packet, so as to perform packet loss detection on the target data packet through the configured packet loss detection event. The specific implementation manner is as follows:
[0062] Before receiving the target data packet, the method further includes:
[0063] receiving packet loss detection configuration data, and configuring the packet loss detection event according to the packet loss detection configuration data; or
[0064] According to the packet loss information of the historical data message, packet loss detection configuration data is determined, and the packet loss detection event is configured according to the packet loss detection configuration data.
[0065] The packet loss can be understood as a phenomenon that a data message that should be transmitted from a sending end to a receiving end in a network transmission process fails to successfully arrive at the receiving end in the process due to various reasons, that is, the packet loss can be understood as a loss of the data message in the network transmission process.
[0066] The packet loss detection event can be understood as a processing event encountered by a target data message in a data message forwarding device; for example, the packet loss detection event includes but is not limited to a rate limiting event, a security group event, a route forwarding event, etc.; and the packet loss detection configuration data includes but is not limited to configuration data such as a configuration policy, a time period, and a processing method.
[0067] Specifically, taking the rate limiting event as an example of the packet loss detection event, if the rate limiting event is to be configured, packet loss detection configuration data related to the rate limiting event needs to be obtained, wherein the packet loss detection configuration data can include configuration data such as a configuration policy (such as a policy based on protocol rate limiting), a rate limiting value in a non-peak period (such as 1 a.m. to 5 a.m.), a rate limiting value in other time periods, and a processing method (such as discarding data packets exceeding the rate limiting value when the traffic exceeds the rate limiting value); and the packet loss detection event is configured based on the packet loss detection configuration data.
[0068] Alternatively, in actual application, the packet loss information of the historical data message can also be collected, the packet loss information of the historical data message is analyzed through a neural network model to determine key information such as a packet loss period, a packet loss frequency, and a packet loss rate, and it is understood that which data flow or which time period is more likely to have a packet loss phenomenon; and thus the packet loss detection configuration data can be determined according to the packet loss information of the historical data message, such as formulating a reasonable packet loss detection strategy, so as to configure the packet loss detection event.
[0069] The data message processing method provided by the embodiments of the present specification can customize packet loss detection configuration data to configure personalized packet loss detection events according to the customized packet loss detection configuration data; or can obtain more reasonable packet loss detection configuration data according to the packet loss information of the historical data message, and then configure the packet loss detection event according to the reasonable packet loss detection configuration data, so as to reasonably perform packet loss detection on the target data message according to the packet loss detection event.
[0070] Step 204: performing packet loss detection on the target data message according to the packet loss detection event, and updating an initial state identifier of the target data message to a target state identifier in a case where it is determined that the target data message meets the packet loss detection event, wherein the target state identifier corresponds to the packet loss detection event.
[0071] The initial state identifier can be understood as an identifier used to represent the original state of the target data packet, which represents whether the target data packet is to be packet-dropped. Specifically, the initial state identifier is a state identifier of the target data packet not being packet-dropped, which can be identified by using a number, a character, or the like, such as using the number 0 to represent the initial state identifier of the target data packet. The target state identifier can be understood as a state identifier corresponding to a packet-dropping detection event and to be packet-dropped, such as using the number 1 to represent the target state identifier corresponding to the rate limiting event.
[0072] Specifically, taking the packet-dropping detection event as the rate limiting event as an example, the rate limiting event can be understood as an event in which a data packet is discarded due to bandwidth limitation or traffic shaping policy of the data packet forwarding device. Specifically, the rate limiting event can be implemented by using a token bucket algorithm, that is, when the target data packet arrives, a token needs to be taken out from the token bucket to continue transmission. If a token shortage occurs, that is, there is no available token, the target data packet is colored red, it is considered that the target data packet satisfies the rate limiting event, and the initial state identifier of the target data packet is updated to the target state identifier corresponding to the rate limiting event, that is, the number 0 representing the initial state identifier is updated to the number 1 corresponding to the rate limiting event.
[0073] In one or more embodiments of the present specification, a plurality of packet-dropping detection events are iterated, and the initial state identifier of the target data packet can be updated to the target state identifier corresponding to the i th packet-dropping detection event in a case where it is determined that the target data packet satisfies the i th packet-dropping detection event, so as to accurately identify and mark the packet-dropping information of the target data packet. The specific implementation manner is as follows:
[0074] The packet-dropping detection events include N, and N is a positive integer; and the packet-dropping detection on the target data packet according to the packet-dropping detection events includes updating the initial state identifier of the target data packet to a target state identifier in a case where it is determined that the target data packet satisfies the packet-dropping detection event, which includes:
[0075] An i th packet-dropping detection event is determined from the N packet-dropping detection events, and the packet-dropping detection on the target data packet according to the i th packet-dropping detection event, wherein i is a positive integer, and the initial value of i is 1;
[0076] The initial state identifier of the target data packet is updated to the target state identifier corresponding to the i th packet-dropping detection event in a case where it is determined that the target data packet satisfies the i th packet-dropping detection event.
[0077] Specifically, for each packet loss detection event (indexed by i), it is checked whether the target data packet satisfies the packet loss detection event. If the target data packet satisfies the i-th packet loss detection event, it is considered that there is a packet loss phenomenon, and the initial state identifier of the target data packet is updated to the target state identifier corresponding to the i-th packet loss detection event.
[0078] Taking the case of N being 3, and the 3 packet loss detection events being a speed limit event, a security group event (an event of filtering and discarding data packets according to a security rule), and a network congestion event (an event of discarding data packets exceeding processing capacity due to full buffer), the data packet processing method is described in detail.
[0079] The first packet loss detection event (e.g., the speed limit event) is determined from the 3 packet loss detection events, and the target data packet is subjected to packet loss detection according to the speed limit event. In a case where it is determined that the target data packet satisfies the speed limit event, it is considered that there is a packet loss phenomenon, and the initial state identifier of the target data packet is updated to the target state identifier corresponding to the speed limit event, e.g., the number 0 representing the initial state identifier of the target data packet is updated to the number 1 representing the target state identifier corresponding to the speed limit event.
[0080] The packet loss detection according to the i-th packet loss detection event on the target data packet further comprises:
[0081] In a case where it is determined that the target data packet does not satisfy the i-th packet loss detection event, it is judged whether i is greater than or equal to N,
[0082] If yes, the packet loss detection is ended, and the initial state identifier of the target data packet is determined as the target state identifier.
[0083] If no, i is incremented by 1, and the steps of determining the i-th packet loss detection event from the N packet loss detection events, and subjecting the target data packet to packet loss detection according to the i-th packet loss detection event are continued to be executed.
[0084] Continuing with the above example, if the target data packet does not satisfy the first packet loss detection event, it is further judged whether i has reached or exceeded the preset number of packet loss detection events 3.
[0085] At this time, i is 1, and the number of packet loss detection events 3 has not been reached, indicating that there are remaining packet loss detection events to be checked. At this time, the value of i is incremented by 1, and the next round of packet loss detection is continued, i.e., the target data packet is subjected to packet loss detection according to the second packet loss detection event (the security group event).
[0086] In a case where it is determined that the target data packet satisfies the security group event, it is considered that there is a packet loss phenomenon, and the initial state identifier of the target data packet is updated to the target state identifier corresponding to the security group event, such as updating the number 0 representing the initial state identifier of the target data packet to the number 2 representing the target state identifier corresponding to the rate limiting event.
[0087] Further, if the target data packet does not satisfy the second packet loss detection event, it is further determined whether i has reached or exceeded the preset packet loss detection event number 3.
[0088] At this time, i is 2, and the packet loss detection event number 3 has not been reached, indicating that there are remaining packet loss detection events to be checked. At this time, the value of i is increased by 1, and then the next round of packet loss detection is continued, that is, the target data packet is subjected to packet loss detection according to the third packet loss detection event (network congestion event).
[0089] In a case where it is determined that the target data packet satisfies the network congestion event, it is considered that there is a packet loss phenomenon, and the initial state identifier of the target data packet is updated to the target state identifier corresponding to the network congestion event, such as updating the number 0 representing the initial state identifier of the target data packet to the number 3 representing the target state identifier corresponding to the rate limiting event.
[0090] Further, if the target data packet does not satisfy the third packet loss detection event, it is further determined whether i has reached or exceeded the preset packet loss detection event number 3.
[0091] At this time, i is 3, and the packet loss detection event number 3 has been reached, indicating that all packet loss detection events have been checked, but the target data packet does not satisfy any packet loss condition. Therefore, the packet loss detection is ended, and the initial state identifier of the target data packet is directly taken as the target state identifier, meaning that the target data packet is considered to have no packet loss problem. On this basis, if it is determined that the target data packet satisfies the packet mirroring condition according to the data packet attribute information, the target data packet is mirrored to obtain a mirrored data packet, and the mirrored data packet is sent to a target processor. The target processor determines the target state identifier of the mirrored data packet to be the initial state identifier of the target data packet, and determines that the target data packet has no packet loss problem.
[0092] The data packet processing method provided in the present specification is implemented by means of cyclic traversal, which can compare each packet loss detection event until a data packet loss condition that meets the condition is found or all conditions are checked, thereby ensuring comprehensive and accurate determination of the packet loss state of the target data packet.
[0093] Step 206: according to the data packet attribute information and the target state identifier, if the target data packet meets the packet mirroring condition, mirror the target data packet to obtain a mirrored data packet carrying the target state identifier.
[0094] The mirrored data packet can be understood as a data packet consistent with the packet content of the target data packet, but it is forwarded to another specified destination (such as a monitoring device, a log server, an analysis tool, etc.), and then the information related to the target data packet is obtained by analyzing the mirrored data packet at the destination.
[0095] Specifically, by matching the data packet attribute information of the target data packet, it is determined whether the target data packet meets the packet mirroring condition, and in the case of meeting, the target data packet is mirrored to obtain a mirrored data packet consistent with the target data packet.
[0096] In one or more embodiments of the present specification, the packet mirroring condition can be understood as a condition that the data packet attribute information of the target data packet matches the preset data packet attribute information, so that the target data packet is mirrored in the case that the data packet attribute information of the target data packet matches the preset data packet attribute information. The specific implementation is as follows:
[0097] According to the data packet attribute information and the target state identifier, if the target data packet meets the packet mirroring condition, mirror the target data packet to obtain a mirrored data packet carrying the target state identifier, including:
[0098] According to the data packet attribute information, if the data packet attribute information of the target data packet matches the preset data packet attribute information, mirror the target data packet to obtain a mirrored data packet carrying the target state identifier.
[0099] In practical applications, the five-tuple information of the target data packet can be used to determine whether the target data packet meets the pre-set packet mirroring condition (pre-set five-tuple information). In this way, target data packets of specific types, specific directions or specific items can be screened for more in-depth analysis.
[0100] For example, when the user's historical data packets have a packet loss problem, but the reason for the packet loss of the historical data packets cannot be determined, the five-tuple information of the historical data packets can be determined as the pre-set five-tuple information, that is, in the case that the target data packet meets the packet mirroring condition, the target data packet is mirrored and uploaded to the CPU, so that the CPU analyzes the obtained mirrored data packet carrying the target state identifier, thereby obtaining the reason for the packet loss of the historical data packets.
[0101] The data packet processing method provided by the embodiments of the present specification can facilitate subsequent traffic analysis, fault positioning and the like by mirroring, i.e., copying, an original target data packet to generate a mirror data packet, and meanwhile, will not affect the normal transmission of the original target data packet in the network.
[0102] Step 208: sending the mirror data packet carrying the target state identifier to a target processor.
[0103] The target processor can be understood as a processor with analysis capability or configured with an analysis tool; and the target processor can be a CPU for analyzing the mirror data packet. The packet loss information includes, but is not limited to, packet loss point, packet loss reason and the like.
[0104] Specifically, in the case of sending the mirror data packet carrying the target state identifier to the CPU, the CPU can analyze the received mirror data packet to obtain the target state identifier of the mirror data packet, so that the target state identifier determines the packet loss detection event corresponding thereto, and further determines the packet loss information of the target data packet; for example, when the target state identifier is a number 1, it is determined that the packet loss detection event corresponding thereto is a rate limiting event, i.e., the packet loss reason of the target data packet is that the packet is lost due to rate limiting.
[0105] In one or more embodiments of the present specification, by configuring the target state identifier corresponding to the packet loss detection event, in the case of analyzing the mirror data packet by the target processor, the packet loss information of the target data packet can be determined by determining the packet loss detection event corresponding to the target state identifier. The specific implementation manner is as follows:
[0106] Before the receiving of the target data packet, the method further includes:
[0107] configuring the target state identifier corresponding to the packet loss detection event;
[0108] The sending of the mirror data packet carrying the target state identifier to the target processor includes:
[0109] sending the mirror data packet carrying the target state identifier to the target processor, so that the target processor determines the packet loss detection event corresponding to the target state identifier based on the target state identifier carried by the mirror data packet, and determines the packet loss information of the target data packet according to the packet loss detection event corresponding to the target state identifier.
[0110] Specifically, the target state identifier of the target data packet is represented in the form of a number, in which case, the target state identifier corresponding to the current to-be-configured packet loss detection event can be determined according to the sequence position number of the plurality of packet loss detection events, wherein the sequence position number can be determined according to the priority of the current to-be-configured packet loss detection event (for example, the priority can be determined according to the possibility of packet loss of the target data packet in the case of the packet loss detection event), or can be determined randomly, as long as one packet loss detection event corresponds to a unique target state identifier.
[0111] For example, in the case of the plurality of packet loss detection events including a speed limit event, a security group event, and a network congestion event, the target state identifier corresponding to the speed limit event can be configured as the number 1, the target state identifier corresponding to the security group event can be configured as the number 2, and the target state identifier corresponding to the network congestion event can be configured as the number 3.
[0112] Therefore, in the case of sending the mirror data packet carrying the target state identifier to the target processor, the target processor can determine the packet loss detection event corresponding to the target state identifier based on the target state identifier of the mirror data packet, so as to determine the packet loss information of the target data packet according to the packet loss detection event.
[0113] In actual application, the target state identifier of the target data packet can also be represented in a form other than a number, such as a string, in which case, the target state identifier corresponding to the packet loss detection event can be determined according to the attribute information of the packet loss detection event, such as the type of the packet loss detection event. For example, the type of the speed limit event and the network congestion event can be the transmission type in the network transmission process (identified by the string “transmission”), and the type of the security group event can be the security type in the network transmission process (identified by the string “safety”), so as to configure the target state identifier corresponding to the packet loss detection event in the form of a string according to the type of the packet loss detection event.
[0114] Of course, on this basis, the event name of the packet loss detection event can be directly determined as the target state identifier corresponding thereto, such as the target state identifier configured for the speed limit event being “Speed limit”, the target state identifier configured for the security group event being “Security Group”, and the target state identifier configured for the network congestion event being “Network congestion”. Then, in actual application, when the mirror data packet is sent to the target processor, the target processor can directly determine the packet loss information of the target data packet by analyzing the mirror data packet to obtain the target data identifier corresponding thereto.
[0115] The data packet processing method provided by the embodiments of the present specification can implicitly carry the packet loss information through the target state identifier in the case that the target data packet exists packet loss, so that the target processor can accurately determine the packet loss information through the target state identifier.
[0116] In the case that the mirror data packet is sent to the target processor, the mirror data packet needs to be encapsulated, and at this time, the target state identifier of the mirror data packet can be filled into the identifier identification field of the initial data frame. The specific implementation is as follows:
[0117] The mirror data packet is sent to the target processor, so that the target processor determines the packet loss information of the target data packet based on the target state identifier of the mirror data packet.
[0118] The mirror data packet is encapsulated into an initial data frame, and the target state identifier is filled into the identifier identification field in the initial data frame to obtain a target data frame.
[0119] The target data frame is sent to the target processor through the target protocol corresponding to the target data frame, so that the target processor determines the packet loss node of the target data packet by analyzing the target data frame and obtaining the target state identifier filled in the identifier identification field.
[0120] The initial data frame can be understood as a data frame obtained by encapsulating the mirror data packet. The encapsulation process usually involves adding necessary header information, tail information, etc., such as source MAC address (Media Access Control Address, also known as local area network address), target MAC address, etc.
[0121] The target protocol can be understood as the protocol corresponding to the target data frame. For example, in the case that the target data frame is a VLAN data frame, the target protocol is a VLAN protocol.
[0122] The target state identifier is filled in a specific identifier identification field (such as a reserved field or special mark bit in some protocols) in the encapsulated initial data frame, so that the target data frame filled with the target state identifier is sent to the target processor. In the case that the target processor receives the target data frame, it will be parsed, the target state identifier is obtained by reading the content of the identifier identification field, so as to judge and determine whether the original mirror data packet exists packet loss or other abnormal conditions in the transmission process.
[0123] For example, in the case of multiplexing VLAN protocol information, the target data packet is encapsulated into a VLAN data frame, at this time, the identification identification field can be understood as a VID (VLAN ID) field of the VLAN data frame, indicating the number of the VLAN to which the data frame belongs, and the value range is 0-4095. In the case of filling the target state identification of the target data packet into the field, the number 0 can be used to represent that the target data packet is normal and not lost, and other numbers represent the target state identification corresponding to each packet loss detection event.
[0124] The data packet processing method provided by the embodiments of the present specification realizes carrying the target state identification of the mirror data packet in the target data frame, indicating the packet loss information of the mirror data packet in the transmission process, so that the target processor can accurately and quickly understand the integrity and reliability of the target data packet, and improve the quality and efficiency of network communication.
[0125] In one or more embodiments of the present specification, in the case of sending the mirror data packet to the target processor, the target operation for the original target data packet is determined according to the target state identification of the target data packet. The specific implementation is as follows:
[0126] After sending the mirror data packet to the target processor, the method further comprises:
[0127] According to the target state identification of the target data packet, the target operation of the target data packet is determined, wherein the target operation includes a packet loss operation and a non-packet loss operation.
[0128] Specifically, if the target state identification indicates that the target data packet has packet loss in the transmission process, the data packet forwarding device will perform the corresponding packet loss operation; if the target state identification indicates that the target data packet has no packet loss, the data packet forwarding device can normally perform subsequent operations.
[0129] In practical applications, the target data packet can have a packet loss flag bit, which can be the position representing the target state identification described above, or other positions of the target data packet, which is not limited here. The packet loss or non-packet loss operation is performed through the packet loss flag bit of the target data packet.
[0130] The data packet processing method provided by the embodiments of the present specification does not affect the normal operation of the data packet forwarding device for the original target data packet when the target processor analyzes the mirror data packet.
[0131] The data packet processing method provided by the embodiment of the present specification updates the initial state identifier of the target data packet to the target state identifier, so that when it is determined that the target data packet meets the packet mirroring condition, the target data packet is mirrored, and the target processor can determine the packet loss detection event corresponding to the target state identifier through the target state identifier of the obtained mirrored data packet, so as to accurately determine the packet loss information of the target data packet. In the case of judging whether the target data packet meets the packet mirroring condition based on the data packet attribute information of the target data packet, the complexity is reduced, the resource consumption is reduced, the packet loss information is more accurate and simple to troubleshoot, and the processing efficiency of determining the packet loss information is improved.
[0132] Referring to Figure 3 , Figure 3 A flowchart of a packet loss information analysis method applied to a target processor is shown, which comprises the following steps.
[0133] Step 302: receiving the mirrored data packet carrying the target state identifier sent by the data packet forwarding device, wherein the mirrored data packet is generated according to the data packet attribute information and the target state identifier information.
[0134] Step 304: analyzing the mirrored data packet to obtain the target state identifier carried by the mirrored data packet, and determining the packet loss node of the target data packet based on the target state identifier carried by the mirrored data packet.
[0135] Specifically, the target processor can receive and analyze the mirrored data packet carrying the target state identifier, and accurately and quickly determine the packet loss node (which can also include the packet loss reason) of the target data packet based on the target state identifier. In this case, the problem source can be quickly located based on the packet loss node or the packet loss reason, the troubleshooting time is shortened, and timely repair is performed to reduce the service interruption time caused by network problems.
[0136] In actual application, according to the determined packet loss node of the target data packet, the fault recovery mechanism can be triggered in time, such as resending the lost data packet when it is determined that the target data packet has packet loss according to the target state identifier, and when the packet loss node of the target data packet is determined, targeted performance optimization (such as adjusting bandwidth allocation, replacing hardware devices, etc.) can be performed for the packet loss node before the lost data packet is resent, so as to improve the network transmission efficiency and stability, and ensure the continuity of the project and the integrity of the data.
[0137] The packet loss information analysis method provided by the embodiment of the present specification can accurately and efficiently determine the packet loss node of the target data packet based on the analysis of the mirror data packet carrying the target state identifier, and then perform reasonable network optimization based on the packet loss node to improve the network transmission efficiency and stability.
[0138] Referring to Figure 4 , Figure 4 A processing process flowchart of a data packet processing method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0139] Specifically, taking the target data packet passing through three processing flows as an example, the data packet processing method is described in detail.
[0140] Step 402: The target data packet is processed by processing flow 1. In the case that the target data packet is to be lost, step 404 is executed; in the case that the target data packet is not lost, step 406 is executed.
[0141] Specifically, taking the data packet forwarding device as FPGA as an example, in the processing process of the target data packet in FPGA, the target data packet is first processed by processing flow 1, wherein the processing flow can be understood as the packet loss detection event in the above embodiment; after the processing of processing flow 1, the processing result of the target data packet includes two kinds, i.e. packet loss and no packet loss.
[0142] If the processing flow 1 is a rate limiting event, the target data packet passes through the rate limiting event. In the case that the target data packet has a token, the target data packet passes, i.e. the target data packet is not lost, at this time the target data packet enters the processing of processing flow 2; in the case that the target data packet has no token, the target data packet is discarded, i.e. the target data packet is lost, at this time step 404 is executed.
[0143] Step 404: marking packet loss reason 1 and counting packet loss.
[0144] Among them, the packet loss reason 1 is the packet loss reason corresponding to the processing flow 1, such as in the case that the processing flow 1 is a rate limiting event, the packet loss reason is rate limiting packet loss.
[0145] Specifically, the specific implementation of marking the packet loss reason can be referred to the specific implementation of updating the initial state identifier of the target data packet to the target state identifier in the above embodiment, i.e. by updating the initial state identifier of the target data packet to the target state identifier, the target data packet can be implicitly marked with the packet loss reason, in the case that the target state identifier corresponds to the packet loss detection event one by one, the packet loss detection event can be determined through the target state identifier of the target data packet, and then the packet loss reason is determined.
[0146] The packet loss information of the target data packet is obtained by marking the packet loss reason and counting the packet loss.
[0147] Step 406: The target data packet is processed according to the processing flow 2, if the target data packet is to be lost, step 408 is executed; if the target data packet is not to be lost, step 410 is executed.
[0148] Step 408: The packet loss reason 2 is marked and the packet loss is counted.
[0149] Step 410: The target data packet is processed according to the processing flow 3, if the target data packet is to be lost, step 412 is executed; if the target data packet is not to be lost, step 414 is executed.
[0150] Step 412: The packet loss reason 3 is marked and the packet loss is counted.
[0151] Specifically, the specific implementation of the processing flow 2 and the processing flow 3 can refer to the specific implementation of the processing flow 1 described above, which will not be repeated here.
[0152] Step 414: The target data packet is mirrored.
[0153] Specifically, whether the target data packet is to be lost or not, it is determined whether the target data packet meets the mirroring packet condition according to the quintuple information (the data packet attribute information in the above embodiment) of the target data packet.
[0154] In actual application, the packet mirroring rule can be configured in the mirroring table, and the packet mirroring rule includes the preconfigured quintuple information, that is, it is determined whether the target data packet is to be mirrored by judging whether the quintuple information of the target data packet is consistent with the preconfigured quintuple information in the packet mirroring rule; in the case that the quintuple information of the target data packet is consistent with the preconfigured quintuple information in the packet mirroring rule (i.e. the packet mirroring rule is hit), the target data packet is mirrored to obtain a mirrored data packet; in the case that the packet mirroring rule is not hit, step 418 is executed.
[0155] Step 416: The CPU parses the mirrored data packet.
[0156] Specifically, the mirrored data packet is uploaded to the CPU (i.e. the target processor in the above example), and the CPU is used to parse the mirrored data packet, so as to obtain the target state identifier of the mirrored data packet and the packet loss information of the target data packet.
[0157] In actual application, the packet loss information can be carried and uploaded to the CPU by selecting the multiplexing VLAN protocol information, and the target data packet is encapsulated into a VLAN data frame; wherein, Figure 5A VLAN data frame structure diagram provided by an embodiment of the present specification is shown, and specifically includes the following fields: destination address, source address, VLAN tag, length / type (indicating the length or type of the data field), data (actual data content), frame check sequence (FCS, Frame Check Sequence, used to check the integrity of the data frame).
[0158] The VLAN Tag further includes the following fields: tag protocol identifier (TPID, Tag Protocol Identifier, used to identify the tag in the frame), priority (PRI, Priority, used to determine the priority and discard priority of the data packet), canonical format indicator (CFI, Canonical Format Indicator, used to distinguish the format of the data frame), VLAN identifier (VID, VLAN ID, virtual local area network identifier, used to identify the VLAN to which the data frame belongs).
[0159] Specifically, by multiplexing the VID field, the target state identifier of the mirror data packet is filled into the VID field, so that when the encapsulated VLAN data frame is sent to the CPU, the network analysis tool (such as tcpdump) in the CPU can determine the packet loss reason of the target data packet through the VLAN ID.
[0160] Step 418: Perform packet loss or no packet loss operation.
[0161] Specifically, in the case of mirroring the target data packet, for the original target data packet, the packet loss or no packet loss operation is performed according to the packet loss flag of the target data packet.
[0162] The data packet processing method provided by the embodiment of the present specification updates the initial state identifier of the target data packet to the target state identifier, so that the target data packet can carry the packet loss information, then configures a packet mirroring rule based on five tuples, and through packet mirroring, the packet loss reason is sent to the CPU as part of the target data packet for analysis, which can accurately determine the packet loss reason, reduce the complexity, reduce the consumption of resources, and make it more accurate and simple to troubleshoot packet loss problems.
[0163] Corresponding to the above method embodiment, the present specification also provides a data packet processing device embodiment, Figure 6 A structure diagram of a data packet processing device applied to a data packet forwarding device is shown, according to an embodiment of the present specification. As shown in Figure 6As shown, the device comprises:
[0164] The receiving module 602 is configured to receive a target data packet, wherein the target data packet carries data packet attribute information;
[0165] The updating module 604 is configured to perform packet loss detection on the target data packet according to a packet loss detection event, and update an initial state identifier of the target data packet to a target state identifier in a case where it is determined that the target data packet meets the packet loss detection event, wherein the target state identifier corresponds to the packet loss detection event.
[0166] The mirroring module 606 is configured to mirror the target data packet to obtain a mirrored data packet carrying the target state identifier in a case where it is determined that the target data packet meets a packet mirroring condition according to the data packet attribute information and the target state identifier.
[0167] The sending module 608 is configured to send the mirrored data packet carrying the target state identifier to a target processor.
[0168] Optionally, the updating module 604 is further configured to:
[0169] determine an i-th packet loss detection event from the N packet loss detection events and perform packet loss detection on the target data packet according to the i-th packet loss detection event, wherein i is a positive integer, and an initial value of i is 1;
[0170] update the initial state identifier of the target data packet to a target state identifier corresponding to the i-th packet loss detection event in a case where it is determined that the target data packet meets the i-th packet loss detection event.
[0171] Optionally, the updating module 604 is further configured to:
[0172] determine whether i is greater than or equal to N in a case where it is determined that the target data packet does not meet the i-th packet loss detection event,
[0173] if yes, end the packet loss detection and determine the initial state identifier of the target data packet as the target state identifier;
[0174] if no, increase i by 1 and continue to perform the steps of determining the i-th packet loss detection event from the N packet loss detection events and performing packet loss detection on the target data packet according to the i-th packet loss detection event.
[0175] The device further comprises:
[0176] The event configuration module is configured to receive packet loss detection configuration data, and configure the packet loss detection event according to the packet loss detection configuration data.
[0177] The packet loss detection configuration data is determined according to the packet loss information of the historical data packet, and the packet loss detection event is configured according to the packet loss detection configuration data.
[0178] The apparatus further comprises:
[0179] The identification configuration module is configured to configure the target state identifier corresponding to the packet loss detection event.
[0180] Optionally, the sending module 608 is further configured to:
[0181] The mirror data packet carrying the target state identifier is sent to the target processor, so that the target processor determines the packet loss detection event corresponding to the target state identifier based on the target state identifier carried by the mirror data packet, and determines the packet loss information of the target data packet according to the packet loss detection event corresponding to the target state identifier.
[0182] Optionally, the mirroring module 606 is further configured to:
[0183] The target data packet attribute information and the matching condition of the preset data packet attribute information are determined according to the data packet attribute information, and the target data packet is mirrored to obtain the mirror data packet carrying the target state identifier.
[0184] Optionally, the sending module 608 is further configured to:
[0185] The mirror data packet is encapsulated into an initial data frame, and the target state identifier is filled into an identification field in the initial data frame to obtain a target data frame.
[0186] The target data frame is sent to the target processor through the target protocol corresponding to the target data frame, so that the target processor determines the packet loss node of the target data packet by analyzing the target data frame and obtaining the target state identifier filled in the identification field.
[0187] The apparatus further comprises:
[0188] The execution module is configured to determine a target operation on the target data packet according to the target state identifier of the target data packet, wherein the target operation includes a packet loss operation and a non-packet loss operation.
[0189] The data message processing apparatus provided by the embodiment of the present specification updates the initial state identifier of the target data message to the target state identifier when the target data message meets the packet loss detection event, so that the target data message is mirrored when it is determined that the target data message meets the message mirroring condition, the obtained mirrored data message is consistent with the target data message, that is, the state identifier carried by the mirrored data message is also the target state identifier, and when the mirrored data message carrying the target state identifier is sent to the target processor, the target processor can determine the packet loss detection event corresponding to the target state identifier through the target state identifier carried by the mirrored data message, so as to accurately determine the packet loss node of the target data message. Moreover, when it is determined whether the target data message meets the message mirroring condition based on the data message attribute information of the target data message, the complexity is reduced, the consumption of resources is reduced, the packet loss information is more accurate and simple to troubleshoot, and the processing efficiency of determining the packet loss node is improved.
[0190] The above is a schematic scheme of the data message processing apparatus applied to the data message forwarding device according to the embodiment. It should be noted that the technical scheme of the data message processing apparatus applied to the data message forwarding device belongs to the same concept as the technical scheme of the data message processing method applied to the data message forwarding device described above, and the details of the technical scheme of the data message processing apparatus applied to the data message forwarding device that are not described in detail can be referred to the description of the technical scheme of the data message processing method applied to the data message forwarding device.
[0191] Corresponding to the method embodiments described above, the present specification also provides a packet loss information analysis apparatus embodiment, Figure 7 A structure schematic diagram of a packet loss information analysis apparatus applied to a target processor is shown according to an embodiment of the present specification. As shown in the figure, Figure 7 The apparatus comprises:
[0192] The receiving module 702 is configured to receive the mirrored data message carrying the target state identifier sent by the data message forwarding device, wherein the mirrored data message is generated according to the data message attribute information and the target state identifier information.
[0193] The determining module 704 is configured to parse the mirrored data message, obtain the target state identifier carried by the mirrored data message, and determine the packet loss node of the target data message based on the target state identifier carried by the mirrored data message.
[0194] The packet loss information analysis apparatus provided by the embodiment of the present specification can accurately and efficiently determine the packet loss node of the target data message through the analysis of the target processor on the mirrored data message, and then perform reasonable network optimization based on the packet loss node, thereby improving the network transmission efficiency and stability.
[0195] The above is a schematic scheme of the packet loss information analysis device applied to the target processor according to the embodiment. It should be noted that the technical scheme of the packet loss information analysis device applied to the target processor and the technical scheme of the packet loss information analysis method applied to the target processor belong to the same concept. The technical scheme of the packet loss information analysis device applied to the target processor, which is not described in detail, can be seen from the description of the technical scheme of the packet loss information analysis method applied to the target processor.
[0196] Figure 8 A structural block diagram of a computing device 800 is shown according to one embodiment of the present specification. The components of the computing device 800 include, but are not limited to, a memory 810 and a processor 820. The processor 820 is connected to the memory 810 through a bus 830, and a database 850 is used to save data.
[0197] The computing device 800 also includes an access device 840, which enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 840 can include one or more of any type of network interface (e.g., a network interface controller (NIC)), wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, near field communication (NFC).
[0198] In one embodiment of the present specification, the above-mentioned components of the computing device 800 and other components not shown in the Figure 8 may be connected to each other, for example, through a bus. It should be understood that Figure 8The illustrated computing device structural block diagram is merely for the purpose of example, and is not a limitation on the scope of the present specification. Other components can be added or replaced as needed by those skilled in the art.
[0199] The computing device 800 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 800 can also be a mobile or stationary server.
[0200] The processor 820 is configured to execute instructions of a computer program to implement the steps of the data packet processing method and the packet loss information analysis method.
[0201] Each of the embodiments in the present specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, the computing device embodiment is described simply because it is basically similar to the data packet processing method embodiment, and the relevant part can be referred to the part of the data packet processing method embodiment.
[0202] An embodiment of the present specification also provides a computer readable storage medium storing a computer program / instruction, which is executed by a processor to implement the steps of the data packet processing method and the packet loss information analysis method.
[0203] Each of the embodiments in the present specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, the computer readable storage medium embodiment is described simply because it is basically similar to the data packet processing method embodiment, and the relevant part can be referred to the part of the data packet processing method embodiment.
[0204] An embodiment of the present specification also provides a computer program product comprising a computer program / instruction, which is executed by a processor to implement the steps of the data packet processing method and the packet loss information analysis method.
[0205] The above is a schematic scheme of a computer program product of the embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the data message processing method described above belong to the same concept, and the technical scheme of the computer program product is not described in detail. The contents can be seen from the description of the technical scheme of the data message processing method.
[0206] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different than the order in which they are recited in the embodiments and still achieve desirable results. In addition, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous or necessary.
[0207] The computer instructions include computer program code, which can be in the form of source code, object code, executable code, or some intermediate form. The computer-readable medium can include any entity or apparatus capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the contents contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of patent practice, for example, in some regions, according to the patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0208] It should be noted that for the foregoing method embodiments, in order to facilitate description, they are all expressed as a combination of a series of actions, but those skilled in the art should know that the embodiments of the present specification are not limited by the order of the described actions, because according to the embodiments of the present specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the embodiments of the present specification.
[0209] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be seen from the related description of other embodiments.
[0210] The preferred embodiments of the present specification disclosed above are only used to help explain the present specification. Alternative embodiments do not describe all the details and limit the present application to the specific embodiments described. Obviously, many modifications and variations of the embodiments of the present specification can be made in light of the content of the present specification. The present specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of the present specification, so that those skilled in the art can well understand and utilize the present specification. The present specification is limited only by the claims and their full scope and equivalents.
Claims
1. A data packet processing method applied to a data packet forwarding device, comprising: receiving a target data packet, wherein the target data packet carries data packet attribute information; performing packet loss detection on the target data packet according to a packet loss detection event, and updating an initial state identifier of the target data packet to a target state identifier in a case where it is determined that the target data packet satisfies the packet loss detection event, wherein the target state identifier corresponds to the packet loss detection event; mirroring the target data packet to obtain a mirrored data packet carrying the target state identifier in a case where it is determined that the target data packet satisfies a packet mirroring condition according to the data packet attribute information and the target state identifier; and sending the mirrored data packet carrying the target state identifier to a target processor. 2.The data packet processing method of claim 1, wherein the packet loss detection event comprises N packet loss detection events, and N is a positive integer; and the performing packet loss detection on the target data packet according to a packet loss detection event and updating an initial state identifier of the target data packet to a target state identifier in a case where it is determined that the target data packet satisfies the packet loss detection event comprises: determining an i th packet loss detection event from the N packet loss detection events, and performing packet loss detection on the target data packet according to the i th packet loss detection event, wherein i is a positive integer, and an initial value of i is 1; and updating the initial state identifier of the target data packet to a target state identifier corresponding to the i th packet loss detection event in a case where it is determined that the target data packet satisfies the i th packet loss detection event. 3.The data packet processing method of claim 2, further comprising, after the performing packet loss detection on the target data packet according to the i th packet loss detection event: determining whether i is greater than or equal to N in a case where it is determined that the target data packet does not satisfy the i th packet loss detection event, if yes, ending packet loss detection, and determining the initial state identifier of the target data packet as the target state identifier; and if no, increasing i by 1, and continuing to perform the determining an i th packet loss detection event from the N packet loss detection events, and performing packet loss detection on the target data packet according to the i th packet loss detection event. 4.The data packet processing method of claim 1, further comprising, before the receiving a target data packet: receiving packet loss detection configuration data, and configuring the packet loss detection event according to the packet loss detection configuration data; or determining packet loss detection configuration data according to packet loss information of historical data packets, and configuring the packet loss detection event according to the packet loss detection configuration data. 5.The data packet processing method of claim 1, further comprising, before the receiving a target data packet: configuring a corresponding target state identifier for the packet loss detection event; and the sending the mirrored data packet carrying the target state identifier to a target processor comprises: sending the mirror data message carrying the target state identifier to a target processor, so that the target processor determines a packet loss detection event corresponding to the target state identifier based on the target state identifier carried by the mirror data message, and determines packet loss information of the target data message according to the packet loss detection event corresponding to the target state identifier.
6. The data message processing method of claim 1, wherein in a case where it is determined that the target data message satisfies the packet mirroring condition according to the data message attribute information and the target state identifier, the target data message is mirrored to obtain a mirror data message carrying a target state identifier, and the method comprises: in a case where the data message attribute information of the target data message matches preset data message attribute information according to the data message attribute information, the target data message is mirrored to obtain a mirror data message carrying a target state identifier.
7. The data message processing method of claim 1, wherein the sending of the mirror data message carrying the target state identifier to a target processor comprises: the mirror data message is encapsulated into an initial data frame, and the target state identifier is filled into an identifier identification field in the initial data frame to obtain a target data frame; the target data frame is sent to a target processor through a target protocol corresponding to the target data frame, so that the target processor determines a packet loss node of the target data message by analyzing the target data frame and obtaining the target state identifier filled in the identifier identification field.
8. The data message processing method of claim 1, wherein after the sending of the mirror data message to the target processor, the method further comprises: determining a target operation on the target data message according to the target state identifier of the target data message, wherein the target operation comprises a packet loss operation and a non-packet loss operation.
9. The data message processing method of any one of claims 1-8, wherein the data message attribute information comprises a source address, a destination address, a target protocol, a source port and / or a destination port of the target data message.
10. The data message processing method of any one of claims 1-8, wherein the data message forwarding device is a cloud data message forwarding device.
11. A packet loss information analysis method applied to a target processor, comprising: receiving a mirror data message carrying a target state identifier sent by a data message forwarding device, wherein the mirror data message is generated according to data message attribute information and the target state identifier information; analyzing the mirror data message to obtain the target state identifier carried by the mirror data message, and determining a packet loss node of the target data message based on the target state identifier carried by the mirror data message.
12. A data message processing apparatus applied to a data message forwarding device, comprising: a receiving module configured to receive a target data message, wherein the target data message carries data message attribute information; an updating module configured to perform packet loss detection on the target data packet according to a packet loss detection event, and update an initial state identifier of the target data packet to a target state identifier in a case where it is determined that the target data packet satisfies the packet loss detection event, wherein the target state identifier corresponds to the packet loss detection event; a mirroring module configured to mirror the target data packet to obtain a mirrored data packet carrying the target state identifier in a case where it is determined that the target data packet satisfies a packet mirroring condition according to the data packet attribute information and the target state identifier; a sending module configured to send the mirrored data packet carrying the target state identifier to a target processor.
13. A packet loss information analysis apparatus applied to a target processor, comprising: a receiving module configured to receive a mirrored data packet carrying a target state identifier sent by a data packet forwarding device, wherein the mirrored data packet is generated according to data packet attribute information and the target state identifier information; a determining module configured to parse the mirrored data packet to obtain the target state identifier carried by the mirrored data packet, and determine a packet loss node of the target data packet based on the target state identifier carried by the mirrored data packet.
14. A computing device, comprising: a memory and a processor; the memory is configured to store computer programs / instructions, and the processor is configured to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method in any one of claims 1 to 11.
15. A computer readable storage medium storing computer programs / instructions, which, when executed by a processor, implement the steps of the method in any one of claims 1 to 11.
16. A computer program product comprising computer programs / instructions, which, when executed by a processor, implement the steps of the method in any one of claims 1 to 11.