CN-122001791-A - Round trip delay determining method, round trip delay determining device, electronic equipment and storage medium
Abstract
The application relates to the technical field of Internet and provides a round trip delay determining method, a round trip delay determining device, electronic equipment and a storage medium, wherein the method comprises the steps of sequentially extracting characteristic value heads, receiving and transmitting packet flag bits, check codes and characteristic value tails corresponding to all sampled UDP messages in a game process; the method comprises the steps of determining game UDP messages meeting characteristic value rules from all sampled UDP messages based on characteristic value heads and characteristic value tails corresponding to the sampled UDP messages, wherein the characteristic value rules are used for representing a structuring mode corresponding to characteristic value fields in data parts of the game UDP messages, dividing all the game UDP messages into client-side sending packets and server-side returning packets based on receiving packet zone bits or port orientations corresponding to the game UDP messages, and determining optimized round-trip delay based on check codes of the client-side sending packets and the server-side returning packets. The embodiment of the application can calculate and optimize the round trip delay without depending on the cooperation of a server side and the data content decryption.
Inventors
- WANG HAOYU
- QIN YUE
- WANG XIAOYU
- YAN JUNJIE
- MA LIU
Assignees
- 中国移动通信集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260122
Claims (15)
- 1. A method for determining round trip delay, comprising: Sequentially extracting the characteristic value heads, the receiving and transmitting packet zone bits, the check codes and the characteristic value tails which correspond to all the sampling UDP messages in the game process; Determining a game UDP message meeting a characteristic value rule from all the sampled UDP messages based on a characteristic value head and a characteristic value tail corresponding to each sampled UDP message, wherein the characteristic value rule is used for representing a structuring mode corresponding to a characteristic value field in a data part of the game UDP message; Dividing all the game UDP messages into client-side packet sending and server-side packet returning based on the corresponding packet receiving and sending zone bit or port pointing of each game UDP message; and determining to optimize round trip delay based on the check codes of the client sending packet and the server returning packet.
- 2. The round trip delay determining method of claim 1, wherein the determining the optimized round trip delay based on the check codes of the client packet and the server packet comprises: Matching the check codes of the client sending package and the server returning package to obtain a plurality of matched data pairs, wherein each matched data pair comprises the client sending package and the server returning package with the same check code; Determining a single round trip delay corresponding to each matched data pair based on the packet receiving time stamp and the packet sending time stamp corresponding to each matched data pair; And determining the optimized round trip delay based on the number of the matched data pairs, all the single round trip delays and the somatosensory delay of the game picture with the same time period as each single round trip delay.
- 3. The round trip delay determining method of claim 1, wherein extracting characteristic value headers corresponding to all sampled UDP messages in a game process comprises: s11, determining a first initial matching value corresponding to all the sampled UDP messages based on the initial characteristic value head of each sampled UDP message, the preset game characteristic value head and all the sampled UDP messages; s12, increasing the length of the initial characteristic value head to obtain a first characteristic value head; S13, determining first matching values corresponding to all sampled UDP messages based on the first characteristic value head, the preset game characteristic value head and all sampled UDP messages; S14, determining the first characteristic value head as a new initial characteristic value head when the first matching value is equal to the first initial matching value, repeatedly executing the step S12 and the step S13 until the first matching value is equal to the first initial matching value, stopping the process until the first matching value is equal to the first initial matching value, and determining the finally obtained initial characteristic value head as the characteristic value head corresponding to all the sampled UDP messages; and S15, determining the initial characteristic value head as the characteristic value head corresponding to all the sampled UDP messages under the condition that the first matching value is not equal to the first initial matching value.
- 4. The round trip delay determination method of claim 1, wherein the transmit-receive packet flag bit comprises a transmit packet flag bit and a receive packet flag bit; extracting the receiving and transmitting packet zone bits corresponding to all sampled UDP messages in the game process comprises the following steps: Based on port pointing, dividing all sampled UDP messages into a client-side packet sending message and a server-side packet returning message, and eliminating the length bytes of the characteristic value head in the client-side packet sending message and the server-side packet returning message; Determining a packet sending matching result based on first zone bits corresponding to different packet sending offset values in the client packet sending messages, preset packet sending zone bits, all the client packet sending messages and a first preset threshold value; under the condition that the packet sending matching result is that the packet sending matching is successful, determining a packet sending zone bit, and determining a packet receiving matching result based on the position of the packet sending zone bit, a preset packet receiving zone bit, all server side packet returning messages and the first preset threshold value; and determining a packet receiving zone bit under the condition that the packet receiving matching result is that the packet receiving matching is successful.
- 5. The round trip delay determining method of claim 4, wherein determining the packet matching result based on the first flag bit, the preset packet flag bit, all client packet messages and the first preset threshold value corresponding to different packet offsets in each of the client packet messages comprises: determining second initial matching values corresponding to all client-side packet sending messages based on a first zone bit corresponding to a first packet sending offset in each client-side packet sending message, a preset packet sending zone bit and all client-side packet sending messages; Under the condition that the second initial matching value is smaller than the first preset threshold value, the first packet sending offset is increased to obtain a second packet sending offset; determining a second flag bit corresponding to the second packet sending offset as a new first flag bit, and repeatedly executing the step of determining a second initial matching value until the packet sending matching result is determined to be a packet sending matching failure under the condition that the second packet sending offset is larger than the length of each client packet sending message; and under the condition that the second initial matching value is larger than or equal to the first preset threshold value, determining that the packet matching result is successful.
- 6. The round trip delay determining method according to claim 4, wherein determining the packet reception matching result based on the position of the packet transmission flag bit, a preset packet reception flag bit, all server side packet return messages and the first preset threshold value includes: determining a third zone bit which is positioned at the same position as the packet sending zone bit in each service side packet returning message; Determining a third initial matching value corresponding to the server-side packet returning message based on each third flag bit, the preset packet receiving flag bit and all the server-side packet returning messages; Under the condition that the third initial matching value is larger than the first preset threshold value, determining that the packet receiving matching result is successful in packet receiving matching; And under the condition that the third initial matching value is smaller than or equal to the first preset threshold value, determining that the packet receiving matching result is a packet receiving matching failure.
- 7. The round trip delay determining method as defined in any one of claims 4-6, wherein extracting check codes corresponding to all sampled UDP messages during the game comprises: Determining initial offset corresponding to each of the server-side packet returning message and the client-side packet sending message based on the length of the characteristic value head and the position of the receiving-sending packet flag bit; Matching the initial packet returning check code corresponding to the initial offset in each server packet returning message with the initial packet sending check code corresponding to the initial offset in each client packet sending message to obtain a check matching result; Under the condition that the check matching result is that all initial packet returning check codes are matched with all initial packet sending check codes one by one, determining each initial packet returning check code as a check code corresponding to each server packet returning message, and determining each initial packet sending check code as a check code corresponding to each client packet sending message; And when the check matching result is that at least one pair of initial packet returning check codes and initial packet sending check codes are not matched, increasing the initial offset to obtain an incremental offset, and repeatedly executing the step of determining the check matching result until the check matching result is that all initial packet returning check codes are matched with all initial packet sending check codes one by one, determining the initial packet returning check codes obtained finally as check codes corresponding to the packet returning messages of the server, and determining the initial packet sending check codes as check codes corresponding to the packet sending messages of the client.
- 8. The round trip delay determining method of claim 1, wherein extracting characteristic value tails corresponding to all sampled UDP messages during a game comprises: determining a first initial characteristic value tail corresponding to an initial tail offset in each sampled UDP message based on the length of the characteristic value head, the position of the receiving and transmitting packet flag bit and the position of the check code; Determining a fourth initial matching value corresponding to all the sampled UDP messages based on the first initial characteristic value tail of each sampled UDP message, the preset game characteristic value tail and all the sampled UDP messages; Determining an initial offset corresponding to the characteristic value tail based on the fourth initial matching value and a second preset threshold value; determining a second initial characteristic value tail corresponding to each sampled UDP message based on the initial length and the initial offset; Determining a fifth initial matching value corresponding to all the sampled UDP messages based on a second initial characteristic value tail corresponding to each sampled UDP message, the preset game characteristic value tail, all the sampled UDP messages and the second preset threshold value; and determining the characteristic value tail based on the fifth initial matching value, the second preset threshold value and the initial offset.
- 9. The round trip delay determination method of claim 8, wherein the determining the starting offset corresponding to the characteristic tail based on the fourth initial matching value and a second preset threshold value comprises: Determining the initial tail offset as the initial offset corresponding to the characteristic value tail under the condition that the fourth initial matching value is equal to the second preset threshold value; And when the fourth initial matching value is smaller than the second preset threshold value, increasing the initial tail offset to obtain a first tail offset, determining a first characteristic value tail corresponding to the first tail offset as a new first initial characteristic value tail, determining the first tail offset as a new initial tail offset, and repeatedly executing the step of determining a fourth initial matching value until the fourth initial matching value is equal to the second preset threshold value, and determining the finally obtained initial tail offset as the initial offset corresponding to the characteristic value tail.
- 10. The round trip delay determination method of claim 8, wherein the determining the characteristic value tail based on the fifth initial match value, the second preset threshold, and the starting offset comprises: Determining the second initial characteristic value tail as the characteristic value tail under the condition that the fifth initial matching value is not equal to the second preset threshold value; And when the fifth initial matching value is equal to the second preset threshold value, increasing the initial length to obtain a first length, determining the first length as a new initial length, determining a second characteristic value tail as a new second initial characteristic value tail, and repeatedly executing the step of determining the fifth initial matching value until the fifth initial matching value is not equal to the second preset threshold value, determining the finally obtained second initial characteristic value tail as the characteristic value tail, wherein the second characteristic value tail is determined based on the first length and the initial offset.
- 11. The round trip delay determination method of claim 1, wherein the method further comprises: Determining game test IP data with optimized round trip delay greater than a delay quality difference threshold as quality difference IP; and carrying out path tracking on the quality difference IP, and determining IP analysis data corresponding to the quality difference IP.
- 12. A round trip delay determination apparatus, comprising: the extraction module is used for sequentially extracting the characteristic value heads, the receiving and transmitting packet zone bits, the check codes and the characteristic value tails which correspond to all the sampled UDP messages in the game process; the first determining module is used for determining a game UDP message meeting a characteristic value rule from all the sampled UDP messages based on the characteristic value head and the characteristic value tail corresponding to each sampled UDP message, wherein the characteristic value rule is used for representing a structuring mode corresponding to a characteristic value field in a data part of the game UDP message; The classification module is used for dividing all the game UDP messages into client-side packet sending and server-side packet returning based on the received and transmitted packet zone bit or port direction corresponding to each game UDP message; and the second determining module is used for determining the optimized round trip delay based on the check codes of the client sending packet and the server returning packet.
- 13. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that the processor implements the round trip delay determination method according to any one of claims 1 to 11 when executing the computer program.
- 14. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the round trip delay determination method according to any one of claims 1 to 11.
- 15. A computer program product comprising a computer program which, when executed by a processor, implements a round trip delay determination method as claimed in any one of claims 1 to 11.
Description
Round trip delay determining method, round trip delay determining device, electronic equipment and storage medium Technical Field The present application relates to the field of internet technologies, and in particular, to a round trip delay determining method, a round trip delay determining device, an electronic device, and a storage medium. Background In the prior art, the round trip delay is generally calculated through data packets, specifically, a plurality of data packets are defined in the game process, the data packets are corresponding to events or states in the game by utilizing specific identifiers or features in the game, and the round trip delay of the data packets is calculated by comparing the sending time and the receiving time of the data packets. However, since the data packet in the game uses UDP (User Datagram Protocol ) for data interaction, the UDP is a connectionless protocol, there is no built-in acknowledgement mechanism, and the data content is mostly encrypted, so that important information of the game cannot be obtained from the data packet. In the prior art, PING is usually used to collect round trip delay, but PING data passing through ICMP (Internet Control Message Protocol ) is easily intercepted at the gateway side, and does not really reach the server side, so that the round trip delay of UDP cannot be accurately reflected. Through the PING test of UDP, the cooperation of the server is needed, the correct data recognized by the server is not sent, and the server cannot respond, so that the method in the prior art has a large limitation. Disclosure of Invention The embodiment of the application provides a round trip delay determining method, a round trip delay determining device, electronic equipment and a storage medium, which are used for solving the defects that the calculation of round trip delay in the prior art requires server side cooperation and has larger limitation. In a first aspect, an embodiment of the present application provides a round trip delay determining method, including the following steps. Sequentially extracting the characteristic value heads, the receiving and transmitting packet zone bits, the check codes and the characteristic value tails which correspond to all the sampling UDP messages in the game process; Determining a game UDP message meeting a characteristic value rule from all the sampled UDP messages based on a characteristic value head and a characteristic value tail corresponding to each sampled UDP message, wherein the characteristic value rule is used for representing a structuring mode corresponding to a characteristic value field in a data part of the game UDP message; Dividing all the game UDP messages into client-side packet sending and server-side packet returning based on the corresponding packet receiving and sending zone bit or port pointing of each game UDP message; and determining to optimize round trip delay based on the check codes of the client sending packet and the server returning packet. In one embodiment, the determining the optimized round trip delay based on the check codes of the client packet sending and the server packet returning includes: Matching the check codes of the client sending package and the server returning package to obtain a plurality of matched data pairs, wherein each matched data pair comprises the client sending package and the server returning package with the same check code; Determining a single round trip delay corresponding to each matched data pair based on the packet receiving time stamp and the packet sending time stamp corresponding to each matched data pair; And determining the optimized round trip delay based on the number of the matched data pairs, all the single round trip delays and the somatosensory delay of the game picture with the same time period as each single round trip delay. In one embodiment, extracting the characteristic value heads corresponding to all sampled UDP messages in the game process includes: s11, determining a first initial matching value corresponding to all the sampled UDP messages based on the initial characteristic value head of each sampled UDP message, the preset game characteristic value head and all the sampled UDP messages; s12, increasing the length of the initial characteristic value head to obtain a first characteristic value head; S13, determining first matching values corresponding to all sampled UDP messages based on the first characteristic value head, the preset game characteristic value head and all sampled UDP messages; S14, determining the first characteristic value head as a new initial characteristic value head when the first matching value is equal to the first initial matching value, repeatedly executing the step S12 and the step S13 until the first matching value is equal to the first initial matching value, stopping the process until the first matching value is equal to the first initial matching value, and determining the finally obta