Time delay acquisition method and device, equipment, storage medium and program product

By using hash table instead of linked list storage delay statistics in communication technology, the problem that linked list storage delay is easily reached to the threshold, resulting in the inability to obtain delay, and more efficient and accurate network evaluation is achieved.

CN119865448AActive Publication Date: 2025-04-22CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510019303.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-04-22
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

When using the linked list to obtain delay, if the number of records of data messages stored in the linked list reaches the number threshold and the confirmation message has not been obtained, it will lead to the inability to obtain the round trip delay.

Method used

The hash table is used instead of the linked list to store the delay statistics information, and the delay statistics information is obtained from the hash table of the target dimension, including the delay information of the data packet dimension, the user equipment dimension and the service dimension.

Benefits of technology

It avoids the problem of the small amount of relevant information stored in the linked list, which easily reaches the threshold for the number of relevant information stored, and thus leads to the inability to obtain the delay, improving the accuracy and efficiency of network evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865448A_ABST
    Figure CN119865448A_ABST
Patent Text Reader

Abstract

The invention discloses a time delay acquisition method and device, equipment, a storage medium and a program product, relates to the technical field of communication, and is used for avoiding the situation that round-trip time delay cannot be acquired possibly due to the fact that the round-trip time delay is acquired by using a linked list. The method comprises the steps of determining a hash table corresponding to a target dimension from hash tables corresponding to at least one dimension based on a dimension identifier of the target dimension; the target dimension comprises at least one of a data message dimension, a user equipment dimension and a service dimension; the hash table is used for storing dimension identifiers of corresponding dimensions and time delay statistical information of the corresponding dimensions; and time delay statistical information is acquired from the hash table corresponding to the target dimension. The method and the device are applied to a scene for acquiring the time delay.
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 delay acquisition method, device, equipment, storage medium and program product. Background Art

[0002] Round-Trip Time (RTT) is a method for calculating the round-trip delay based on the Transmission Control Protocol (TCP). The sending device can send a data message (also called a sending message) to the receiving device based on the TCP protocol. The receiving device receives the data message and generates an acknowledgment (ACK) message (also called a response message) for the data message. Then the receiving device returns the acknowledgment message to the sending device. Furthermore, the round-trip delay (also called RTT delay or transmission delay) of the group of data messages can be obtained based on the time difference between the acknowledgment message and the data message.

[0003] Currently, the round-trip delay can be calculated using a linked list. The records of obtaining data packets and confirmation packets are stored in a linked list. Whenever a confirmation packet is obtained, the record of the data packet corresponding to the confirmation packet is queried from the linked list to calculate the round-trip delay based on the time difference between obtaining the confirmation packet and obtaining the data packet.

[0004] However, before using the linked list to store the message records, the number threshold of the linked list to store the message records needs to be set in advance, and the number of message records that the linked list can store is relatively small. If the number of data message records stored in the linked list reaches the number threshold, the confirmation message has not been obtained, resulting in the inability to obtain the round-trip delay. Summary of the invention

[0005] The present application provides a delay acquisition method, apparatus, device, storage medium and program product, which are used to solve the technical problem that when using a linked list to obtain the delay, if the number of records of data messages stored in the linked list reaches a quantity threshold and no confirmation message is obtained, the round-trip delay cannot be obtained.

[0006] In order to achieve the above objectives, this application adopts the following technical solutions:

[0007] In a first aspect, a latency acquisition method is provided, the method comprising: based on a dimension identifier of a target dimension, determining a hash table corresponding to the target dimension from hash tables corresponding to at least one dimension; the target dimension comprises at least one of a data message dimension, a user device dimension, and a service dimension; the hash table is used to store the dimension identifier of the corresponding dimension and latency statistical information of the corresponding dimension; and obtaining latency statistical information from the hash table corresponding to the target dimension.

[0008] In one possible implementation, the target dimension is a data message dimension, and the dimension identifier of the data message dimension is determined based on the sequence number of the sent message and the message length of the sent message, or based on the sequence number of the reply message; the delay statistical information corresponding to the data message dimension includes the timestamp of the sent message and / or the timestamp of the reply message.

[0009] In one possible implementation, the method also includes: receiving a target sending message and storing a timestamp of the target sending message in a table entry corresponding to the target sending message in a hash table; one target sending message corresponds to one target reply message; receiving a target reply message and storing a timestamp of the target reply message in a table entry corresponding to the target sending message.

[0010] In a possible implementation, the method also includes: receiving multiple target sending messages, and storing the timestamp of the corresponding target sending messages in the table entry corresponding to each target sending message in the hash table; the multiple target sending messages are multiple continuously sent messages; the multiple target sending messages correspond to one target reply message; receiving the target reply message, and storing the timestamp of the target reply message in the table entry corresponding to the last target sending message in the hash table; the last sending message is the last message sent among the multiple target sending messages.

[0011] In a possible implementation, the target dimension also includes a user equipment dimension, and the dimension identifier of the user equipment dimension is the network address of the user equipment; the delay statistical information corresponding to the user equipment dimension includes at least one item of the average round-trip delay of at least one round-trip delay, the maximum round-trip delay of at least one round-trip delay, the minimum round-trip delay of at least one round-trip delay, the number of round-trip delays less than a first preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the first preset value and less than the second preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the second preset value and less than the third preset value in at least one round-trip delay, and the number of round-trip delays greater than or equal to the third preset value in at least one round-trip delay; the round-trip delay is determined based on the delay statistical information corresponding to the data message dimension.

[0012] In a possible implementation, the target dimension also includes a business dimension, and the dimension identifier of the business dimension is the identifier of the business for which the message is sent and / or the identifier of the business for which the reply message is executed; the delay statistical information corresponding to the business dimension includes at least one of the average round-trip delay of at least one round-trip delay, the maximum round-trip delay of at least one round-trip delay, the minimum round-trip delay of at least one round-trip delay, the number of round-trip delays less than a first preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the first preset value and less than the second preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the second preset value and less than a third preset value in at least one round-trip delay, and the number of round-trip delays greater than or equal to the third preset value in at least one round-trip delay.

[0013] In a possible implementation, when the sent message is a retransmission message, the delay statistical information corresponding to the data message dimension also includes: a retransmission timeout of the sent message.

[0014] In one possible implementation, a sending message and / or a response message is forwarded between a sending device and a receiving device via a base station; when the identifier of the base station that forwards the sending message is different from the identifier of the base station that forwards the response message, the round-trip delay between the sending device and the receiving device is a cross-base station round-trip delay.

[0015] In a possible implementation, when the location for collecting and sending messages and reply messages is between the access network and the core network, the sending device is a user device, and the receiving device is a server, the round-trip delay is used to characterize the delay of the core network; when the location for collecting and sending messages and reply messages is between the access network and the core network, the sending device is a server, and the receiving device is a user device, the round-trip delay is used to characterize the transmission delay of the access network; the access network includes: user equipment, base station; the core network includes: user plane network element, server.

[0016] In a possible implementation, the hash table includes multiple entries; the number of the multiple entries is determined based on at least one of the number of interfaces for collecting messages, interface rate, network address category, transmission delay statistical period, and data item deletion period.

[0017] In a second aspect, a delay acquisition device is provided, which includes: a transmission unit and a processing unit; the processing unit is used to determine a hash table corresponding to a target dimension from hash tables corresponding to at least one dimension based on a dimension identifier of the target dimension; the target dimension includes at least one of a data message dimension, a user equipment dimension, and a service dimension; the hash table is used to store the dimension identifier of the corresponding dimension and the delay statistical information of the corresponding dimension; the transmission unit is used to obtain the delay statistical information from the hash table corresponding to the target dimension.

[0018] In one possible implementation, the target dimension is a data message dimension, and the dimension identifier of the data message dimension is determined based on the sequence number of the sent message and the message length of the sent message, or based on the sequence number of the reply message; the delay statistical information corresponding to the data message dimension includes the timestamp of the sent message and / or the timestamp of the reply message.

[0019] In one possible implementation, the transmission unit is also used to receive a target sending message; the processing unit is also used to store the timestamp of the target sending message in the table entry corresponding to the target sending message in the hash table; one target sending message corresponds to one target reply message; the transmission unit is also used to receive a target reply message; the processing unit is also used to store the timestamp of the target reply message in the table entry corresponding to the target sending message.

