A method and apparatus for determining a propagation delay

CN117135082BActive Publication Date: 2026-10-27HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210544281.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2026-10-27
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

而应用数据包的传输路径上的路由器等第三方网络设备难以对加密形式传输的应用数据包进行解密得到传播时延,进而也不能根据传播时延进行优化调整

Benefits of technology

[0065]第八方面,本申请提供一种计算机程序产品,当计算机读取并执行所述计算机程序产品时,使得计算机执行上述第一方面或第二方面中任一项所述的方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117135082B_ABST
    Figure CN117135082B_ABST
Patent Text Reader

Abstract

The application discloses a kind of propagation delay determination method and device. Among them, method is: network equipment extracts first content from the first data packet of target application according to the content extraction rule corresponding to target application, and first content embodies the data packet characteristic of target application, then when the second content of target application is saved in network equipment, and second content and first content satisfy pairing condition, the time difference between the first time that network equipment processes first data packet and the second time that second data packet of target application is processed before, the propagation delay of target application can be determined according to the time difference, so whether the data packet of target application is encrypted, any network equipment on the data packet transmission path can obtain the propagation delay of target application by the above-mentioned mode, to provide a kind of general propagation delay determination method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network technology, and in particular to a method and apparatus for determining propagation delay. Background Technology

[0002] Currently, users can run various online applications, such as online games, via the internet. Users are increasingly demanding higher network quality for these applications. Propagation latency is a key indicator used to evaluate the network quality of online applications. Therefore, how to reduce the propagation latency of online applications is a problem worthy of attention.

[0003] Reducing the propagation latency of network applications requires first determining that latency. A common approach is to incorporate latency-testing data, such as heartbeat packets, into specific application protocols. However, different network applications typically employ vastly different transmission mechanisms and protocol formats. The payload of application packets is encrypted, and only the network equipment of the application operator (such as clients and servers) possesses the decryption tools to parse the transmitted heartbeat packets and heartbeat response packets to obtain the propagation latency. Third-party network devices along the application packet's transmission path, such as routers, cannot decrypt the encrypted application packets to obtain the propagation latency, and therefore cannot optimize or adjust based on it. Therefore, a universal method for determining propagation latency is urgently needed. Summary of the Invention

[0004] This application provides a method and apparatus for determining propagation delay, which can be used to implement a general method for determining propagation delay on network devices.

[0005] In a first aspect, embodiments of this application provide a method for determining propagation delay, which can be applied to the propagation delay determination apparatus provided in a third aspect of this application. The method includes:

[0006] The network device extracts first content from the first data packet of the target application according to the content extraction rules corresponding to the target application. The first content includes binary data extracted from the first data packet and / or plaintext content obtained based on the binary data. The first content reflects the data packet characteristics of the target application. If the network device stores the second content of the target application and the second content satisfies the pairing condition with the first content, the propagation delay of the target application is determined according to the time difference between the first moment when the network device processes the first data packet and the second moment when it processes the second data packet of the target application. The second content is extracted from the second data packet according to the content extraction rules. The fact that the second content satisfies the pairing condition with the first content indicates that the first data packet is a response data packet corresponding to the second data packet.

[0007] In the above method, the network device is not limited by whether the binary data extracted from the first data packet can be decrypted into plaintext content to obtain the propagation delay. In this embodiment, the network device extracts first content that reflects the characteristics of the data packet of the target application, thereby marking the first data packet as a data packet of the target application through the first content, and confirming whether the first content and the previously cached second content of the target application meet the pairing condition. The second content is also extracted from the second data packet according to the content extraction rules. If the network device caches the second content, and the second content and the first content meet the pairing condition, it indicates that both the first and second data packets are data packets from the target application, and the first data packet is the response data packet corresponding to the second data packet. Accordingly, the network device determines the propagation delay of the target application based on the time difference between the first moment of processing the first data packet and the second moment of processing the second data packet. Thus, regardless of how the data packets related to the target application are encrypted, any network device on the data packet transmission path can obtain the propagation delay of the target application in the above manner, thereby providing a universal method for determining propagation delay.

[0008] Optionally, before the network device extracts the first content from the first data packet of the target application according to the content extraction rules corresponding to the target application, it further includes:

[0009] The network device acquires the data stream to be processed from the target application; the network device selects the first data packet from the data stream to be processed, wherein the length of the first data packet is within a preset length range, and / or, the first data packet contains a preset string within a preset position range.

[0010] In the above method, the network device selects the first data packet based on the length of the data packet and / or a preset string, thereby enabling it to select the data packet used for content extraction more accurately.

[0011] Optionally, the pairing condition between the second content and the first content is determined based on at least one of the following:

[0012] The first value in the first content and the second value in the second content are calculated according to a preset operation and the result belongs to a preset value range; the first value and the second value conform to a preset correspondence; the first transmission direction in the first content is opposite to the second transmission direction in the second content, and the order of the first moment and the second moment is a preset order; the time difference between the first moment and the second moment belongs to a preset time difference range.

[0013] Thus, based on at least one of the above, it is possible to determine whether the second content and the first content meet the pairing conditions with richer information, and to determine more accurately whether the pairing conditions are met.

[0014] Optionally, the method further includes:

[0015] The network device determines the first delay of the target application based on the time difference between the third time when the third data packet is processed and the fourth time when the fourth data packet of the target application is processed before the third time. The third data packet is the response data packet corresponding to the fourth data packet.

[0016] Determining the propagation delay of the target application based on the time difference between the first moment when the network device processes the first data packet and the second moment when it processes the second data packet of the target application includes:

[0017] The second delay of the target application is determined based on the time difference between the first time point and the second time point; the propagation delay of the target application is determined based on the first delay and the second delay.

[0018] Using the above method, the first delay can be determined based on the time difference between the third and fourth moments, and the second delay can be determined based on the time difference between the first and second moments. Thus, based on more sets of delay data, the propagation delay of the target application can be determined more accurately.

[0019] Optionally, the method further includes:

[0020] If the network device does not cache the second content of the target application, or if the second content does not meet the pairing condition with the first content, then the network device stores the first content; when the first content meets a preset condition, the network device deletes the first content, the preset condition including: the duration of storage of the first content is greater than or equal to a preset duration, and / or, the network device extracts a fifth content that matches the first content from a fifth data packet within the preset duration, and / or, the first content is the earliest content extracted from all the content currently cached by the network device, and the data volume of all the content cached by the network device is greater than or equal to a preset value, and any content cached by the network device is extracted by the network device from the acquired data packet.

[0021] In the above manner, when the network device does not cache the second content of the target application, or when the second content does not meet the pairing conditions with the first content, it stores the first content, thereby continuing to wait for the fifth content to be paired with the first content, and can delete the first content when the preset conditions are met, avoiding the first content from staying in the network device for a long time and saving the storage space of the network device.

[0022] Optionally, the first data packet is a data packet sent by the peer device to the network device, and the second data packet is a data packet sent by the network device to the peer device, wherein the peer device is an application client or an application server.

[0023] In the above approach, the peer device is either an application client or an application server. Therefore, the network device can determine the latency between the application client and the application server, thereby improving the flexibility of the latency determination method.

[0024] Optionally, when the peer device is an application client, the propagation delay is the user latency of the target application; or, when the peer device is an application server, the propagation delay is the network latency of the target application.

[0025] Optionally, the method further includes:

