Network data quality evaluation method, system and related device

By using bypass and flow table techniques to split, store, and parse network data packets, the problem of difficulty in measuring network data quality in complex network topologies is solved, enabling accurate assessment of network data quality.

CN120880946APending Publication Date: 2025-10-31SHANGHAI EMBEDWAY INFORMATION TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511175093.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing technologies struggle to objectively assess network data quality, especially in complex network topologies where issues such as out-of-order packets, packet loss, and packet errors make it difficult to measure network data quality.

Method used

By using bypass technology to acquire data packets in the network link, they are split and stored in multiple queues for parsing, and flow table technology is used to update the record content and analyze session integrity to assess data quality.

Benefits of technology

It enables objective assessment of network data quality, accurately identifies issues such as out-of-order packets, packet loss, and packet errors, and provides actionable quality assessment indicators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880946A_ABST
    Figure CN120880946A_ABST
Patent Text Reader

Abstract

The invention discloses a network data quality evaluation method and system and a related device, relates to the field of Internet, and is applied to a network data quality evaluation system, and the method comprises the steps: obtaining at least one data packet of a session in a network link through a bypass technology; respectively storing the at least one data packet into a plurality of first queues according to streams, analyzing the at least one data packet, and scheduling the at least one data packet to a second queue according to the streams after the at least one data packet is analyzed; obtaining the data packet from the second queue, and updating the record content of the flow table according to the analysis information of the data packet; when the data transmission in the session is finished, the recorded content of the flow table is analyzed, and the integrity of the session is determined; and determining the quality of the session for transmitting the data packet by using the network link according to the integrity of the session. According to the application, the data packet is obtained through the bypass technology mirror image, the data packet is stored according to the stream, the integrity of the session is determined by analyzing the recorded content in the stream table, and the evaluation of the network data quality is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a method, system and related apparatus for evaluating network data quality. Background Technology

[0002] With the rapid development of the Internet, the network topology in the network environment is becoming increasingly complex. Network data is transmitted through links at various levels in the network topology, which may lead to problems such as out-of-order delivery, packet loss, and packet errors, thereby affecting the quality of network data.

[0003] Subsequent business processing often requires high-quality network data. Currently, network data quality can only be roughly measured by subjective perceptions such as network lag and slowness. Therefore, how to evaluate the quality of network data in network links is a technical problem that urgently needs to be solved. Summary of the Invention

[0004] In view of the above problems, this application provides a method, system, and related apparatus for evaluating network data quality, so as to achieve the purpose of network data quality evaluation. The specific solution is as follows:

[0005] The first aspect of this application provides a method for evaluating network data quality, applied to a network data quality evaluation system, wherein the method for evaluating network data quality includes:

[0006] At least one data packet in the network link is obtained through bypass technology, and the at least one data packet belongs to the same session;

[0007] The at least one data packet is stored into multiple first queues according to the flow, the at least one data packet is parsed, and after the at least one data packet is parsed, the at least one data packet is scheduled to the second queue according to the flow.

[0008] The data packet is retrieved from the second queue, and the record content of the flow table is updated according to the parsing information of the data packet;

[0009] When the data transmission in the session ends, the record content of the flow table is analyzed to determine the integrity of the session;

[0010] The quality of the data packets transmitted by the session using the network link is determined based on the integrity of the session.

[0011] In one possible implementation, storing the at least one data packet into multiple first queues according to the stream includes:

[0012] The at least one data packet is stored in a corresponding first queue according to the outer 5-tuple information of the data packet. The outer 5-tuple information of each data packet in each first queue is the same. The outer 5-tuple information is the 5-tuple information of the encapsulated data packet.

[0013] In one possible implementation, parsing the at least one data packet includes:

[0014] For each data packet in the first queue, verify the length of the data packet;

[0015] If the length of the data packet is not greater than the preset length, parse the header information of the current layer of the data packet;

[0016] Determine whether the data packet is a target type message based on the header information;

[0017] If the data packet is a message of the target type, then the next layer of the data packet is taken as the current layer, and the process returns to the step of parsing the header information of the current layer of the data packet; if the data packet is not a message of the target type, then the parsing stops.

[0018] In one possible implementation, scheduling the at least one data packet to the second queue by flow after the at least one data packet parsing is completed includes:

[0019] After each data packet is parsed, the inner five-tuple information of the data packet is obtained. The inner five-tuple information is the five-tuple information of the data packet before encapsulation.

[0020] The data packets are scheduled to the corresponding second queue based on the inner 5-tuple information, and the inner 5-tuple information of each data packet in each second queue is the same.

[0021] In one possible implementation, updating the record content of the flow table based on the parsed information of the data packet includes:

[0022] Obtain the type of the data packet in the second queue. If the type of the data packet is a Transmission Control Protocol (TCP) message, then query the flow table to see if there is a record for the data packet based on the information of the data packet.

[0023] If the flow table contains a record of the data packet, then update the number of data packets and the total number of bytes in the flow table and determine the sequence number of the data packet. Compare the sequence number of the data packet with the minimum sequence number and the maximum sequence number recorded in the flow table. If the sequence number of the data packet is less than the minimum sequence number or greater than the maximum sequence number, then update the sequence number in the flow table according to the sequence number of the data packet.