[0020] In a possible implementation, the transmission unit is also used to receive multiple target sending messages; the processing unit stores the timestamp of the corresponding target sending message in the table entry corresponding to each target sending message in the hash table; the multiple target sending messages are multiple continuously sent messages; the multiple target sending messages correspond to one target reply message; the transmission unit is also used to receive the target reply message; the processing unit stores the timestamp of the target reply message in the table entry corresponding to the last target sending message in the hash table; the last sending message is the last sent message among the multiple target sending messages.

[0021] In a possible implementation, the target dimension also includes a user equipment dimension, and the dimension identifier of the user equipment dimension is the network address of the user equipment; the delay statistical information corresponding to the user equipment dimension includes at least one item of the average round-trip delay of at least one round-trip delay, the maximum round-trip delay of at least one round-trip delay, the minimum round-trip delay of at least one round-trip delay, the number of round-trip delays less than a first preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the first preset value and less than the second preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the second preset value and less than the third preset value in at least one round-trip delay, and the number of round-trip delays greater than or equal to the third preset value in at least one round-trip delay; the round-trip delay is determined based on the delay statistical information corresponding to the data message dimension.

[0022] In a possible implementation, the target dimension also includes a business dimension, and the dimension identifier of the business dimension is the identifier of the business for which the message is sent and / or the identifier of the business for which the reply message is executed; the delay statistical information corresponding to the business dimension includes at least one of the average round-trip delay of at least one round-trip delay, the maximum round-trip delay of at least one round-trip delay, the minimum round-trip delay of at least one round-trip delay, the number of round-trip delays less than a first preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the first preset value and less than the second preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the second preset value and less than a third preset value in at least one round-trip delay, and the number of round-trip delays greater than or equal to the third preset value in at least one round-trip delay.

[0023] In a possible implementation, when the sent message is a retransmission message, the delay statistical information corresponding to the data message dimension also includes: a retransmission timeout of the sent message.

[0024] In one possible implementation, a sending message and / or a response message is forwarded between a sending device and a receiving device via a base station; when the identifier of the base station that forwards the sending message is different from the identifier of the base station that forwards the response message, the round-trip delay between the sending device and the receiving device is a cross-base station round-trip delay.

[0025] In a possible implementation, when the location for collecting and sending messages and reply messages is between the access network and the core network, the sending device is a user device, and the receiving device is a server, the round-trip delay is used to characterize the delay of the core network; when the location for collecting and sending messages and reply messages is between the access network and the core network, the sending device is a server, and the receiving device is a user device, the round-trip delay is used to characterize the transmission delay of the access network; the access network includes: user equipment, base station; the core network includes: user plane network element, server.

[0026] In a possible implementation, the hash table includes multiple entries; the number of the multiple entries is determined based on at least one of the number of interfaces for collecting messages, interface rate, network address category, transmission delay statistical period, and data item deletion period.

[0027] In a third aspect, an electronic device comprises: a processor and a memory; wherein the memory is used to store one or more programs, and the one or more programs include computer execution instructions. When the electronic device is running, the processor executes the computer execution instructions stored in the memory to enable the electronic device to perform a delay acquisition method as in the first aspect.

[0028] In a fourth aspect, a computer-readable storage medium storing one or more programs is provided. The one or more programs include instructions. When the instructions are executed by a computer, the computer executes a delay acquisition method as in the first aspect.

[0029] In a fifth aspect, a computer program product is provided. When the computer instructions are executed on an electronic device, the electronic device executes a delay acquisition method as in the first aspect.

[0030] The present application provides a delay acquisition method, device, equipment, storage medium and program product, which are applied to the scenario of delay acquisition. When network evaluation is required, the hash table corresponding to the target dimension can be determined from the hash table for storing delay statistical information corresponding to at least one dimension based on the dimension identifier of the target dimension including at least one of the data message dimension, the user equipment dimension and the service dimension. Further, the delay statistical information is obtained from the hash table corresponding to the target dimension to perform network evaluation based on the delay statistical information that can reflect the network status. That is, the number of delay statistical information that can be stored in the hash table is much larger than that of the linked list. By storing the delay statistical information in a hash table instead of a linked list, it is possible to avoid the problem that the number of related information stored in the linked list is small, and it is easy to reach the threshold of the number of related information stored, which leads to the inability to obtain the delay. In addition, the hash table can be used to obtain delay statistical information of multiple different dimensions, thereby improving the accuracy of network evaluation.

[0031] Through the above method, the base station can obtain the delay statistics information from the hash table corresponding to the target dimension based on the dimension identifier of the target dimension, so as to perform network evaluation based on the delay statistics information. Thus, the technical problem that when using a linked list to obtain the delay, if the number of records of data messages stored in the linked list reaches the number threshold and the confirmation message has not been obtained, the round-trip delay cannot be obtained is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A schematic diagram of the structure of a delay acquisition system provided in an embodiment of the present application;

[0033] Figure 2 A schematic diagram of a delay acquisition method provided in an embodiment of the present application Figure 1 ;

[0034] Figure 3 A schematic diagram of a delay acquisition method provided in an embodiment of the present application Figure 2 ;

[0035] Figure 4 A schematic diagram of the structure of a hash table of data message dimension provided for an embodiment of the present application;

[0036] Figure 5A schematic diagram of a delay acquisition method provided in an embodiment of the present application Figure 3 ;

[0037] Figure 6 A schematic diagram of the structure of a hash table for returning one response message from multiple sent messages provided in an embodiment of the present application;

[0038] Figure 7 A schematic diagram of the structure of a hash table in the user equipment dimension provided in an embodiment of the present application;

[0039] Figure 8 A schematic diagram of the structure of a hash table of a business dimension provided in an embodiment of the present application;

[0040] Fig. 9 A schematic diagram of the structure of a hash table corresponding to an inter-base station RTT delay provided in an embodiment of the present application;

[0041] Fig.10 A schematic diagram of obtaining uplink RTT delay and downlink RTT delay provided in an embodiment of the present application;

[0042] Fig.11 A schematic diagram of the structure of a delay acquisition device provided in an embodiment of the present application;

[0043] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0045] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" and "plurality" refer to two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be different.

[0046] With the rapid development of the Internet and the Internet of Things, operators' network traffic data is growing exponentially. Network congestion, wireless environment, routing hops, distance, terminal problems, and service provider networks are all important factors that affect user service experience. How to present the user network experience in massive data is an important challenge facing operators.

[0047] The current mobile network evaluation and optimization methods mainly reflect the network situation through indicators such as wireless parameters and traffic rates. However, when analyzing user perception through traditional wireless parameters and traffic rates, it is necessary to first judge the services currently used by the user. In addition, the wireless parameter collection points are not centralized, and it is impossible to obtain user data for the entire network. The statistical data is based on the data at the cell base station level, and it is impossible to give the network experience of each user. Although the wireless parameters and traffic rates collected by the probe can reflect the user's network experience to a certain extent. However, they are greatly affected by the user's operating behavior and are restricted by the user's usage behavior, and it is impossible to effectively analyze the user's network quality.

[0048] RTT delay is a round-trip delay calculation method based on the TCP protocol. When the user device sends a TCP datagram (that is, a datagram sent based on the TCP protocol), the other party will confirm the datagram, and then the transmission delay of the group of datagrams can be known through the time difference between the confirmation message and the sent datagram. That is, RTT delay is the time from the sender sending the data to the sender receiving the confirmation message from the receiver.

[0049] RTT delay is usually determined by three parts: the propagation time of the link, the processing time of the end system, and the cache and queuing time of the intermediate nodes of the network such as the router network element base station. Under normal circumstances, the transmission time and processing time of the data message are relatively fixed. In the case of network congestion, the RTT delay will fluctuate. Specifically, the ACK message will affect the RTT delay. TCP will send the ACK message in the following scenarios: (1) After receiving a send message, the 200ms timer is started. When the 200ms timer expires, the second send message has not arrived, so the ACK message for this send message is sent. This is called delayed sending. (2) After receiving a send message, the 200ms timer is started. Before the timeout, the second send message arrives. At this time, the two send messages correspond to one ACK message. (3) After receiving a send message, the 200ms timer is started. Before the timeout, the send message is sent. So the ACK message for this send message is piggybacked. This is called piggybacking. (4) Whenever TCP receives an out-of-order data that exceeds the expected sequence number, it always sends an ACK with the confirmation number of its expected sequence number. (5) Window update or also called opening window (when the receiving end window reaches the maximum, all the data in the receiving buffer is pushed to the process, causing the receiving buffer to be empty), notifying the sender that it can continue to send.

