Time delay statistics method and system, storage medium, and electronic device in interactive system
By recording timestamps in an interactive system and calculating multiple sets of latency data, the problem of low efficiency in latency data statistics in existing technologies is solved, and more efficient latency data statistics are achieved.
Patent Information
- Application Number
- CN202211472680.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-11-17
AI Technical Summary
In existing technologies, the efficiency of latency data statistics during interactive device testing is low, resulting in a waste of time and manpower.
By recording timestamps in an interactive system, multiple sets of delay data can be calculated using these timestamps for statistical analysis, thereby improving the efficiency of delay data statistics.
Multiple sets of latency data were obtained during a single interactive data transmission process, improving the efficiency of latency data statistics during interactive device testing.
Smart Images

Figure CN115883420B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer application technology and relates to a delay statistics method and system, a storage medium, and an electronic device in an interactive system. Background Art
[0002] With the great progress of wireless network and communication technology, users' requirements for wireless network have been raised accordingly. For example, in real-time video, virtual reality, online live broadcast, online shopping, online games and other services, the packet delay in these scenarios is relatively sensitive. During the network transmission process, the transmission efficiency will fluctuate due to the influence of network hardware equipment performance, network transmission performance, network jitter, and packet size. The transmission time will also fluctuate.
[0003] The application running process is affected by the hardware performance of the running environment and the complexity of the program execution method. The running time varies. During the application development process, it is necessary to continuously debug and optimize to adjust the running efficiency to the highest level. During the deployment process, it is necessary to continuously debug the appropriate hardware to match the minimum configuration requirements, which is helpful for calculating the deployment cost during the procurement process. In the prior art, during the debugging of the operation between interactive hardware devices, the execution of different running steps of the hardware devices is often counted separately, for example, the transmission time from device one to device two is counted, and the encryption time of device two for the data packet is counted. In this way, the separate test statistics of a large number of running steps consume a lot of time and manpower costs.
[0004] Therefore, there is currently a lack of a delay statistics method in an interactive system that can improve the efficiency of delay data statistics during the interactive device testing process. Summary of the invention
[0005] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0006] In order to solve the problems existing in the related art, the embodiments of the present disclosure provide a delay statistics method and system, a storage medium, and an electronic device in an interactive system, so as to solve the problem of low efficiency of delay data statistics in the interactive device testing process in the prior art.
[0007] In a first aspect, in some embodiments, a method for counting delay in an interactive system is provided, which is applied to a first device, and the method includes:
[0008] S110, sending a basic data packet to the second device and immediately generating a timestamp t1;
[0009] S120, receiving confirmation information from the second device, and immediately generating a timestamp t2;
[0010] S130, receiving the interactive data packet, immediately generating a timestamp t 5+m , read the interactive data packet;
[0011] S140, after reading the interactive data packet, immediately generate a timestamp t 6+m ;
[0012] S160, according to the following delay data formula, count the contents of multiple delay data and perform analysis;
[0013] The delay data formula includes:
[0014] The transmission time between devices is D1, D1 = (t2-t1) / 2;
[0015] The time difference between devices is D2, D2 = t3-t1-D1;
[0016] Basic data packet receiving time D3, D3 = t4-t3.
[0017] The first task time is D4, D4 = t5-t n4 ; .....; mth task time D m+3 , D m+3 =t 4+m -t 3+m ;
[0018] Interaction data packet transmission time D m+4 , D m+4 =t 5+m -t 4+m +D2;
[0019] Simulation Interaction Data Unit D m+5 , D m+5 =t 6+m -t 5+m .
[0020] Preferably, the first device has a video acquisition function, and obtaining a basic data packet includes:
[0021] S108, initializing the video encoder and generating a timestamp t0;
[0022] S109, collecting video and obtaining basic data packets;
[0023] The delay data formula in S160 also includes: basic data packet generation time D0, D0 = t1-t0.
[0024] Preferably, reading the interactive data packet includes:
[0025] Parse according to the agreed format to obtain the data packet after the mth task execution and the second device timestamp information set.
[0026] In a second aspect, in some embodiments, a method for statistically analyzing delay in an interactive system is provided, which is applied to a second device, and the method includes:
[0027] S210, upon receiving the beginning of the basic data packet, immediately generate a timestamp t3, and send a confirmation receipt message to device one;
[0028] S220, after receiving the complete basic data packet, immediately generate a timestamp t4;
[0029] S230, executing the task according to the basic data packet, obtaining the data packet after the task is executed, and generating a timestamp after the task is completed;
[0030] S240, repeat S230 m times, obtain the data packet after the mth execution of the task, and generate a timestamp t 4+m ; Wherein, m≥1 and m is an integer;
[0031] S250, sending the data packet after the mth task execution and the second device timestamp information set as an interactive data packet to the first device; the second device timestamp information set includes t3, t4, ..., t 4+m .
[0032] Preferably, the basic data packet is a video data packet, and the tasks are decoding video and rendering video.
[0033] Preferably, the data packet after the mth task execution and the second device timestamp information set are used as the interaction data packet, including:
[0034] Encapsulate the data packet after the mth task execution and the second device timestamp information set according to the agreed format;
[0035] The encapsulated data packet after the mth task execution and the timestamp information set of the second device are used as the interaction data packet.
[0036] In a third aspect, in some embodiments, a delay statistics system in an interactive system is disclosed, wherein the system includes a first device and a second device, wherein the first device and the second device are connected, and both the first device and the second device are used to send, receive data and perform tasks.
[0037] Preferably, the first device has a video capture function.
[0038] In a fourth aspect, in some embodiments, a computer-readable storage medium is disclosed, on which a computer program is stored, and the program is executed by a processor such as the delay statistics method in an interactive system as described above.
[0039] In the fifth aspect, in some embodiments, an electronic device is disclosed, comprising a memory and a processor, characterized in that the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor such as the above-mentioned delay statistics method in an interactive system.
[0040] The embodiments of the present disclosure provide a method and system for counting delays in an interactive system, a storage medium, and an electronic device, which can achieve the following technical effects:
[0041] The disclosed embodiment records timestamps when the hardware device executes different steps during interactive data transmission in the hardware device, and finally calculates multiple groups of delay data through the timestamps, and uses the multiple groups of delay data for statistical analysis. The disclosed embodiment only simulates interactive transmission once, and obtains multiple groups of delay data, thereby improving the efficiency of statistical delay data in the interactive device test process.
[0042] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0044] Figure 1 It is a schematic diagram of a time delay statistics system in an interactive system provided by an embodiment of the present disclosure;
[0045] Figure 2 It is a step diagram of a method for counting delays in an interactive system provided by an embodiment of the present disclosure;
[0046] Figure 3 It is a schematic diagram of a delay statistics electronic device in an interactive system provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0047] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and systems can be simplified for display.
[0048] The following description and accompanying drawings fully illustrate specific embodiments of the present invention so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The examples represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operations may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. The scope of the embodiments of the present invention includes the entire scope of the claims, and all available equivalents of the claims. In this article, each embodiment may be represented individually or generally by the term "invention", which is only for convenience, and if more than one invention is disclosed in fact, it is not intended to automatically limit the scope of the application to any single invention or inventive concept. In this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, without requiring or implying any actual relationship or order between these entities or operations. Moreover, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method or electronic device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method or electronic device. In the absence of further restrictions, the elements defined by the sentence "including a..." do not exclude the presence of other identical elements in the process, method or electronic device including the elements. The various embodiments herein are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. For the methods, products, etc. disclosed in the embodiments, since they correspond to the method part disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0049] The application running process is affected by the hardware performance of the running environment and the complexity of the program execution method. The running time varies. During the application development process, it is necessary to continuously debug and optimize to adjust the running efficiency to the highest level. During the deployment process, it is necessary to continuously debug the appropriate hardware to match the minimum configuration requirements, which is helpful for calculating the deployment cost during the procurement process. In the prior art, during the debugging of the operation between interactive hardware devices, the execution of different running steps of the hardware devices is often counted separately, for example, the transmission time from device one to device two is counted, and the encryption time of device two for the data packet is counted. In this way, the separate test statistics of a large number of running steps consume a lot of time and manpower costs.
[0050] In order to solve the problems existing in the related art, the embodiment of the present disclosure records timestamps in different steps of the hardware device when the hardware device transmits data interactively, and finally calculates multiple groups of delay data through the timestamps, and uses the multiple groups of delay data for statistical analysis. The embodiment of the present disclosure only performs one interactive data transmission and obtains multiple groups of delay data, thereby improving the efficiency of statistical delay data in the interactive device test process.
[0051] Combination Figure 1 As shown, in some embodiments, a delay statistics system in an interactive system is disclosed, the system comprising a first device and a second device, wherein the first device and the second device are connected, and both the first device and the second device are used to send, receive data and perform tasks.
[0052] It should be understood that both the first device and the second device are hardware devices that can execute program tasks. In practical applications, the connection method can be a wire connection or a wireless connection.
[0053] Preferably, the first device further includes an output unit; the output unit is used to display the delay data content and the analysis content.
[0054] It should be understood that the first device is used to display all data results. In practical applications, the output unit may be a printing device or a human-computer interaction interface.
[0055] Preferably, the first device has a video acquisition function
[0056] Figure 2 As shown, an interactive diagram of a delay statistics method in an interactive system is provided according to an embodiment of the present disclosure.
[0057] The present disclosure provides a method applied to a first device, characterized in that the method includes:
[0058] S110, obtaining a basic data packet;
[0059] S120, sending a basic data packet to the second device and immediately generating a timestamp t1;
[0060] S130, receiving confirmation information from the second device, and immediately generating a timestamp t2;
[0061] S140, receiving the interactive data packet, immediately generates a timestamp t 5+m , read the interactive data packet;
[0062] S150, after reading the interactive data packet, immediately generate a timestamp t 6+m ;
[0063] S160, calculating the delay data content according to the following delay data formula, and performing data statistical analysis;
[0064] The delay data formula includes:
[0065] The transmission time between devices is D1, D1 = (t2-t1) / 2;
[0066] The time difference between devices is D2, D2 = t3-t1-D1;
[0067] Basic data packet receiving time D3, D3 = t4-t3.
[0068] The first task time is D4, D4 = t5-t n4 ; .....; mth task time D m+3 , D m+3 =t 4+m -t 3+m ;
[0069] Interaction data packet transmission time D m+4 , D m+4 =t 5+m -t 4+m +D2;
[0070] Simulation Interaction Data Unit D m+5 , D m+5 =t 6+m -t 5+m .
[0071] Correspondingly, the method is applied to the second device, characterized in that the method includes:
[0072] S210, upon receiving the beginning of the basic data packet, immediately generate a timestamp t3, and send a confirmation receipt message to device one;
[0073] S220, after receiving the complete basic data packet, immediately generate a timestamp t4;
[0074] S230, executing the task according to the basic data packet, obtaining the data packet after the task is executed, and generating a timestamp after the task is completed;
[0075] S240, repeat S230 m times, obtain the data packet after the mth execution of the task, and generate a timestamp t 4+m ; Wherein, m≥1 and m is an integer;
[0076] S250, sending the data packet after the mth task execution and the second device timestamp information set as an interactive data packet to the first device; the second device timestamp information set includes t3, t4, ..., t 4+m .
[0077] It should be understood that the first device first sends a basic data packet to the second device. At the moment the first device sends the data packet, the first device records its own timestamp t1. The receipt of the basic data packet is a process, so it takes a period of time for the second device to receive it. Just after receiving the basic data packet, the second device generates t3. After completely receiving the basic data packet, the second device generates t4. Therefore, the basic data packet reception time D3, D3 = t4-t3.
[0078] Between two devices, the basic data packet is first sent from the first device to the second device, generating a timestamp t1. At the beginning of the second device receiving the basic data packet, a confirmation reception message is generated and sent to the first device as a signal. The first device receives the confirmation reception message from the second device and immediately generates a timestamp t2. The time process between t1 and t2 includes the moment when the first device sends the data packet to the second device, and the second device sends the confirmation reception message to the first device. The data of the confirmation reception message is too small, and it only takes a short time to receive, which can be used as a time point. The time process between t1 and t2 is the process of data going back and forth from the first device to the second device, that is, the transmission process of two instantaneous data. Therefore, the transmission time between devices is D1, D1 = (t2-t1) / 2.
[0079] It should be noted that the time of the first device and the second device at the same moment is not the same. For example, at the same moment, the first device is 12:00, while the second device is 12:05. Therefore, there is a time difference between the first device and the second device. When the second device receives the beginning of the basic data packet, a timestamp t3 is generated. Correspondingly, when the second device generates timestamp t3, the time of the first device is the sum of t1 and the transmission time D1 between one device. Therefore, the time difference between the second device and the first device, that is, the time difference D2 between the devices, D2 = t3-t1-D1.
[0080] Next, the second device receives the basic data packet and generates a timestamp t4. The basic data packet is received at time D3, D3 = t4-t3. On the second device, m tasks are executed on the base data packet. Here, the number and content of the tasks are not particularly limited and are determined according to actual requirements. For example, the execution tasks are compression and encryption. After each task is executed, a timestamp is generated. Then, the data packet after the mth execution of the task and the timestamp information set of the second device are sent to the first device as an interactive data packet; the timestamp information set of the second device includes t3, t4..., t 4+m The time of each task is the end time of the task minus the end time of the previous task. Therefore, the task calculation is expressed as the first task time D4, D4 = t5-t n4 ; .....; mth task time D m+3 , D m+3 =t 4+m -t 3+m .
[0081] Then, after receiving the complete interactive data packet, the first device generates a timestamp t 5+m The time from when the second device sends the interactive data packet to when the first device receives the complete interactive data packet is, that is, the interactive data packet transmission time D m+4 , D m+4 =t n+3+m -t n+2+m +D2. The first device reads the interactive data packet. After completing the reading, it generates a timestamp t 6+m Therefore, the simulated interaction data unit D m+5 , D m+5 =t 6+m -t 5+m .
[0082] Finally, the delay data content is calculated and statistical analysis is performed.
[0083] It should be understood that the interactive system statistical delay is mainly used to analyze the delay of the program running interactive process. Since interaction is a continuous process, real-time monitoring and analysis often use summary statistics. Generally, a statistical sampling time is set. This process averages all results within the sampling time or takes the maximum value for calculation.
[0084] In an optimized embodiment, the method is applied to a first device, wherein the first device has a video acquisition function; obtaining a basic data packet includes:
[0085] S108, initializing the video encoder and generating a timestamp t0;
[0086] S109, collecting video and obtaining basic data packets;
[0087] The delay data formula in S160 also includes: basic data packet generation time D0, D0 = t1-t0.
[0088] Correspondingly, in the application on the second device, the basic data packet is a video data packet, and the task is decoding video and rendering video.
[0089] It should be understood that in the embodiment of the present disclosure, after the first device captures the video, it sends it to the second device for decoding and rendering, and then sends the video with the task of decoding and rendering back to the first device. After the first device reads the data, it performs statistical analysis.
[0090] In an optimized embodiment, the application is applied in the first device to read the interactive data packet, including: parsing according to the agreed format to obtain the data packet after the mth task execution and the second device timestamp information set.
[0091] Correspondingly, the application on the second device uses the data packet after the mth task execution and the timestamp information set of the second device as the interaction data packet, including:
[0092] Encapsulate the data packet after the mth task execution and the second device timestamp information set according to the agreed format;
[0093] The encapsulated data packet after the mth task execution and the timestamp information set of the second device are used as the interaction data packet.
[0094] It should be understood that the second device first encapsulates the data packet and the second device timestamp information set after executing the task for the mth time according to the agreed format and sends them to the first device, and the first device first parses them to obtain the data.
[0095] A specific embodiment is: due to the influence of network fluctuations in network transmission, the duration of the interaction will fluctuate. The interaction of interactive devices is affected by the performance of the simulation program and the frequency of interactive data, and the duration of the interaction varies, so it is necessary to conduct statistical analysis on it.
[0096] Device 1 initializes the video encoder, generates timestamp t0, captures the screen of device 1, encodes the screen, and records timestamp t1. This process counts the screen capture process and video encoding process as a set of time-consuming calculation units. Since screen capture and video encoding are affected by screen resolution and hardware performance, the time taken is not fixed, so it is necessary to perform statistical analysis.
[0097] Device 1 sends a video data packet to device 2. Device 2 receives the video data packet and generates a timestamp t3. It immediately replies to device 1 with a data packet. Device 1 receives the data packet and records the timestamp t2. This process counts the video data packet transmission process as a set of time-consuming calculation units. To ensure the image quality, the video data is usually large, the transmission time varies, and the time duration will also fluctuate due to network transmission fluctuations. It is necessary to perform statistical analysis.
[0098] Device 2 receives the complete video data and records the timestamp t4. It decodes the video, renders the video screen, and records the timestamp t5. Device 2 encapsulates the recorded timestamps t4 and t5 and the interactive data as an interactive data packet in the agreed format and sends it to Device 1. The video data decoding and the rendered screen are considered as a set of time-consuming calculation units. Since the speed of video decoding and rendering is related to hardware performance and the time taken varies, it is necessary to perform statistical analysis. It should be understood that decoding and rendering are one execution task, not two execution tasks, so the process is counted as one time-consuming calculation unit.
[0099] Device 1 receives the interaction data and records the timestamp t6. Device 1 reads the interaction data and records the timestamp t7. This process parses the interaction data packet according to the agreed format, reads the interaction data and the timestamp recorded by device 2 as a set of time-consuming calculation units.
[0100] The final interaction delay is obtained by performing statistical calculation based on all the above timestamp information. In this process, all the statistical timestamps are analyzed and calculated;
[0101] The time-consuming calculation unit is calculated as follows:
[0102] Video encoding duration: D1 = t1-t0;
[0103] Video data transmission duration: D2 = (t2-t1) / 2;
[0104] The time difference between device 2 and device 1: D3 = t3-t2-D2;
[0105] Device 2 video receiving time: D4 = t4-t3;
[0106] Video decoding and rendering time: D5 = t5-t4;
[0107] Interactive data transmission duration: D6 = t6-t5+D3;
[0108] Simulation interaction duration: D7 = t7-t6.
[0109] The embodiments of the present disclosure have the following advantages:
[0110] Each key step has a recorded timestamp, which can facilitate the calculation of the time taken for a certain step or certain steps;
[0111] A more reliable delay can be calculated without time synchronization between the two devices;
[0112] The delay is calculated uniformly by the device, which can effectively control the error range of the delay calculation;
[0113] The delay data is calculated, analyzed and recorded uniformly by the device, making it convenient for administrators to view.
[0114] It should be understood that video encoding has a frame rate attribute setting, which represents the number of video frame data in one second. Each video data packet transmission requires a time interval to balance the smoothness of the video picture.
[0115] Combination Figure 3 As shown, the embodiment of the present disclosure provides an electronic device for delay statistics in an interactive system, including a processor 30 and a memory 31. Optionally, the electronic device may also include a communication interface 32 and a bus 33. The processor 30, the communication interface 32, and the memory 31 may communicate with each other through the bus 33. The communication interface 32 may be used for information transmission. The processor 30 may call the logic instructions in the memory 31 to execute the delay statistics method in the interactive system of the above embodiment.
[0116] An embodiment of the present disclosure provides a storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the delay statistics method in the interactive system.
[0117] The above-mentioned storage medium may be a transient computer-readable storage medium or a non-transient computer-readable storage medium. Non-transient storage media include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes, and may also be a transient storage medium.
[0118] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, individual components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and" as used in this application refers to any and all possible matches of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and "comprising" refer to the presence of stated features, wholes, steps, operations, elements and components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and groups of these. In the absence of further restrictions, the elements defined by the sentence "including a ..." do not exclude the existence of other identical elements in the process, method or electronic device including the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same or similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0119] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, systems and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0120] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to the embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in an order different from that disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each box in the block diagram and the flowchart, and the matching of the boxes in the block diagram and the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with the matching of dedicated hardware and computer instructions.
Claims
1. A method for statistical delay in interactive systems. It is characterized in that The delay statistics method in the interactive system applied to the first device includes: S110, obtaining a basic data packet; S120, sending a basic data packet to the second device, and immediately generating a timestamp t 1 ; S130, receiving the confirmation information from the second device, and immediately generating a timestamp t 2 ; S140, receiving the interactive data packet, immediately generates a timestamp t 5+m , read the interactive data packet; S150, after reading the interactive data packet, immediately generate a timestamp t 6+m ; S160, calculating the delay data content according to the following delay data formula, and performing data statistical analysis; The delay data formula includes: Transmission time between devices D 1 , D 1 =(t 2 -t 1 ) / 2; Time difference between devices D 2 , D 2 =t 3 -t 1 -D 1 ; Basic data packet receiving time D 3 , D 3 =t 4 -t 3 ; First task time D 4 , D 4 =t 5 -t 4 ; .....; mth task time D m+3 , D m+3 =t 4+m -t 3+m ; Interaction data packet transmission time D m+4 , D m+4 =t 5+m -t 4+m +D 2 ; Simulation Interaction Data Unit D m+5 , D m+5 =t 6+m -t 5+m ; The delay statistics method in the interactive system applied to the second device includes: S210, receiving the beginning of the basic data packet, immediately generating a timestamp t 3 , and sends a confirmation message of receipt to the first device; S220, after receiving the complete basic data packet, immediately generate a timestamp t 4 ; S230, executing the task according to the basic data packet, obtaining the data packet after the task is executed, and generating a timestamp after the task is completed; S240, repeat S230 m times, obtain the data packet after the mth execution of the task, and generate a timestamp t 4+m ; Wherein, m≥1 and m is an integer; S250, sending the data packet after the mth task execution and the second device timestamp information set as an interactive data packet to the first device; the second device timestamp information set includes t 3 ,t 4 ......、t 4+m ; The first device has a video acquisition function; Get the basic data package, including: S108, initialize the video encoder and generate a timestamp t 0 ; S109, collecting video and obtaining basic data packets; The delay data formula in S160 also includes: the basic data packet generation time D 0 , D 0 =t 1 -t 0 .
2. The method according to claim 1, It is characterized in that Read interactive data packets, including: Parse according to the agreed format to obtain the data packet after the mth task execution and the second device timestamp information set.
3. The method according to claim 1, It is characterized in that The basic data packet is a video data packet, and the tasks are decoding video and rendering video.
4. The method according to claim 1, It is characterized in that The data packet after the mth task execution and the timestamp information set of the second device are used as the interaction data packet, including: Encapsulate the data packet after the mth task execution and the second device timestamp information set according to the agreed format; The encapsulated data packet after the mth task execution and the timestamp information set of the second device are used as the interaction data packet.
5. A time delay statistics system in an interactive system, It is characterized in that The system comprises a first device and a second device, and the system is applied to the delay statistics method in an interactive system as claimed in any one of claims 1 to 4.
6. The system according to claim 5, It is characterized in that The first device has a video acquisition function.
7. A computer-readable storage medium having computer program instructions stored thereon, It is characterized in that The computer program instructions implement the method of any one of claims 1 to 4 when executed by a processor.
8. An electronic device comprising a memory and a processor, It is characterized in that The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 4.