[0024] If the flow table does not contain a record for the data packet, a new entry for the data packet is created in the flow table, and the information of the data packet is recorded.

[0025] In one possible implementation, the data packets recorded in the flow table are of TCP packet type.

[0026] The step of analyzing the record content of the flow table to determine the integrity of the session includes:

[0027] Based on the data packet information recorded in the flow table, the three-way handshake in the session, whether there is an end message, the uplink integrity of the data packets, and the downlink integrity of the data packets are verified.

[0028] The preceding action of the session is the process of the user terminal sending data to the server, and the following action of the session is the process of the server sending data to the user terminal.

[0029] One possible implementation also includes:

[0030] Generate a log file for the session, the log file including the data quality information of the data packets transmitted by the session using the network link.

[0031] A second aspect of this application provides a network data quality assessment system, the network data quality assessment system comprising:

[0032] The acquisition unit is used to acquire at least one data packet in a network link through bypass technology, wherein the at least one data packet belongs to the same session;

[0033] The storage unit is used to store the at least one data packet into multiple first queues according to the stream, parse the at least one data packet, and after the at least one data packet is parsed, schedule the at least one data packet to a second queue according to the stream.

[0034] An update unit is used to obtain the data packet from the second queue and update the record content of the flow table according to the parsing information of the data packet;

[0035] The analysis unit is used to analyze the record content of the flow table when the data transmission in the session ends, and to determine the integrity of the session;

[0036] An evaluation unit is used to determine the quality of data packets transmitted by the session using the network link based on the integrity of the session.

[0037] A third aspect of this application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0038] The memory is used to store computer programs;

[0039] The processor is used to execute the computer program to enable the electronic device to implement the network data quality assessment method of the first aspect or any implementation thereof.

[0040] The fourth aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the network data quality assessment method described in the first aspect or any implementation thereof.

[0041] Based on the above technical solution, this application provides a method, system, and related apparatus for evaluating network data quality. The method first acquires at least one data packet from a session in a network link using bypass technology, and temporarily stores multiple data packets in multiple first queues. The data packets in the first queues are then parsed. After parsing at least one data packet, it is scheduled to a second queue according to the flow, achieving flow-based allocation of data packet storage, which facilitates subsequent integrity analysis. The flow table records are updated based on the parsed data packet information, and the records in the flow table are analyzed to determine the integrity of the session. This method mirrors the network data packets of a session in the network link using bypass technology, thus not affecting the behavior of data packets in the network link. It stores data packets according to the flow, updates the flow table records based on the parsed data packet information, and determines the integrity of the session by analyzing the records in the flow table. This facilitates the determination of whether out-of-order packets, packet loss, or incorrect packets occur in the session, thereby achieving network data quality evaluation. Attached Figure Description

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

[0043] Figure 1 A flowchart illustrating a method for evaluating network data quality provided in an embodiment of this application;

[0044] Figure 2 A flowchart illustrating the parsing process of a data packet at the current layer, provided as an embodiment of this application;

[0045] Figure 3 A schematic diagram of a flow table update process provided in an embodiment of this application;

[0046] Figure 4 A schematic diagram of the structure of a network data quality assessment system provided in an embodiment of this application;

[0047] Figure 5 This is a hardware structure block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0048] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0049] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0050] The terms "first," "second," etc., used in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0051] With the rapid development of the Internet, network topologies in the network environment are becoming increasingly complex. As network data is transmitted through various links within this topology, issues such as out-of-order delivery, packet loss, and packet errors may occur, thus impacting network data quality.

[0052] Users often struggle to determine the specific quality of network data, relying instead on subjective perceptions such as network lag and speed to make a rough assessment, making it difficult to pinpoint the exact cause of the lag. Furthermore, traditional network traffic processing devices generally lack multi-core caching, resulting in poor processing performance, out-of-order delivery, low processing efficiency, and difficulty in executing tasks efficiently in parallel.

[0053] Subsequent advanced business processing requires high-quality data in order to extract high-value information. Therefore, an operable and measurable indicator is needed to determine whether network data meets the requirements after transmission through network links at all levels.

[0054] To address the aforementioned problems, embodiments of this application provide a method for evaluating network data quality. The method for evaluating network data quality according to embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0055] This application provides a method for evaluating network data quality, applied to a network data quality evaluation system. The core technical architecture of this system includes a data acquisition layer, a data processing layer, and a data transmission layer. The data acquisition layer utilizes multi-queue parallel storage to efficiently collect data packets, employs multi-core processing binding and then stream-based core allocation to ensure data packet timing, and uses flow table technology to identify and route raw network traffic according to Transmission Control Protocol (TCP) or User Datagram Protocol (UDP). It supports VLAN, Multiprotocol Label Switching (MPLS), and GPRS Tunneling Protocol (GTPU) packet parsing. The data processing layer verifies data integrity by comparing the sequence number continuity in the session, and based on data integrity, performs byte count statistics on uplink and downlink data in the session, calculating packet loss in real time. The data transmission layer processes the results from the data acquisition and processing layers and selects the output file format of the statistical structure according to user requirements.