[0050] From the above ACK message sending rules, we can see that in a normal network and terminal environment, ACK messages will be sent in a very short time. In extreme cases, ACK messages will be sent within 200ms. Therefore, the main reason for the large RTT delay is the quality of the network or network congestion. In summary, RTT delay is one of the important indicators for measuring network transmission performance, which can reflect the speed and stability of data transmission in the network.

[0051] Generally speaking, the shorter the RTT delay, the faster the network transmission speed, and vice versa. Therefore, by monitoring the RTT delay in TCP, the performance of the network can be judged, which can reflect the current service usage of users and present the user's service experience. In addition, the RTT delay is calculated through the interaction between data packets, which is not restricted by the user's behavior and can well reflect the quality of the network currently used by the user. Therefore, it is feasible to use RTT delay to evaluate the quality of the network used by users.

[0052] At present, the main method of using probes to count RTT delays is to use a streaming plus linked list method, using the Internet Protocol (IP) quintuple as the data stream of a user's primary service, and storing each TCP data packet of the data stream in a linked list in the data stream. When an ACK message is obtained, check whether there is a TCP data packet corresponding to the ACK message in the linked list. If a TCP data packet exists, the RTT delay is calculated based on the ACK message and the TCP data packet. This method requires pre-setting the number of TCP data packets stored in the linked list. If the data stream is particularly long and no ACK message has been obtained, the linked list will be full and the subsequent RTT delay cannot be recorded.

[0053] To solve the above problems, the present application provides a delay acquisition method, which uses a hash table (HASH) table (also known as a hash table) to record the RTT delay. The maximum storage items of the HASH table can reach 1 billion levels. Therefore, there will be no RTT delay loss caused by the limit on the number of linked lists. Moreover, the query efficiency of the HASH table is faster than that of the linked list, and there is no need to set a limit on the maximum number of TCP messages stored in the linked list, so there will be no RTT delay loss. In addition, the base stations and times passed by the uplink and downlink data packets in the RTT delay can be recorded by expanding the fields for RTT delay calculation, which can be used to analyze the RTT delay across base stations and bearers, and determine whether the high RTT delay is caused by frequent switching, thereby providing important indicators for network evaluation and optimization.

[0054] In addition, the uplink and downlink RTT delays can be used to determine whether the problem of poor user service experience is caused by the network side (also called the core network) or the wireless side (also called the access network). RTT delay can be used to evaluate the perception of mobile network users and locate areas where users have poor service experience.

[0055] A delay acquisition method provided in an embodiment of the present application can be applied to a delay acquisition system. Figure 1 FIG. 1 shows a schematic diagram of the structure of a time delay acquisition system. Figure 1 As shown, the delay acquisition system 10 includes: a transmitting device 11, a receiving device 12 and an electronic device 13. The transmitting device 11, the receiving device 12 and the electronic device 13 can be connected in a wired manner or in a wireless manner, which is not limited in the embodiment of the present invention.

[0056] The electronic device 13 can collect the delay statistical information between the sending device 11 and the receiving device 12, store the delay statistical information between the sending device 11 and the receiving device 12 in a hash table, determine the hash table corresponding to the target dimension from the hash table corresponding to at least one dimension based on the dimension identifier of the target dimension, and obtain the delay statistical information between the sending device 11 and the receiving device 12 from the hash table corresponding to the target dimension.

[0057] The electronic device 13 may be a base station device, a desktop computer (also called a desktop computer), a server, or a server group consisting of multiple servers.

[0058] The transmitting device 11 and the receiving device 12 may be user equipment or a web server (also referred to as a server). User equipment (UE) may be a device with wireless transceiver function. The user equipment may be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiments of the present disclosure do not limit the application scenarios.

[0059] The server may be a single physical server located in the core network, or a server cluster consisting of multiple servers. Alternatively, the server cluster may be a distributed cluster. Alternatively, the server may be a cloud server. The specific implementation of the server is not limited in the embodiments of the present application.

[0060] A delay acquisition method provided by an embodiment of the present application is described below in conjunction with the accompanying drawings. Figure 2 As shown, a delay acquisition method provided in an embodiment of the present application is applied to an electronic device, and the method includes S201-S202:

[0061] S201. Based on the dimension identifier of the target dimension, determine a hash table corresponding to the target dimension from hash tables corresponding to at least one dimension.

[0062] Among them, the target dimension includes at least one of a data message dimension, a user equipment dimension and a service dimension; the hash table is used to store the dimension identifier of the corresponding dimension and the delay statistical information of the corresponding dimension.

[0063] Optionally, the delay statistics information may be a timestamp of a collected data message, or an average delay, a maximum delay, a minimum delay, etc. between multiple round trip delays of a data message transmitted between a sending device and a receiving device. The data message may be a message transmitted based on the TCP protocol, i.e., a TCP message.

[0064] When the network needs to be evaluated, the electronic device can collect data packets transmitted between the sending device and the receiving device, and store the timestamps of the collected data packets in the corresponding hash table (the hash table can be a hash table corresponding to the data packet dimension), or store the average delay, maximum delay, minimum delay and other information obtained based on the timestamp of the data packet in the corresponding hash table (the hash table can be a hash table corresponding to the user device dimension or the service dimension).

[0065] The user device may be a transmitting device or a receiving device. The dimension identifier of the data message dimension may be the sum of the sequence number of the transmitted message and the message length of the transmitted message, or the sequence number of the response message corresponding to the transmitted message. The dimension identifier of the user device dimension may be the IP address of the user device. The dimension identifier of the service dimension may be the service name.

[0066] The electronic device may determine the hash table corresponding to the target dimension from the hash tables corresponding to at least one dimension based on the dimension identifier of the target dimension. For example, the electronic device may determine the hash table corresponding to the data message dimension from the hash table corresponding to the data message dimension and the hash table corresponding to the user device dimension based on the dimension identifier of the data message dimension.

[0067] S202. Obtain latency statistics information from a hash table corresponding to the target dimension.

[0068] Optionally, the electronic device can obtain the delay statistics information from the hash table corresponding to the target dimension. For example, the electronic device can obtain the timestamp of the data message transmitted between the sending device and the receiving device from the hash table corresponding to the data message dimension, and calculate the round-trip delay between the sending device and the receiving device based on the timestamp of the data message transmitted between the sending device and the receiving device to evaluate the network quality of the network between the sending device and the receiving device. The larger the round-trip delay, the worse the network quality, and the smaller the round-trip delay, the better the network quality.

[0069] For example, the electronic device can obtain information such as the average delay, maximum delay, and minimum delay based on the timestamp of the data message corresponding to each user device in multiple user devices from the hash table corresponding to the user device dimension to evaluate the difference in network quality between different user devices.

[0070] The present application can obtain delay statistics through a hash table. The maximum storage items of the hash table can reach 1 billion. Compared with the linked list used in the related art, the number of delay statistics that can be stored in the hash table is much larger than that of the linked list, and there will be no RTT delay missing due to the limit on the number of linked lists. Storing delay statistics through a hash table instead of a linked list can avoid the problem that the number of related information stored in the linked list is small, and it is easy to reach the threshold of the number of related information stored, which leads to the problem of being unable to obtain the delay. Moreover, the query efficiency of the hash table is faster than that of the linked list, which can improve the efficiency of network evaluation. And obtaining delay statistics of multiple different dimensions through a hash table can improve the accuracy of network evaluation.

[0071] In one possible implementation, the target dimension is a data message dimension, and the dimension identifier of the data message dimension is determined based on the sequence number of the sent message and the message length of the sent message, or based on the sequence number of the reply message; the delay statistical information corresponding to the data message dimension includes the timestamp of the sent message and / or the timestamp of the reply message.

[0072] Optionally, the dimension identifier of the data message dimension can be the sum of the sequence number of the sent message (also called Sequence number) and the message length of the sent message (also called TCP Segment Len), or the sequence number of the response message corresponding to the sent message (also called Acknowledgment number). That is, the Sequence number + TCP Segment Len or Acknowledgment number of the data message is used as the key value of the hash table. The delay statistics corresponding to the data message dimension may include the timestamp of the sent message and / or the timestamp of the response message corresponding to the sent message.

[0073] The electronic device may determine the difference between the timestamp of a response message corresponding to a certain sent message and the timestamp of the sent message as the RTT delay between the sending device and the receiving device.