[0026] If the propagation delay meets the preset delay optimization conditions, the network device increases the priority of packet forwarding for the target application, and / or updates the packet forwarding port corresponding to the target application, wherein the network quality of the transmission line corresponding to the updated port is higher than the network quality of the transmission line corresponding to the port before the update.

[0027] Based on a general method for determining propagation delay, the propagation delay of the target application can be further optimized, thus providing a general delay optimization method.

[0028] Secondly, embodiments of this application provide another method for determining propagation delay, which can be applied to the propagation delay determination apparatus provided in the fourth aspect of this application. The method includes:

[0029] The network device extracts first content from the first data packet of the target application according to the content extraction rules corresponding to the target application. The first content includes binary data extracted from the first data packet and / or plaintext content obtained based on the binary data. The first content reflects the data packet characteristics of the target application.

[0030] The network device determines the propagation delay of the target application based on the first content and according to the functional relationship between the first content and the propagation delay of the target application.

[0031] In the above method, the network device is not limited by whether the binary data extracted from the first data packet can be decrypted into plaintext content to obtain the propagation delay. In this embodiment, the network device can extract first content that reflects the characteristics of the data packet of the target application, thereby marking the first data packet as the data packet of the target application. Furthermore, the network device can determine the propagation delay of the target application based on the first content and the corresponding functional relationship between the first content and the propagation delay of the target application. Therefore, regardless of how the data packets related to the target application are encrypted, any network device on the data packet transmission path can extract the content in the above manner to obtain the propagation delay of the target application, thus providing a universal method for determining propagation delay.

[0032] Optionally, before the network device extracts the first content from the first data packet of the target application according to the content extraction rules corresponding to the target application, it further includes:

[0033] The network device acquires the data stream to be processed from the target application; the network device selects the first data packet from the data stream to be processed, wherein the length of the first data packet is within a preset length range, and / or, the first data packet contains a preset string within a preset position range.

[0034] Optionally, the first data packet is a data packet sent by the peer device to the network device, and the second data packet is a data packet sent by the network device to the peer device, wherein the peer device is an application client or an application server.

[0035] Optionally, when the peer device is an application client, the propagation delay is the user delay of the target application; when the peer device is an application server, the propagation delay is the network delay of the target application.

[0036] Optionally, the method further includes:

[0037] If the propagation delay meets the preset delay optimization conditions, the network device increases the priority of packet forwarding for the target application, and / or updates the packet forwarding port corresponding to the target application, wherein the network quality of the transmission line corresponding to the updated port is higher than the network quality of the transmission line corresponding to the port before the update.

[0038] Thirdly, embodiments of this application provide a propagation delay determination device, the device comprising:

[0039] The acquisition module is used to extract first content from the first data packet of the target application according to the content extraction rules corresponding to the target application. The first content includes binary data extracted from the first data packet and / or plaintext content obtained based on the binary data. The first content reflects the data packet characteristics of the target application.

[0040] The processing module is configured to determine the propagation delay of the target application based on the time difference between the first moment when the network device processes the first data packet and the second moment when it processes the second data packet of the target application, if the network device stores the second content of the target application and the second content satisfies the pairing condition with the first content. The second content is extracted from the second data packet according to the content extraction rule, and the pairing condition between the second content and the first content indicates that the first data packet is a response data packet corresponding to the second data packet.

[0041] Optionally, before extracting the first content from the first data packet of the target application, the acquisition module is further configured to:

[0042] Obtain the data stream to be processed from the target application; select the first data packet from the data stream to be processed, wherein the length of the first data packet is within a preset length range, and / or the first data packet contains a preset string within a preset position range.

[0043] Optionally, the pairing condition between the second content and the first content is determined based on at least one of the following:

[0044] The first value in the first content and the second value in the second content are calculated according to a preset operation and the result belongs to a preset value range; the first value and the second value conform to a preset correspondence; the first transmission direction in the first content is opposite to the second transmission direction in the second content, and the order of the first moment and the second moment is a preset order; the time difference between the first moment and the second moment belongs to a preset time difference range.

[0045] Optionally, the processing module is further configured to:

[0046] The first delay of the target application is determined based on the time difference between the third time when the third data packet is processed and the fourth time when the fourth data packet of the target application is processed before the third time. The third data packet is the response data packet corresponding to the fourth data packet.

[0047] The processing module is specifically used for:

[0048] The second delay of the target application is determined based on the time difference between the first time point and the second time point; the propagation delay of the target application is determined based on the first delay and the second delay.

[0049] Optionally, the processing module is further configured to:

[0050] If the network device does not cache the second content of the target application, or if the second content does not meet the pairing condition with the first content, then the first content is stored; when the first content meets a preset condition, the first content is deleted, the preset condition including: the duration of storage of the first content is greater than or equal to a preset duration, and / or, the network device extracts a fifth content that matches the first content from a fifth data packet within the preset duration, and / or, the first content is the earliest content extracted from all the content cached by the network device, and the data volume of all the content currently cached by the network device is greater than or equal to a preset value, and any content cached by the network device is extracted by the network device from the acquired data packet.

[0051] Optionally, the first data packet is a data packet sent by the peer device to the network device, and the second data packet is a data packet sent by the network device to the peer device, wherein the peer device is an application client or an application server.

[0052] Optionally, when the peer device is an application client, the propagation delay is the user latency of the target application; or, when the peer device is an application server, the propagation delay is the network latency of the target application.

[0053] Optionally, the processing module is further configured to: if the propagation delay meets a preset delay optimization condition, increase the priority of packet forwarding for the target application, and / or update the packet forwarding port corresponding to the target application, wherein the network quality of the transmission line corresponding to the updated port is higher than the network quality of the transmission line corresponding to the port before the update.

[0054] Fourthly, embodiments of this application provide a propagation delay determination device, the device comprising:

[0055] The acquisition module is used to extract first content from the first data packet of the target application according to the content extraction rules corresponding to the target application. The first content includes binary data extracted from the first data packet and / or plaintext content obtained based on the binary data. The first content reflects the data packet characteristics of the target application.

[0056] The processing module is configured to determine the propagation delay of the target application based on the first content and according to the functional relationship between the first content and the propagation delay of the target application.

[0057] Optionally, before extracting the first content from the first data packet of the target application, the acquisition module is further configured to:

[0058] Obtain the data stream to be processed from the target application; select the first data packet from the data stream to be processed, wherein the length of the first data packet is within a preset length range, and / or the first data packet contains a preset string within a preset position range.

[0059] Optionally, the first data packet is a data packet sent by the peer device to the network device, and the second data packet is a data packet sent by the network device to the peer device, wherein the peer device is an application client or an application server.

[0060] Optionally, when the peer device is an application client, the propagation delay is the user delay of the target application; when the peer device is an application server, the propagation delay is the network delay of the target application.

[0061] Optionally, the processing module is further configured to: if the propagation delay meets a preset delay optimization condition, increase the priority of packet forwarding for the target application, and / or update the packet forwarding port corresponding to the target application, wherein the network quality of the transmission line corresponding to the updated port is higher than the network quality of the transmission line corresponding to the port before the update.

[0062] Fifthly, an electronic device is provided, the electronic device comprising: one or more processors; one or more memories; wherein the one or more memories store one or more computer instructions, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of the first or second aspects above.

[0063] A sixth aspect provides a computer-readable storage medium comprising computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of the first or second aspects above.