[0056] Specifically, the data acquisition layer may include a data receiving module, a data parsing module, and a flow table management module; the data processing layer may include an integrity analysis module; and the data transmission layer may include a log management module.

[0057] Reference Figure 1 , Figure 1 A flowchart illustrating a method for evaluating network data quality provided in this application embodiment is shown below. Figure 1 As shown in the embodiment of this application, a method for evaluating network data quality is provided. Applying the above-mentioned network data quality evaluation system, the method may include steps S10 to S14, which are described in detail below.

[0058] S10. Obtain at least one data packet in the network link through bypass technology, wherein at least one data packet belongs to the same session;

[0059] S11. Store at least one data packet into multiple first queues according to the flow, parse at least one data packet, and after at least one data packet is parsed, schedule at least one data packet to the second queue according to the flow.

[0060] Bypass technology can refer to a technique that achieves specific functions by establishing backup or parallel paths outside the main system or main path. This embodiment uses bypass technology to collect mirrored data packets in the network link, facilitating subsequent network data quality analysis.

[0061] The first queue can refer to the data packet receiving queue. In this embodiment, after acquiring at least one data packet, the data receiving module can distribute the at least one data packet evenly to each first queue for temporary storage and perform dynamic scheduling of the data packets to ensure orderly processing and handle short-term traffic spikes. Furthermore, if the traffic is too large or the data packet processing is too slow, causing the first queue to fill up, the data receiving module can activate a protection mechanism to selectively discard some data packets, thereby ensuring the normal operation of the network data quality assessment system. Specifically, when the number of data packets in the first queue reaches a preset threshold, the data receiving module triggers the protection mechanism, maintaining the stable operation of the network data quality assessment system through random packet loss.

[0062] The specific process of storing data packets in this embodiment can be shown as follows:

[0063] Data packets are processed sequentially according to the FIFO (First-In, First-Out) principle, with at least one packet per queue. For the currently processed packet, the hash value of the outer 5-tuple information is calculated using a CRC algorithm, mapping this information to a fixed numerical range. The hash value is then modulo the number of cores (the number of CPU cores or queues processing the packets), mapping the hash value of the outer 5-tuple information to a specific data range to determine the packet's target queue ID. Finally, the packet is stored in the first queue corresponding to the target queue ID, ensuring load balancing across queues for subsequent processing. Therefore, when the data receiving module stores at least one packet into its corresponding first queue based on the outer 5-tuple information, the outer 5-tuple information of all packets in each first queue is identical, ensuring that each first queue corresponds to a data stream (a set of packets with the same characteristics).

[0064] The FIFO (First-In-First-Out) principle refers to a common data processing principle that specifies the processing order of data or tasks: the data or task that enters the system earliest will be processed first. The CRC (Cyclic Redundancy Check) algorithm can be an error detection algorithm, and can also be used to generate hash values. The outer 5-tuple information of a data packet refers to the 5-tuple information of the encapsulated data packet. During transmission, the outermost protocol layer of the data packet contains this 5-tuple information, which can refer to the five key fields of the data packet: source IP address (sender's IP address), destination IP address (receiver's IP address), source port number (sender's port number), destination port number (receiver's port number), and protocol type (the protocol used). Therefore, the outer 5-tuple information of a data packet can include: outer source IP address, outer destination IP address, outer source port number, outer destination port number, and outer protocol type.

[0065] After at least one data packet is stored in multiple first queues, the data parsing module can retrieve the data packets from the first queues sequentially according to their storage order and parse them. After parsing, the inner five-tuple information of the data packet is obtained. The data receiving module can calculate the hash value of the inner five-tuple information using a CRC algorithm, and then take the modulo of the hash value with the number of cores (the number of CPU cores or queues processing data packets) to map the hash value of the inner five-tuple information to a data range. This determines the scheduling queue ID of the data packet. Finally, the data packet is scheduled to the second queue corresponding to the scheduling queue ID. Therefore, after the data receiving module performs secondary queue scheduling of the data packets, the inner five-tuple information of each data packet in each second queue is the same, ensuring that after parsing, data packets from the same data stream are still stored in the same second queue. The inner five-tuple information of the data packet can refer to: the five-tuple information of the data packet before encapsulation, and the five-tuple information encapsulated in the innermost protocol layer. Therefore, the inner five-tuple information of the data packet can include: inner source IP address, inner destination IP address, inner source port number, inner destination port number, and inner protocol type.

[0066] In this embodiment, since each core of the network data quality assessment system can process data packets for one queue, the data packets are stored and scheduled according to data streams. This ensures that data packets in the same data stream are processed by the same core, eliminating the need for additional locking during stream creation, querying, and deletion operations, thereby improving processing efficiency.