[0074] It should be noted that, according to the characteristics of TCP messages, Sequence number + TCP Segment Len = Acknowledgment number. The RTT delay can be obtained based on the timestamps of the two data messages whose TCP Segment Len is greater than 0. That is, the timestamp of the Acknowledgment number of the response message minus the timestamp of the Sequence number of the sent message. For example, the Sequence number of a sent message is 2566503740, the TCP Segment Len is 437, and the timestamp is 14:16:13.095735000. The Acknowledgment number of another ACK message is 2566504177, and the timestamp is 14:16:13.111225000. Since Sequence number + TCP Segment Len = Acknowledgment number. Therefore, the following ACK message is the response message of the previous sending message. Through RTT delay = timestamp of ACK message - timestamp of sending message = 14:16:13.111225000 - 14:16:13.0957 35000, we can get the RTT delay of 0.01549s. In this way, we can get the RTT delay between the sending device and the receiving device of 0.01549s.

[0075] The present application can obtain the delay statistics corresponding to the data message dimension by querying the hash table according to the dimension identifier of the data message dimension, and then the round-trip delay corresponding to each group of data messages can be known, so as to perform network evaluation according to the round-trip delay corresponding to each group of data messages.

[0076] In one design, Figure 3 As shown, a method for obtaining a time delay provided in an embodiment of the present application, before the above step S201, the method further includes S301-S302:

[0077] S301: Receive a target sent message, and store the timestamp of the target sent message in an entry corresponding to the target sent message in a hash table.

[0078] Optionally, the electronic device may receive a target transmission message corresponding to a certain user device (i.e., a target transmission message sent by the user device or a target transmission message received by the user device), and store the timestamp of the target transmission message and the IP address of the user device in the table entry corresponding to the target transmission message in the hash table. The timestamp of the target transmission message may indicate the time point when the electronic device receives the target transmission message.

[0079] S302: Receive a target response message, and store the timestamp of the target response message in a table entry corresponding to the target sent message.

[0080] Optionally, the electronic device may receive the target response message corresponding to the user device, and store the timestamp of the target response message in the table entry corresponding to the target transmission message. That is, the timestamp of the target transmission message and the timestamp of the target response message corresponding to the target transmission message are stored in the same table entry of the hash table. The timestamp of the target response message may indicate the time point when the electronic device receives the target response message.

[0081] Optionally, when the Sequence number+TCP SegmentLen+user IP of a sent message received by an electronic device does not hit the entry in the HASH table, it means that this data message is not recorded in the HASH table (that is, the timestamp of the data message is not stored in the HASH table), the electronic device can add the data message as a new data message to the HASH table and record the timestamp of the data message.

[0082] When the Acknowledgment number + user IP of a response message received by the electronic device hits the entry in the HASH table (that is, the timestamp of the sending message of the response message has been stored in the HASH table), it means that the response message and the sending message corresponding to the Sequence number + TCP Segment Len are paired successfully. The electronic device can then record the timestamp of the response message corresponding to the Acknowledgment number + user IP, and subtract the timestamp of the sending message corresponding to the Sequence number + TCP Segment Len from the timestamp of the response message corresponding to the Acknowledgment number + user IP to obtain the corresponding round-trip delay.

[0083] For example, Figure 4 As shown, the first table entry of the hash table of the data message dimension can store the IP address of user device 1 (i.e., user IP1), the message stamp of Sequence number (i.e., the sequence number of the sent message) 1+TCPSegment Len (i.e., the message length of the sent message) 1 and the message stamp of Acknowledgment number (i.e., the sequence number of the reply message) 1 corresponding to user device 1, the second table entry can store the message stamp of Sequence number2+TCP Segment Len2 and the message stamp of Acknowledgment number2. The third table entry can store the IP address of user device 2 (i.e., user IP2), the message stamp of Sequence number1+TCP Segment Len1 and the message stamp of Acknowledgmentnumber1 corresponding to user device 2, the fourth table entry can store the message stamp of Sequence number2+TCP Segment Len2 and the message stamp of Acknowledgment number2, and the fifth table entry can store the message stamp of Sequence number3+TCPSegment Len3 and the message stamp corresponding to Acknowledgment number3.

[0084] like Figure 4As shown, the present application can match the sending packet and the confirmation packet of the RTT delay by putting the same Sequence number + TCP Segment Len + user IP and Acknowledgment number + user IP into a table entry of the HASH table. This method avoids the problem of a long time spent searching for the Acknowledgment number that is the same as the Sequence number + TCP Segment Len in the linked list. In addition, there is no need to predefine the maximum number of Sequence number + TCP Segment Len that the linked list supports searching. In the test of the existing network, under the condition of a 10 Gigabit Ethernet (GE) port rate, the HASH table entries required for the RTT delay calculation are approximately 1 million, and the current HASH table and server memory can meet the requirements.

[0085] In a possible implementation, when the sent message is a retransmission message, the delay statistical information corresponding to the data message dimension also includes: a retransmission timeout of the sent message.

[0086] Optionally, when the electronic device receives the target transmission message, the electronic device can determine whether the target transmission message is a retransmission message. If the Sequence number+TCP Segment Len+user IP of a transmission message received by the electronic device does not hit the entry of the HASH table, it means that the transmission message is not a retransmission message. If the Sequence number+TCP Segment Len+user IP of the transmission message hits the entry of the HASH table, it means that the transmission message is a retransmission message.

[0087] In the case where the sent message is a retransmission message, the electronic device can store the retransmission timeout (RTO) of the sent message in the table entry corresponding to the sent message, and replace the timestamp of the original sent message with the timestamp corresponding to the sequence number and TCP Segment Len of the sent message. When calculating the RTT delay later, the difference between the timestamp of the response message corresponding to the retransmission message and the timestamp of the retransmission message is added to the RTO value to obtain the RTT delay.

[0088] It should be noted that the TCP protocol will start a timer during the handshake process. If no response message is received within the timer, the message will be retransmitted. The retransmission timeout is called RTO. The relationship between RTT and RTO is: due to the uncertainty of the network, each RTT changes dynamically, and RTO also changes dynamically.

[0089] This application can use the RTT+RTO method to calculate the final RTT delay when the message sent is a retransmitted data message, thereby more accurately reflecting the network delay situation.

[0090] In one design, Figure 5 As shown, a delay acquisition method provided in an embodiment of the present application, before the above step S201, the method further includes S401-S402:

[0091] S401, receiving multiple target sending messages, and storing the timestamp of the corresponding target sending message in the table entry corresponding to each target sending message in the hash table.

[0092] The multiple target sending messages are multiple messages sent continuously; and the multiple target sending messages correspond to one target response message.

[0093] S402: Receive a target response message, and store the timestamp of the target response message in the entry corresponding to the last target sending message in the hash table.

[0094] The last sent message is the last sent message among multiple target sent messages.

[0095] Optionally, for a case where an electronic device receives multiple continuously sent messages and a corresponding response message to the multiple continuously sent messages, the electronic device may receive the multiple continuously sent messages and store the corresponding timestamp of the sent message in the table entry corresponding to each sent message in the hash table. Specifically, each time the electronic device receives a sent message, the electronic device may search the HASH table using the Sequence number-TCP Segment Len of the sent message. If the message corresponding to the Sequence number-TCP Segment Len is not found, or the found message has been paired with the ACK message, it means that the sent message is the first message among the multiple continuously sent messages. Then, in the table entry corresponding to the sent message, it is stored that the total length of the continuous unconfirmed messages (i.e., TCP_total_len) is 0, and the TCP Segment Len of the sent message is recorded in a global set (i.e., TCP Segment set).

[0096] If the Sequence number-TCP Segment Leni (TCPSegment Leni is the length in the TCP Segment Set) of a certain sent message received by the electronic device is not paired with the Acknowledgment number in the HASH table, then obtain the TCP Segment Leni of the Sequence number, and set the TCP_total_len of this message to the TCP Segment Leni of this message (i is the item number in the TCP Segment Set that can be used to find the TCP Segment Len of the previous sent message in the HASH table based on the Sequence number-TCPSegment Len) + the TCP_total_len of the previous sent message.

[0097] If the Acknowledgment number of the response message received by the electronic device matches the Sequence number + TCP Segment Len, the RTT delay is the difference between the timestamp of the response message and the timestamp of the sent message obtained by searching the HASH table by subtracting the TCP_total_len from the Acknowledgment number.

