Data service performance evaluation method, storage medium and computer equipment

By copying the data packets to the original socket program, filtering and parsing the transmission control protocol data packets, the problems of low efficiency and inaccuracy of traditional testing methods are solved, and efficient and accurate evaluation of the data service performance of terminal equipment is achieved, ensuring the stability of network services.

CN119629094APending Publication Date: 2025-03-14SHENZHEN NEOWAY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411831626.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-14

Smart Images

  • Figure CN119629094A_ABST
    Figure CN119629094A_ABST
Patent Text Reader

Abstract

The invention discloses a data service performance evaluation method, a storage medium and computer equipment. The data service performance evaluation method comprises the following steps: S10, copying a data packet received by a local machine to an original socket program; s20, filtering the data packet through an original socket program to obtain a transmission control protocol data packet; s30, analyzing the parameter information of the transmission control protocol data packet through the original socket program and analyzing the transmission control protocol data packet; and S40, calculating record data of the transmission control protocol data packet through the original socket program and outputting performance data. Through the mode, the efficiency and the accuracy of the network data service performance test method can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data service performance evaluation method, storage medium and computer equipment. Background Art

[0002] With the advent of the new century, the Internet of Things technology has flourished, the number of Internet of Things devices has increased dramatically, and its application scenarios have become increasingly rich and complex. As an important sensing device, the Internet of Things terminal plays an important role in transmitting various types of collected information, such as sound, images, videos, temperature, humidity, voltage and other key data, to the platform layer through the network. At the same time, the platform layer also needs to send instructions to the terminal device through the network to achieve precise control of its working status.

[0003] In this context, the data service performance of terminal equipment is crucial to ensure the smooth operation of the business. If the data service performance is poor, it may cause the business to be unable to be used normally, and even cause security risks in some key industries. Therefore, it is particularly important to monitor and evaluate the performance status of terminal data services.

[0004] However, traditional network data service performance testing methods, such as packet filling test and ping test, have obvious limitations. Packet filling test evaluates the transmission capacity of the network by sending a large number of data packets, but this method consumes a lot of traffic and increases the cost of use. The ping test relies on manual operation or pre-set test targets, which is difficult to implement in many unattended and business-changing scenarios. In addition, the results of the ping test often deviate greatly from the actual usage and cannot meet the actual needs; more seriously, the ping test does not require special authentication and is easily exploited by network attackers, posing a security risk. Therefore, many network services will disable the ICMP protocol, resulting in the ping test being unable to effectively evaluate the performance of network services.

[0005] Traditional network data service performance testing methods can no longer meet the needs of terminal equipment data service performance monitoring and evaluation in the current Internet of Things environment. A more efficient, accurate and secure testing method is urgently needed. Summary of the invention

[0006] The present application mainly provides a data service performance evaluation method, a storage medium and a computer device to solve the problems of low efficiency and inaccuracy of traditional network data service performance testing methods.

[0007] In order to solve the above technical problems, a technical solution adopted by the present application is to provide a data service performance evaluation method, which includes: S10: copying the data packet received by the local machine to the original socket program; S20: filtering the data packet through the original socket program to obtain the transmission control protocol data packet; S30: parsing the transmission control protocol data packet parameter information and analyzing the transmission control protocol data packet through the original socket program; S40: calculating the record data of the transmission control protocol data packet through the original socket program and outputting the performance data.

[0008] In some embodiments, the data service performance evaluation method further includes:

[0009] The performance data includes delay, packet error rate, average delay, average packet error rate, sending rate and receiving rate.

[0010] In some embodiments, the data service performance evaluation method further includes:

[0011] Before the step of filtering out the transmission control protocol data packet in the data packet by the raw socket program, the method comprises:

[0012] S21: Read the length of the data packet and add it to the total data size variable.

[0013] In some embodiments, the data service performance evaluation method further includes:

[0014] After the step of reading the length of the data packet and adding it to the total data size variable, the method further includes:

[0015] S22: parse the data packet header protocol and determine the data packet type.

[0016] If the data packet is the transmission control protocol data packet, continue to analyze the transmission control protocol data packet;

[0017] If the data packet is of other types, the next data packet is parsed.

[0018] In some embodiments, the data service performance evaluation method further includes:

[0019] Before the step of parsing the transmission control protocol data packet parameter information and analyzing the transmission control protocol data packet by the original socket program, the method includes:

