A data processing method and related device
By utilizing the tagging information of traffic blocks in the data stream to count the number of received packets, the problem of inaccurate packet loss detection is solved, and the accuracy and cost-effectiveness of packet loss detection are improved without increasing bandwidth overhead.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT CLOUD COMPUTING (BEIJING) CO LTD
- Filing Date
- 2024-11-18
- Publication Date
- 2026-05-29
AI Technical Summary
Among existing packet loss detection schemes, active detection schemes cannot fully represent the actual network situation and require additional bandwidth overhead, while passive detection schemes are easily affected by out-of-order packets, resulting in inaccurate packet loss detection.
By acquiring traffic blocks in the data stream and utilizing the tagging information carried by each data packet, the reference tagging information of the traffic block is determined, and the number of data packets carrying the same tagging information is counted, thereby improving the accuracy of packet reception and thus enhancing the accuracy of packet loss detection.
Without increasing bandwidth overhead, it can accurately count packet loss, reflect the true state of the network, reduce packet loss detection costs, and resist interference from out-of-order packets.
Smart Images

Figure CN122120164A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method and related equipment. Background Technology
[0002] With the development of computer technology, networks, as a crucial infrastructure, enable information exchange, resource sharing, and collaborative work through the transmission of data packets. Network quality detection is fundamental to network research such as network performance monitoring, traffic management, and fault diagnosis. Packet loss detection is a vital part of network quality detection; the packet loss amount obtained through packet loss detection is an important indicator of network quality and can provide a reference for optimizing the network environment. Currently available packet loss detection schemes suffer from several drawbacks. Active detection schemes cannot fully represent the true network situation and require additional bandwidth overhead, while passive detection schemes are susceptible to packet out-of-order delivery during transmission, leading to inaccurate packet loss detection. Summary of the Invention
[0003] This application provides a data processing method and related equipment that can improve the statistical accuracy of message reception and thus improve the accuracy of packet loss detection.
[0004] On one hand, embodiments of this application provide a data processing method, the method comprising:
[0005] Get the m-th traffic block in the first data stream. The first data stream is transmitted sequentially in the form of traffic blocks. Each traffic block contains multiple data packets, and each data packet carries tag information. m is a positive integer.
[0006] Based on the tagging information carried by a specific data packet in the m-th traffic block, determine the reference tagging information of the m-th traffic block;
[0007] The number of data packets whose tagging information matches the reference tagging information in the m-th traffic block and its adjacent traffic blocks is counted to obtain the packet reception count of the m-th traffic block.
[0008] On one hand, a data processing apparatus, characterized in that the apparatus comprises:
[0009] The acquisition unit is used to acquire the m-th traffic block in the first data stream. The first data stream is transmitted sequentially in the form of traffic blocks. Each traffic block contains multiple data packets, and each data packet carries tag information. m is a positive integer.
[0010] The processing unit is used to determine the reference tag information of the m-th traffic block based on the tag information carried by the specific data packet in the m-th traffic block;
[0011] The processing unit is also used to count the number of data packets whose tagging information is consistent with the reference tagging information in the m-th traffic block and its adjacent traffic blocks, and to obtain the number of packets received in the m-th traffic block.
[0012] On one hand, embodiments of this application provide a computer device, the computer device including: a processor adapted to execute computer programs;
[0013] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the data processing method described above.
[0014] On one hand, embodiments of this application provide a computer-readable storage medium storing a computer program, which is loaded by a processor and executed as described above in the data processing method.
[0015] On one hand, embodiments of this application provide a computer program product, which includes a computer program or computer instructions, and the computer program or computer instructions implement the above-described data processing method when executed by a processor.
[0016] In this embodiment, the m-th traffic block in the first data stream, where m is a positive integer, can be obtained. The first data stream is transmitted in the form of traffic blocks, and each traffic block includes multiple data packets, each carrying tag information. For the statistics of data packet reception, each traffic block is used as the basic statistical unit to ensure fine-grained data statistics. The actual transmitted data packets are used as the statistical objects, eliminating the need for additional bandwidth overhead, reducing packet loss detection costs, and reflecting the real situation in the network. Based on the tag information carried by specific data packets in the traffic block, the reference tag information of the m-th traffic block can be determined. Based on the reference tag information of the m-th traffic block, the number of data packets in the m-th traffic block and its adjacent traffic blocks that carry tag information consistent with the reference tag information can be counted, thus obtaining the packet reception volume of the m-th traffic block. In the above process, by counting the number of data packets whose tagging information matches the reference tagging information carried in the traffic block adjacent to the m-th traffic block, it is possible to resist the interference caused by out-of-order packets, improve the accuracy of packet reception statistics for the m-th traffic block, and thus improve the accuracy of packet loss detection. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1a This is a schematic diagram illustrating the transmission of data packets between single nodes according to an exemplary embodiment of this application;
[0019] Figure 1b This is a schematic diagram illustrating message out-of-order delivery as provided in an exemplary embodiment of this application;
[0020] Figure 1c This is an architectural diagram of a data processing system provided in an exemplary embodiment of this application;
[0021] Figure 2 This is a flowchart illustrating a data processing method provided in an exemplary embodiment of this application;
[0022] Figure 3a This is a schematic diagram illustrating the relationship between delayed data packets and traffic blocks, provided in an exemplary embodiment of this application.
[0023] Figure 3b This is a schematic diagram illustrating the relationship between out-of-order data packets and traffic blocks, provided in an exemplary embodiment of this application.
[0024] Figure 3c This is a schematic diagram illustrating the statistical message reception volume provided in an exemplary embodiment of this application;
[0025] Figure 4 This is a flowchart illustrating another data processing method provided in an exemplary embodiment of this application;
[0026] Figure 5 This is an interactive schematic diagram of a data processing flow provided in an exemplary embodiment of this application;
[0027] Figure 6 This is a schematic diagram of the structure of a data processing apparatus provided in an exemplary embodiment of this application;
[0028] Figure 7 This is a schematic diagram of the structure of a computer device provided in an exemplary embodiment of this application. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0030] In communication networks, data packets are the basic data units for network transmission. They contain data information from the source address to the destination address, as well as header information for control and identification. They can carry transmitted data; for example, in real-time communication scenarios, data packets include data related to the real-time communication scenario, such as transmitted images or files. The source address is the address of the data sender, and the destination address is the address of the data receiver. The data sender can send data packets sequentially to the data receiver indicated by the destination address. If the packet transmission between the data sender and receiver is a single-node (i.e., a single computer device) transmission, then the data receiver can receive data packets in sequence, and the order in which the data packets are received at the data receiver is the same as the order in which they were sent at the data receiver. For example, as shown... Figure 1a The diagram illustrates the transmission of data packets between single nodes. Data packets sent by node 1 are received by node 2 in sequence without any out-of-order issues. The nodes mentioned in this application can be understood as computer devices. However, in practical applications, the transmission of data packets between two computer clusters is often involved. A computer cluster refers to a system where multiple independent computer devices (or nodes) are connected through a network to collaboratively process specific computing tasks. Between two computer clusters, due to the existence of ECMP (Equal-Cost Multi-Path Routing) between devices, data packets can be sent to their destination via multiple paths with the same cost (e.g., bandwidth, latency, throughput). Since different paths have different latency values, the data packets sent by the sender may not be received in the order they were sent at the receiver. For example, data packets sent earlier by the sender may not be received in the expected order at the receiver, resulting in out-of-order data packets. For example, as shown... Figure 1b The diagram illustrates out-of-order data packets. Data packets sent by node 1 arrive at node 2 in an unexpected order. The order in which data packets are received at node 2 is different from the order in which they are sent at node 1, resulting in out-of-order data packets at node 2.
[0031] This application proposes a data processing scheme, which involves a data processing system, method, and related equipment. This scheme can solve the problem of inaccurate packet loss detection caused by out-of-order packets in ECMP (Equal-Cost Multi-Path Routing) between devices in a network, leading to inaccurate statistics on the number of data packets received. This technical solution can be applied to in-band packet loss detection between clusters, where a cluster refers to a computer cluster in the network, in-band refers to the normal path of data packet transmission, and packet loss detection refers to the process of statistically analyzing the number of lost data packets transmitted in the network, also known as packet loss statistics. The technical solution provided in this application optimizes the statistical logic for the number of received data packets. For any traffic block in the first data stream, based on the reference tag information of the traffic block, it can count the number of data packets in that traffic block and its adjacent traffic blocks whose tag information matches the reference tag information. Considering that out-of-order data packets often occur at the edges of two adjacent traffic blocks, by overwriting adjacent traffic blocks when statistically analyzing each traffic block, out-of-order data packets in two adjacent traffic blocks can be correctly assigned to the correct traffic block. This improves the accuracy of the packet reception statistics for each traffic block in out-of-order scenarios. Based on the accurate packet reception statistics, the accuracy of the packet loss statistics can be improved. Furthermore, this application uses the actual transmitted data packets as the statistical object, requiring no additional bandwidth overhead, reducing packet loss detection costs, and reflecting the true packet loss situation in the network.
[0032] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items with substantially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or execution order. The term "at least one" refers to one or more, and "multiple" means two or more; for example, multiple data packets refer to the two or more data packets in question. The terms "module" or "unit" refer to a computer program or part of a computer program with a predetermined function, which works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of a larger module or unit that contains the functionality of that module or unit.
[0033] The architecture of the data processing system provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0034] Please see Figure 1c , Figure 1cThis is an architectural diagram of a data processing system provided in an exemplary embodiment of this application. For example... Figure 1c As shown, the data processing system includes a first computer cluster (which can be denoted as MP1, including nodes MP1-1, MP1-2, ..., MP1-M), a second computer cluster (which can be denoted as MP2, including nodes MP2-1, MP2-2, ..., MP2-N), and data analysis equipment. The nodes in both the first and second computer clusters can be understood as computer devices, which can be terminal devices or servers. The data analysis equipment can be a server or a terminal device. Terminal devices include, but are not limited to, smartphones, tablets, smart wearable devices, smart voice interaction devices, smart home appliances, personal computers, in-vehicle terminals, smart cameras, routers, etc., and this application does not limit the number of such devices. A server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but it is not limited to these. This application does not limit the number of servers.
[0035] In one embodiment, the first computer cluster can be a cluster comprising M devices providing ECMP services using the same VIP (Virtual IP Address). The second computer cluster can be a cluster comprising N devices providing ECMP services using the same VIP. Data flows are continuously forwarded between the MP1 and MP2 clusters. The MP1 cluster is the data sender, and any node MP1-i (where i = {1, 2, 3, ..., M}) in the MP1 cluster can be called a data sending node. The MP2 cluster is the data receiver, and any node MP2-j (where j = {1, 2, 3, ..., N}) in the MP2 cluster can be called a data receiving node.
[0036] Each computer device in the second computer cluster can execute the data processing method provided in this application. Taking the execution of the data processing method provided in this application by computer device MP2-1 in the second computer cluster MP2 as an example, the general process of the data processing method is described as follows: (1) Computer device MP2-1 can obtain the m-th traffic block in the first data stream. The first data stream is transmitted in the form of traffic blocks. Each traffic block contains multiple data packets, and each data packet carries tag information, where m is a positive integer. The tag information carried by each data packet can be marked by the computer device that sends the data packet (such as the computer device in the first computer cluster). The tag information can be a string, a combination of a single letter or number, etc. (2) Determine the reference tag information of the m-th traffic block according to the tag information carried by the specific data packet in the m-th traffic block. In one embodiment, the m-th traffic block is received in the m-th time period. The specific data packet includes, but is not limited to, one or more of the following: data packets in a specific time interval, data packets at a specific time point, specified data packets, etc. The reference tag information of the m-th traffic block can be the tag information carried by more than a preset number of data packets in the m-th traffic block. The preset number of data packets are data packets in the m-th traffic block that arrive in order without being out of order. For example, if 15 consecutive data packets in the m-th traffic block carry tag information A, then the reference tag information of the m-th traffic block is A. This reference tag information, as the main tag information, can be used to determine whether the data packets in the m-th traffic block truly belong to this traffic block. (3) Count the number of data packets in the m-th traffic block and its adjacent traffic blocks that carry tag information consistent with the reference tag information to obtain the packet reception volume of the m-th traffic block. In one feasible implementation, since out-of-order packets often exist at the edge junction of two adjacent traffic blocks, this application can divide the traffic block into at least one traffic segment. Each traffic segment consists of a portion of the data packets in the traffic block. When counting the number of data packets whose tag information is consistent with the reference tag information in the adjacent traffic blocks of the m-th traffic block, the number of data packets whose tag information is consistent with the reference tag information in a traffic segment adjacent to the m-th traffic block can be counted.
[0037] In one embodiment, computer device MP2-1 can send the received packet count of the m-th traffic block to the data analysis device, so that the data analysis device can perform packet loss statistics based on the received and transmitted packet counts of the m-th traffic block to obtain the packet loss amount of the m-th traffic block. This completes the detection of packet loss during network forwarding between MP1 and MP2 within a time period, and the accurate statistics of the received packet counts for each traffic block ensure the accuracy of the packet loss statistics.
[0038] In the data processing system provided in this application embodiment, the computer device can count the packet reception volume of each traffic block on a per-block basis. Taking the packet reception volume of the m-th traffic block as an example, in the process of counting the packet reception volume of the m-th traffic block, the reference marker information of the m-th traffic block can be determined. Based on the reference marker information, not only the number of data packets in the m-th traffic block whose marker information matches the reference marker information is counted, but also the number of data packets in the adjacent traffic blocks of the m-th traffic block whose marker information matches the reference marker information is counted. In this way, even if there are out-of-order data packets, data packets that appear in the m-th traffic block but do not belong to that traffic block, and data packets that appear in the adjacent traffic blocks of the m-th traffic block but belong to the m-th traffic block, can all be attributed to the packet reception volume of the correct traffic block. This accurately counts the packet reception volume of the traffic block and improves the accuracy of packet loss detection.
[0039] The data processing method provided in the embodiments of this application will be described next.
[0040] Please see Figure 2 This is a flowchart illustrating a data processing method provided in an exemplary embodiment of this application. The data processing method can be performed by a computer device (such as...). Figure 1c The data processing method, which is executed by computer device MP2-1 in the second computer cluster, may include the contents shown in S201-S203.
[0041] S201, retrieve the m-th traffic block in the first data stream, where m is a positive integer.
[0042] In one feasible implementation, the first data stream is transmitted in the form of traffic blocks, where a traffic block refers to a segment of data stream in the network, which is a part of the first data stream. The computer device can receive the first data stream and obtain the m-th traffic block from it. The first data stream is a continuous, ordered data sequence, with data packets being the basic units constituting this sequence. The first data stream includes multiple data packets arriving in an ordered manner. Based on the continuous transmission of data packets, the first data stream is dynamically changing. This dynamic change includes: data packets can be continuously added to the first data stream, increasing the number of data packets in the first data stream as data packets are added; data packets can also be processed or removed from the first data stream, decreasing the number of data packets in the first data stream as data packets are processed or removed.
[0043] In one feasible implementation, each traffic block in the first data stream has a block ID, which can be determined based on the current system time (g_seconds) and the probe period (interval). In one implementation, the block ID of a traffic block is the quotient of the current system time (g_seconds) and the probe period (interval). Here, the current system time refers to the time when the data receiving node in the data processing system receives the data packets included in the traffic block. Since the devices between nodes maintain clock synchronization, even if there is an error, it is controlled within milliseconds (e.g., 5ms), and the average network latency between clusters is also controlled within milliseconds. Therefore, the block ID of most data packets in the traffic block to which they belong at the data sending node is consistent with the block ID of the traffic block to which they belong at the data receiving node. However, it is possible that a few data packets at the edge of a traffic block arrive within the time period for receiving the next traffic block, thus the block ID of the data packets at the data receiving node may be inconsistent. For example, as shown... Figure 3a The data sending node MP1-1 sends data packets from traffic block M to data receiving node MP2-1. Due to the large network latency, the last data packet from traffic block M sent by the data sending node is divided into traffic block M+1 after arriving at data receiving node MP2-1.
[0044] In one feasible implementation, each traffic block contains multiple data packets, each carrying tagging information. The tagging information carried by each data packet can be obtained by the data sending node marking the corresponding data packet according to the time period in which the data packet is sent. This tagging information (which can be denoted as color) can be a character identifier (such as letters, numbers, or strings). Based on the carrying of tagging information, nodes can synchronously identify the same traffic block, and during the transmission of data packets between individual nodes, changes in tagging information are equivalent to self-synchronization signals. Self-synchronization refers to the process by which nodes maintain consistency through synchronization mechanisms (such as clock synchronization, data synchronization, etc.). The tagging information carried by the data packets can be identified and processed, enabling fine-grained flow control and network quality management.
[0045] If the tagging information carried by the data packets in the m-th traffic block differs, it indicates that there are out-of-order or delayed data packets in the m-th traffic block. Due to ECMP or transmission delays between devices, out-of-order or delayed data packets may appear at the margin between two adjacent traffic blocks. Therefore, a change in tagging information in the data packets included in the first data stream does not necessarily indicate a change in traffic block. For example, as described above... Figure 3b The diagram illustrates the relationship between out-of-order data packets and traffic blocks. (See diagram for example.) Figure 3b The diagram illustrates the transmission and reception of data packets across six traffic blocks. Node 1 sends six traffic blocks (Block M-1 to Block M+4) sequentially. Data packets within the same traffic block carry the same tagging information, while adjacent traffic blocks carry different tagging information. When Node 2 receives these traffic blocks, out-of-order packets exist between traffic blocks Block M-1 and Block M. Specifically, the last data packet in Block M-1 arrives after the first data packet in Block M. Therefore, the last data packet in Block M-1 carries tagging information B, while the first data packet in Block M carries tagging information A. Similarly, out-of-order packets also exist between traffic blocks Block M+1 and Block M+2, and between traffic blocks Block M+4 and Block M+3.
[0046] S202, determine the reference tag information of the m-th traffic block based on the tag information carried by the specific data packet in the m-th traffic block.
[0047] In one implementation, a computer device can identify a specific data packet from the m-th traffic block, and determine the reference tagging information of the m-th traffic block based on the tagging information carried by the specific data packet. If the number of specific data packets includes only one, that is, if the specific data packet includes only one data packet, then the tagging information carried by the specific data packet in the m-th traffic block can be determined as the reference tagging information of the m-th traffic block; in this method, the reference tagging information of the m-th traffic block refers to the tagging information carried by the specific data packet. If a specific data packet contains multiple packets, it can be grouped and statistically analyzed according to its tagging information to obtain at least one group of specific data packets. If there are multiple groups of specific data packets, each group carries the same tagging information, while different groups carry different tagging information. The computer device can determine the tagging information carried by the group of specific data packets with the most data obtained from the statistical analysis as the reference tagging information for the m-th traffic block. In this method, the reference tagging information for the m-th traffic block refers to the tagging information that appears most frequently among the tagging information carried by the specific data packets of the m-th traffic block. In this way, considering the situation where a specific data packet contains multiple data packets, but the tagging information carried by these multiple data packets is different, the reference tagging information can be determined based on the tagging information carried by the data packet with the most identical tagging information, thus improving the reliability and accuracy of the reference tagging information.
[0048] In one embodiment, each traffic block in the first data stream is received within a corresponding time period, also known as a probe period, denoted as interval. The duration of the time period is a preset duration, for example, 30 seconds (s). The m-th traffic block is received in the m-th time period. The m-th time period can be a time interval, such as the time interval from 19:00:00 to 19:00:30. Each time period is sequentially divided into multiple time intervals, including a central time interval. The central time interval refers to a time interval located in the middle of the time period. The specific data packet in the m-th traffic block refers to one or more of the following ①-④:
[0049] ① At least one data packet whose reception time falls within the central time interval of the m-th time period in the m-th traffic block. Each data packet received by the computer device corresponds to a reception time, which refers to the point in time when the data packet is received by the computer device, also known as the arrival time of the data packet. Since out-of-order or delayed data packets are prone to occur at the edge of the traffic block, in order to ensure the accuracy of the reference marking information determination, this application identifies the data packets received in the central time interval of the m-th time period as specific data packets, so as to determine the reference marking information of the m-th traffic block based on the marking information carried by the specific data packets. In a feasible implementation, at least one data packet within the central time interval carries the same marking information, and the marking information of one data packet can be randomly selected from at least one data packet within the central time interval of the m-th time period to determine the reference marking information of the m-th traffic block.
[0050] ② At least one designated data packet among the multiple data packets contained in the m-th traffic block. In one feasible implementation, the designated data packet includes one or both of the following: a data packet with a designated time and a data packet with a designated tag. The designated time includes, but is not limited to: the start time of the center time interval of the m-th time period, or the center time point of the m-th time period, where the center time point refers to the position at half the duration of the m-th time period. For example, if the m-th time period is from 19:00:00 to 19:00:30, then the designated time could be 19:00:15, and the specific data packet refers to the data packet received at that designated time. The designated tag is designated tagging information, which can be manually set by the administrator of the computer cluster or automatically set according to the tagging information carried by the data packets contained in the corresponding traffic block sent by the data sender. For example, if the tag information carried by each data packet in the m-th traffic block sent by the data sender is A, then a specified tag can be set to A, and a specific data packet is a data packet carrying the specified tag; the reference tag information of the m-th traffic block is the specified tag. If the specified at least one data packet includes one data packet, then the tag information carried by the specified data packet can be determined as the reference tag information of the m-th traffic block. If the specified at least one data packet includes multiple data packets, then the specific data packets can be grouped and counted according to the tag information, and the tag information carried by the group of specific data packets with the largest number can be determined as the reference tag information of the m-th traffic block.
[0051] ③ Select a preset number of data packets from the multiple data packets contained in the m-th traffic block. In a feasible implementation, the preset number can be customized by the computer cluster administrator, for example, the preset number can be 20. The preset number can also be determined based on the number of data packets contained in the m-th traffic block, for example, the preset number can be 1 / 2 of the total number of data packets contained in the m-th traffic block. During the selection, the computer device can randomly select the preset number of data packets, or select k data packets at corresponding time intervals, where k is a positive integer; for example, select 1 data packet at 1 second interval. If the preset number of selected data packets carry the same tag information, then the tag information carried by the preset number of data packets can be determined as the reference tag information of the m-th traffic block. If the preset number of selected data packets carry different tag information, then the preset number of data packets can be grouped and counted according to the tag information, and the tag information carried by the group of data packets with the largest number can be determined as the reference tag information of the m-th traffic block.
[0052] ④ Data packets received in the m-th traffic block at the start time of the center time interval of the m-th time period. In one feasible implementation, data packets can be continuously received within the m-th time period. Data packets received at the start time of the center time interval of the m-th time period and for a period thereafter can be considered as stably received data packets without out-of-order delivery. Therefore, data packets received in the m-th traffic block at the start time of the center time interval of the m-th time period are identified as specific data packets. In one implementation, the tagging information carried by this specific data packet can be identified as the reference tagging information of the m-th traffic block.
[0053] The specific data packet types described above can be selected based on the data packet reception time or specified information when identifying a specific data packet from the m-th traffic block. In general, determining the reference tag information of the m-th traffic block based on the tag information carried by the specific data packet can ensure that the reference tag information of the m-th traffic block is reliable and can provide an accurate basis for identifying whether a data packet truly belongs to the m-th traffic block, thereby improving the statistical accuracy of the packet reception volume of the m-th traffic block.
[0054] In one embodiment, the m-th traffic block is received in the m-th time period. This specific data packet is a data packet whose reception time falls within the central time interval of the m-th time period. If the current system time reaches the end of the central time interval of the m-th time period, execution is triggered to determine the reference marker information of the m-th traffic block based on the marker information carried by the specific data packet in the m-th traffic block. Thus, the marker information that appears most frequently among the data packets received within the central time interval can be accurately identified and used as the reference marker information for the m-th traffic block.
[0055] S203, count the number of data packets in the m-th traffic block and its adjacent traffic blocks that carry the same tag information as the reference tag information, and obtain the packet reception count of the m-th traffic block.
[0056] In one embodiment, the computer device can count the number of data packets belonging to the m-th traffic block based on the reference tag information of the m-th traffic block and the tag information carried by each data packet in the m-th traffic block and its adjacent traffic blocks, thereby obtaining the packet reception count of the m-th traffic block. That is, the packet reception count of the m-th traffic block refers to the total number of data packets belonging to the m-th traffic block in the first data stream.
[0057] In one implementation, the adjacent traffic blocks of the m-th traffic block refer to the traffic blocks adjacent to the m-th traffic block. The adjacent traffic blocks of the m-th traffic block include one or both of the (m-1)-th and (m+1)-th traffic blocks. The m-th traffic block is received in the m-th time period, the (m+1)-th traffic block is received in the (m+1)-th time period, and the (m-1)-th traffic block is received in the (m-1)-th time period; thus, the time periods for receiving two adjacent traffic blocks are also adjacent.
[0058] Each time period is sequentially divided into multiple time intervals. In one feasible implementation, each time period can be sequentially divided into multiple time intervals according to a preset margin. This preset margin is determined based on the average network latency between computer clusters and the device clock difference between nodes, as shown in Equation 1 below:
[0059] margin = |A| + Delay_avg Formula 1
[0060] Here, A represents the clock difference between nodes, with the clock difference of data center devices within 5 milliseconds. Delay_avg represents the average network latency (in milliseconds) between the first computer cluster MP1 and the second computer cluster MP2. Additionally, this preset edge duration is less than half the duration of the time period, i.e., margin. <Interval / 2。
[0061] By dividing the time period, multiple intervals are obtained, including a first time interval, a central time interval, and a second time interval. Both the first and second time intervals are adjacent to the central time interval. The first and second time intervals have the same duration, and both durations are preset edge durations. This method allows for the reasonable setting of preset edge duration margins, thereby eliminating errors caused by time asynchrony between different machines. Furthermore, it allows for the reasonable division of each time period interval, ensuring the accuracy of data packet statistics covering the edge junctions of adjacent traffic blocks and improving the statistical accuracy of the number of packets received from traffic blocks in each time period.
[0062] Each time interval corresponds to a traffic block segment. Based on the division of time intervals, each traffic block is also divided into 3 traffic segments. The representation of each time interval can be expressed as follows: Equation 2:
[0063]
[0064] Where `top` represents the first time interval, `stable` represents the central time interval, `bottom` represents the second time interval, `remainder` refers to the remainder of the current system time `g_seconds` / `interval` when the data packet is received, and `margin` represents the preset edge duration. For each data packet, based on the data packet's reception time and the probe period, it can be determined which time interval or traffic segment the data packet falls into.
[0065] In one embodiment, when the computer device performs step S203 above, it can implement it according to the following steps (1)-(3):
[0066] (1) Count the number of data packets in the m-th traffic block whose tag information is consistent with the reference tag information to obtain the first number.
[0067] In one implementation, when counting the number of data packets in the m-th traffic block whose tag information is the same as the reference tag information, the statistics can be performed along the dimension of each time interval. Specifically, the number of data packets in the m-th traffic block whose reception time is in the first time interval (i.e., the top interval) of the m-th time period and whose tag information is the same as the reference tag information can be counted separately; this number can be denoted as stats[block].top[primary_color]. The number of data packets in the m-th traffic block whose reception time is in the middle time interval (i.e., the stable interval) of the m-th time period and whose tag information is the same as the reference tag information can also be counted separately; this number can be denoted as stats[block].stable[primary_color]. The number of data packets in the m-th traffic block whose reception time is in the second time interval (i.e., the bottom interval) of the m-th time period and whose tagging information is consistent with the reference tagging information can be denoted as stats[block].bottom[primary_color]. The first number is obtained by summing the number of data packets in the m-th traffic block whose tagging information is consistent with the reference tagging information in each time interval of the m-th time period, such as summing stats[block].top[primary_color] + stats[block].stable[primary_color] + stats[block].bottom[primary_color].
[0068] (2) Count the number of data packets in the adjacent traffic blocks of the m-th traffic block whose tag information is the same as the reference tag information, and obtain the second number.
[0069] In one feasible implementation, based on the division of time periods into intervals, the number of data packets whose reception time falls within the edge time interval of the corresponding time period in adjacent traffic blocks of the m-th traffic block and whose carrying tag information is consistent with the reference tag information can be counted. Here, the edge time interval refers to a time interval adjacent to the m-th time period corresponding to the m-th traffic block within the time period in which adjacent traffic blocks are received; for example, the last time interval of the traffic block preceding the m-th traffic block, or the first time interval of the traffic block following the m-th traffic block. Based on the time intervals included in each time period division, one or two of the following counts can be included: counting the number of data packets in the (m-1)-th traffic block whose reception time falls within the second time interval of the (m-1)-th time period and whose carrying tag information is consistent with the reference tag information; and counting the number of data packets in the (m+1)-th traffic block whose reception time falls within the first time interval of the (m+1)-th time period and whose carrying tag information is consistent with the reference tag information. By counting the number of data packets whose tag information matches the reference tag information within the edge time interval, even if the data packets of the m-th traffic block arrive out of order with the data packets of the adjacent traffic blocks, the out-of-order data packets whose tag information matches the reference tag information in the adjacent traffic blocks of the m-th traffic block can be correctly counted in the packet reception of the traffic block to which they belong.
[0070] In one embodiment, based on the order of the m-th traffic block in the first data stream, the number of data packets whose tag information matches the reference tag information carried in the adjacent traffic blocks of the m-th traffic block is counted. The methods for obtaining the second number may include the following (2.1)-(2.2):
[0071] (2.1) If the m-th traffic block is the first traffic block, then the adjacent traffic blocks of the m-th traffic block include the (m+1)-th traffic block. The computer device can count the number of data packets in the (m+1)-th traffic block whose reception time is in the first time interval of the (m+1)-th time period, and whose tag information is consistent with the reference tag information, to obtain a second quantity. In one feasible implementation, the m-th traffic block is the first traffic block in the first data stream. The computer device can group and count the data packets in the (m+1)-th traffic block that are in the first time interval of the (m+1)-th time period according to the tag information, to obtain the number of multiple groups of data packets in the first time interval of the (m+1)-th time period. Each group of data packets carries the same tag information, and different groups of data packets carry different tag information. The number of the group of data packets whose tag information is consistent with the reference tag information is determined as the second quantity.
[0072] For example, the duration of the first time interval (top[m+1]) in the (m+1)th time period is 0-3 seconds of the (m+1)th time period. One data packet is received per second, including data packet p1 (carrying tag information B), data packet p2 (carrying tag information A), and data packet p3 (carrying tag information B). Two sets of data packets can be obtained: one set has 1 data packet and all data packets carry tag information A; the other set has 2 data packets and all data packets carry tag information B. Since the reference tag information for the m-th traffic block is A, the number of data packets carrying tag information A (1) can be determined as the second set. This way, the number of out-of-order data packets belonging to the m-th traffic block within the (m+1)th traffic block is counted within the m-th traffic block, improving the statistical accuracy of the packet reception in the m-th traffic block.
[0073] (2.2) If the m-th traffic block is not the first traffic block, then the adjacent traffic blocks of the m-th traffic block include the (m-1)-th traffic block and the (m+1)-th traffic block. When counting the number of data packets whose tag information matches the reference tag information carried in the adjacent traffic blocks of the m-th traffic block, the computer device can separately count the data packets within the time interval of the edge intersection between the (m-1)-th traffic block and the m-th traffic block, and the data packets within the time interval of the edge intersection between the (m+1)-th traffic block and the m-th traffic block, including the contents shown in ①-③ below:
[0074] ① Count the number of data packets in the (m+1)th traffic block whose reception time falls within the first time interval of the (m+1)th time period, and whose tag information matches the reference tag information. This gives the total number of data packets belonging to the mth traffic block in the (m+1)th traffic block. The statistical logic for this part can be found in the detailed description of the steps in (2.1) above, and will not be repeated here.
[0075] ② Count the number of data packets in the (m-1)th traffic block whose receiving time is in the second time interval of the (m-1)th time period, whose tag information is consistent with the reference tag information, and obtain the number of data packets belonging to the mth traffic block in the (m-1)th traffic block.
[0076] The second time interval of the (m-1)th time period is adjacent to the first time interval of the m-th time period. These two time intervals serve as the boundary between two traffic blocks, and the received data packets are prone to arriving out of order. For example, a data packet originally belonging to the m-th traffic block arrives in the (m-1)th time period, while a data packet belonging to the (m-1)th traffic block arrives in the m-th time period. In one implementation, the computer device can group and count the data packets in the second time interval of the (m-1)th time period within the m-1th traffic block according to the tag information, obtaining the number of at least one group of data packets in the second time interval of the m-1th time period. Each group of data packets carries the same tag information, while different groups of data packets carry different tag information. The number of data packets in a group whose tag information matches the reference tag information is determined as the number of data packets belonging to the m-th traffic block in the (m-1)th traffic block. For example, the second time interval (bottom[m-1]) of the (m-1)th time period is 27 seconds to 29 seconds of the (m-1)th time period, and one data packet is received every second, carrying the tag information B, A, B respectively; the reference tag information of the mth traffic block is A, then the number of data packets belonging to the mth traffic block in the (m-1)th traffic block can be obtained as 1.
[0077] ③ Integrate the statistically obtained number of data packets belonging to the m-th traffic block to obtain the second quantity. In one embodiment, the statistically obtained number of data packets belonging to the m-th traffic block includes: the number of data packets belonging to the m-th traffic block in the (m-1)-th traffic block and the number of data packets belonging to the m-th traffic block in the (m+1)-th traffic block. The computer device can sum the number of data packets belonging to the m-th traffic block in the (m-1)-th traffic block and the number of data packets belonging to the m-th traffic block in the (m+1)-th traffic block, and the sum is the second quantity.
[0078] In one feasible implementation, based on the division of time periods into intervals, the packet reception volume of the m-th traffic block can be counted at the end of the first time interval of the (m+1)-th time period corresponding to the m+1-th traffic block (e.g., the current system time reaches the beginning of the center time interval of the (m+1)-th time period, or the current system time reaches the end of the first time interval of the (m+1)-th time period). This allows for waiting for the duration of the first time interval (e.g., margin duration) to complete the packet reception volume count for the m-th traffic block. Regardless of whether the tag information is flipped within the first time interval, the packet reception volume can be accurately counted. Within the center time interval of the m-th time period, the number of data packets carrying tag information consistent with the reference tag information can be counted within the m-th time period (e.g., at the end of the center time interval).
[0079] The statistics of message reception for each traffic block in the first data stream can be implemented according to the above logic. In one embodiment, the m-th traffic block is not the first traffic block. The m-th traffic block can also be an adjacent traffic block of other traffic blocks (i.e., the (m-1)-th traffic block). That is, the m-th traffic block can be an adjacent traffic block of the (m-1)-th traffic block or an adjacent traffic block of the (m+1)-th traffic block. When counting the message reception of the (m-1)-th traffic block, the number of data packets in the m-th traffic block whose reception time is in the first time interval of the m-th time period and whose carrying tag information is consistent with the reference tag information of the (m-1)-th traffic block can be counted. When counting the message reception of the (m+1)-th traffic block, the number of data packets in the m-th traffic block whose reception time is in the second time interval of the (m+1)-th time period and whose carrying tag information is consistent with the reference tag information of the (m-1)-th traffic block can be counted. To distinguish between different traffic blocks, the reference marker information of two adjacent traffic blocks is different. For example, the reference marker information of the (m-1)th traffic block is different from that of the mth traffic block. Data packets received in the first time interval of the mth time period in the mth traffic block can be grouped and counted according to the marker information. Based on the reference marker information of the (m-1)th traffic block, the number of data packets whose marker information matches the reference marker information can be determined as the number of data packets belonging to the (m-1)th traffic block in the mth traffic block. This number is then merged into the number of data packets belonging to the (m-1)th traffic block to obtain the packet reception count of the (m-1)th traffic block. Similarly, data packets received in the second time interval of the m-th time period in the m-th traffic block can be grouped and counted according to the tag information. Based on the reference tag information of the (m+1)-th traffic block, the number of data packets whose tag information is consistent with the reference tag information can be determined as the number of data packets belonging to the (m+1)-th traffic block in the m-th traffic block. This number is then merged into the number of data packets belonging to the (m+1)-th traffic block to obtain the packet reception volume of the (m+1)-th traffic block.
[0080] In another implementation, if the first data stream stops transmitting, and the m-th traffic block is the last traffic block in the first data stream, then the adjacent traffic blocks of the m-th traffic block include the (m-1)-th traffic block. When the computer device counts the number of data packets in the adjacent traffic blocks of the m-th traffic block whose tag information matches the reference tag information, it can count the number of data packets in the (m-1)-th traffic block whose reception time is in the second time interval of the (m-1)-th time period whose tag information matches the reference tag information, thus obtaining a second count. Furthermore, the step of counting the number of data packets in the m-th traffic block and the (m-1)-th traffic block whose tag information matches the reference tag information can be triggered at the end of the m-th time period.
[0081] (3) Integrate the first quantity and the second quantity to obtain the message reception quantity of the mth traffic block.
[0082] In one implementation, the integration here refers to summing the first quantity and the second quantity, and the sum is the packet reception volume of the m-th traffic block. The packet reception volume of the m-th traffic block refers to the total number of data packets belonging to the m-th traffic block. The data packets belonging to the m-th traffic block include at least the data packets in the m-th traffic block, and may also include at least one of the following: at least one data packet in the (m+1)-th traffic block whose reception time is within the first time interval of the (m+1)-th time period, and at least one data packet in the (m-1)-th traffic block whose reception time is within the second time interval of the (m-1)-th time period.
[0083] The statistical logic for the message reception of the m-th traffic block described in (1)-(3) can be found in the pseudocode below.
[0084] AM_RX_STAT(g_seconds,interval,margin)
[0085] block = g_seconds / interval / / Determines the block identifier of the traffic block
[0086] remainder = g_seconds%interval / / Determine the time interval of the data packet if remainder>=0 and remainder <margin
[0087] #top section
[0088] stats[block].top[color]++ / / Counts the number of data packets with various marker information whose received time falls within the current traffic block.
[0089] if remainder == margin - 1
[0090] primary_color_prev=stats[block-1].primary_color
[0091] stats[block-1]=stats[block-2].bottom[primary_color_prev]+
[0092] stats[block-1].top[primary_color_prev]+
[0093] stats[block-1l.stable[primary_color_prev]+
[0094] stats[block-1].bottom[primary_color_prev]+
[0095] stats[block].top[primary_color_prev] / / Stats the number of packets received in the previous block
[0096] report stats[block-1]
[0097] elif remainder>=margin and remainder <interval–margin
[0098] #stable section
[0099] stats[blockl.stable[color]++
[0100] if remainder==interval-margin-l
[0101] #get the color with maximum stats[blockl.stable
[0102] stats[block].primary color = argmax stats[block].stable(color) / / The primary label information (primary_color) of the current traffic block is the color with the largest value in the stats.stable count of this traffic block.
[0103] else
[0104] #bottom section
[0105] stats[block].bottom[color]++
[0106] In the pseudocode above, for each interval of received data packets, the categories of the tag information carried by the received data packets and their corresponding occurrence frequencies (counters) can be counted. For example, when in the time interval [0, margin) corresponding to the current traffic block, the number of data packets with various tag information received within the time interval [0, margin) in the current traffic block can be counted as the occurrence frequency of various tag information; and when reaching the time point of margin-1, the number of packets received in the previous traffic block can be counted. For each traffic block, the tag information with the largest counter value in the stable interval corresponding to the traffic block can be set as the primary tag information (prime color). After determining the primary tag information of the current traffic block, counters with the same primary tag information in the top interval of the current traffic block can be added to the number of packets received in the current traffic block, and counters with different primary tag information can be added to the number of packets received in the previous traffic block. At the same time, counters with the same primary tag information in the bottom interval of the previous traffic block can also be added to the number of packets received in the current block.
[0107] To facilitate further understanding of the above pseudocode, the following can be provided: Figure 3c The diagram illustrates the statistical process. Figure 3cThis illustrates the processing involved in statistical analysis for each of the M traffic blocks. For the first traffic block (Block1), at the end of the Stable1 interval of Block1, the primary marker c1 of Block1 is determined based on the data packets within the Stable1 interval. At the end of the Top2 interval corresponding to the second traffic block (Block2), the number of received packets for Block1 is counted, i.e., the number of data packets with the same primary marker c1 is counted across the four intervals: Top2 + Top1 + Stable1 + Bottom1. After reaching the Stable1 interval of the second traffic block, the primary marker c2 of Block2 can be determined. At the end of the Top3 interval corresponding to the third traffic block (Block2), the number of received packets for Block2 can be counted, i.e., the number of data packets with the same primary marker c2 is counted across the five intervals: Top3 + Bottom2 + Stable2 + Top2 + Bottom1. Similarly, the statistics for the received packets of each subsequent traffic block are performed after the end of the Top interval corresponding to the next traffic block. When the last traffic block BlockM is reached, the number of packets received in the traffic block BlockM can be counted after the bottom interval corresponding to BlockM ends. That is, the number of data packets with the same main marker cM in TopM+BottomM+StableM+Bottom(M-1) can be counted.
[0108] The logic of the statistical message reception volume shown in (1)-(3) above can refine the reception of each traffic block to the dimension of traffic segments by dividing the time period in which the traffic block is received. By statistically analyzing the data messages of each traffic block and the edge junction area of two adjacent traffic blocks, the impact of message disorder on statistical accuracy can be overcome, and the accuracy of the message reception volume of the traffic block can be improved.
[0109] In one embodiment, any data packet in the m-th traffic block is represented as data packet p. During the process of counting data packets in the m-th traffic block whose tagging information matches the reference tagging information, if the tagging information carried by data packet p in the m-th traffic block is inconsistent with the reference tagging information, the receiving order of data packet p in the m-th traffic block is determined based on the receiving time of data packet p. This receiving order can be used to indicate the time interval in the m-th time period. In a feasible implementation, the receiving order of data packet p in the m-th traffic block can be determined based on the remainder obtained by quoting the receiving time and the time period interval of data packet p. For example, the receiving time of data packet p is 19:00:20, the preset margin is 3 seconds, the time period interval is 30 seconds, the remainder of data packet p is 20, and data packet p is located within the central time interval [3, 27) of the m-th time period. If the reception order of data packet p indicates that data packet p is in the center time interval of the m-th time period, then data packet p is identified as an abnormal data packet, and this data packet p is not included in the packet reception statistics of any traffic block. This is because most data packets arriving within the center time interval of each time period are considered unlikely to arrive out of order; that is, the tagging information carried by data packets arriving within the center time interval is usually consistent with the reference tagging information. If the tagging information carried by a data packet in the center time interval of the m-th time period is inconsistent with the reference tagging information, then this data packet can be identified as an abnormal data packet. To ensure the accuracy of the statistics, abnormal data packets are not supported in being counted in the packet reception statistics of any traffic block.
[0110] The data processing method provided in this application, taking any traffic block (the m-th traffic block) in the first data stream as an example, illustrates the statistical logic of the packet reception volume of any traffic block. In this statistical logic, by using the marking information carried by specific data packets in the m-th traffic block, the reference marking information of the m-th traffic block can be determined. Using the reference marking information as the statistical basis, abnormal data packets and out-of-order data packets in the m-th traffic block can be excluded. Data packets belonging to the m-th traffic block in the adjacent traffic blocks of the m-th traffic block can also be counted. In this way, the data packets at the edge junction of the m-th traffic block and the adjacent traffic blocks of the m-th traffic block are covered. This can solve the problem of inaccurate packet reception volume statistics caused by out-of-order or delayed packet arrival, improve the statistical accuracy of packet reception volume of each traffic block, and thus improve the statistical accuracy of packet loss volume of each traffic block.
[0111] Please see Figure 4This is a flowchart illustrating a data processing method provided in an exemplary embodiment of this application. The data processing method can be performed by a computer device (such as...). Figure 1c The data processing method, which is executed by computer device MP2-1 in the second computer cluster, may include the contents shown in S401-S403.
[0112] S401, retrieve the m-th traffic block from the first data stream.
[0113] S402, determine the reference tag information of the m-th traffic block based on the tag information carried by the specific data packet in the m-th traffic block.
[0114] S403, count the number of data packets in the m-th traffic block and its adjacent traffic blocks that carry the same tag information as the reference tag information, and obtain the message reception count of the m-th traffic block.
[0115] The above steps S401-S403 can be found in the description of the foregoing embodiments, and will not be repeated here.
[0116] In another embodiment, the attribute information of each data packet includes at least one of the following: data type of the data packet, destination address of the data packet, source address of the data packet, block identifier (blockID) of the traffic block in which the data packet is located, and tag information carried by the data packet; when the computer device executes S203, it can group and count the data packets in the m-th traffic block according to the attribute information of the data packets to obtain the number of L1 group data packets in the m-th traffic block; and group and count the data packets in the adjacent traffic blocks of the m-th traffic block according to the attribute information of the data packets to obtain the number of L2 group data packets in the adjacent traffic blocks of the m-th traffic block; wherein L1 and L2 are both positive integers; wherein the attribute information of each group of data packets is the same, and the attribute information of different groups of data packets is different. The packet statistics for data packets in adjacent traffic blocks of the m-th traffic block include one or two of the following: packet statistics for data packets received within the first time interval of the m+1-th time period in the (m+1)-th traffic block, and packet statistics for data packets received within the second time interval of the m-1-th time period in the (m-1)-th traffic block. Based on the reference marker information, at least one group of data packets whose marker information matches the reference marker information can be selected from the number of L1 group data packets, and at least one group of data packets whose marker information matches the reference marker information can be selected from the number of L2 group data packets. The selected groups of data packets are then integrated to obtain the packet reception count of the m-th traffic block. This packet reception count of the m-th traffic block may include the reception count of multiple groups of data packets.
[0117] S404, send the message reception volume of the m-th traffic block to the data analysis device so that the data analysis device can perform packet loss statistics based on the message reception volume and message transmission volume of the m-th traffic block to obtain the packet loss volume of the m-th traffic block.
[0118] In one embodiment, the message reception volume of the m-th traffic block may include the reception volume of multiple sets of data packets. Each set of data packets has the same attribute information, but different sets may have different attribute information. Each set of data packets corresponds to a specific type of data packet. The attribute information of any data packet includes one or more of the following: the source address of the data packet, the destination address of the data packet, the data size of the data packet, the traffic block identifier of the traffic block to which the data packet belongs, the tag information carried by the data packet, and the receiving node of the data packet. The reception volume of each set of data packets can be denoted as counter or Num. When sending the message reception volume of the m-th traffic block, the computer device can send the reception volume of multiple sets of data packets and the attribute information of each set of data packets. Each set of data includes data in the following dimensions: {source, destination, type, ID, color, counter}. In a feasible implementation, the data dimension of each data packet can be flexibly expanded according to attribute information. For example, the Type field can be further divided into large packets (i.e., data packets with a data size greater than or equal to the preset data size, denoted as RX-L) and small packets (i.e., data packets with a data size less than the preset data size, denoted as RX-S) based on whether the data size of the data packet (e.g., total_length) is greater than or equal to the preset data size, so as to facilitate the statistics of packet loss of small packets and giant frame packets.
[0119] For example, by grouping and statistically analyzing data based on {source address, destination address, data volume, block identifier, and tag information}, and recording the counter (or Num) value for each group, we can obtain data records in the following dimensions: {source address, destination address, type, block identifier, tag information, and counter}, as shown in Table 1 below.
[0120] Table 1 Statistical data for each group of data packets
[0121] source Purpose Type ID color dip Num MP1 MP2 RX-S 0 A MP2-1 115 MP1 MP2 RX-L 0 A MP2-1 15 MP1 MP2 RX-S 1 B MP2-1 121 MP1 MP2 RX-L 1 B MP2-1 25 MP1 MP2 RX-S …… ...… MP2-1 …… MP1 MP2 RX-S m A MP2-1 129 MP1 MP2 RX-L m A MP2-1 35
[0122] Here, Type indicates the type of data packet based on data volume, where RX-L indicates a large data packet and RX-S indicates a small data packet; ID refers to the block identifier of the traffic block to which the data packet belongs; color indicates the tagging information carried by the data packet; dip (Deterministic IP) is a deterministic IP address used to indicate the node receiving the data packet (i.e., the receiving node); and Num indicates the number of packets received. For data packets with the same tagging information, the data based on the Type dimension differs, including multiple sets of data. For example, in the packet data containing traffic block identifier 0 and tagging information A, the Type dimension includes two types, RX-L and RX-S, corresponding to two sets of data: 115 and 15 respectively.
[0123] In one embodiment, each traffic block includes at least one data packet, and each data packet has different attribute information. The received data volume of the m-th traffic block includes the received data volume of at least one data packet in the m-th traffic block; the sent data volume of the m-th traffic block includes the sent data volume of at least one data packet in the m-th traffic block; then, the packet loss data of the m-th traffic block includes: the packet loss data of each data packet in the m-th traffic block determined based on the received data volume and the sent data volume of each data packet in the m-th traffic block.
[0124] In one feasible implementation, the computer device runs a monitoring component for monitoring whether the message reception of the m-th traffic block has reached the sending condition. The sending condition includes, but is not limited to, at least one of the following: the current system time is at the end of the first time interval of the m+1-th time period, the m+1-th traffic block is obtained from the first data stream, etc. The data analysis device includes a message storage component and a data analysis service component. After the computer device sends the packet reception volume of the m-th traffic block to the data analysis device via the monitoring component, it can first store the data in the message storage component, which may include, but is not limited to, Kafka, Pulsar, etc. In an optional implementation, the transmission volume of each type of data packet in each traffic block is stored in the first message set `topic_tx` of the message storage component, and the reception volume of each type of data packet in each traffic block is stored in the second message set `topic_rx` of the message storage component. The data analysis device can call the data analysis service component to retrieve the transmission volume of each type of data packet in the m-th traffic block from the first message set and the reception volume of each type of data packet in the m-th traffic block from the second message set. Based on the transmission and reception volumes of each type of data packet in the m-th traffic block, the packet loss volume of each type of data packet in the m-th traffic block is determined. The data analysis service component is used to aggregate, statistically analyze, and determine the packet loss volume of each traffic block's transmission and reception volumes. The data analysis device can determine the packet loss amount for each type of data packet by the absolute difference between the received and sent amounts. In this way, the data analysis device can call the data analysis service component to consume data from the first message set `topic_tx` and the second message set `topic_rx` of the message storage component in real time, and perform grouping calculations according to the data packet attribute information (such as {source address, destination address, type, block identifier}). Subtracting `rx_counter` from `tx_counter` yields the packet loss information for MP1 and MP2 in the corresponding time period. This packet loss information includes the packet loss amount of each type of data packet in the m-th traffic block within the m-th time period. Furthermore, by separating the statistical data of the received traffic block from the packet loss detection service, when the computer cluster reports a large amount of data, the processing pressure of the data analysis device can be reasonably distributed among various components, which can improve the efficiency of packet loss detection to a certain extent.
[0125] For example, the block identifier of the m-th traffic block is 0. The message reception of the m-th traffic block includes the following two sets of data: {MP1, MP2, TX-S, 0, A, MP2-1, 115} and {MP1, MP2, TX-L, 0, A, MP2-1, 15}. The message transmission of the m-th traffic block includes the following two sets of data: {MP1, MP2, TX-S, 0, A, MP1-1, 125} and {MP1, MP2, TX-L, 0, A, MP1-1, 25}. As can be seen, the m-th traffic block includes two types of data packets. These two types of data packets carry the same tagging information, but their types are different. Based on the number of packets sent and received, it can be determined that in the m-th traffic block, the packet loss of TX-S type data packets is 125-115=10, and the packet loss of TX-L type data packets is 25-15=10.
[0126] In one implementation, the data analysis device can output the packet loss rate of the m-th traffic block to the network optimization device. The network optimization device can determine the network performance level based on the packet loss rate of the m-th traffic block and execute corresponding optimization strategies accordingly. Here, packet loss rate is negatively correlated with network performance level; a higher packet loss rate indicates a lower network performance level, representing worse network performance. Optimization strategies may include detecting network connectivity and reducing the load on nodes in the network.
[0127] The data processing method provided in this application embodiment allows a computer device to send the received packet volume of a traffic block to a data analysis device. The data analysis device then obtains the packet loss volume of the traffic block based on the difference between the sent and received packet volumes. Since no additional data packets need to be sent, and instead real data packets transmitted over the network are used, the additional bandwidth required for packet loss detection is greatly reduced. At the traffic block level, the sent and received packet volumes can be periodically statistically analyzed. The packet loss volume between clusters in various time periods can be calculated from the perspective of each traffic block. By combining data from adjacent traffic blocks, out-of-order packet problems can be mitigated, improving the accuracy of packet loss detection.
[0128] In one embodiment, the above is performed. Figures 2-4The computer device in the illustrated embodiment can be referred to as a data receiving node. The message transmission volume of the m-th traffic block is obtained by the data sending node by counting the number of data packets included in the m-th traffic block in the source data stream. The source data stream is the data stream sent by the data sending node to the data receiving node. The data packets in the source data stream are the same as those in the first data stream, but the sending order of the data packets in the source data stream and the receiving order of the data packets in the first data stream may be different. The source data stream is transmitted in the form of traffic blocks, and includes continuously transmitted data packets, each carrying tag information. The tagging information can be obtained by the data sending node tagging the data packets according to the time period in which the data packets are sent. By tagging the data packets, the first data stream can be virtually divided into traffic blocks. Each traffic block consists of data packets sent within a time period (e.g., interval = 30 seconds). The tagging information carried by the data packets can be used at the data sending node to distinguish adjacent traffic blocks: data packets within the same traffic block carry the same tagging information, while data packets in adjacent traffic blocks carry different tagging information. Thus, the switching of tagging information can be regarded as the switching of traffic blocks. For example, at the data sending node (i.e., node 1), each data packet in traffic block M carries tagging information B, each data packet in traffic block M+1 carries tagging information A, and when switching to traffic block M+2, each data packet in traffic block M+2 carries tagging information B.
[0129] The data sending node can send a source data stream to the data receiving node, obtain the m-th traffic block in the source data stream, and count the number of data packets in the m-th traffic block to obtain the packet transmission volume of the m-th traffic block; then, it sends the packet transmission volume of the m-th traffic block to the data analysis device. In one feasible implementation, each data packet in the m-th traffic block is sent to the data receiving node within the m-th time period. When sending a data packet, the data sending node can determine the block identifier of the traffic block to which the data packet belongs based on the data packet's transmission time (i.e., the current system time g_seconds when the data packet is sent) and the m-th time period interval; for example, the ratio between the data packet's transmission time g_seconds and the m-th time period interval can be rounded down, i.e., the quotient of g_seconds / intervald, as the block identifier of the traffic block to which the data packet belongs; data packets with the same quotient of g_seconds / intervald (i.e., belonging to the same traffic block) can be marked with the same tag information.
[0130] When a data sending node counts the number of data packets in the m-th traffic block, it can determine the transmission volume of at least one group of data packets based on the attribute information of the data packets. This attribute information includes at least one of the following: the tag information carried by the data packet, the block identifier of the traffic block to which the data packet belongs, the source address of the data packet, and the destination address of the data packet. For example, based on {source, destination, type, ID, color} as the grouping criterion, the transmission volume counter for each group of data packets can be recorded. The transmission volume of the m-th traffic block can include the transmission volume of at least one group of data packets. Table 2 below illustrates the statistical data of each group of data packets counted by the data sending node.
[0131] Table 2
[0132] source Purpose Type ID color dip Num MP1 MP2 TX-S 0 A MP1-1 125 MP1 MP2 TX-L 0 A MP1-1 25 MP1 MP2 TX-S 1 B MP1-1 121 MP1 MP2 TX-L 1 B MP1-1 21 MP1 MP2 TX-S …… ...… MP1-1 …… MP1 MP2 TX-S m A MP1-1 139 MP1 MP2 TX-L m A MP1-1 19
[0133] Table 2 above lists the number of data packets sent from MP1-1 in the first computer cluster MP1 to the second computer cluster. `Type` indicates the type of data packet based on data volume; `TX-L` indicates a large packet, and `TX-S` indicates a small packet. `ID` refers to the block identifier of the traffic block to which the data packet belongs, `color` represents the tagging information carried by the data packet, and `dip` represents the data sending node. For each computer device in the first computer cluster, the number of data packets sent to the second computer cluster can be counted in the same way. For example, Table 3 below shows the statistics of the number of data packets sent by computer device MP1-m.
[0134] Table 3
[0135] source Purpose Type ID color dip Num MP1 MP2 TX-S 0 A MP1-m 135 MP1 MP2 TX-L 0 A MP1-m 15 MP1 MP2 TX-S 1 B MP1-m 141 MP1 MP2 TX-L 1 B MP1-m 22 MP1 MP2 TX-S …… ...… MP1-m …… MP1 MP2 TX-S m A MP1-m 149 MP1 MP2 TX-L m A MP1-m 41
[0136] The statistical data in Table 3 above are all data packets sent from MP1-m in the first computer cluster MP1 to the second computer cluster.
[0137] In one feasible implementation, the data sending node can detect whether the packet transmission volume of the m-th traffic block meets the transmission conditions. If the transmission conditions are met, it can trigger the step of sending the packet transmission volume of the m-th traffic block to the data analysis device. Meeting the transmission conditions may include, but is not limited to, changes in the tag information carried by the data packets, or changes in the quotient of g_seconds / interval. The data sending node runs a monitoring component, which can report the packet transmission volume of the m-th traffic block to the data analysis device.
[0138] Based on the description of the above embodiments, please refer to Figure 5The diagram illustrates the interaction. The first computer cluster can send data packets to the second computer cluster. Each of the m computer devices in the first cluster can determine the block identifier of the traffic block to which the sent data packet belongs based on the quotient of g_seconds / interval. The order of the data packets within the traffic block is determined based on the value of g_seconds%interval. Data packets in each traffic block carry the same labeling information (color), such as the labeling information of all data packets in traffic block Block0 being A. The number of data packets sent by each computer device can be reported to a message storage component (such as Kafka) via a monitor and stored in the first message set topic_tx of the message storage component. Similarly, each of the n computer devices in the second computer cluster can determine the block identifier of the traffic block to which the received data packet belongs based on the quotient of g_seconds / interval, and the order of the data packets within the traffic block is determined based on the value of g_seconds%interval. In the second computer cluster, the tagging information carried by the data packets in the traffic blocks received by each computer device may be different. When counting the number of packets received for each traffic block, the number of data packets in the current traffic block and adjacent traffic blocks that carry the same tagging information as the main tagging information can be counted based on the main tagging information. For example, when counting the number of packets received for the i-th traffic block, the main tagging information A can be determined based on the tagging information carried by the data packets in the stable[i] interval, where i is a positive integer. After the top interval of the (i+1)th traffic block ends, if the end time of top[i+1] is reached, we can count: the number of packets carrying tag information A in the bottom interval of the (i-1)th traffic block (i.e., bottom[i-1]); the number of packets carrying tag information A in the top interval of the ith traffic block (i.e., top[i]); the number of packets carrying tag information A in the stable interval of the ith traffic block (i.e., stable[i]); the number of packets carrying tag information A in the bottom interval of the ith traffic block (i.e., bottom[i]); and the number of packets carrying tag information A in the top interval of the (i+1)th traffic block (i.e., top[i+1]). By combining the above-counted number of data packets carrying tag information A, we can obtain the packet reception count of the ith traffic block.Each computer device in the second computer cluster can statistically analyze the received packet volume of each traffic block as described above. The monitor then reports the statistically analyzed packet volume of each traffic block to the data analysis device, where it is stored in the message storage component. The packet volume of each traffic block can be stored in the second message set `topic_rx` of the message storage component. The data analysis device can invoke the data analysis service component to retrieve the packet transmission and reception volumes of the same traffic block from the first and second message sets of the message storage component. Based on these volumes, it determines the packet loss rate of the traffic block and stores it in the result storage device. This allows for direct retrieval of the packet loss rate of the corresponding traffic block when needed. This interactive logic significantly reduces the additional bandwidth required for packet loss detection, mitigates out-of-order packet problems, and improves the accuracy of packet loss detection.
[0139] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a data processing apparatus provided in an exemplary embodiment of this application. This data processing apparatus can be installed in the computer equipment (e.g., [example equipment]) provided in the embodiments of this application. Figure 1c (any computer device point in the second computer cluster). Figure 6 The data processing device 10 shown may be a computer program (including program code) running on a computer device, and the data processing device 10 may be used to execute... Figure 2 or Figure 4 Some or all of the steps in the method embodiments shown. Please refer to [link / reference]. Figure 6 The data processing device 10 may include the following units:
[0140] The acquisition unit 601 is used to acquire the m-th traffic block in the first data stream. The first data stream is transmitted sequentially in the form of traffic blocks. Each traffic block contains multiple data packets, and each data packet carries tag information. m is a positive integer.
[0141] The processing unit 602 is used to determine the reference tag information of the m-th traffic block based on the tag information carried by a specific data packet in the m-th traffic block; and to count the number of data packets in the m-th traffic block and its adjacent traffic blocks whose tag information is consistent with the reference tag information, thereby obtaining the packet reception count of the m-th traffic block.
[0142] In one embodiment, the processing unit 602 is specifically configured to: if the number of specific data packets includes multiple packets, group the specific data packets according to the tagging information, and determine the tagging information carried by the group of specific data packets with the largest number of packets as the reference tagging information of the m-th traffic block; if the number of specific data packets includes one packet, determine the tagging information carried by the specific data packet in the m-th traffic block as the reference tagging information of the m-th traffic block.
[0143] In one embodiment, each traffic block in the first data stream is received in a corresponding time period, and the m-th traffic block is received in the m-th time period; each time period is sequentially divided into multiple time intervals, and the multiple time intervals include a center time interval; a specific data packet in the m-th traffic block refers to at least one data packet in the m-th traffic block whose reception time falls within the center time interval of the m-th time period; or, a specific data packet in the m-th traffic block refers to at least one designated data packet among the multiple data packets contained in the m-th traffic block; or, a specific data packet in the m-th traffic block refers to a predetermined number of data packets selected from the multiple data packets contained in the m-th traffic block; or, a specific data packet in the m-th traffic block refers to a data packet in the m-th traffic block whose reception time is the start time of the center time interval of the m-th time period.
[0144] In one embodiment, the processing unit 602 is specifically configured to: count the number of data packets in the m-th traffic block whose tag information matches the reference tag information to obtain a first number; count the number of data packets in the adjacent traffic blocks of the m-th traffic block whose tag information matches the reference tag information to obtain a second number; and integrate the first number and the second number to obtain the number of packets received in the m-th traffic block.
[0145] In one embodiment, if the m-th traffic block is not the first traffic block, then the adjacent traffic blocks of the m-th traffic block include the (m-1)-th traffic block and the (m+1)-th traffic block; the (m-1)-th traffic block is received in the (m-1)-th time period, and the (m+1)-th traffic block is received in the (m+1)-th time period; each time period is sequentially divided into multiple time intervals, which include: a first time interval, a central time interval, and a second time interval, both of which are adjacent to the central time interval; the processing unit 602 is specifically used to: count the traffic blocks whose reception time is in the (m+1)-th time period. The number of data packets whose tag information matches the reference tag information in at least one data packet within the first time interval of m+1 time periods is used to obtain the number of data packets belonging to the m-th traffic block in the (m+1)-th traffic block. The number of data packets whose tag information matches the reference tag information in at least one data packet within the second time interval of the m-1-th time period in the m-1-th traffic block is used to obtain the number of data packets belonging to the m-th traffic block in the m-1-th traffic block. The number of data packets belonging to the m-th traffic block obtained by the statistics is integrated to obtain the second number.
[0146] In one embodiment, the m-th traffic block is received in the m-th time period; if the m-th traffic block is the first traffic block, then the adjacent traffic blocks of the m-th traffic block include the (m+1)-th traffic block; the (m+1)-th traffic block is received in the (m+1)-th time period; each time period is sequentially divided into multiple time intervals, the multiple intervals including: a first time interval, a central time interval, and a second time interval, the first time interval and the second time interval are both time intervals adjacent to the central time interval; the processing unit 602 is specifically used to: count the number of data packets in the (m+1)-th traffic block whose reception time is in the first time interval of the (m+1)-th time period, whose carrying tag information is consistent with the reference tag information, to obtain a second number.
[0147] In one embodiment, the transceiver unit 603 is configured to: send the message reception volume of the m-th traffic block to the data analysis device, so that the data analysis device can perform packet loss statistics based on the message reception volume and the message transmission volume of the m-th traffic block to obtain the packet loss volume of the m-th traffic block.
[0148] In one embodiment, each traffic block includes at least one data packet, and each data packet has different attribute information; the attribute information of each data packet includes at least one of the following: data volume of the data packet, data packet transmission and reception information, traffic block identifier of the data packet, and data packet marking information; if the packet reception volume of the m-th traffic block includes the reception volume of at least one data packet in the m-th traffic block, and the packet transmission volume of the m-th traffic block includes the reception volume of at least one data packet in the m-th traffic block, then the packet loss volume of the m-th traffic block includes: the packet loss volume of each data packet in the m-th traffic block determined according to the reception volume and transmission volume of each data packet in the m-th traffic block.
[0149] It is understood that the specific functions of each unit of the data processing apparatus described in the embodiments of this application can be specifically implemented according to the methods in the above method embodiments, and the specific implementation process can be referred to the relevant descriptions in the above method embodiments, which will not be repeated here. In addition, the beneficial effects of using the same method will not be repeated here either.
[0150] An exemplary embodiment of this application also provides a structural schematic diagram of a computer device, which can be found in [reference needed]. Figure 7 The computer device may include a processor 701, an input device 702, an output device 703, and a memory 704. The processor 701, input device 702, output device 703, and memory 704 are connected via a bus. The memory 704 stores a computer-readable storage medium, including a computer program, and the processor 701 executes the computer program stored in the memory 704.
[0151] In one embodiment, the processor 701 executes the following operations by running a computer program in the memory 704: acquiring the m-th traffic block in the first data stream, wherein the first data stream is transmitted sequentially in the form of traffic blocks, each traffic block contains multiple data packets, each data packet carries tag information, and m is a positive integer; determining the reference tag information of the m-th traffic block based on the tag information carried by a specific data packet in the m-th traffic block; and counting the number of data packets in the m-th traffic block and its adjacent traffic blocks whose tag information matches the reference tag information to obtain the message reception count of the m-th traffic block.
[0152] In one embodiment, the processor 701 is specifically configured to: if the number of specific data packets includes multiple packets, group the specific data packets according to the tagging information, and determine the tagging information carried by the group of specific data packets with the largest number of packets as the reference tagging information of the m-th traffic block; if the number of specific data packets includes one packet, determine the tagging information carried by the specific data packet in the m-th traffic block as the reference tagging information of the m-th traffic block.
[0153] In one embodiment, each traffic block in the first data stream is received in a corresponding time period, and the m-th traffic block is received in the m-th time period; each time period is sequentially divided into multiple time intervals, and the multiple time intervals include a center time interval; a specific data packet in the m-th traffic block refers to at least one data packet in the m-th traffic block whose reception time falls within the center time interval of the m-th time period; or, a specific data packet in the m-th traffic block refers to at least one designated data packet among the multiple data packets contained in the m-th traffic block; or, a specific data packet in the m-th traffic block refers to a predetermined number of data packets selected from the multiple data packets contained in the m-th traffic block; or, a specific data packet in the m-th traffic block refers to a data packet in the m-th traffic block whose reception time is the start time of the center time interval of the m-th time period.
[0154] In one embodiment, the processor 701 is specifically configured to: count the number of data packets in the m-th traffic block whose tag information matches the reference tag information, to obtain a first number; count the number of data packets in the adjacent traffic blocks of the m-th traffic block whose tag information matches the reference tag information, to obtain a second number; and integrate the first number and the second number to obtain the number of packets received in the m-th traffic block.
[0155] In one embodiment, if the m-th traffic block is not the first traffic block, then the adjacent traffic blocks of the m-th traffic block include the (m-1)-th traffic block and the (m+1)-th traffic block; the (m-1)-th traffic block is received in the (m-1)-th time period, and the (m+1)-th traffic block is received in the (m+1)-th time period; each time period is sequentially divided into multiple time intervals, which include: a first time interval, a center time interval, and a second time interval, both of which are adjacent to the center time interval; the processor 701 is specifically used to: count the traffic blocks whose reception time is in the m-th time period. The number of data packets whose tag information matches the reference tag information in at least one data packet in the first time interval of the +1 time period is used to obtain the number of data packets belonging to the m-th traffic block in the (m+1)-th traffic block; the number of data packets whose tag information matches the reference tag information in at least one data packet in the second time interval of the (m-1)-th traffic block is used to obtain the number of data packets belonging to the m-th traffic block in the (m-1)-th traffic block; the number of data packets belonging to the m-th traffic block obtained by the statistics is integrated to obtain the second number.
[0156] In one embodiment, the m-th traffic block is received in the m-th time period; if the m-th traffic block is the first traffic block, then the adjacent traffic blocks of the m-th traffic block include the (m+1)-th traffic block; the (m+1)-th traffic block is received in the (m+1)-th time period; each time period is sequentially divided into multiple time intervals, the multiple intervals including: a first time interval, a central time interval, and a second time interval, the first time interval and the second time interval are both time intervals adjacent to the central time interval; the processor 701 is specifically used to: count the number of data packets in the (m+1)-th traffic block whose reception time is in the first time interval of the (m+1)-th time period, whose carrying tag information is consistent with the reference tag information, to obtain a second number.
[0157] In one embodiment, the processor 701 is configured to: send the packet reception volume of the m-th traffic block to the data analysis device, so that the data analysis device performs packet loss statistics based on the packet reception volume and the packet transmission volume of the m-th traffic block to obtain the packet loss volume of the m-th traffic block.
[0158] In one embodiment, each traffic block includes at least one data packet, and each data packet has different attribute information; the attribute information of each data packet includes at least one of the following: data volume of the data packet, data packet transmission and reception information, traffic block identifier of the data packet, and data packet marking information; if the packet reception volume of the m-th traffic block includes the reception volume of at least one data packet in the m-th traffic block, and the packet transmission volume of the m-th traffic block includes the reception volume of at least one data packet in the m-th traffic block, then the packet loss volume of the m-th traffic block includes: the packet loss volume of each data packet in the m-th traffic block determined according to the reception volume and transmission volume of each data packet in the m-th traffic block.
[0159] It should be understood that the computer device described in the embodiments of this application can execute the data processing method described in the corresponding embodiments above, and can also execute the data processing apparatus described in the corresponding embodiments above, which will not be repeated here. In addition, the beneficial effects of using the same method will not be repeated here either.
[0160] Furthermore, it should be noted that this application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When a processor executes these program instructions, it can execute the aforementioned... Figure 2 and Figure 4 The methods described in the corresponding embodiments are therefore not repeated here.
[0161] According to one aspect of this application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, enabling the computer device to perform the aforementioned... Figure 2 and Figure 4 The methods described in the corresponding embodiments are therefore not repeated here.
[0162] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The computer-readable storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0163] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Those skilled in the art will understand that all or part of the processes for implementing the above embodiments and equivalent variations made in accordance with the claims of this application are still within the scope of this application.
Claims
1. A data processing method, characterized in that, The method includes: Obtain the m-th traffic block in the first data stream, where the first data stream is transmitted sequentially in the form of traffic blocks, each traffic block contains multiple data packets, and each data packet carries tag information, where m is a positive integer; Based on the tagging information carried by a specific data packet in the m-th traffic block, determine the reference tagging information of the m-th traffic block; The number of data packets whose tagging information matches the reference tagging information in the m-th traffic block and its neighboring traffic blocks is counted to obtain the packet reception count of the m-th traffic block.
2. The method as described in claim 1, characterized in that, The step of determining the reference marking information of the m-th traffic block based on the marking information carried by a specific data packet in the m-th traffic block includes: If the number of specific data packets includes multiple packets, the specific data packets are grouped and counted according to the tagging information, and the tagging information carried by the group of specific data packets with the largest number of packets is determined as the reference tagging information of the m-th traffic block. If the number of specific data packets includes one, then the tagging information carried by the specific data packet in the m-th traffic block is determined as the reference tagging information of the m-th traffic block.
3. The method as described in claim 1 or 2, characterized in that, Each traffic block in the first data stream is received in a corresponding time period, and the m-th traffic block is received in the m-th time period; each time period is sequentially divided into multiple time intervals, and the multiple time intervals include a central time interval; The specific data packet in the m-th traffic block refers to at least one data packet in the m-th traffic block whose reception time falls within the center time interval of the m-th time period; or... The specific data packet in the m-th traffic block refers to at least one designated data packet among the multiple data packets contained in the m-th traffic block; or, The specific data packets in the m-th traffic block refer to a predetermined number of data packets selected from the multiple data packets contained in the m-th traffic block; or, The specific data packet in the m-th traffic block refers to the data packet in the m-th traffic block whose reception time is the start time point of the center time interval of the m-th time period.
4. The method as described in claim 1, characterized in that, The step of counting the number of data packets in the m-th traffic block and its neighboring traffic blocks that carry tag information consistent with the reference tag information to obtain the packet reception count of the m-th traffic block includes: The first number is obtained by counting the number of data packets in the m-th traffic block whose tag information matches the reference tag information; The second quantity is obtained by counting the number of data packets whose tag information is consistent with the reference tag information in the adjacent traffic blocks of the m-th traffic block; The first quantity and the second quantity are combined to obtain the message reception volume of the m-th traffic block.
5. The method as described in claim 4, characterized in that, If the m-th traffic block is not the first traffic block, then the adjacent traffic blocks of the m-th traffic block include the (m-1)-th traffic block and the (m+1)-th traffic block; the (m-1)-th traffic block is received in the (m-1)-th time period, and the (m+1)-th traffic block is received in the (m+1)-th time period; each time period is sequentially divided into multiple time intervals, the multiple intervals including: a first time interval, a central time interval, and a second time interval, wherein the first time interval and the second time interval are both time intervals adjacent to the central time interval; The second quantity is obtained by counting the number of data packets whose tag information matches the reference tag information in the adjacent traffic blocks of the m-th traffic block, including: The number of data packets in the (m+1)th traffic block whose reception time is in the first time interval of the (m+1)th time period and whose tag information is consistent with the reference tag information is obtained by counting the number of data packets belonging to the mth traffic block in the (m+1)th traffic block. The number of data packets in the (m-1)th traffic block whose reception time is in the second time interval of the (m-1)th time period and whose tag information is consistent with the reference tag information is obtained by counting the number of data packets belonging to the m-th traffic block in the (m-1)th traffic block. The second number is obtained by integrating the statistically obtained number of data packets belonging to the m-th traffic block.
6. The method as described in claim 4, characterized in that, The m-th traffic block is received in the m-th time period; if the m-th traffic block is the first traffic block, then the adjacent traffic blocks of the m-th traffic block include the (m+1)-th traffic block; the (m+1)-th traffic block is received in the (m+1)-th time period; each time period is sequentially divided into multiple time intervals, the multiple intervals including: a first time interval, a central time interval, and a second time interval, wherein the first time interval and the second time interval are both time intervals adjacent to the central time interval; The second quantity is obtained by counting the number of data packets whose tag information matches the reference tag information in the adjacent traffic blocks of the m-th traffic block, including: The second number is obtained by counting the number of data packets in the (m+1)th traffic block whose reception time is in the first time interval of the (m+1)th time period, and whose tag information is consistent with the reference tag information.
7. The method as described in claim 1, characterized in that, The method further includes: The message reception volume of the m-th traffic block is sent to the data analysis device so that the data analysis device can perform packet loss statistics based on the message reception volume and message transmission volume of the m-th traffic block to obtain the packet loss volume of the m-th traffic block.
8. The method as described in claim 7, characterized in that, Each traffic block includes at least one data packet, and each data packet has different attribute information; the attribute information of each data packet includes at least one of the following: the data size of the data packet, the sending and receiving information of the data packet, the traffic block identifier of the data packet, and the tagging information of the data packet; If the packet reception volume of the m-th traffic block includes the reception volume of at least one data packet in the m-th traffic block, and the packet transmission volume of the m-th traffic block includes the reception volume of at least one data packet in the m-th traffic block, then the packet loss volume of the m-th traffic block includes: the packet loss volume of each data packet in the m-th traffic block determined based on the reception volume and transmission volume of each data packet in the m-th traffic block.
9. A data processing apparatus, characterized in that, The device includes: The acquisition unit is used to acquire the m-th traffic block in the first data stream. The first data stream is transmitted sequentially in the form of traffic blocks. Each traffic block contains multiple data packets, and each data packet carries tag information. m is a positive integer. The processing unit is configured to determine the reference tag information of the m-th traffic block based on the tag information carried by a specific data packet in the m-th traffic block; The processing unit is further configured to count the number of data packets whose tagging information is consistent with the reference tagging information in the m-th traffic block and its adjacent traffic blocks, and to obtain the packet reception volume of the m-th traffic block.
10. A computer device, characterized in that, include: A processor is used to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, performs the data processing method as described in any one of claims 1-8.