[0098] For example, Figure 6 As shown, the electronic device first receives the Sequence number 1 message from user IP1, and uses Sequence number (i.e., the sequence number of the message sent) 1-TCP Segment Len (i.e., the message length of the message sent) 1 to perform a HASH table query. If the message cannot be found or the found item already has a corresponding ACK message, the TCP_total_len (i.e., the total length of consecutive unconfirmed messages) value is recorded as 0, and the TCP Segment Len1 of the Sequence number 1 message is recorded in a global set TCP Segment set (i.e., the message length set). Subsequently, the electronic device receives the Sequence number 2 message, and Sequence number 2-TCP Segment Len2 is hashed to obtain the Sequence number 1 message, i.e., TCP Segment Leni is TCP Segment Len2.

[0099] Because there is no ACK confirmation message for the Sequence number 1 message, the Sequence number 2 message records TCP_total_len2, which is TCP_total_len1+TCP Segment Len2.

[0100] Similarly, the Sequence number 3 message is hashed by Sequence number 3-TCP Segment Len3 to obtain the Sequence number 2 message. Since the Sequence number 2 message does not have an ACK confirmation message, the value of TCP_total_len3 recorded in the Sequence number 3 message is TCP_total_len2+TCP Segment Len3. At this time, if an ACK message is received, the Acknowledgment number (i.e., the sequence number of the response message) 3 of the ACK message = Sequence number 3 + TCP Segment Len3, then Acknowledgment number 3-TCP_total_len3 is calculated, and the Sequence number 1 + TCP Segment Len1 message is obtained after querying the HASH table. The timestamp of Acknowledgment number 3 of the ACK message is subtracted from the timestamp of Sequence number 1 + TCP Segment Len1 to obtain the RTT delay.

[0101] For example, Figure 6As shown, the first table entry of the hash table for returning a response message from multiple sent messages can store the timestamp corresponding to Sequence number 1 + TCP Segment Len1 + user IP1 and TCP_total_len1 = 0, the second table entry can store the message stamp of Sequence number 2 + TCP Segment Len2 + user IP1 and the message stamp of TCP_total_len2 = TCP_total_len1 + TCP Segment Leni, the third table entry can store the message stamp of Sequence number 3 + TCP Segment Len3 + user IP1 and the message stamp of TCP_total_len3 = TCP_total_len2 + TCP Segment Leni, the fourth table entry can store the message stamp of Sequence number 4 + TCP SegmentLen4 + user IP1 and the message stamp of Acknowledgment number 4, and the fifth table entry can store the message stamp of Sequence number 1 + TCP Segment Len1 + user IP2 and the message stamp corresponding to Acknowledgment number 1.

[0102] In the case where multiple consecutive sent messages return a reply message, the present application can use a message backtracking method when a reply message is received to find the first sent message without a reply message among multiple consecutive sent messages, so as to calculate a more accurate RTT delay value based on the timestamp of the reply message and the timestamp of the first sent message.

[0103] In a possible implementation, the target dimension also includes a user equipment dimension, and the dimension identifier of the user equipment dimension is the network address of the user equipment; the delay statistical information corresponding to the user equipment dimension includes at least one item of the average round-trip delay of at least one round-trip delay, the maximum round-trip delay of at least one round-trip delay, the minimum round-trip delay of at least one round-trip delay, the number of round-trip delays less than a first preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the first preset value and less than the second preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the second preset value and less than the third preset value in at least one round-trip delay, and the number of round-trip delays greater than or equal to the third preset value in at least one round-trip delay; the round-trip delay is determined based on the delay statistical information corresponding to the data message dimension.

[0104] Optionally, after calculating the RTT delay based on the timestamp of the data message in the HASH table of the data message dimension, the calculated RTT delay can be filled into the HASH table of the user device dimension to complete the calculation of the RTT delay statistics of the user device dimension. The network address of the user device can be the IP address of the user device, which can also be called the user IP.

[0105] For example, the first preset value may be 50 ms, the second preset value may be 200 ms, and the third preset value may be 1000 ms. Figure 7 As shown, based on Figure 4 After the RTT delay is calculated in the HASH table in the user device dimension, it can be mapped to the HASH table in the user device dimension. After the RTT delay is successfully mapped in the HASH table in the user device dimension, the two RTT delays of user IP1 can be calculated (the RTT delay obtained based on the message stamp of Sequence number (i.e., the sequence number of the sent message) 1+TCP SegmentLen (i.e., the message length of the sent message) 1 and the message stamp of Acknowledgment number (i.e., the sequence number of the reply message) 1 corresponding to user device 1, and the RTT delay obtained based on the message stamp of Sequence number2+TCP SegmentLen2 and the message stamp of Acknowledgment number (i.e., the sequence number of the reply message) 1 corresponding to user device 1, and the RTT delay obtained based on the message stamp of Sequence number2+TCP SegmentLen2 and the message stamp of Acknowledgment number (i.e., the sequence number of the reply message) 1 corresponding to user device 1). number2) the average RTT delay, the maximum RTT delay, the minimum RTT delay, the number of RTT delays less than 50ms (also referred to as the number of times) of the two RTT delays, the number of RTT delays greater than or equal to 50ms and less than 200ms, the number of RTT delays greater than or equal to 200ms and less than 1000ms, and the number of RTT delays greater than or equal to 1000ms. Further, the table entry of the HASH table of the user IP corresponding to the user IP is found through the user IP (the first table entry of the HASH table of the user IP corresponding to user IP1, the second table entry of the HASH table of the user IP corresponding to user IP2), and the calculated RTT delays of each user IP are backfilled into the HASH table entry of the user IP.

[0106] The present application can obtain various delay statistics information in the user equipment dimension through a hash table in the user equipment dimension, so that network evaluation can be performed based on the various delay statistics information in the user equipment dimension to improve the accuracy of network evaluation.

[0107] In a possible implementation, the target dimension also includes a business dimension, and the dimension identifier of the business dimension is the identifier of the business for which the message is sent and / or the identifier of the business for which the reply message is executed; the delay statistical information corresponding to the business dimension includes at least one of the average round-trip delay of at least one round-trip delay, the maximum round-trip delay of at least one round-trip delay, the minimum round-trip delay of at least one round-trip delay, the number of round-trip delays less than a first preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the first preset value and less than the second preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the second preset value and less than a third preset value in at least one round-trip delay, and the number of round-trip delays greater than or equal to the third preset value in at least one round-trip delay.

[0108] Optionally, the RTT delay in the service dimension refers to the RTT delay of combining the data stream of the IP quintuple according to the user IP and the service identifier. The RTT delay counted according to the user IP and the service identifier includes the average RTT delay, the maximum RTT delay, the minimum RTT delay, and the number of segmented RTT delays in each cycle when each user device executes the corresponding service (i.e., the number of RTT delays less than the first preset value, the number of round-trip delays greater than or equal to the first preset value and less than the second preset value, the number of RTT delays greater than or equal to the second preset value and less than the third preset value, and the number of RTT delays greater than or equal to the third preset value).

[0109] Specifically, the electronic device can map multiple data streams (source IP (i.e. user IP) + destination IP + source port + destination port) with the same user IP and service identifier into a table entry in the HASH table, and identify the service identifier based on the system file (HOST) or service name (ServerName) in the first data packet of each data stream, and map the same user IP and service identifier corresponding to the destination IP, source port and destination port to the same keyIP and keyport (including key sport and key dport).

[0110] Later, after parsing each data message, the keyIP, key sport and key dport corresponding to the destination IP, source port and destination port of the user IP can be queried in the HASH table corresponding to the user IP+service identifier according to the destination IP address, source port and destination port of the data message, and the average RTT delay, maximum RTT delay, minimum RTT delay and the number of segmented statistical RTT delays of the merged flow user are stored in the table entry of the HASH table corresponding to the user IP+keyIP+key sport+key dport. Stream merging refers to merging data streams from multiple data sources into one data stream, and then performing real-time analysis on the merged data stream.

[0111] Based on the above, we can know that the HASH table of the RTT delay in the business dimension is calculated at the granularity of user IP+keyIP+keyport, that is, the average RTT delay, maximum RTT delay, minimum RTT delay and the number of statistical RTT delays between partitions can be calculated at the granularity of user IP+keyIP+keyport, and mapped to the RTT delay in the business dimension through IP+keyIP+keyport.

[0112] For example, Figure 8 As shown, the electronic device can identify multiple data streams (the destination IP+source port+destination port of each data stream in the multiple data streams can be different, for example, the destination IPs are destination IP1, destination IP2 and destination IP3 respectively) based on HOST (i.e., system file) or ServerName (i.e., service name), the user IP of a data stream is user IP1, the service identifier is service identifier 1, and further, the user IP1 and service identifier 1 are mapped to the destination IP, source port and destination port as keyIP1+key sport1+key dport1.