[0020] S31: Grouping the transmission control protocol data packets based on the same target address to form the transmission control protocol data packet grouping sample.

[0021] In some embodiments, the data service performance evaluation method further includes:

[0022] After the step of grouping the transmission control protocol data packets based on the same destination address, the method further comprises:

[0023] S32: judging whether the transmission control protocol data packet is an empty data packet according to the protocol header of the transmission control protocol data packet,

[0024] If the transmission control protocol data packet is an empty data packet, then the analysis of the transmission control protocol data packet is terminated;

[0025] If the transmission control protocol data packet is not a null data packet, continue analyzing the transmission control protocol data packet.

[0026] In some embodiments, the data service performance evaluation method further includes:

[0027] If the transmission control protocol data packet is not an empty data packet, then after the step of continuing to analyze the transmission control protocol data packet, the method further comprises:

[0028] S33: Obtain the target address of the transmission control protocol data packet, and determine whether the transmission control protocol data packet group sample exists at the target address;

[0029] If it exists and the transmission control protocol data packet group sample has not reached the maximum value, continue to analyze the transmission control protocol data packet;

[0030] If it does not exist and the transmission control protocol data packet grouping sample has not reached the maximum value, then create a new transmission control protocol data packet grouping sample with the target address as the identifier;

[0031] Otherwise, the analysis of the transmission control protocol data packet is terminated.

[0032] In some embodiments, the data service performance evaluation method further includes:

[0033] The delay is the timestamp of receiving the data packet minus the timestamp of sending the data packet. If the transmission control protocol data packet is a retransmission, the delay record data is set to -1.

[0034] In order to solve the above technical problems, another technical solution adopted by the present application is: providing a storage medium storing program data, and the program data implements the steps of the data service performance evaluation method when executed by a processor.

[0035] To solve the above technical problems, another technical solution adopted in the present application is: to provide a computer device, including a processor and a memory connected to each other, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the data service performance evaluation method are implemented.

[0036] The beneficial effects of the present application are as follows: Different from the prior art, the present application discloses a data service performance evaluation method, storage medium and computer device. By copying the data packet received by the local machine to the original socket program, the original socket program parses the required parameter information from the copy of the data packet, and the original message continues to be processed according to the operating system protocol stack process. The original socket program will not make any changes to the message in the protocol stack and will not affect the system data state. By filtering the data packet through the original socket program and obtaining the transmission control protocol data packet, the evaluation can be made more real and accurate; by parsing the transmission control protocol data packet parameter information and analyzing the transmission control protocol data packet through the original socket program, it is convenient for subsequent analysis and statistical evaluation data; by calculating the recorded data of the transmission control protocol data packet through the original socket program and outputting the performance data, the key indicators such as the data sending rate, receiving rate, delay and packet loss rate between the terminal and the relevant platform in the service interaction process can be evaluated efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0038] Figure 1 It is a flow chart of a data service performance evaluation method provided by the present application;

[0039] Figure 2 It is a structural schematic diagram of an embodiment of the storage medium provided by the present application;

[0040] Figure 3 It is a structural schematic diagram of an embodiment of a computer device provided by the present application.

[0041] Description of the accompanying symbols:

[0042] 40 - storage medium; 41 - program data; 50 - computer device; 51 - memory; 52 - processor. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0044] The terms "first", "second", "third" in the embodiments of the present application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second", "third" can expressly or implicitly include at least one of the features. In the description of the present application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0045] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0046] See also Figure 1 , a flow chart of a data service performance evaluation method provided in the present application. The data service performance evaluation method comprises:

[0047] S10: Copy the data packet received by the local machine to the original socket program.

[0048] A raw socket is a type of socket that allows direct access to lower-level protocols, providing more refined control over network communications. By using a raw socket, you can bypass the operating system's high-level protocol stack and directly process raw data packets, providing greater flexibility for analyzing and processing network data.

[0049] The process of copying a data packet to a raw socket program first requires creating a raw socket in the operating system. This usually requires administrator privileges because direct access to the network layer involves security and stability issues. After the socket is successfully created, the system can begin to monitor all data packets on the network interface, regardless of their destination address. This process is called "promiscuous mode" monitoring because it does not distinguish the destination address of the data packet, but captures all traffic passing through the network interface. This embodiment is a performance monitoring program that can be started at any time to monitor real-time performance status when needed; it can also reside in the system and continue to run to provide monitoring services. At this time, the program continuously samples at a set time slice to achieve dynamic monitoring. If there is space to store historical data, the data service performance status over a period of time in the past can be traced back to assist in analyzing abnormal problems such as slow data transmission and data loss during the service interaction of terminal devices with different servers.