[0067] During the data packet parsing process, the data parsing module can periodically check whether there are data packets in the first queue. If there are data packets, the data packets are retrieved and parsed. If there are no data packets, it means that the data packets cached in the first queue have been processed. The data parsing module retrieves data packets from the first queue again for parsing after a certain interval (the length of the interval can be determined by the internal scheduling mechanism of the processing chip of the network data quality assessment system), and so on, in a loop.

[0068] In the data parsing module, the data parsing module determines the type of data at each layer of the data packet layer by layer and performs classification and statistics during the data packet parsing process. Therefore, the data packet parsing process may include: for each data packet in the first queue, verifying the length of the data packet; if the length of the data packet is not greater than a preset length, parsing the header information of the current layer of the data packet; determining whether the data packet is a message of the target type based on the header information; if the data packet is a message of the target type, then taking the next layer of the data packet as the current layer, returning to the step of parsing the header information of the current layer of the data packet; if the data packet is not a message of the target type, then stopping further parsing. Here, the preset length can refer to a set data packet byte length.

[0069] Specifically, such as Figure 2 The data packet parsing process shown is the specific parsing process at the current layer. During this process, the data packet category information can be recorded and statistics can be performed. The specific parsing process is as follows:

[0070] A data packet is read from the first queue according to the multi-core scheduling mechanism;

[0071] Check the length of the data packet to determine if the length of the data packet is greater than 2048 bytes. If the length of the data packet is greater than 2048 bytes, record the data packet as a large data packet and discard the data packet.

[0072] If the length of the data packet is no more than 2048 bytes, then read 13-14 bytes of the data packet and determine whether the encapsulation protocol of the data packet is IPv4, IPv6, VLAN or MPLS. If it is, then record the data packet as an Ethernet data packet and proceed to the next step of parsing. If it is not, then no further parsing processing is performed.

[0073] Parse the header information of IPv4 or IPv6 packets to determine whether the packet is a fragmented packet. If it is, record that the packet is an IPv4 fragment or an IPv6 fragment. If it is not, record that the packet is an IPv4 or an IPv6 fragment.

[0074] Read the protocol field of the record information for IPv4 packets, determine whether the packet is a TCP or UDP packet. If it is, record it as TCP or UDP and proceed to the next step of parsing. If not, do not proceed with further parsing. Read the next_header field of the record information for IPv6 packets, determine whether the packet is a TCP or UDP packet. If it is, record it as TCP or UDP and proceed with the next step of parsing. If not, do not proceed with further parsing.

[0075] Read the port number of the UDP data packet and determine whether the data packet is a GTPU message. If the port number is 3386, record it as GTPU-V0. If the port number is 2152, record it as GTPU-V1. Data packets with other port numbers are not further parsed.

[0076] The GTPU packet header is parsed to determine if the encapsulation protocol of the next layer is IPv4 or IPv6. If so, the header information of the IPv4 or IPv6 packet is parsed, and the above parsing steps are repeated. If the encapsulation protocol of the next layer is not IPv4 or IPv6, no further parsing is performed. At this point, the parsing of the packet can be considered complete, and the packet is scheduled to the second queue for secondary queue scheduling. Thus, this embodiment can continuously parse packets layer by layer, complete the parsing of packets, and perform secondary scheduling for packets that do not require further parsing.

[0077] IPv4 (Internet Protocol version 4) is one of the core protocols of the Internet, used for transmitting data packets over a network. IPv6 (Internet Protocol version 6) is the latest version of the Internet protocol, also used for transmitting data packets over a network. VLAN (Virtual Local Area Network) is a technology that divides a physical local area network (LAN) into multiple logical LANs. MPLS (Multiprotocol Label Switching) is a network technology for efficient packet forwarding. TCP (Transmission Control Protocol) is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. UDP (User Datagram Protocol) is a connectionless, unreliable transport layer protocol.

[0078] S12. Obtain data packets from the second queue and update the record content of the flow table according to the parsing information of the data packets.

[0079] In this context, a flow table refers to a record table that records data packet information. This information may include the packet's five-tuple, processing behavior, etc., while the processing behavior may refer to actions such as forwarding or dropping the packet. In this embodiment, each core can maintain one flow table. Therefore, each core's flow table can record data packet information from at least one queue processed by the core. After a data packet is parsed, or during the parsing process, the flow table management module can sequentially retrieve relevant data packet information from the second queue to update the flow table's records.

[0080] Specifically, such as Figure 3 As shown, the specific process of updating the record content of the flow table in the flow table management module is as follows:

[0081] Read the data packets in the second queue and obtain the type information of the data packets to determine whether the type of the data packets is a TCP packet;

[0082] If the data packet type is a TCP packet, the flow table is checked for a record of the packet based on its information. If the data packet type is a UDP packet, the packet is discarded (because UDP transmission is unreliable, making subsequent integrity checks difficult, so the UDP packet is released directly). The flow table management module obtains the packet's 5-tuple information (outer or inner 5-tuple information) and queries the flow table entry to determine if the packet's information is recorded. The query method can be: first, using uplink / downlink algorithms, the transmission direction (uplink or downlink) of the data packet in the session is determined based on the packet's 5-tuple information, then a hash value is calculated according to the transmission direction, and the query is performed based on the hash value. Uplink in a session refers to the process of the user terminal sending data to the server; downlink in a session refers to the process of the server sending data to the user terminal.