[0064] In a seventh aspect, this application provides a chip including a processor coupled to a memory for reading and executing a software program stored in the memory to implement the method described in any one of the first or second aspects above.

[0065] Eighthly, this application provides a computer program product that, when read and executed by a computer, causes the computer to perform the method described in any one of the first or second aspects above.

[0066] For the beneficial effects of aspects three through eight above, please refer to the beneficial effects of aspects one or two, which will not be repeated here. Attached Figure Description

[0067] Figure 1A A schematic diagram of the network architecture to which the propagation delay determination method provided in this application embodiment can be applied;

[0068] Figure 1B A schematic diagram illustrating the propagation delay in a propagation delay determination method provided in an embodiment of this application;

[0069] Figure 2 A schematic diagram illustrating a scenario in which the propagation delay determination method provided in this application embodiment can be applied;

[0070] Figure 3 A schematic diagram of the network device to which the propagation delay determination method provided in this application embodiment can be applied;

[0071] Figure 4 A schematic diagram illustrating the execution of a propagation delay determination method provided in this application embodiment in a network device;

[0072] Figure 5 A flowchart illustrating the steps of a method for determining propagation delay provided in an embodiment of this application;

[0073] Figure 6 A flowchart illustrating the steps of another propagation delay determination method provided in this application embodiment;

[0074] Figure 7 A schematic diagram of a propagation delay determination device provided in an embodiment of this application;

[0075] Figure 8 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation

[0076] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0077] In the embodiments of this application, "one or more" refers to one or more (including two); "and / or" describes the relationship between the associated objects, indicating that there may be three relationships; for example, A and / or B indicates that there may be the following three relationships: A exists alone, A and B exist simultaneously, and B exists alone, where A and B may be singular or plural. The character " / " generally indicates that the associated objects before and after it are in an "or" relationship.

[0078] In this application, the ordinal numbers such as "first" and "second" are used to distinguish multiple objects, but are not used to limit the order, sequence, priority or importance of multiple objects.

[0079] Application scenarios:

[0080] like Figure 1A The diagram shows the network architecture to which the propagation delay determination method provided in this application can be applied. Figure 1A The network architecture shown includes server devices, intermediate devices, and client devices. Figure 1A The illustrated network architecture is applicable to various communication systems. Optionally, Figure 1A The network architecture shown is a 4G communication system, a 5G communication system, or a future communication system. The network architecture and service scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of communication network architecture and the emergence of new service scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0081] Figure 1A The illustrated network architecture does not limit the specific network protocol. Optionally, the network protocol is User Datagram Protocol (UDP) or Quick UDP Internet Connection (QUIC). Regardless of whether the data packets are encrypted in the network protocol or in what way they are encrypted, the propagation delay determination method of the embodiments of this application can be used.

[0082] It should be noted that, Figure 1A The network architecture shown is merely an example and does not limit the specific number or type of server devices, intermediate devices, and client devices. Optionally, a client device may be a single client device or a client cluster, with the client cluster comprising multiple client devices. Optionally, a client device may be a mobile terminal, personal computer, etc. Figure 1AIn the illustrated network architecture, the transmission path between the client device and the server device may include one or more intermediate devices, as long as communication between the client device and the server device is possible. Optionally, intermediate devices include routers, modems, gateways, firewalls, or broadband remote access servers (BRAS), etc. Optionally, the server device may be a single server device or a server cluster, with the server cluster comprising multiple server devices. Optionally, the server device may be a server or similar device.

[0083] The device implementing the propagation delay determination method in this application embodiment is not limited; the device may be... Figure 1A In the illustrated network architecture, any network device—whether a server, intermediate, or client—can execute the propagation delay determination method. By executing this method, the network device can obtain the propagation delay of the target application. The target application can be any network application; optionally, it can be a network game, online chat software, etc.

[0084] In this embodiment, the propagation latency of the target application is understood as the time it takes for the data packets of the target application to travel from... Figure 1A The diagram illustrates the round-trip time (RTT) from the local device to the remote device, using a network device as an example. Optionally, the remote device can be a client device or a server device. For example, the client device could be the application client of the target application, and the server device could be the application server of the target application. Optionally, the propagation delay can be network latency or user latency. Figure 1B As shown, network latency refers to the Round-Trip Time (RTT) of a target application's data packets from the network device to the server device (peer device) when the network device is not a server device. Optionally, network latency refers to the round-trip time from when the network device sends the target application's data packets to the server device until the network device receives the response data packets from the server device. User latency refers to the RTT of a target application's data packets from the network device to the client device when the network device is not a client device. Optionally, user latency refers to the round-trip time from when the network device sends the target application's data packets to the client device until the network device receives the response data packets from the client device.

[0085] It should be noted that in the definition of propagation delay for the target application above, when the network device is neither a client device nor a server device, the target application's data packets will enter and leave the network device. Furthermore, the dwell time of the data packets from entering the network device to leaving is generally small relative to the overall propagation delay of the target application. Therefore, the start or end time of the target application's propagation delay can have multiple possibilities. Optionally, the start time of the target application's propagation delay can be any time within the period from when the target application's data packets enter the network device from the client device to when they leave the network device (i.e., are sent to the server device). For example, Figure 1A In the example shown, taking the network device as an intermediate device, the intermediate device receives the data packet of the target application from the client device at time T1; the intermediate device sends the data packet of the target application to the server device at time T2; the time period during which the data packet of the target application stays in the intermediate device is from T1 to T2. The intermediate device receives the response data packet from the server device at time T3, and the intermediate device sends the response data packet to the client device at time T4; the time period during which the response data packet of the target application stays in the intermediate device is from T3 to T4. The propagation delay of the target application is defined as T2'-T1', where T2' is any time from T3 to T4, and T1' is any time from T1 to T2. Optionally, the propagation delay of the target application can be T3-T2 or T4-T2.

[0086] Figure 1A In the illustrated network architecture, any network device can execute the propagation delay determination method provided in this application embodiment. Optionally, the propagation delay determination method can be executed collaboratively by multiple modules in the network device, or implemented independently by a single delay determination module. Taking the implementation of the propagation delay determination method by a single delay determination module as an example, the specific form of the delay determination module is not limited. Optionally, the delay determination module can be software or hardware. For example, the delay determination module can be a chip or a piece of program code. When the delay determination module is used as a functional module, it can be embedded in... Figure 1A Any network device in the illustrated network architecture. Figure 2 The illustrated scenario illustrates a possible scenario where the latency determination module is embedded within a network device. Specifically, Figure 2 The illustrated scenario lists some common network devices. Optionally, the client device is a mobile terminal or a personal computer (PC), the intermediate device is a wireless router or a broadband dial-up modem, and the server device is a server. All of these network devices can be configured with a latency determination module to implement a propagation latency determination method.

[0087] like Figure 3The diagram shown illustrates the structure of a network device to which the propagation delay determination method provided in this embodiment of the application can be applied. Optionally, Figure 3 The network device shown is Figure 2 Any network device in the scenario shown. Figure 3 In the example, the network device includes the following modules: bus, memory, input devices (such as mouse, keyboard, etc.), display, processor, and network interface. The operating system is installed on the memory, and the latency determination module is located in the memory. For example, the latency determination module is software in the memory that runs on top of the operating system.