[0050] After the local system receives the data packet from the business platform, it will copy a copy and give it to the registered custom raw socket. The raw socket program will parse the required parameter information from the copy of the data packet, while the original data packet continues to be processed according to the operating system protocol stack process. The raw socket program will not make any changes to the data packet in the protocol stack and will not affect the system data status.

[0051] By copying the data packets received by the local machine to the raw socket program, the raw socket program can provide real-time and detailed data for network performance evaluation, allowing network administrators to deeply understand the dynamics of network traffic, promptly discover and solve potential problems, thereby ensuring efficient and stable operation of network services.

[0052] S20: Filter the data packets through the original socket program to obtain the transmission control protocol data packets.

[0053] Transmission Control Protocol (TCP) is a communication protocol that ensures reliable data transmission in the network. It achieves correct, orderly and complete data transmission through multiple mechanisms such as connection establishment, data segmentation, sequence number and confirmation mechanism, flow control, congestion control, timeout retransmission and checksum. The TCP header contains key information such as source port and destination port, sequence number, confirmation number, data offset, control bit, window size, checksum, etc., which together ensure that TCP can handle data reassembly, flow control and error detection. These characteristics of TCP make it an indispensable protocol for data transmission on the Internet and provide the basis for various network communications.

[0054] After the User Datagram Protocol data packet is sent, there will be no confirmation information (ack) from the other end, and the delay size cannot be determined. Therefore, among the sent and received data packets, the data packets with the transmission protocol type of Transmission Control Protocol are filtered out as statistical samples of the delay and packet error rate indicators.

[0055] The original socket program determines whether it is a transmission control protocol data packet by parsing the protocol type in the data packet header. If it is a transmission control protocol data packet, it is filtered out and analyzed; if it is not a transmission control protocol data packet, the data packet is discarded.

[0056] By filtering the transmission control protocol data packets, the estimated delay and packet error rate can be made more realistic and accurate, thereby making the subsequently calculated data more accurate.

[0057] S30: Parsing the transmission control protocol data packet parameter information and analyzing the transmission control protocol data packet through the original socket program.

[0058] The transmission control protocol packet parameter information includes source port number, destination port number, sequence number, confirmation number, data offset, reservation, control bit, window size, checksum, urgent pointer, options and padding. These parameter information together constitute the core of the transmission control protocol packet, which is used to ensure the reliable transmission of data.

[0059] When the raw socket program captures a transmission control protocol data packet, it first parses the header information of the data packet. Among them, the source port number and the destination port number are used to identify the sender and the receiver's application, and the sequence number and the confirmation number are used to ensure the sequential transmission and correct reception of the data. The transmission control protocol data packet assigns a unique identifier to each byte of data through the sequence number, and the confirmation number is used to inform the sender of the location of the data that has been successfully received, effectively preventing the loss and duplication of data packets.

[0060] The data offset field indicates the length of the TCP packet header, and the window size field reflects the amount of data that the receiver can currently receive, which can dynamically adjust the sender's sending rate to avoid network congestion. The checksum field is used to detect the integrity of the data packet to ensure that no errors occur during transmission.

[0061] The control bits represent different states of the TCP packet connection through different combinations. For example, the synchronization sequence number flag is used for synchronization requests when establishing a connection, the confirmation flag is used to confirm received data, and the end flag is used for termination requests when closing a connection. The settings and changes of these control bits reflect the entire process of the TCP packet connection from establishment to release.

[0062] By parsing the parameter information of the transmission control protocol data packet through the raw socket program, the behavior of network transmission can be deeply analyzed. For example, by observing the state changes of the synchronization sequence number flag and the confirmation flag, the establishment and release process of the transmission control protocol data packet connection can be tracked. At the same time, by comparing the sequence number and the confirmation number, the order and integrity of the data packet can be determined. In addition, by analyzing the changes in the window size, the network congestion situation can be understood and the sending strategy can be adjusted accordingly.

[0063] S40: Calculate the recorded data of the transmission control protocol data packet through the raw socket program and output the performance data.