[0113] The first table entry of the HASH table of the service dimension can store the average RTT delay, the maximum RTT delay, the minimum RTT delay, the number of RTT delays less than 50ms, the number of RTT delays greater than or equal to 50ms and less than 200ms, the number of RTT delays greater than or equal to 200ms and less than 1000ms, and the number of RTT delays greater than or equal to 1000ms corresponding to user IP1+keyIP1+key sport1+keydport1. The delay information stored in the first table entry can be the RTT delay obtained based on the message stamp of Sequence number (i.e., the sequence number of the sent message) 1+TCP Segment Len (i.e., the message length of the sent message) 1 and the message stamp of Acknowledgment number (i.e., the sequence number of the reply message) 1 when user device 1 executes the service of service identifier 1, and the RTT delay obtained based on the message stamp of Sequence number2+TCPSegment Len2 and the message stamp of Acknowledgment number2.

[0114] The second table entry of the HASH table of the service dimension can store the average RTT delay, maximum RTT delay, minimum RTT delay, the number of RTT delays less than 50ms, the number of RTT delays greater than or equal to 50ms and less than 200ms, the number of RTT delays greater than or equal to 200ms and less than 1000ms, and the number of RTT delays greater than or equal to 1000ms corresponding to user IP1+keyIP2+key sport2+keydport2. The delay information stored in the second table entry can be obtained based on the RTT delay obtained by the message stamp of Sequence number3+TCPSegment Len3 and the message stamp of Acknowledgment number3 when user device 1 executes the service of service identifier 2.

[0115] The third table entry of the HASH table of the service dimension can store the average RTT delay, the maximum RTT delay, the minimum RTT delay, the number of RTT delays less than 50ms, the number of RTT delays greater than or equal to 50ms and less than 200ms, the number of RTT delays greater than or equal to 200ms and less than 1000ms, and the number of RTT delays greater than or equal to 1000ms corresponding to user IP2+keyIP1+key sport1+keydport1. The delay information stored in the third table entry can be based on the RTT delay obtained from the message stamp of Sequence number1+TCPSegment Len1 and the message stamp of Acknowledgment number1 when user device 2 executes the service of service identifier 1, and the RTT delay obtained from the message stamp of Sequence number2+TCP Segment Len2 and the message stamp of Acknowledgment number2.

[0116] The present application can query the unified IP quadruple of the data stream as the key value according to each data stream of the service used by the user, and then perform HASH mapping. It can merge multiple data streams into a user's service, and then perform statistics on the RTT delay of the user's service to obtain a hash table of the service dimension, so as to perform network evaluation based on the various delay statistics information of the service dimension to improve the accuracy of the network evaluation.

[0117] In one possible implementation, a sending message and / or a response message is forwarded between a sending device and a receiving device via a base station; when the identifier of the base station that forwards the sending message is different from the identifier of the base station that forwards the response message, the round-trip delay between the sending device and the receiving device is a cross-base station round-trip delay.

[0118] Optionally, the electronic device can record the base station that forwards a certain transmission message and the base station that forwards the response message corresponding to the transmission message in the HASH table of the data message dimension, so that it can be known whether the two base stations corresponding to each RTT delay calculated are the same. If they are different, it is considered to be a cross-base station RTT delay. If they are the same, it is considered to be a non-cross-base station RTT delay. In addition, it can be known whether the two base stations corresponding to the maximum RTT delay are the same base station, and the relevant information of the cross-base station RTT delay, such as whether the maximum RTT delay is across base stations, the maximum RTT delay in the cross-base station RTT delay, the first cross-base station RTT delay, the last cross-base station RTT delay, and the number of cross-base station RTT delays, can be recorded to evaluate the impact of switching base stations on user services based on the relevant information of the cross-base station RTT delay. For example, if the cross-base station RTT delay is greater than the non-cross-base station RTT delay, it means that switching base stations will cause the delay of user services to increase.

[0119] The definition of the flag of cross-base station RTT delay is shown in Formula 1:

[0120]

[0121] Among them, SN+TCP len represents the sequence number + message length of the sent message, ACK represents the sequence number of the sent response message, SN base station represents the base station that forwards the sent message, ACK base station represents the base station that forwards the response message, flag is 1, indicating that the RTT delay is the cross-base station RTT delay, and flag is 0, indicating that the RTT delay is the non-cross-base station RTT delay.

[0122] The definition of whether the maximum RTT delay crosses the base station delay (flagmaxrtt) is shown in Formula 2:

[0123]

[0124] Among them, MAX(RTTi) represents the maximum RTT delay. If flagmaxrtt is 1, it means that the maximum RTT delay is the cross-base station delay. If flagmaxrtt is 0, it means that the maximum RTT delay is not the cross-base station delay.

[0125] The maximum RTT delay (ie, RTT2gnodeb) among the inter-base station RTT delays is defined as shown in Formula 3:

[0126] RTT2gnodeb={(gnodeb11, gnodeb12), (gnodebn1, gnodebn2)} Formula 3;

[0127] MAX(RTTi) and flag=1

[0128] Among them, (gnode11, gnodeb12) are the two base stations corresponding to the RTT delay of the first cross-base station when the maximum RTT delay occurs, and (gnoden1, gnodebn2) are the two base stations corresponding to the RTT delay of the last cross-base station when the maximum RTT delay occurs.

[0129] For example, Fig. 9 As shown in the figure, in the hash table, the base station 1 corresponding to Sequence number (i.e., the sequence number of the sent message) 1 + TCP Segment Len (i.e., the message length of the sent message) 1 of user IP1 and the base station 2 corresponding to Acknowledgment number (i.e., the sequence number of the response message) 1 are the same, and the base station 1 corresponding to Sequence number 2 + TCP Segment Len 2 and the base station 2 corresponding to Acknowledgment number 2 are different. Therefore, user IP1 crosses base stations. The maximum RTT delay in the cross-base station RTT delay is the difference between the timestamp of Acknowledgment number 2 and the timestamp of Sequence number 2 + TCP Segment Len 2. The first cross-base station RTT delay and the last cross-base station RTT delay are also the difference between the timestamp of Acknowledgment number 2 and the timestamp of Sequence number 2 + TCP Segment Len 2. The number of cross-base station RTT delays is 1.

[0130] The maximum RTT delay among the cross-base station RTT delays of user IP2 is the maximum RTT delay among the RTT delays corresponding to Sequence number1+TCP SegmentLen1, Sequence number2+TCP Segment Len2, and Sequence number3+TCP Segment Len3. The first cross-base station RTT delay is the difference between the timestamp of Acknowledgment number1 and the timestamp of Sequence number1+TCP Segment Len1. The last cross-base station RTT delay is the difference between the timestamp of Acknowledgment number3 and the timestamp of Sequence number3+TCP Segment Len3. The number of cross-base station RTT delays is 3.

[0131] This application can count the relevant information of the cross-base station RTT delay, and then evaluate the impact of switching base stations on user services based on the relevant information of the cross-base station RTT delay.

[0132] In a possible implementation, when the location for collecting and sending messages and reply messages is between the access network and the core network, the sending device is a user device, and the receiving device is a server, the round-trip delay is used to characterize the delay of the core network; when the location for collecting and sending messages and reply messages is between the access network and the core network, the sending device is a server, and the receiving device is a user device, the round-trip delay is used to characterize the transmission delay of the access network; the access network includes: user equipment, base station; the core network includes: user plane function (UPF), server.

[0133] Optionally, when the location where the electronic device collects and sends messages and reply messages is between the access network and the core network, the sending end device is a server, and the receiving end device is a user device, the RTT delay is calculated to characterize the transmission delay of the access network. When the location where the electronic device collects and sends messages and reply messages is between the access network and the core network, the sending end device is a user device, and the receiving end device is a server, the RTT delay is calculated to characterize the transmission delay of the core network.

[0134] The access network may also include an IP radio access network (RAN) and an IP bearer network.

[0135] For example, Fig.10 As shown, the location where the electronic device collects the transmission message and the response message (i.e., the collection point) is located between the IP RAN and the IP bearer network. When the user device sends a transmission message to the server and the server returns a response message to the user device, the RTT delay is the uplink RTT delay, and the RTO of the retransmission message is the uplink RTO. When the server sends a transmission message to the user device and the user device returns a response message to the server, the RTT delay is the downlink RTT delay, and the RTO of the retransmission message is the downlink RTO.