[0088] To facilitate understanding of the propagation delay determination method provided in this application, the following is combined with... Figure 4 This application provides a method for determining propagation delay. Figure 4 The process of performing a propagation delay determination method in a network device is illustrated. Optionally, this process includes three steps: application identification, delay determination, and delay optimization. Figure 4 In the example, the network device includes an application identification module, a latency determination module, and a latency optimization module. The application identification module is used for application identification, the latency determination module is used for latency determination, and the latency optimization module is used for latency optimization.

[0089] It should be understood that Figure 4 The modules in the network device shown are merely an example. Optionally, in some embodiments, the network device has more than Figure 4 The diagram shows more or fewer modules, or combinations of two or more modules, or modules that are different from each other. Optionally, Figure 4 The various modules shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits. Optionally, the network device does not have an application identification module and a latency optimization module, but integrates the application identification function and latency optimization function into the latency determination module.

[0090] The specific processes for the three steps of application identification, latency determination, and latency optimization are likely as follows:

[0091] Application identification:

[0092] Application identification refers to identifying which network application a data packet belongs to, and this can be performed by the application identification module. In some embodiments, application identification also includes identifying the data packet type. Since a network application typically needs to transmit a large amount of data, it may continuously transmit multiple data packets, which form the data stream of the network application. Application identification can be implemented at both the data packet level and the data stream level. At the data packet level, the application identification module can determine the network application and data packet type of a single data packet. At the data stream level, the application identification module can uniformly determine which network application and data packet type each data packet in the data stream belongs to. For example, the network application might be the game Honor of Kings or Peacekeeper Elite; the data stream type could be any one of the following: a battle stream, a text chat stream, a voice call stream, or a video playback stream. For example, the application identification result might be a battle stream for Honor of Kings or a heartbeat stream for Peacekeeper Elite.

[0093] For example, possible implementations of application recognition include the following:

[0094] (1) Identify the application in the network application data packet based on the string in the data packet. For example, if the network application data packet contains the binary string corresponding to "WangZheRongYao", then it can be known that the network application is the online game Honor of Kings. This method can be implemented at the data packet level or at the data stream level.

[0095] (2) Identify the application in the network application's data stream based on the length of the data packets. For example, if the lengths of the first four data packets in the network application's data stream are 200, -200, 280, and -420, then the network application is identified as the online game "Peacekeeper Elite". Positive numbers represent data packets sent from the client device to the server device, and negative numbers represent data packets sent from the server device to the client device. This method can be implemented at the data stream level.

[0096] (3) Identify the application in the data stream based on the server's Internet Protocol (IP) address. For example, if the IP address in the data stream is the server IP address of the online game Honor of Kings, then the network application is identified as the online game Honor of Kings. This method can be implemented at the packet level or the data stream level.

[0097] It should be noted that the possible implementations of application identification described above are merely examples and not limitations on application identification. After the application identification stage, the network application corresponding to the data packet or data stream and the data packet type can be determined. Optionally, the application identification module outputs the data packet, data stream, and application identification results to the latency determination module. For example, the application identification result includes the network application's data stream, the network application's identifier (ID), and the data packet type within the data stream.

[0098] Delay determination:

[0099] Optionally, the delay determination includes four sub-steps: (1) packet filtering; (2) content extraction; (3) content matching; and (4) delay calculation. It should be noted that, since there are various possibilities for data packets, whether or not the above four sub-steps are executed depends on the specific characteristics of the data packets. For example, some target application data packets do not require filtering; any data packet from the target application can be extracted. For example, after content extraction of some target application data packets, sub-step (3) is unnecessary; the propagation delay can be obtained by data conversion based on the content extracted from the data packets. The four sub-steps can be as follows:

[0100] (1) Data packet filtering:

[0101] The data packets from a target application may be of various types, some of which exhibit characteristics distinct from other packets. Identifying these packets and extracting their content allows for pairing and accurate identification of the target application's data packets. Data packet filtering can be performed at both the data stream level and the individual packet level.

[0102] There are multiple ways to implement stream-level filtering. Optionally, all packets in a data stream can be selected based on the network application ID and data stream type. For example, the network application ID and data stream type might be in a whitelist. The above implementation is just one example; there may be many other ways. For instance, determining whether all packets in a data stream can be selected based on the network application ID, data stream type, and communication port of the data stream.

[0103] There are multiple ways to implement packet-level filtering. Optionally, for the first packet of the target application, if the length of the first packet is within a preset length range, and / or the first packet contains a preset string within a preset position range, then the first packet is selected. Optionally, the preset string and the preset position range have a corresponding relationship with the target application.

[0104] If the length of the first data packet falls within the preset length range, for example, if the length of the first data packet is 200 bytes, then the first data packet is selected. Alternatively, if the length of the first data packet is greater than 150 bytes but less than 250 bytes, then the first data packet is selected.

[0105] If the first data packet contains a preset string within a preset position range, optionally, the preset string is the binary string corresponding to the name of the target application. Optionally, the preset position range of the first data packet is the entire data packet, or a portion of the first data packet. For example, the first data packet is the data packet for the game Honor of Kings. The preset position range of the first data packet is from an offset of 20 bytes to an offset of 50 bytes from the starting position, and the string "WangZheRongYao" corresponding to the game Honor of Kings exists within this preset position range.

[0106] It should be noted that the embodiments in this application are merely illustrative examples of the implementation methods for data packet filtering and do not constitute a limitation on the implementation methods for data packet filtering. The above-mentioned implementation methods for data packet filtering can be combined or selected according to the actual scenario.

[0107] (2) Content extraction:

[0108] Content extraction refers to extracting content from data packets that reflects the characteristics of the target application. Since the formats of data packets for different target applications may differ, the specific extraction method depends on the content extraction rules corresponding to the target application. Taking the first data packet of the target application as an example, the latency determination module extracts first content from the first data packet of the target application. This first content reflects the characteristics of the target application's data packets. Optionally, the first content extracted by the latency determination module includes binary data extracted from the first data packet and / or plaintext content obtained based on the binary data. For example, the binary data extracted from the first data packet is binary data within a preset position range in the first data packet. For example, the plaintext content obtained based on the binary data is the length of the first data packet, or the transmission direction of the first data packet, or the numerical value corresponding to the binary data within the preset position range in the first data packet.

[0109] It should be noted that the role of the first content may differ for different network applications. When there is a corresponding preset function relationship between the first content of the target application and the propagation delay, the delay determination module can directly calculate the propagation delay of the target application based on the first content and the preset function relationship, i.e., skipping step (3) and executing the corresponding step (4). When there is no corresponding preset function relationship between the first content of the target application and the propagation delay, the delay determination module can perform content matching based on the first content to obtain the propagation delay of the target application, i.e., corresponding to step (3). It should be noted that whether there is a corresponding preset function relationship between the first content of the target application and the propagation delay does not need to be determined in the delay determination module. This is because after the application identification of the target application, it has been determined whether there is a corresponding preset function relationship between the first content of the target application and the propagation delay, and the corresponding process can be directly executed in the delay determination module.

[0110] (3) Content matching:

[0111] Content pairing refers to pairing content extracted from data packets of the same target application. The latency determination module determines whether the network device stores the second content of the target application and whether the second content meets the pairing condition with the first content. The second content is extracted from the second data packet according to the content extraction rules of the target application. The network device processes the second data packet first, followed by the first data packet. If the second content and the first content meet the pairing condition, it indicates that the first data packet is the response data packet corresponding to the second data packet. By pairing the first and second content, the latency determination module can mark the second data packet of the target application that the network device sends to the peer device, along with the first data packet of the peer device's response.