[0064] In one embodiment, the performance data includes latency, packet error rate, average latency, average packet error rate, sending rate, and receiving rate.

[0065] According to the Transmission Control Protocol specification, data is sent from the source address to the destination address. After receiving the data, the destination address needs to return a confirmation message to the source address. The arrival time of the confirmation message of this data packet minus the sending time is used as the transmission delay of the data packet.

[0066] The packet error rate refers to the percentage of packets received by the receiving end that are inconsistent with the packets sent by the sending end or cannot be correctly parsed during data transmission due to various reasons (such as noise, interference, equipment failure, etc.). The level of the packet error rate directly reflects the reliability and stability of network transmission.

[0067] The average delay is the ratio of the total system delay to the number of received data packets. If packet loss occurs, the delay caused by the packet loss is not calculated, and only the successfully received data packets are processed.

[0068] The average packet error rate refers to the proportion of data packets that are erroneous and discarded among the transmitted data packets within a certain period of time.

[0069] The transmission rate, also called the upstream rate, refers to the speed at which the host sends data to the digital channel.

[0070] The receiving rate, also called the downstream rate, refers to the speed at which the host receives data from the digital channel.

[0071] The recorded data is the recorded value of non-empty transmission control protocol data packets, including: device sending rate, device receiving rate, packet delay, device average delay, packet loss rate and device average packet loss rate.

[0072] Among them, the device sending rate = total sending data length / time slice;

[0073] Device receiving rate = total received data length / time slice;

[0074] Service connection TCP data packet 1 delay = accumulated delay of non-empty TCP data packets in TCP data packet group 1 / corresponding total number of data packets;

[0075] Service connection transmission control protocol data packet 2 delay = the accumulated delay of non-empty transmission control protocol data packets in transmission control protocol data packet group 2 / the corresponding total number of data packets;

[0076] Average device delay = the sum of the delays of non-empty TCP packets in each TCP packet group / the total number of corresponding packets;

[0077] Packet loss rate of service connection transmission control protocol data packet 1 = the accumulated number of non-empty transmission control protocol data packets lost in transmission control protocol data packet group 1 / the corresponding total number of data packets;

[0078] Packet loss rate of service connection transmission control protocol data packet 2 = the accumulated number of non-empty transmission control protocol data packets lost in transmission control protocol data packet group 2 / the corresponding total number of data packets;

[0079] The average packet loss rate of the device = the cumulative number of non-empty transmission control protocol data packets lost in each transmission control protocol data packet group / the corresponding total number of data packets.

[0080] Time slice is an important concept in computer science, especially in operating systems and multitasking environments. It refers to a fixed period of time allocated by the operating system to each process or thread for executing the task of the process or thread. After the program is started in this application, relevant initialization operations are performed, the values ​​of various statistical variables are reset to 0, and the time slice timer is started.

[0081] By using the original socket program to calculate the recorded data of the transmission control protocol data packet and output the performance data, the real-time status of network transmission can be monitored, and potential network problems can be discovered and resolved in a timely manner. When a network failure occurs, the cause of the failure can be quickly located by analyzing the abnormal values ​​in the performance data (such as a sudden increase in latency, increased packet error rate, etc.). The network can also be optimized and adjusted based on the analysis results of the performance data to improve the reliability and stability of network transmission.

[0082] In one embodiment, before the step of filtering out the transmission control protocol data packets from the data packets through the raw socket program, the method includes:

[0083] S21: Read the length of the data packet and add it to the total data size variable.

[0084] Data packets are the basic unit of information transmission, and their length (i.e., the size of the data packet) is one of the important indicators for monitoring and analyzing network traffic performance. In order to accurately evaluate the total amount and efficiency of network transmission, it is usually necessary to add up the length of each received data packet to obtain a variable of the total data size.

[0085] When a raw socket program receives a data packet through the raw socket interface, it first parses the packet header and extracts the packet length information from it. The packet length is usually a fixed field, which is located somewhere in the IP header or TCP header in the TCP / IP protocol stack, depending on the type of packet.

[0086] After obtaining the packet length, the program will accumulate this length value into the total data size variable. This variable is usually a global variable or a class member variable, which is used to continuously record the total amount of data transmitted over the network during the entire raw socket program. The accumulation operation is usually performed in the loop of receiving data packets, and the accumulation operation is performed once each time a data packet is received.