[0083] If the flow table contains records for data packets, then the record content of the flow table is updated. Updating the record content of the flow table may include: updating the number of data packets and the total number of bytes in the flow table, and updating the sequence number in the flow table according to the sequence number of the data packet;

[0084] If there is a record for a data packet in the flow table, update the number of data packets and the total number of bytes in the flow table, and determine the sequence number of the data packet; compare the sequence number of the data packet with the minimum and maximum sequence numbers recorded in the flow table to determine whether the sequence number needs to be updated;

[0085] If the sequence number of the data packet is the minimum sequence number (the sequence number of the data packet is less than the minimum sequence number), then the minimum sequence number in the flow table is updated. If the sequence number of the data packet is the maximum sequence number (the sequence number of the data packet is greater than the maximum sequence number), then the maximum sequence number in the flow table is updated. If the sequence number of the data packet is neither the minimum sequence number nor the maximum sequence number (not less than the minimum sequence number and not greater than the maximum sequence number), and if it matches the sequence number already recorded in the flow table, then the data packet can be determined to be a retransmission packet. If the sequence number of the data packet does not match the sequence number of the next packet expected by the flow table, then the data packet can be determined to be an out-of-order packet.

[0086] If the flow table does not contain a record for the data packet, a new entry for the data packet is created in the flow table, recording the data packet information. Specifically, the initial record for the data packet behavior is initially set to drop (action 0). After querying the data packet behavior rule table, the initial record for the data packet behavior is updated. For example, if the behavior rule table shows that the data packet behavior is forwarding to interface 1 (action 1), then the initial record for that data packet behavior in the flow table is updated (replacing action 0 with action 1). The data packet information may include: 5-tuple information, behavior information, sequence number, acknowledgment sequence number, payload, uplink and downlink data, etc.

[0087] Furthermore, flow table entries have an aging time. The aging time refers to the time interval during which a flow table entry is automatically deleted if it has not been used or matched with any data packets within a certain period. The aging time of a flow table entry can be flexibly configured according to the actual traffic volume and resource availability. In this embodiment, the average duration of multiple data flows is selected as the default value for the flow table aging time. This prevents incomplete data flow information in the flow table due to an aging time that is too short, and also prevents insufficient flow table capacity due to an aging time that is too long, thus affecting business operations. Before the aging time of the flow table is reached, the records in the flow table are continuously saved. When the aging time of the flow table is reached, the information is processed by the integrity analysis module and the log management module and written to the log file (disk file), and the records in the flow table are cleared.

[0088] S13. When data transmission in a session ends, analyze the records in the flow table to determine the integrity of the session.

[0089] S14. Determine the quality of data packets transmitted by the session using the network link based on the session integrity.

[0090] Since the integrity analysis module primarily relies on the reliability of the TCP communication protocol, this embodiment focuses on assessing the integrity of TCP traffic, omitting the integrity of UDP traffic. The TCP traffic integrity assessment process can be summarized as follows:

[0091] Based on the packet information recorded in the flow table, the three-way handshake in the session, whether there is a termination message, and the uplink and downlink integrity of the packets are verified.

[0092] Specifically, regarding the verification of the three-way handshake in a session, this embodiment first determines the existence of the three handshake packets in the session based on the records in the flow table and the control bit fields of the TCP header of the data packet. The three handshake packets can include: a synchronization message, a response message to the synchronization message, and a response message. The three handshake packets can have certain relationships. For example, if the sequence number of the synchronization message is J, then the response sequence number of the response message to the synchronization message is J+1; assuming the sequence number is K, then the response sequence number of the response message is K+1. If the flow table records the information of the three handshake packets and the sequence numbers are correct, then the three-way handshake verification can be determined to have passed, and the terminal and server of the session can be determined to have successfully paired. Successful TCP pairing is a necessary condition for session integrity. If the flow table lacks the information of the three handshake packets or the sequence numbers are incorrect, then the terminal and server of the session can be determined to have failed to pair. In this embodiment, the verification of the three-way handshake is mainly used to determine the pairing rate of the session. The pairing rate of the session can be used as a reference indicator of data quality in the network link, and can be used to determine whether the data is a one-sided flow, whether there are any omissions in front-end access, or whether data sampling is missing.

[0093] Regarding the verification of session termination messages, this embodiment can determine whether there is a termination message for both the uplink and downlink of the session by using the control bit field in the TCP header of the data packet.

[0094] For the verification of data packets within a session, the uplink and downlink segments of the session need to be verified separately. Only when both the uplink and downlink segments are complete can the session be considered complete. Taking the uplink integrity judgment as an example, the specific judgment logic for determining session integrity based on the records in the flow table in this embodiment can be as follows:

[0095] A session can be considered complete if it contains SYN, FIN, RST (or no RST), and no packet loss.

[0096] A session can be considered complete if it contains SYN, no FIN, RST, and no packet loss.