[0112] Optionally, whether the first content and the second content satisfy the pairing condition is determined based on at least one of the following four criteria:

[0113] The first value in the first content and the second value in the second content are calculated according to a preset value range; the first value and the second value conform to a preset correspondence; the first transmission direction in the first content and the second transmission direction in the second content are opposite, and the order of the first moment and the second moment is a preset order; the time difference between the first moment and the second moment is within a preset time difference range.

[0114] Optionally, the pairing conditions are designed based on the data packet characteristics of the target application, and there is a correspondence between the pairing conditions and the target application. For example, when the target application is network application A, satisfying the pairing conditions means that each of the above four items is satisfied; when the target application is network application B, satisfying the pairing conditions of the target application means that any three of the above four items are satisfied.

[0115] Optionally, if the latency determination module determines that the network device stores the second content of the target application, and the second content meets the pairing condition with the first content, then it deletes both the first and second content. Alternatively, if the latency determination module determines that the network device does not store the second content of the target application, or if the second content meets the pairing condition with the first content, then it stores the first content in the network device. For example, it caches the first content in the network device, waiting for the network device to extract the content paired with it from subsequently received data packets.

[0116] Optionally, to prevent the first content from being unable to be paired for a long time due to issues such as packet loss, thus wasting the network device's storage space, the network device deletes the first content when it meets preset conditions. Optionally, the preset conditions include: the duration of storage of the first content is greater than or equal to a preset duration; and / or, the network device extracts a fifth piece of content that matches the first content from a fifth data packet within the preset duration; and / or, the first content is the earliest content extracted from all currently cached content by the network device, and the data volume of all cached content is greater than or equal to a preset value, wherein any content cached by the network device is extracted by the network device from the acquired data packets.

[0117] For example, if the duration of the first content stored in the network device is greater than or equal to 10 seconds, and / or if the network device retrieves the fifth content paired with the first content at the 5th second, the network device deletes the first content. For instance, if the network device currently caches 100 pieces of content, these 100 pieces of content are extracted from 100 data packets received by the network device, with each of the 100 pieces of content corresponding one-to-one with these 100 data packets. The first content is the earliest content extracted from these 100 pieces of content, with a default value of 100; in this case, the network device deletes the first content.

[0118] (4) Delay calculation:

[0119] It should be noted that the method for calculating latency based on the first content may differ for different network applications.

[0120] When there is a corresponding preset function relationship between the first content of the target application and the propagation delay, the delay determination module directly calculates the propagation delay of the target application based on the first content and the preset function relationship.

[0121] For example, the first content is the length of the first data packet. The length of the first data packet has a corresponding preset functional relationship with the propagation delay of the target application. Then the delay determination module can calculate the propagation delay of the target application based on the length of the first data packet and the preset functional relationship.

[0122] When there is no corresponding preset function relationship between the first content of the target application and the propagation delay, the delay determination module can perform content matching based on the first content to obtain the propagation delay of the target application. It should be noted that whether there is a corresponding preset function relationship between the first content of the target application and the propagation delay does not need to be determined in the delay determination module; the corresponding process can be directly executed in the delay determination module.

[0123] When the latency determination module determines that the network device stores the second content of the target application, and the second content meets the pairing condition with the first content, the propagation latency of the target application can be determined based on the time difference between the first moment when the network device processes the first data packet and the second moment when it processes the second data packet of the target application. Optionally, the time difference between the first moment and the second moment can be used as the propagation latency of the target application, or the time difference between the first moment and the second moment can be adjusted to obtain the propagation latency of the target application.

[0124] The first moment may refer to any moment during which the first data packet remains in the network device while the network device is processing the first data packet; optionally, the first moment refers to the moment when the network device receives the first data packet. The second moment may refer to any moment during which the second data packet remains in the network device while the network device is processing the second data packet; optionally, the second moment refers to the moment when the network device sends the second data packet. For example, when the network device is... Figure 1A When the intermediate device is shown, the first time corresponds to T2' and the second time corresponds to T1'.

[0125] For example, the second moment refers to the moment when the network device sends the second data packet to the server device, and the first moment refers to the moment when the network device receives the first data packet sent by the server device. The second moment is 120.00 seconds. The network device sends the second data packet to the server device and parses the second value (100) from the first four bytes starting from the fifth byte of the second data packet. The network device caches the transmission direction, the second moment, and the second value (100) of the second data packet as the second content. The first moment is 120.30 seconds. The network device receives the first data packet from the server device and parses an integer value (100) from the first four bytes starting from the fifth byte of the first data packet. The network device uses the transmission direction, the first moment, and the first value (100) of the first data packet as the first content. The delay determination module iterates through and compares the cached content based on the first content to determine if the second content and the first content meet the pairing condition. In this configuration, the transmission direction of the first data packet is opposite to that of the second data packet, and the order of the first and second moments is a preset order (the first moment follows the second moment); the result of the calculation of the first and second values ​​according to a preset operation falls within a preset value range (i.e., the difference between the first and second values ​​is 0). Therefore, the delay determination module can determine the propagation delay as 0.30 seconds based on the difference between the first and second moments.

[0126] In some embodiments, propagation delay can be determined based on more paired content. For example, the network device determines a first delay for the target application based on the time difference between the third time when processing the third data packet and the fourth time when processing the fourth data packet of the target application before the third time, where the third data packet is a response data packet corresponding to the fourth data packet. Furthermore, a second delay for the target application is determined based on the time difference between the first and second times; and the propagation delay of the target application is determined based on the first and second delays. Here, a third content can be extracted from the third data packet, and a fourth content can be extracted from the fourth data packet; pairing the third and fourth content indicates that the third data packet is a response data packet corresponding to the fourth data packet. The principle of pairing the third and fourth content and the principle of determining the second delay of the target application can refer to the process of obtaining the first delay, and will not be repeated here. That is, following the same principle as the first delay, more delays can be obtained, and the network delay of the target application can be determined based on multiple delays. For example, the network delay of the target application can be obtained by averaging multiple delays.

[0127] Latency optimization:

[0128] Optionally, after the latency determination module determines the propagation latency, when the propagation latency meets a preset latency optimization condition, the latency optimization module performs latency optimization on the propagation latency of the target application. For example, the preset latency optimization condition is that the propagation latency is greater than a preset latency threshold. The specific implementation of latency optimization can be as follows:

[0129] Optionally, the latency optimization module increases the priority of packet forwarding for the target application. For example, in the network device's internal buffer queue, packets with longer propagation latency are prioritized and forwarded first. Optionally, the latency optimization module updates the port for packet forwarding corresponding to the target application. The network quality of the transmission line corresponding to the updated port is higher than that of the transmission line corresponding to the port before the update, allowing the target application's packets to be transmitted through the higher network quality transmission line. In Wi-Fi wireless communication technology scenarios, when the network device is a wireless router, the network device adjusts the transmission direction of the Wi-Fi antenna to match that of the peer device and increases the transmission power of the Wi-Fi antenna. In addition, if the target application still has a long propagation latency after adjustment, the packets of the target application are restricted to ensure the propagation latency of packets of other network applications. Various implementations of latency optimization can be used individually or in combination.