[0087] The calculation of the total data size variable is the basis for the subsequent calculation of other performance parameters. For example, the device sending rate = total sent data length / time slice.

[0088] Reading the length of the data packet and accumulating it to the total data size variable is an important operation that can help understand and control the network transmission process and improve the reliability and efficiency of network communication.

[0089] In one embodiment, after the step of reading the length of the data packet and adding it to the total data size variable, the method further includes:

[0090] S22: parse the data packet header protocol and determine the data packet type.

[0091] If the data packet is a transmission control protocol data packet, continue to analyze the transmission control protocol data packet;

[0092] If the data packet is of other types, parse the next data packet.

[0093] The packet header contains various metadata about the packet, such as source address, destination address, protocol type, length, etc.

[0094] The raw socket program determines which type of protocol data packet the data packet is by reading a specific field in the data packet header (usually the protocol field or type field). In the TCP / IP protocol stack, common protocol types include the Transmission Control Protocol, the User Datagram Protocol, the Internet Control Message Protocol, etc.

[0095] If the result is a transmission control protocol packet, the raw socket program will enter the in-depth analysis phase of this type of packet. The processing of transmission control protocol packets is relatively complex because the transmission control protocol packet is a connection-oriented, reliable, byte stream-based transport layer communication protocol. When processing transmission control protocol packets, the raw socket program needs to pay attention to various fields in the transmission control protocol packet header, such as sequence number, confirmation number, window size, flag bit, etc., to understand the transmission status of the packet, whether retransmission is required, whether confirmation information has been received, etc.

[0096] This step is an important part of network communication processing and determines the subsequent processing flow of the data packet. By parsing the data packet header protocol, the program can accurately determine the type of data packet and filter out the required transmission control protocol data packet. This not only helps to ensure the smooth progress of network communication, but also improves the efficiency and reliability of network communication.

[0097] In one embodiment, before the step of parsing the transmission control protocol data packet parameter information and analyzing the transmission control protocol data packet by the raw socket program, the method includes:

[0098] S31: Grouping TCP data packets based on the same target address to form TCP data packet grouping samples.

[0099] The destination address, i.e. the destination IP address of a data packet, is key information in the TCP / IP protocol stack for determining the direction of data packet transmission. By grouping data packets with the same destination address, we can focus on network communication activities on a specific target, thereby more efficiently analyzing the parameter information and transmission behavior of the transmission control protocol data packet.

[0100] In each captured TCP data packet, the target address field is extracted. According to the extracted target address, the TCP data packets are grouped according to the same target address to form a TCP data packet grouping sample. Through the grouping sample, the network communication activities of a specific target can be analyzed in more detail.

[0101] The number of packets of the transmission control protocol data packets, the number of statistical data packets in each group, and the time slice all need to be limited. For example, in this embodiment, a maximum of 5 groups of TCP connections are used, and the number of samples of the statistical delay packets of each group of transmission control protocol data packets is limited to a maximum of 64, the time slice is 1 second, and all data are cleared each time performance monitoring is performed. Users can adjust according to actual needs, such as counting a maximum of 3 groups of transmission control protocol data packets within a 2-second time slice, 32 data packets per group, and so on.

[0102] In one embodiment, after the step of grouping the transmission control protocol data packets based on the same destination address, the method further comprises:

[0103] S32: judging whether the transmission control protocol data packet is an empty data packet according to the protocol header of the transmission control protocol data packet,

[0104] If the transmission control protocol data packet is an empty data packet, then the analysis of the transmission control protocol data packet ends;

[0105] If the transmission control protocol data packet is not a null data packet, continue to analyze the transmission control protocol data packet.

[0106] Parse the data offset field and data length part of the data packet, and detect that the data length of a certain transmission control protocol data packet is zero, that is, when there is no data byte following the data start position indicated by the data offset field, the data packet is regarded as an empty data packet. Empty data packets can be used to keep the connection active in network communication (such as the detection packet in the transmission control protocol data packet keep-alive mechanism), or as part of certain specific protocols (such as certain control messages), but they usually do not contain valid data at the user level. Therefore, for such data packets, it may not be necessary to continue to conduct in-depth analysis. In this embodiment, it is chosen to directly end the processing of the data packet and discard it to reduce unnecessary resource consumption.