[0136] It should be noted that Fig.10 The uplink RTT delay is the round-trip delay between the UPF and the server, including the delays generated by the network element, IP bearer network, and server. The downlink RTT delay is the round-trip delay between the base station and the user equipment, including the delays generated by the base station, UE, and IP RAN. The uplink RTT delay can be used to locate problems on the network side (i.e., the core network), and the downlink RTT delay can be used to locate problems on the wireless side (access network). For example, if the uplink RTT delay is greater than the downlink RTT delay, it means that there is a problem on the network side.

[0137] In a possible implementation, the hash table includes multiple entries; the number of the multiple entries is determined based on at least one of the number of interfaces for collecting messages, interface rate, network address category, transmission delay statistical period, and data item deletion period.

[0138] Optionally, when calculating the RTT delay using a HASH table, the number of data items (also referred to as table items) in the HASH table needs to be considered. The factors affecting the data items in the HASH table are mainly the number of interfaces for collecting messages (i.e., sending messages and replying messages), the data flow of each interface (also referred to as interface rate), the user statistics cycle (also referred to as the transmission delay statistics cycle), and the HASH table data item deletion cycle (also referred to as the data item deletion cycle). The number of data items may be positively correlated with the number of interfaces for collecting messages, the interface rate, the network address category, the transmission delay statistics cycle, and the data item deletion cycle.

[0139] Exemplarily, it is assumed that the number of data items occupied by the HASH table (i.e., the number of table items in the hash table) is HN, the number of interfaces is IN, the interface rate is RA, the IP category (i.e., the network address category) is IPT, the user statistics cycle is UP, the HASH table data item deletion cycle is HP, and the coefficient is a. The maximum data item of the HASH table is 1<<27, i.e., 227=134,217,728 items. When the number of interfaces is 2, the interface rate of one interface (i.e., the single interface rate) is 6 Gbps, and the IP category is Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6), as the user statistics cycle and the HASH table data item deletion cycle change, the HASH table occupied data item number mapping table can be shown in Table 1.

[0140] Table 1

[0141]

[0142] It can be seen from Table 1 that the number of data items occupied by the HASH table is linearly related to the user statistics cycle and the deletion cycle of the HASH table data items. Since the server interface modes are the same, if the single interface rate is the same, then HN = IN*RA*IPT*UP*HP*a. According to the data tested above, the coefficient a can be obtained. When the maximum number of data items in the HASH table is 120,000,000 (in order to simplify the calculation, 227 takes 120 million items), the mapping table of the maximum number of data items occupied by the HASH table can be shown in Table 2.

[0143] It should be noted that when the maximum number of data items occupied by the HASH table is 120,000,000 items, the combination of the number of interfaces that can be connected, the user statistics cycle, and the HASH table data item deletion cycle can be shown in Table 2. Considering that if the HASH table is too large, the central processing unit (CPU) cannot completely delete the HASH table, so the HASH table data item deletion cycle should be controlled at 64s or less. In this way, the maximum number of interfaces can support 40 interfaces. By setting the maximum number of data items in the HASH table, the number of interfaces, single interface rate, IP category, user statistics cycle, or HASH table data item deletion cycle can be reasonably set to avoid the number of interfaces, single interface rate, IP category, user statistics cycle, or HASH table data item deletion cycle being too large, resulting in HASH table overload.

[0144] Table 2

[0145]

[0146] The present application can control the size of the hash table based on parameters such as the number of interfaces for collecting messages, interface rate, network address category, transmission delay statistical period, and data item deletion period, so that the size of the hash table can be flexibly controlled to store and process more delay statistical information.

[0147] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0148] The embodiment of the present application can divide the functional modules of a delay acquisition method according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0149] Fig.11 This is a schematic diagram of the structure of a delay acquisition device provided in an embodiment of the present application. Fig.11 As shown, a delay acquisition device 110 is used to avoid the use of a linked list to obtain a round-trip delay, which may cause the round-trip delay to be unable to be obtained, for example, for executing Figure 2 A delay acquisition method is shown. The delay acquisition device 110 includes: a transmission unit 1101 and a processing unit 1102.

[0150] Processing unit 1102 is used to determine the hash table corresponding to the target dimension from the hash tables corresponding to at least one dimension based on the dimension identifier of the target dimension; the target dimension includes at least one of the data message dimension, the user equipment dimension and the service dimension; the hash table is used to store the dimension identifier of the corresponding dimension and the delay statistical information of the corresponding dimension.

[0151] The transmission unit 1101 is used to obtain delay statistics information from a hash table corresponding to a target dimension.

[0152] In one possible implementation, the target dimension is a data message dimension, and the dimension identifier of the data message dimension is determined based on the sequence number of the sent message and the message length of the sent message, or based on the sequence number of the reply message; the delay statistical information corresponding to the data message dimension includes the timestamp of the sent message and / or the timestamp of the reply message.

[0153] In one possible implementation, the transmission unit 1101 is also used to receive a target sending message; the processing unit 1102 is also used to store the timestamp of the target sending message in the table entry corresponding to the target sending message in the hash table; one target sending message corresponds to one target reply message; the transmission unit 1101 is also used to receive a target reply message; the processing unit 1102 is also used to store the timestamp of the target reply message in the table entry corresponding to the target sending message.

[0154] In one possible implementation, the transmission unit 1101 is also used to receive multiple target sending messages; the processing unit 1102 stores the timestamp of the corresponding target sending message in the table entry corresponding to each target sending message in the hash table; the multiple target sending messages are multiple continuously sent messages; the multiple target sending messages correspond to one target reply message; the transmission unit 1101 is also used to receive a target reply message; the processing unit 1102 stores the timestamp of the target reply message in the table entry corresponding to the last target sending message in the hash table; the last sending message is the last message sent among the multiple target sending messages.

[0155] In a possible implementation, the target dimension also includes a user equipment dimension, and the dimension identifier of the user equipment dimension is the network address of the user equipment; the delay statistical information corresponding to the user equipment dimension includes at least one item of the average round-trip delay of at least one round-trip delay, the maximum round-trip delay of at least one round-trip delay, the minimum round-trip delay of at least one round-trip delay, the number of round-trip delays less than a first preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the first preset value and less than the second preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the second preset value and less than the third preset value in at least one round-trip delay, and the number of round-trip delays greater than or equal to the third preset value in at least one round-trip delay; the round-trip delay is determined based on the delay statistical information corresponding to the data message dimension.

[0156] In a possible implementation, the target dimension also includes a business dimension, and the dimension identifier of the business dimension is the identifier of the business for which the message is sent and / or the identifier of the business for which the reply message is executed; the delay statistical information corresponding to the business dimension includes at least one of the average round-trip delay of at least one round-trip delay, the maximum round-trip delay of at least one round-trip delay, the minimum round-trip delay of at least one round-trip delay, the number of round-trip delays less than a first preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the first preset value and less than the second preset value in at least one round-trip delay, the number of round-trip delays greater than or equal to the second preset value and less than a third preset value in at least one round-trip delay, and the number of round-trip delays greater than or equal to the third preset value in at least one round-trip delay.

[0157] In a possible implementation, when the sent message is a retransmission message, the delay statistical information corresponding to the data message dimension also includes: a retransmission timeout of the sent message.

[0158] In one possible implementation, a sending message and / or a response message is forwarded between a sending device and a receiving device via a base station; when the identifier of the base station that forwards the sending message is different from the identifier of the base station that forwards the response message, the round-trip delay between the sending device and the receiving device is a cross-base station round-trip delay.

[0159] In a possible implementation, when the location for collecting and sending messages and reply messages is between the access network and the core network, the sending device is a user device, and the receiving device is a server, the round-trip delay is used to characterize the delay of the core network; when the location for collecting and sending messages and reply messages is between the access network and the core network, the sending device is a server, and the receiving device is a user device, the round-trip delay is used to characterize the transmission delay of the access network; the access network includes: user equipment, base station; the core network includes: user plane network element, server.

[0160] In a possible implementation, the hash table includes multiple entries; the number of the multiple entries is determined based on at least one of the number of interfaces for collecting messages, interface rate, network address category, transmission delay statistical period, and data item deletion period.

[0161] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the embodiment of the present application provides a possible structural diagram of the electronic device involved in the above-mentioned embodiment. Fig.12 As shown, an electronic device 120 is used to avoid the problem that the round-trip delay may not be obtained when the round-trip delay is obtained by using a linked list, for example, for executing Figure 2 A delay acquisition method is shown. The electronic device 120 includes a processor 1201, a memory 1202 and a bus 1203. The processor 1201 and the memory 1202 may be connected via the bus 1203.