[0130] For example, when the propagation latency of the target application exceeds 400 milliseconds, the latency optimization module increases the packet forwarding priority of the target application. When the propagation latency of the target application drops to 300 milliseconds, the latency optimization module switches the port for packet forwarding from the Wi-Fi port to the 4G traffic port.

[0131] The steps of a propagation delay determination method provided in this application are as follows: Figure 5 As shown. Figure 5 For the specific implementation methods of each step shown, please refer to Figure 4 Related descriptions.

[0132] Step 501: The network device identifies the application of the data stream to be processed.

[0133] For the specific implementation of step 501, please refer to... Figure 4 The corresponding application identification description. Step 501 is an optional step. In some embodiments, the network device can acquire data packets or data streams that have already undergone application identification.

[0134] Step 502: The network device selects a first data packet from the data stream to be processed.

[0135] For the specific implementation of step 502, please refer to Figure 4The corresponding description of packet filtering. Step 502 is an optional step. In some embodiments, the network device may not select packets from the data stream to be processed, for example, it may use any packet from the data stream to be processed as the first packet.

[0136] Step 503: The network device extracts the first content from the first data packet of the target application according to the content extraction rules corresponding to the target application.

[0137] For the specific implementation method of step 503, please refer to Figure 4 The relevant description of the content extraction.

[0138] Step 504: The network device determines whether it has stored the second content of the target application and whether the second content and the first content meet the pairing conditions.

[0139] The second content is extracted from the second data packet according to the content extraction rules of the target application. The second content and the first content satisfy the pairing condition, indicating that the first data packet is the response data packet corresponding to the second data packet.

[0140] If yes, proceed to step 505; otherwise, proceed to step 506.

[0141] The specific pairing conditions in step 504 are as follows: Figure 4 The descriptions of the corresponding content pairings will not be repeated here.

[0142] Step 505: The network device determines the propagation delay of the target application based on the first and second time points.

[0143] Wherein, the first moment is the moment when the network device processes the first data packet, and the second moment is the moment when the network device processes the second data packet. Optionally, the first moment is the moment when the network device receives the first data packet sent by the peer device, and the second moment is the moment when the network device sends the second data packet to the peer device. Optionally, the peer device is a client device or a server device. For example, the client device is the application client of the target application, and the server device is the application server of the target application.

[0144] After step 505 is completed, proceed to step 510.

[0145] Step 506: The network device stores the first content.

[0146] Step 507: The network device determines whether it has extracted the fifth content that matches the first content within a preset time period.

[0147] The fifth content is extracted from the fifth data packet, and the first content and the fifth content satisfy the pairing condition to indicate that the first data packet is the response data packet corresponding to the second data packet.

[0148] If yes, proceed to step 508; otherwise, proceed to step 509.

[0149] Step 508: The network device determines the propagation delay of the target application based on the first and fifth time points.

[0150] The first moment refers to the moment when the network device processes the first data packet, and the fifth moment refers to the moment when the network device processes the fifth data packet.

[0151] After step 508 is completed, proceed to step 510.

[0152] Step 509: The network device deletes the first content.

[0153] Step 509 is an optional step. For example, in some embodiments, the process may end if the result after step 504 is negative. After step 509 is completed, the process ends.

[0154] Step 510: Network devices optimize the propagation latency of the target application.

[0155] The specific implementation method for optimizing propagation delay in step 510 is as follows: Figure 4 Description of the latency optimization section. Step 510 is an optional step. In some embodiments, the process may end after steps 505 and 508 are completed.

[0156] according to Figure 5 As shown in the propagation delay determination method, the network device is not limited by whether the binary data extracted from the first data packet can be decrypted into plaintext content to obtain the propagation delay. In this embodiment, the network device extracts the first content that reflects the characteristics of the data packet of the target application, and thus can mark the first data packet as the data packet of the target application by the first content, and confirm whether the first content and the previously cached second content of the target application meet the pairing condition. The second content is also extracted from the second data packet according to the content extraction rules. If the network device caches the second content and the second content meets the pairing condition with the first content, it means that the first data packet and the second data packet are both data packets from the target application, and the first data packet is the response data packet corresponding to the second data packet. Accordingly, the network device determines the propagation delay of the target application based on the time difference between the first time of processing the first data packet and the second time of processing the second data packet. In this way, no matter how the data packets related to the target application are encrypted, any network device on the data packet transmission path can obtain the propagation delay. Figure 5 The propagation delay determination method shown obtains the propagation delay of the target application, thus providing a general method for determining propagation delay.

[0157] Figure 5The propagation delay determination method shown is applicable to situations where the content extracted from data packets of network applications can be paired. However, some network applications have a preset functional relationship between the content extracted from data packets and the propagation delay, allowing the transmission delay to be obtained without pairing the content extracted from two data packets. Therefore, this application provides another propagation delay determination method, the steps of which are as follows: Figure 6 As shown. Figure 6 For the specific implementation methods of each step shown, please refer to Figure 4 Related descriptions.

[0158] Step 601: The network device performs application identification on the data stream to be processed.

[0159] For the specific implementation of step 601, please refer to [link / reference]. Figure 4 The corresponding application identification description. Step 601 is an optional step. In some embodiments, the network device can acquire data packets or data streams that have already undergone application identification.

[0160] Step 602: The network device selects a first data packet from the data stream to be processed.

[0161] For the specific implementation of step 602, please refer to [link / reference]. Figure 4 The corresponding description of packet filtering. Step 602 is an optional step. In some embodiments, the network device may not select packets from the data stream to be processed, for example, it may use any packet from the data stream to be processed as the first packet.

[0162] Step 603: The network device extracts the first content from the first data packet of the target application according to the content extraction rules corresponding to the target application.

[0163] Step 604: The network device determines the propagation delay of the target application based on the first content and the preset function relationship.

[0164] In step 604, the specific implementation method for determining the propagation delay based on the first content and the preset functional relationship is as follows: Figure 4 The relevant descriptions of the latency calculation part will not be repeated here.

[0165] Step 605: The network device optimizes the propagation latency of the target application. Step 605 is an optional step; in some embodiments, the process may end after step 604 is completed.

[0166] according to Figure 6As illustrated in the propagation delay determination method, the network device is not limited by whether the binary data extracted from the first data packet can be decrypted into plaintext to obtain the propagation delay. In this embodiment, the network device can extract first content reflecting the characteristics of the data packet of the target application, thereby marking the first data packet as belonging to the target application. Furthermore, the network device can determine the propagation delay of the target application based on the first content and the corresponding functional relationship between the first content and the propagation delay of the target application. Therefore, regardless of how the data packets related to the target application are encrypted, any network device on the data packet transmission path can extract the content in the above manner to obtain the propagation delay of the target application, thus providing a universal method for determining propagation delay.

[0167] This application provides a network latency determination device, the structural schematic diagram of which is shown below. Figure 7 As shown. Optionally, the device includes:

[0168] The acquisition module 701 is used to extract first content from the first data packet of the target application according to the content extraction rules corresponding to the target application. The first content includes binary data extracted from the first data packet and / or plaintext content obtained based on the binary data. The first content reflects the data packet characteristics of the target application.

[0169] The processing module 702 is configured to determine the propagation delay of the target application based on the time difference between the first moment when the network device processes the first data packet and the second moment when it processes the second data packet of the target application, if the network device stores the second content of the target application and the second content satisfies the pairing condition, wherein the second content is extracted from the second data packet according to the content extraction rule, and the pairing condition between the second content and the first content indicates that the first data packet is a response data packet corresponding to the second data packet.