[0107] If the transport protocol data packet is judged to be a non-empty data packet, that is, it contains a valid data payload, it is necessary to further analyze the content of the data packet.

[0108] By judging whether the data packet is empty, effective management and optimization of network resources are achieved, which not only reduces unnecessary processing overhead, but also ensures continuous monitoring and analysis of key data flows, providing a solid foundation for efficient operation and security protection of the network.

[0109] In one embodiment, if the transmission control protocol data packet is not a null data packet, then after the step of continuing to analyze the transmission control protocol data packet, the method further includes:

[0110] S33: Obtain the target address of the transmission control protocol data packet, and determine whether the transmission control protocol data packet grouping sample has the target address;

[0111] If it exists and the number of transmission control protocol data packet grouping samples has not reached the maximum value, continue to analyze the transmission control protocol data packet;

[0112] If it does not exist and the transmission control protocol data packet grouping sample has not reached the maximum value, then a new transmission control protocol data packet grouping sample is created with the target address as the identifier;

[0113] Otherwise, the analysis of the TCP packet ends.

[0114] The maximum value of group samples is defined by the user according to actual needs.

[0115] After the raw socket program parses the TCP packet header protocol and determines that it is a non-empty packet, it checks its internal database or cache to determine whether there is already a TCP packet grouping sample based on the target address.

[0116] If the corresponding packet sample is found according to the target address of the transmission control protocol data packet, it means that the target address has been recorded before. At this time, according to the analysis requirements, the current data packet can be added to the packet sample for more in-depth analysis, such as traffic pattern analysis, abnormal behavior detection, etc.

[0117] If no matching group sample is found, but the number of group samples set by the system has not reached the upper limit, a new group sample identified by the target address will be created, which can make subsequent data analysis more systematic and efficient.

[0118] No matter whether a packet sample exists or is newly created, if the upper limit of the number of packet samples has been reached, the remaining data packets will be discarded.

[0119] Through accurate identification of target addresses and flexible management of grouping samples, the efficiency and accuracy of network analysis can be significantly improved, providing network security operation and maintenance personnel with more comprehensive and in-depth insights.

[0120] In one embodiment, the delay is the timestamp of receiving the data packet minus the timestamp of sending the data packet. If the transmission control protocol data packet is a retransmission, the delay record data is set to -1.

[0121] The Transmission Control Protocol packet is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. It ensures the sequential transmission and error-free reception of data packets by establishing a connection between the sender and the receiver. When the Transmission Control Protocol packet detects data packet loss or error, it triggers a retransmission mechanism to resend the lost or erroneous data packet to ensure data integrity and accuracy.

[0122] However, when a TCP packet is retransmitted, if the delay is still calculated in the conventional way, that is, using the receiving timestamp of the retransmitted packet minus the original sending timestamp, the delay value obtained will not truly reflect the actual status of the current network. This is because the retransmitted packet experiences additional waiting time, which may be caused by network congestion, timeout retransmission mechanism or other reasons, and it does not belong to the time spent on the normal transmission path of the packet.

[0123] Therefore, when processing the TCP data packet retransmission data packet, the delay record needs special processing. In this embodiment, the delay record data of the retransmission data packet is set to -1, or to distinguish it from the delay record of the normal transmission data packet.

[0124] Special processing of the delay of retransmission packets of the Transmission Control Protocol not only helps to accurately evaluate the current performance of the network, but also provides strong support for network optimization and troubleshooting. For example, in network performance analysis, if a large number of data packets are found to have a delay record of -1, that is, there are a large number of retransmissions, then it can be inferred that the current network may have congestion, packet loss or other problems, and corresponding optimization measures need to be taken. At the same time, in the troubleshooting process, by identifying the delay record of the retransmission data packet, the link where the problem occurs can be quickly located, improving the efficiency of troubleshooting.

[0125] See also Figure 2 , Figure 2 It is a structural diagram of an embodiment of the storage medium provided by the present application.

[0126] The storage medium 40 stores program data 41. When the program data 41 is executed by the processor, the following is achieved: Figure 1 The steps of the data service performance evaluation method described.

[0127] The program data 41 is stored in a storage medium 40, and includes a number of instructions for enabling a network device (such as a router, a personal computer, a server, or other network device) or a processor to execute all or part of the steps of the method described in each embodiment of the present application.

[0128] Optionally, the storage medium 40 may be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, or other medium that can store the program data 41 .