[0162] The processor 1201 is the control center of the communication device, which can be a processor or a general term for multiple processing elements. For example, the processor 1201 can be a general-purpose central processing unit (CPU) or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor.

[0163] As an embodiment, the processor 1201 may include one or more CPUs, such as Fig.12 CPU 0 and CPU 1 are shown in .

[0164] The memory 1202 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0165] As a possible implementation, the memory 1202 may exist independently of the processor 1201, and the memory 1202 may be connected to the processor 1201 via the bus 1203 to store instructions or program codes. When the processor 1201 calls and executes the instructions or program codes stored in the memory 1202, a delay acquisition method provided in an embodiment of the present application can be implemented.

[0166] In another possible implementation, the memory 1202 may also be integrated with the processor 1201 .

[0167] The bus 1203 may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0168] It should be pointed out that Fig.12 The structure shown does not constitute a limitation on the electronic device 120. Fig.12 In addition to the components shown, the electronic device 120 may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0169] As an example, combining Fig.11 The functions implemented by the transmission unit 1101 and the processing unit 1102 in the delay acquisition device 110 are similar to Fig.12 The function of processor 1201 in is the same.

[0170] Optional, such as Fig.12 As shown, the electronic device 120 provided in the embodiment of the present application may further include a communication interface 1204 .

[0171] The communication interface 1204 is used to connect with other devices through a communication network. The communication network may be Ethernet, wireless access network, wireless local area network (WLAN), etc. The communication interface 1204 may include a receiving unit for receiving data and a sending unit for sending data.

[0172] In one design, in the electronic device provided in the embodiment of the present application, the communication interface can also be integrated into the processor.

[0173] Through the description of the above implementation methods, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional units is used as an example. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the device can be divided into different functional units to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0174] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When a computer executes the instructions, the computer executes each step in the method flow shown in the above method embodiment.

[0175] An embodiment of the present application provides a computer program product. When a computer instruction is executed on an electronic device, the electronic device executes a delay acquisition method in the above method embodiment.

[0176] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk. Random access memory (random access memory, RAM), read-only memory (read-only memory, ROM), erasable programmable read only memory (erasable programmable read only memory, EPROM), registers, hard disks, optical fibers, portable compact disc read-only memory (compact disc read-only memory, CD-ROM), optical storage devices, magnetic storage devices, or the above in a suitable combination, or any other form of computer-readable storage medium known in the art.

[0177] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC).

[0178] In the embodiments of the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0179] Since the electronic device, computer-readable storage medium, and computer program product in the embodiments of the present application can be applied to the above-mentioned method, the technical effects that can be obtained can also refer to the above-mentioned method embodiments, and the embodiments of the present application will not be repeated here.

[0180] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application.

Claims

1. A delay acquisition method, characterized in that: The method comprises: Based on the dimension identifier of the target dimension, determine the hash table corresponding to the target dimension from the hash tables corresponding to at least one dimension; the target dimension includes at least one of a data message dimension, a user equipment dimension, and a service dimension; the hash table is used to store the dimension identifier of the corresponding dimension and the latency statistics information of the corresponding dimension; Obtain latency statistics from a hash table corresponding to the target dimension.

2. The method according to claim 1, characterized in that The target dimension is the data message dimension, and the dimension identifier of the data message dimension is determined based on the sequence number of the sent message and the message length of the sent message, or based on the sequence number of the reply message; the delay statistical information corresponding to the data message dimension includes the timestamp of the sent message and / or the timestamp of the reply message.

3. The method according to claim 2, characterized in that The method further comprises: Receive a target sent message, and store a timestamp of the target sent message in a table entry corresponding to the target sent message in the hash table; one target sent message corresponds to one target response message; A target response message is received, and a timestamp of the target response message is stored in a table entry corresponding to the target sending message.

4. The method according to claim 2, characterized in that: The method further comprises: Receive multiple target sending messages, and store the timestamp of the corresponding target sending message in the table entry corresponding to each target sending message in the hash table; the multiple target sending messages are multiple messages sent continuously; the multiple target sending messages correspond to one target response message; A target response message is received, and a timestamp of the target response message is stored in a table entry corresponding to the last target sent message in the hash table; the last sent message is the last sent message among the multiple target sent messages.

5. The method according to claim 2, characterized in that: The target dimension also includes the user equipment dimension, and the dimension identifier of the user equipment dimension is the network address of the user equipment; the delay statistical information corresponding to the user equipment dimension includes at least one of the average round-trip delay of at least one round-trip delay, the maximum round-trip delay of the at least one round-trip delay, the minimum round-trip delay of the at least one round-trip delay, the number of round-trip delays less than a first preset value in the at least one round-trip delay, the number of round-trip delays greater than or equal to the first preset value and less than a second preset value in the at least one round-trip delay, the number of round-trip delays greater than or equal to the second preset value and less than a third preset value in the at least one round-trip delay, and the number of round-trip delays greater than or equal to the third preset value in the at least one round-trip delay; the round-trip delay is determined based on the delay statistical information corresponding to the data message dimension.

6. The method according to claim 5, characterized in that The target dimension also includes the business dimension, and the dimension identifier of the business dimension is the identifier of the business for which the sent message is to be executed and / or the identifier of the business for which the reply message is to be executed; the delay statistical information corresponding to the business dimension includes at least one of the average round-trip delay of at least one round-trip delay, the maximum round-trip delay among the at least one round-trip delay, the minimum round-trip delay among the at least one round-trip delay, the number of round-trip delays less than a first preset value among the at least one round-trip delay, the number of round-trip delays greater than or equal to the first preset value and less than a second preset value among the at least one round-trip delay, the number of round-trip delays greater than or equal to the second preset value and less than a third preset value among the at least one round-trip delay, and the number of round-trip delays greater than or equal to the third preset value among the at least one round-trip delay.

7. The method according to any one of claims 2 to 6, characterized in that: In the case where the sent message is a retransmission message, the delay statistical information corresponding to the data message dimension also includes: a retransmission timeout of the sent message.

8. The method according to any one of claims 2 to 6, characterized in that: The sending message and / or the response message are forwarded between the sending device and the receiving device through the base station; when the identifier of the base station forwarding the sending message is different from the identifier of the base station forwarding the response message, the round-trip delay between the sending device and the receiving device is the cross-base station round-trip delay.

9. The method according to any one of claims 2 to 6, characterized in that: In the case where the location for collecting the sending message and the reply message is between the access network and the core network, the sending end device is a user device, and the receiving end device is a server, the round-trip delay is used to characterize the delay of the core network; In the case where the location for collecting the sending message and the reply message is between the access network and the core network, the sending end device is the server, and the receiving end device is the user equipment, the round-trip delay is used to characterize the transmission delay of the access network; The access network includes: the user equipment and the base station; the core network includes: the user plane network element and the server.

10. The method according to any one of claims 2 to 6, characterized in that: The hash table includes multiple table entries; the number of the multiple table entries is determined based on at least one of the number of interfaces for collecting messages, interface rate, network address category, transmission delay statistical period and data item deletion period.

11. A delay acquisition device, characterized in that: The delay acquisition device comprises: a transmission unit and a processing unit; The processing unit is used to determine, based on the dimension identifier of the target dimension, a hash table corresponding to the target dimension from hash tables corresponding to at least one dimension; the target dimension includes at least one of a data message dimension, a user equipment dimension, and a service dimension; the hash table is used to store the dimension identifier of the corresponding dimension and the latency statistics information of the corresponding dimension; The transmission unit is used to obtain delay statistical information from the hash table corresponding to the target dimension.

12. An electronic device, characterized in that: include: Processor and memory; The memory is used to store one or more programs, and the one or more programs include computer-executable instructions. When the electronic device is running, the processor executes the computer-executable instructions stored in the memory to enable the electronic device to perform the method described in any one of claims 1-10.

13. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions which, when executed by a computer, cause the computer to perform the method of any one of claims 1-10.

14. A computer program product, characterized in that The computer program product comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Peer network secure routing method based on multi-dimension distributed hash table

    CN101242365A

  • User behavior statistical method and device based on user events

    CN101951623A

  • Delay statistic method, device, system and storage medium

    CN109039819A

  • Data processing method and device and electronic equipment

    CN116938753A

  • Congestion control method, device and equipment

    CN117749710A