[0097] If a session contains SYN, but no FIN, no RST, and the peer has RST but there is no packet loss, then it can be considered complete.

[0098] In other cases, it can be determined that the content is incomplete.

[0099] The upstream integrity of a session is determined by analyzing the TCP control bits of data packets in the flow table. Upstream integrity is determined when the flow table contains packets with the SYN (synchronization) flag and the FIN (end) flag, and either no packets with the RST (reset) flag, and there is no packet loss. Upstream integrity is also determined when the flow table contains packets with the SYN flag and the RST flag, but no packets with the FIN flag, and there is no packet loss. Finally, upstream integrity is determined when the flow table contains packets with the SYN flag and packets with the RST flag sent by the peer, but no packets with either the FIN or RST flag, and there is no packet loss. All other cases indicate upstream incompleteness.

[0100] In the uplink and downlink integrity verification of the session, since the flow table in this embodiment can store the sequence numbers of up to 10 data packets, when the data packets are out of order, the sequence number of the new data packet is compared with the sequence number already recorded in the flow table when the flow table content is updated. If the sequence numbers are consecutive, the sequence number of the new data packet replaces the sequence number in the flow table. If the flow table is full of the sequence numbers of 10 data packets, but the sequence numbers in the flow table are still not consecutive, then the session is determined to be incomplete.

[0101] In the above situation, the determination of whether packet loss exists in the session can be as follows:

[0102] Number of bytes lost = Expected sequence number (seq) - Actual sequence number (seq) - Retransmitted payload;

[0103] Expected seq = Maximum expected seq of the entire session – Minimum expected seq of the entire session;

[0104] Here, the expected sequence number (seq) can refer to the sequence number of the expected data packet, the actual sequence number (seq) can refer to the sequence number of the actually received data packet, and the retransmission payload can refer to the data payload of the retransmitted data packet, indicating the number of bytes in the retransmitted data packet. The method for determining a retransmitted data packet is as follows: when the flow table content is updated, if the sequence number of a new data packet matches the sequence number already recorded in the flow table, then the new data packet can be determined to be a retransmitted data packet.

[0105] If there is a difference between the expected total number of bytes received and the actual total number of bytes received, and this difference is not the same as the number of bytes retransmitted, it indicates that there is packet loss in the session, and the difference can represent the number of bytes lost.

[0106] The total number of bytes expected to be received can be calculated using the maximum expected sequence number (maximum expected seq) and the minimum expected sequence number (minimum expected seq) of the session. The actual total number of bytes received and the number of retransmitted bytes can be obtained from the flow table. The calculation process for the maximum and minimum expected seq may include:

[0107] a. Except for packets with the flag "syn", packets with the flag "rst", and packets with a payload of 0 (data payload is 0), all other packets are included in the minimum / maximum expected seq determination.

[0108] b. Minimum expected seq = min(data packet seq);

[0109] c. If there is a data packet with the flag bit set to fin among the data packets involved in the calculation, then the maximum expected seq = fin packet seq + payload length.

[0110] d. If there are no packets with the fin flag in the data packets involved in the calculation, then the maximum expected seq = max(data packet seq + payload length).

[0111] The calculation process for the maximum expected sequence number (Seq) and minimum expected sequence number (Seq) can be described as follows: First, based on the packet information recorded in the flow table, determine which packets participate in the calculation of the minimum and maximum expected sequence numbers for the session. Packets with the SYN or RST flags, or packets with a payload of 0, do not participate in the calculation. All other packets in the session participate. Therefore, the minimum expected sequence number can be the minimum sequence number of all packets participating in the calculation. For example, if packet 1 has a sequence number of 100, packet 2 has a sequence number of 200, and packet 3 has a sequence number of 300, then the minimum expected Seq = min(100, 200, 300) = 100. The calculation of the maximum expected sequence number can include two cases: packets with the FIN flag participating in the calculation and packets without the FIN flag participating in the calculation. When a packet with the FIN flag exists in the session, the maximum expected sequence number is the sequence number of the packet with the FIN flag plus the length of its payload. When a packet without the FIN flag exists in the session, the maximum expected sequence number is the maximum of the sequence number of the packet plus the length of its payload. For example, packet 1: sequence number 100, payload length 50 bytes; packet 2: sequence number 200, payload length 30 bytes; packet 3: sequence number 300, payload length 100 bytes, both with the FIN flag, then the maximum expected sequence number (seq) is 300 + 100 = 400. Alternatively, packet 1: sequence number 100, payload length 50 bytes; packet 2: sequence number 200, payload length 30 bytes; packet 3: sequence number 300, payload length 100 bytes, none of the three packets have the FIN flag, then the maximum expected sequence number (seq) is max(100 + 50, 200 + 30, 300 + 100) = 400.

[0112] After the integrity analysis module performs integrity analysis on the session, the log management module can generate a session log file. This log file includes information on the data quality of data packets transmitted via the network link. Specifically, after each data stream integrity check in the session, the log management module can write the relevant five-tuple information for each data stream, the number of lost bytes in uplink and downlink, uplink and downlink integrity markers, uplink and downlink out-of-order data, duplicate data packets, etc., into a CSV-type log file, named chronologically. This embodiment can use the session integrity check information recorded in the log file as a data quality evaluation metric (such as session pairing rate, packet loss rate, etc.) to objectively assess the data quality within the session.