[0129] See also Figure 3 , Figure 3 1 is a schematic diagram of a computer device according to an embodiment of the present application. The computer device 50 includes a processor 52 and a memory 51 connected to each other. The memory 51 stores a computer program. When the processor 52 executes the computer program, the steps of the data service performance evaluation method described above are implemented.

[0130] Different from the prior art, the present application discloses a data service performance evaluation method, storage medium and computer device. By copying the data packet received by the local machine to the original socket program, the original socket program parses the required parameter information from the copy of the data packet, and the original message continues to be processed according to the operating system protocol stack process. The original socket program will not make any changes to the message in the protocol stack and will not affect the system data state. By filtering the data packet through the original socket program and obtaining the transmission control protocol data packet, the evaluation can be made more real and accurate; by parsing the transmission control protocol data packet parameter information and analyzing the transmission control protocol data packet through the original socket program, it is convenient for subsequent analysis and statistical evaluation data; by calculating the recorded data of the transmission control protocol data packet through the original socket program and outputting the performance data, the key indicators such as the data sending rate, receiving rate, delay and packet loss rate between the terminal and the relevant platform during the service interaction process can be evaluated efficiently and accurately.

[0131] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data service performance evaluation method, characterized in that: include: S10: copy the data packet received by the local machine to the original socket program; S20: filtering the data packet through the raw socket program to obtain a transmission control protocol data packet; S30: parsing the transmission control protocol data packet parameter information and analyzing the transmission control protocol data packet through the raw socket program; S40: Calculate the record data of the transmission control protocol data packet through the raw socket program and output performance data.

2. The data service performance evaluation method according to claim 1, characterized in that: The performance data includes delay, packet error rate, average delay, average packet error rate, sending rate and receiving rate.

3. The data service performance evaluation method according to claim 1, characterized in that: Before the step of filtering out the transmission control protocol data packet in the data packet by the raw socket program, the method comprises: S21: Read the length of the data packet and add it to the total data size variable.

4. The data service performance evaluation method according to claim 3, characterized in that: After the step of reading the length of the data packet and adding it to the total data size variable, the method further includes: S22: parse the data packet header protocol and determine the data packet type. If the data packet is the transmission control protocol data packet, continue to analyze the transmission control protocol data packet; If the data packet is of other types, the next data packet is parsed.

5. The data service performance evaluation method according to claim 1, characterized in that: Before the step of parsing the transmission control protocol data packet parameter information and analyzing the transmission control protocol data packet by the original socket program, the method includes: S31: Grouping the transmission control protocol data packets based on the same target address to form the transmission control protocol data packet grouping sample.

6. The data service performance evaluation method according to claim 1, characterized in that: After the step of grouping the transmission control protocol data packets based on the same destination address, the method further comprises: S32: judging whether the transmission control protocol data packet is an empty data packet according to the protocol header of the transmission control protocol data packet, If the transmission control protocol data packet is an empty data packet, then the analysis of the transmission control protocol data packet is terminated; If the transmission control protocol data packet is not a null data packet, continue analyzing the transmission control protocol data packet.

7. The data service performance evaluation method according to claim 6, characterized in that: If the transmission control protocol data packet is not an empty data packet, then after the step of continuing to analyze the transmission control protocol data packet, the method further comprises: S33: Obtain the target address of the transmission control protocol data packet, and determine whether the transmission control protocol data packet group sample exists at the target address; If it exists and the transmission control protocol data packet group sample has not reached the maximum value, continue to analyze the transmission control protocol data packet; If it does not exist and the transmission control protocol data packet grouping sample has not reached the maximum value, then create a new transmission control protocol data packet grouping sample with the target address as the identifier; Otherwise, the analysis of the transmission control protocol data packet is terminated.

8. The data service performance evaluation method according to claim 1, characterized in that: The delay is the timestamp of receiving the data packet minus the timestamp of sending the data packet. If the transmission control protocol data packet is a retransmission, the delay record data is set to -1.

9. A storage medium having program data stored thereon, characterized in that: When the program data is executed by a processor, the steps of the data service performance evaluation method according to any one of claims 1 to 8 are implemented.

10. A computer device, characterized in that: It comprises a processor and a memory connected to each other, the memory stores a computer program, and when the processor executes the computer program, the steps of the data service performance evaluation method according to any one of claims 1 to 8 are implemented.