[0170] Optionally, before extracting the first content from the first data packet of the target application, the acquisition module 701 is further configured to:

[0171] Obtain the data stream to be processed from the target application; select the first data packet from the data stream to be processed, wherein the length of the first data packet is within a preset length range, and / or the first data packet contains a preset string within a preset position range.

[0172] Optionally, the pairing condition between the second content and the first content is determined based on at least one of the following:

[0173] The first value in the first content and the second value in the second content are calculated according to a preset operation and the result belongs to a preset value range; the first value and the second value conform to a preset correspondence; the first transmission direction in the first content is opposite to the second transmission direction in the second content, and the order of the first moment and the second moment is a preset order; the time difference between the first moment and the second moment belongs to a preset time difference range.

[0174] Optionally, the processing module 702 is further configured to:

[0175] The first delay of the target application is determined based on the time difference between the third time when the third data packet is processed and the fourth time when the fourth data packet of the target application is processed before the third time. The third data packet is the response data packet corresponding to the fourth data packet.

[0176] The processing module 702 is specifically used for:

[0177] The second delay of the target application is determined based on the time difference between the first time point and the second time point; the propagation delay of the target application is determined based on the first delay and the second delay.

[0178] Optionally, the processing module 702 is further configured to:

[0179] If the network device does not cache the second content of the target application, or if the second content does not meet the pairing condition with the first content, then the first content is stored; when the first content meets a preset condition, the first content is deleted, the preset condition including: the duration of storage of the first content is greater than or equal to a preset duration, and / or, the network device extracts a fifth content that is paired with the first content from a fifth data packet within the preset duration, and / or, the first content is the earliest content extracted from all the content currently cached by the network device, and the data volume of all the content cached by the network device is greater than or equal to a preset value, and any content cached by the network device is extracted by the network device from the acquired data packet.

[0180] Optionally, the first data packet is a data packet sent by the peer device to the network device, and the second data packet is a data packet sent by the network device to the peer device, wherein the peer device is an application client or an application server.

[0181] Optionally, when the peer device is an application client, the propagation delay is the user latency of the target application; or, when the peer device is an application server, the propagation delay is the network latency of the target application.

[0182] Optionally, the processing module 702 is further configured to: if the propagation delay meets the preset delay optimization conditions, increase the priority of the data packet forwarding of the target application, and / or update the data packet forwarding port corresponding to the target application, wherein the network quality of the transmission line corresponding to the updated port is higher than the network quality of the transmission line corresponding to the port before the update.

[0183] This application also provides another network latency determination device, which can also employ... Figure 7 The structure shown.

[0184] Optionally, the device includes:

[0185] The acquisition module 701 is used to extract first content from the first data packet of the target application according to the content extraction rules corresponding to the target application. The first content includes binary data extracted from the first data packet and / or plaintext content obtained based on the binary data. The first content reflects the data packet characteristics of the target application.

[0186] The processing module 702 is configured to determine the propagation delay of the target application based on the first content and according to the functional relationship between the first content and the propagation delay of the target application.

[0187] Optionally, before extracting the first content from the first data packet of the target application, the acquisition module 701 is further configured to:

[0188] Obtain the data stream to be processed from the target application; select the first data packet from the data stream to be processed, wherein the length of the first data packet is within a preset length range, and / or the first data packet contains a preset string within a preset position range.

[0189] Optionally, the first data packet is a data packet sent by the peer device to the network device, and the second data packet is a data packet sent by the network device to the peer device, wherein the peer device is an application client or an application server.

[0190] Optionally, when the peer device is an application client, the propagation delay is the user delay of the target application; when the peer device is an application server, the propagation delay is the network delay of the target application.

[0191] Optionally, the processing module 702 is further configured to: if the propagation delay meets the preset delay optimization conditions, increase the priority of the data packet forwarding of the target application, and / or update the data packet forwarding port corresponding to the target application, wherein the network quality of the transmission line corresponding to the updated port is higher than the network quality of the transmission line corresponding to the port before the update.

[0192] This application also provides an electronic device that can have the following features: Figure 8 The structure shown indicates that the electronic device can be a computer device, or a chip or chip system that enables the computer device to implement the above methods.

[0193] like Figure 8 The illustrated electronic device may include at least one processor 801, which is coupled to a memory to read and execute instructions in the memory to implement the propagation delay determination method provided in this application embodiment. Optionally, the electronic device may also include a communication interface 802 for supporting the electronic device in receiving or sending signaling or data. The communication interface 802 in the electronic device can be used to interact with other electronic devices. The processor 801 can be used to enable the electronic device to perform actions such as... Figure 5 or Figure 6 The steps in the method shown. Optionally, the electronic device may further include a memory 803 storing computer instructions. The memory 803 may be coupled to a processor 801 and / or a communication interface 802 to support the processor 801 in calling the computer instructions in the memory 803 to implement, for example... Figure 5 or Figure 6 The steps in the method shown; in addition, the memory 803 can also be used to store data involved in the method embodiments of this application, for example, to store data and instructions necessary for the communication interface 802 to realize interaction, and / or to store configuration information necessary for the electronic device to execute the method described in the embodiments of this application.

[0194] This application also provides a computer-readable storage medium storing computer instructions. When these computer instructions are invoked and executed by a computer, the computer can perform the methods involved in any possible design of the above-described method embodiments. In this application, the computer-readable storage medium is not limited; for example, it can be RAM (random-access memory), ROM (read-only memory), etc.

[0195] This application also provides a chip, which may include a processor coupled to a memory for reading and executing software programs stored in the memory to perform the methods involved in any possible implementation of the above method embodiments. Here, "coupling" means that two components are directly or indirectly combined with each other, and such combination may be fixed or movable.

[0196] This application also provides a computer program product that, when read and executed by a computer, causes the computer to perform the methods involved in any possible implementation of the above method embodiments.

[0197] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented in software, implementation can be entirely or partially in the form of computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0198] The steps of the methods or algorithms described in the embodiments of this application can be directly embedded in hardware, software units executed by a processor, or a combination of both. The software units can be stored in RAM, flash memory, ROM, EPROM, EEPROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from and write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and storage medium can be housed in an ASIC, which can be housed in a terminal device. Optionally, the processor and storage medium can also be housed in different components within the terminal device.

[0199] These computer instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

Claims

1. A method for determining propagation delay, characterized in that, include: The network device extracts first content from the first data packet of the target application according to the content extraction rules corresponding to the target application. The first content includes binary data extracted from the first data packet and / or plaintext content obtained based on the binary data. The first content reflects the data packet characteristics of the target application. If the network device stores the second content of the target application and the second content satisfies the pairing condition with the first content, then the propagation delay of the target application is determined based on the time difference between the first moment when the network device processes the first data packet and the second moment when it processes the second data packet of the target application. The second content is extracted from the second data packet according to the content extraction rule. The fact that the second content satisfies the pairing condition with the first content indicates that the first data packet is the response data packet corresponding to the second data packet. Before the network device extracts the first content from the first data packet of the target application according to the content extraction rules corresponding to the target application, it also includes: The network device acquires the data stream to be processed from the target application; The network device selects the first data packet from the data stream to be processed, wherein the length of the first data packet is within a preset length range, and / or the first data packet contains a preset string within a preset position range.