[0113] When the log reporting time arrives, the log management module can summarize all new information from the network data quality assessment system between the two reporting times and write it to a CSV log file. This information may include: collection duration, number of data streams, total bytes, number of lost bytes, byte loss rate, number of complete data streams, session integrity rate, etc. To ensure storage space does not overflow, this embodiment implements a timed deletion mechanism for log files: at regular intervals (the time can be set), the timestamps of the log files are checked, and only log files within the set time period are retained; other log files are deleted. CSV (Comma-Separated Values) is a log file format that stores data in plain text and separates it with commas.

[0114] This application provides a method for evaluating network data quality. The method first acquires at least one data packet from a session in a network link using a bypass technique, and temporarily stores multiple data packets in multiple first queues. The data packets in the first queues are then parsed. After parsing at least one data packet, it is scheduled to a second queue according to the flow. This ensures that data packet storage is allocated according to the flow, facilitating subsequent integrity analysis. The flow table records are updated based on the parsed data packet information, and the records in the flow table are analyzed to determine the integrity of the session. This method uses bypass technology to mirror the network data packets of a session in the network link, thus not affecting the behavior of data packets in the network link. It stores data packets according to the flow, updates the flow table records based on the parsed data packet information, and determines the integrity of the session by analyzing the records in the flow table. This facilitates the identification of out-of-order packets, packet loss, and packet errors in the session, thereby achieving network data quality evaluation.

[0115] The above describes a method for evaluating network data quality provided by embodiments of this application. The following will describe a system that applies the above-described method for evaluating network data quality.

[0116] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a network data quality assessment system provided in an embodiment of this application. Figure 4 As shown, the network data quality assessment system may include:

[0117] Acquisition unit 100 is used to acquire at least one data packet in a network link through bypass technology, wherein at least one data packet belongs to the same session;

[0118] Storage unit 110 is used to store at least one data packet into multiple first queues according to the stream, parse at least one data packet, and after at least one data packet is parsed, schedule at least one data packet to a second queue according to the stream.

[0119] The update unit 120 is used to obtain data packets from the second queue and update the record content of the flow table according to the parsing information of the data packets.

[0120] Analysis unit 130 is used to analyze the record content of the flow table when the data transmission in the session ends, and to determine the integrity of the session;

[0121] Evaluation unit 140 is used to determine the quality of data packets transmitted by a session using a network link based on the integrity of the session.

[0122] In one possible implementation, storage unit 110 stores at least one data packet into multiple first queues according to the stream, specifically configured as follows:

[0123] Based on the outer 5-tuple information of the data packet, at least one data packet is stored into the corresponding first queue. The outer 5-tuple information of each data packet in each first queue is the same. The outer 5-tuple information is: the 5-tuple information of the encapsulated data packet.

[0124] In one possible implementation, at least one data packet is parsed in storage unit 110, which can be specifically configured as follows:

[0125] For each data packet in the first queue, check the length of the data packet; if the length of the data packet is not greater than the preset length, parse the header information of the current layer of the data packet; determine whether the data packet is a message of the target type based on the header information; if the data packet is a message of the target type, take the next layer of the data packet as the current layer, and return to the step of parsing the header information of the current layer of the data packet; if the data packet is not a message of the target type, stop parsing.

[0126] In one possible implementation, after at least one data packet has been parsed, storage unit 110 schedules at least one data packet to a second queue according to the flow, specifically as follows:

[0127] After each data packet is parsed, the inner 5-tuple information of the data packet is obtained. The inner 5-tuple information is the 5-tuple information of the data packet before encapsulation. The data packet is scheduled to the corresponding second queue according to the inner 5-tuple information. The inner 5-tuple information of each data packet in each second queue is the same.

[0128] In one possible implementation, the update unit 120 can be specifically configured as follows:

[0129] The system retrieves the type of data packets in the second queue. If the data packet type is a Transmission Control Protocol (TCP) message, it checks the flow table for a record of the data packet based on the data packet information. If a record of the data packet is found in the flow table, the system updates the number of data packets and the total number of bytes in the flow table and determines the sequence number of the data packet. The sequence number of the data packet is compared with the minimum and maximum sequence numbers recorded in the flow table. If the sequence number of the data packet is less than the minimum sequence number or greater than the maximum sequence number, the sequence number in the flow table is updated accordingly. If no record of the data packet is found in the flow table, a new entry for the data packet is created in the flow table, and the data packet information is recorded.

[0130] In one possible implementation, the packet type recorded in the flow table can be a TCP packet.

[0131] Evaluation unit 140 can be configured as follows:

[0132] Based on the data packet information recorded in the flow table, the three-way handshake in the session, whether there is a termination message, the uplink integrity of the data packets, and the downlink integrity of the data packets are verified. The uplink of the session is the process of the user terminal sending data to the server, and the downlink of the session is the process of the server sending data to the user terminal.