2. The method as described in claim 1, characterized in that, The second content and the first content satisfy the pairing condition based on at least one of the following: The result of the calculation of the first value in the first content and the second value in the second content according to the preset calculation belongs to the preset value range; The first value and the second value conform to a preset correspondence; The first transmission direction in the first content is opposite to the second transmission direction in the second content, and the order of the first moment and the second moment is a preset order; The time difference between the first moment and the second moment falls within a preset time difference range.

3. The method as described in claim 1, characterized in that, The method further includes: The network device determines the first delay of the target application based on the time difference between the third time when the third data packet is processed and the fourth time when the fourth data packet of the target application is processed before the third time, wherein the third data packet is the response data packet corresponding to the fourth data packet; Determining the propagation delay of the target application based on the time difference between the first moment when the network device processes the first data packet and the second moment when it processes the second data packet of the target application includes: The second delay of the target application is determined based on the time difference between the first time point and the second time point; The propagation delay of the target application is determined based on the first delay and the second delay.

4. The method as described in claim 1, characterized in that, Also includes: If the network device does not cache the second content of the target application, or if the second content does not meet the pairing condition with the first content, then the network device stores the first content; When the first content meets preset conditions, the network device deletes the first content. The preset conditions include: the duration of storage of the first content is greater than or equal to a preset duration, and / or, the network device extracts a fifth content paired with the first content from a fifth data packet within the preset duration, and / or, the first content is the earliest content extracted from all the content currently cached by the network device, and the data volume of all the content cached by the network device is greater than or equal to a preset value, and any content cached by the network device is extracted by the network device from the acquired data packet.

5. The method as described in claim 1, characterized in that, The first data packet is a data packet sent by the peer device to the network device, and the second data packet is a data packet sent by the network device to the peer device, wherein the peer device is an application client or an application server.

6. The method as described in claim 5, characterized in that, When the peer device is an application client, the propagation delay is the user latency of the target application; or, when the peer device is an application server, the propagation delay is the network latency of the target application.

7. The method according to any one of claims 1 to 6, characterized in that, Also includes: If the propagation delay meets the preset delay optimization conditions, the network device increases the priority of packet forwarding for the target application, and / or updates the packet forwarding port corresponding to the target application, wherein the network quality of the transmission line corresponding to the updated port is higher than the network quality of the transmission line corresponding to the port before the update.

8. A method for determining propagation delay, characterized in that, include: The network device extracts first content from the first data packet of the target application according to the content extraction rules corresponding to the target application. The first content includes binary data extracted from the first data packet and / or plaintext content obtained based on the binary data. The first content reflects the data packet characteristics of the target application. The network device determines the propagation delay of the target application based on the first content and according to the functional relationship between the first content and the propagation delay of the target application. Before the network device extracts the first content from the first data packet of the target application according to the content extraction rules corresponding to the target application, it also includes: The network device acquires the data stream to be processed from the target application; The network device selects the first data packet from the data stream to be processed, wherein the length of the first data packet is within a preset length range, and / or the first data packet contains a preset string within a preset position range.

9. A propagation delay determination device, characterized in that, include: The acquisition module is used to extract first content from the first data packet of the target application according to the content extraction rules corresponding to the target application. The first content includes binary data extracted from the first data packet and / or plaintext content obtained based on the binary data. The first content reflects the data packet characteristics of the target application. The processing module is configured to determine the propagation delay of the target application based on the time difference between the first moment when the network device processes the first data packet and the second moment when it processes the second data packet of the target application, if the network device stores the second content of the target application and the second content satisfies the pairing condition with the first content. The second content is extracted from the second data packet according to the content extraction rule. The pairing condition between the second content and the first content indicates that the first data packet is the response data packet corresponding to the second data packet. Before extracting the first content from the first data packet of the target application, the acquisition module is further configured to: Obtain the data stream to be processed from the target application; The first data packet is selected from the data stream to be processed, wherein the length of the first data packet is within a preset length range, and / or the first data packet contains a preset string within a preset position range.

10. The apparatus as claimed in claim 9, characterized in that, The second content and the first content satisfy the pairing condition based on at least one of the following: The result of the calculation of the first value in the first content and the second value in the second content according to the preset calculation belongs to the preset value range; The first value and the second value conform to a preset correspondence; The first transmission direction in the first content is opposite to the second transmission direction in the second content, and the order of the first moment and the second moment is a preset order; The time difference between the first moment and the second moment falls within a preset time difference range.

11. The apparatus as claimed in claim 9, characterized in that, The processing module is also used for: The first delay of the target application is determined based on the time difference between the third time when the third data packet is processed and the fourth time when the fourth data packet of the target application is processed before the third time. The third data packet is the response data packet corresponding to the fourth data packet. The processing module is specifically used for: The second delay of the target application is determined based on the time difference between the first time point and the second time point; The propagation delay of the target application is determined based on the first delay and the second delay.

12. The apparatus as claimed in claim 9, characterized in that, The processing module is also used for: If the network device does not cache the second content of the target application, or if the second content does not meet the pairing condition with the first content, then the first content is stored. When the first content meets preset conditions, the first content is deleted. The preset conditions include: the duration of storage of the first content is greater than or equal to a preset duration, and / or, the network device extracts a fifth content paired with the first content from the fifth data packet within the preset duration, and / or, the first content is the earliest content extracted from all the content currently cached by the network device, and the data volume of all the content cached by the network device is greater than or equal to a preset value, and any content cached by the network device is extracted by the network device from the acquired data packet.

13. The apparatus as claimed in claim 9, characterized in that, The first data packet is a data packet sent by the peer device to the network device, and the second data packet is a data packet sent by the network device to the peer device, wherein the peer device is an application client or an application server.

14. The apparatus as claimed in claim 13, characterized in that, When the peer device is an application client, the propagation delay is the user latency of the target application; or, when the peer device is an application server, the propagation delay is the network latency of the target application.

15. The apparatus according to any one of claims 9 to 14, characterized in that, The processing module is also used for: If the propagation delay meets the preset delay optimization conditions, the priority of packet forwarding for the target application is increased, and / or the packet forwarding port corresponding to the target application is updated, and the network quality of the transmission line corresponding to the updated port is higher than the network quality of the transmission line corresponding to the port before the update.

16. A propagation delay determination device, characterized in that, include: The acquisition module is used to extract first content from the first data packet of the target application according to the content extraction rules corresponding to the target application. The first content includes binary data extracted from the first data packet and / or plaintext content obtained based on the binary data. The first content reflects the data packet characteristics of the target application. The processing module is configured to determine the propagation delay of the target application based on the first content and according to the functional relationship between the first content and the propagation delay of the target application. Before the acquisition module extracts the first content from the first data packet of the target application according to the content extraction rules corresponding to the target application, it is further configured to: Obtain the data stream to be processed from the target application; The first data packet is selected from the data stream to be processed, wherein the length of the first data packet is within a preset length range, and / or the first data packet contains a preset string within a preset position range.

17. An electronic device, characterized in that, The electronic device includes: one or more processors; one or more memories; wherein the one or more memories store one or more computer instructions that, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 8.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Network time delay measurement method and device, electronic equipment and storage medium

    CN111181798A

  • Signature-Based Latency Extraction Systems And Related Methods For Network Packet Communications

    US20160323166A1