[0133] In one possible implementation, the network data quality assessment system may also include a recording unit:

[0134] The recording unit is used to generate a log file for the session, which includes information on the data quality of data packets transmitted by the session using the network link.

[0135] This application also provides an electronic device in its embodiments. (See reference...) Figure 5 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0136] like Figure 5As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. When the electronic device is powered on, the RAM 503 also stores various programs and data required for the operation of the electronic device. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0137] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, memory cards, hard drives, etc.; and communication devices 509. Communication device 509 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0138] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the network data quality assessment methods provided in this application.

[0139] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the network data quality assessment methods provided in this application.

[0140] It should also be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the system embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0141] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0142] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0143] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0144] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0145] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0146] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for evaluating network data quality, characterized in that, An evaluation system for network data quality is applied, wherein the evaluation method for network data quality includes: At least one data packet in the network link is obtained through bypass technology, and the at least one data packet belongs to the same session; The at least one data packet is stored into multiple first queues according to the flow, the at least one data packet is parsed, and after the at least one data packet is parsed, the at least one data packet is scheduled to the second queue according to the flow. The data packet is retrieved from the second queue, and the record content of the flow table is updated according to the parsing information of the data packet; When the data transmission in the session ends, the record content of the flow table is analyzed to determine the integrity of the session; The quality of the data packets transmitted by the session using the network link is determined based on the integrity of the session.

2. The method for evaluating network data quality according to claim 1, characterized in that, The step of storing the at least one data packet into multiple first queues according to the stream includes: The at least one data packet is stored in a corresponding first queue according to the outer 5-tuple information of the data packet. The outer 5-tuple information of each data packet in each first queue is the same. The outer 5-tuple information is the 5-tuple information of the encapsulated data packet.

3. The method for evaluating network data quality according to claim 1 or 2, characterized in that, The parsing of the at least one data packet includes: For each data packet in the first queue, verify the length of the data packet; If the length of the data packet is not greater than the preset length, parse the header information of the current layer of the data packet; Determine whether the data packet is a target type message based on the header information; If the data packet is a message of the target type, then the next layer of the data packet is taken as the current layer, and the process returns to the step of parsing the header information of the current layer of the data packet; if the data packet is not a message of the target type, then the parsing stops.

4. The method for evaluating network data quality according to claim 1, characterized in that, After the parsing of the at least one data packet is completed, scheduling the at least one data packet to the second queue by flow includes: After each data packet is parsed, the inner five-tuple information of the data packet is obtained. The inner five-tuple information is the five-tuple information of the data packet before encapsulation. The data packets are scheduled to the corresponding second queue based on the inner 5-tuple information, and the inner 5-tuple information of each data packet in each second queue is the same.

5. The method for evaluating network data quality according to claim 1, characterized in that, The step of updating the record content of the flow table according to the parsed information of the data packet includes: Obtain the type of the data packet in the second queue. If the type of the data packet is a Transmission Control Protocol (TCP) message, then query the flow table to see if there is a record for the data packet based on the information of the data packet. If the flow table contains a record of the data packet, then update the number of data packets and the total number of bytes in the flow table and determine the sequence number of the data packet. Compare the sequence number of the data packet with the minimum sequence number and the maximum sequence number recorded in the flow table. If the sequence number of the data packet is less than the minimum sequence number or greater than the maximum sequence number, then update the sequence number in the flow table according to the sequence number of the data packet. If the flow table does not contain a record for the data packet, a new entry for the data packet is created in the flow table, and the information of the data packet is recorded.

6. The method for evaluating network data quality according to claim 1 or 5, characterized in that, The data packets recorded in the flow table are of TCP packet type. The step of analyzing the record content of the flow table to determine the integrity of the session includes: Based on the data packet information recorded in the flow table, the three-way handshake in the session, whether there is an end message, the uplink integrity of the data packets, and the downlink integrity of the data packets are verified. The preceding action of the session is the process of the user terminal sending data to the server, and the following action of the session is the process of the server sending data to the user terminal.

7. The method for evaluating network data quality according to claim 1, characterized in that, Also includes: Generate a log file for the session, the log file including the data quality information of the data packets transmitted by the session using the network link.

8. A network data quality assessment system, characterized in that, The network data quality assessment system includes: The acquisition unit is used to acquire at least one data packet in a network link through bypass technology, wherein the at least one data packet belongs to the same session; The storage unit is used to store the at least one data packet into multiple first queues according to the stream, parse the at least one data packet, and after the at least one data packet is parsed, schedule the at least one data packet to a second queue according to the stream. An update unit is used to obtain the data packet from the second queue and update the record content of the flow table according to the parsing information of the data packet; The analysis unit is used to analyze the record content of the flow table when the data transmission in the session ends, and to determine the integrity of the session; An evaluation unit is used to determine the quality of data packets transmitted by the session using the network link based on the integrity of the session.

9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the network data quality assessment method as described in any one of claims 1 to 7.

10. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the network data quality assessment method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • A method and system for rapid order reporting using FPGA

    CN122496579A