Simulator data playback method and device
By dynamically calculating the simulator data line length, the flexibility and synchronization problems of simulator data playback in the existing technology are solved, and automated and accurate data length updates and synchronous playback are realized, improving the efficiency and accuracy of simulator data playback sex.
Patent Information
- Application Number
- CN202410812061.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-06-21
AI Technical Summary
Existing simulator simulation data record playback methods have limitations in terms of flexibility and synchronization, making it difficult to achieve efficient data playback.
By dynamically calculating the simulation data row length, automatically determine the current data row length using the position difference of adjacent data rows, and update the total length and magnification of the playback data according to the average row length to ensure synchronous playback of the simulation data and video data.
It realizes automated and accurate data length calculation, reduces playback positioning deviation caused by manual setting of fixed length, ensures synchronous playback of simulator data and video data, and improves the robustness and user experience of the playback process.
Smart Images

Figure CN118945430A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a simulator data playback method and device. Background Art
[0002] During the simulation operation of the aviation simulator, it is very important to record the simulation data of the airborne, flight, and avionics systems, as well as the video data of the pilot's operation screen in the cockpit. These recorded simulation data and video data can be played back after the training or test, and used for detailed flight training review and flight test review analysis.
[0003] However, existing simulator simulation data recording and playback methods have limitations in terms of flexibility when recording and playing back data and the synchronization of playback data with recorded video. Therefore, how to better play back simulator data has become a problem that needs to be urgently solved in the industry. Summary of the invention
[0004] The present invention provides a simulator data playback method and device, which are used to solve the problem of how to better perform simulator data playback in the prior art.
[0005] The present invention provides a simulator data playback method, comprising:
[0006] When the simulation data in the simulator data is played back at a normal magnification, obtaining a first playback position of the simulation data in a current playback cycle;
[0007] Determine the first line length of the current line of simulation data played back in the current playback cycle according to the difference between the first playback position and the second playback position of the simulation data; wherein the second playback position is the playback position of the simulation data in the previous playback cycle of the current playback cycle;
[0008] When the first line length exceeds a first preset threshold and is less than a second preset threshold, the total playback data length and the average line length of the simulation data are updated according to the first line length; wherein the first preset threshold and the second preset threshold are associated with the average line length of the simulation data.
[0009] According to a simulator data playback method provided by the present invention, when the first line length exceeds a first preset threshold and is less than a second preset threshold, updating the total playback data length and the average line length of the simulation data according to the first line length, comprising:
[0010] Adding the first row length to the total length of the historical playback data of the simulation data to obtain the total length of the playback data after the simulation data is updated;
[0011] The normal-rate playback times of the simulation data are increased by one to obtain an updated normal-rate playback times, and the updated average row length is determined according to the ratio of the updated total length of the playback data to the updated normal-rate playback times.
[0012] According to a simulator data playback method provided by the present invention, the method further comprises:
[0013] When the simulator data is played back at a single rate or multiple rates, obtaining a current video playback time of the video data in the simulator data;
[0014] When the current video playback time is obtained, the start position of the current playback data is determined based on the product of the current video playback time, the data playback frequency and the average line length.
[0015] According to a simulator data playback method provided by the present invention, after the step of obtaining the current video playback time of the video data in the simulator data, the method further comprises:
[0016] In the case that the current video playback time is not obtained, the number of simulation data items that should be played back in the current playback cycle is calculated according to the data playback frequency to ensure that the simulation data and the video data are played back synchronously.
[0017] According to a simulator data playback method provided by the present invention, the method further comprises:
[0018] In the case where the simulator data is played back for a specified time jump, the start position of the current playback data is determined based on the product of the current video playback time, the data playback frequency and the average line length.
[0019] According to a simulator data playback method provided by the present invention, the method further comprises:
[0020] Compiling a description file for recording playback data, wherein the description file includes at least one of the following: a configuration item name, a search number, a playback identifier, a theme, a variable, a unit, and a range;
[0021] When receiving the simulator data recording instruction, a dat file named with date and time is created based on the description file, and the simulation data updated by the simulator is written into the dat file one by one at a fixed frequency to complete the recording of the simulation data.
[0022] The present invention also provides a simulator data playback device, comprising:
[0023] An acquisition module, configured to acquire a first playback position of the simulation data in a current playback cycle when the simulation data in the simulator data is played back at a normal magnification;
[0024] A determination module, configured to determine the length of a first line of the current line of simulation data played back in the current playback cycle according to a difference between a first playback position and a second playback position of the simulation data; wherein the second playback position is a playback position of the simulation data of a previous playback cycle of the current playback cycle;
[0025] An updating module is used to update the total length of playback data and the average line length of the simulation data according to the first line length when the first line length exceeds a first preset threshold and is less than a second preset threshold; wherein the first preset threshold and the second preset threshold are associated with the average line length of the simulation data.
[0026] According to a simulator data playback device provided by the present invention, the device is also used for:
[0027] Adding the first row length to the total length of the historical playback data of the simulation data to obtain the total length of the playback data after the simulation data is updated;
[0028] The normal-rate playback times of the simulation data are increased by one to obtain an updated normal-rate playback times, and the updated average row length is determined according to the ratio of the updated total length of the playback data to the updated normal-rate playback times.
[0029] According to a simulator data playback device provided by the present invention, the device is also used for:
[0030] When the simulator data is played back at a single rate or multiple rates, obtaining a current video playback time of the video data in the simulator data;
[0031] When the current video playback time is obtained, the start position of the current playback data is determined based on the product of the current video playback time, the data playback frequency and the average line length.
[0032] According to a simulator data playback device provided by the present invention, the device is also used for:
[0033] In the case that the current video playback time is not obtained, the number of simulation data items that should be played back in the current playback cycle is calculated according to the data playback frequency to ensure that the simulation data and the video data are played back synchronously.
[0034] According to a simulator data playback device provided by the present invention, the device is also used for:
[0035] In the case where the simulator data is played back for a specified time jump, the start position of the current playback data is determined based on the product of the current video playback time, the data playback frequency and the average line length.
[0036] According to a simulator data playback device provided by the present invention, the device is also used for:
[0037] Compiling a description file for recording playback data, wherein the description file includes at least one of the following: a configuration item name, a search number, a playback identifier, a theme, a variable, a unit, and a range;
[0038] When receiving the simulator data recording instruction, a dat file named with date and time is created based on the description file, and the simulation data updated by the simulator is written into the dat file one by one at a fixed frequency to complete the recording of the simulation data.
[0039] The present invention also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the simulator data playback method described in any one of the above methods is implemented.
[0040] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the simulator data playback method as described in any one of the above is implemented.
[0041] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the simulator data playback method as described above is implemented.
[0042] The simulator data playback method and device provided by the present invention adopt a dynamic calculation method for the row length of the recorded data, and automatically determine the length of the current data row by calculating the position difference of adjacent data rows. It can also count the average length of the replayed data, and provide an automated and accurate data length calculation benchmark for operations such as double-speed playback, fast forward or backward. The solution of the embodiment of the present application eliminates the steps of manually setting a fixed data length and recompiling the program, while reducing the playback positioning deviation caused by the fixed length setting, and ensuring the synchronization of the playback of simulation data and video data in the simulator data. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 A schematic diagram of a simulator data playback method flow chart provided in an embodiment of the present application;
[0045] Figure 2 A flowchart for configuring playback data provided in an embodiment of the present application;
[0046] Figure 3 A schematic diagram of the automatic calculation process of playback data row length provided in an embodiment of the present application;
[0047] Figure 4 A schematic diagram of the time synchronization correction mechanism flow provided in an embodiment of the present application;
[0048] Figure 5 A schematic diagram of the structure of a simulator data playback device provided in an embodiment of the present application;
[0049] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] Figure 1 A flow chart of a simulator data playback method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, including:
[0052] Step 110, when the simulation data in the simulator data is played back at a normal magnification, obtaining a first playback position of the simulation data in a current playback cycle;
[0053] In the embodiment of the present application, before starting playback, the system needs to locate the starting position in the .dat file, which is usually the beginning of the file or a specific position specified according to the playback instruction.
[0054] The system reads the XML description file to determine which data items need to be replayed and the order in which they are replayed. The system automatically calculates the average length of each line of data (PerLineDataLength) based on the previous replayed data, which is obtained by accumulating the length of all replayed data and dividing it by the number of data lines. ReplayFrequency is the frequency of replay.
[0055] The first playback position (Pos) is calculated using the formula Pos = TimePos*ReplayFrequency*PerLineDataLength, where: TimePos is the starting time position of the current playback cycle. ReplayFrequency is the playback frequency. PerLineDataLength is the average length of each line of data.
[0056] Based on the calculated Pos value, the system locates the first playback position in the .dat file and prepares to start playback.
[0057] Step 120, determining the first line length of the current line of simulation data played back in the current playback cycle according to the difference between the first playback position and the second playback position of the simulation data; wherein the second playback position is the playback position of the simulation data in the previous playback cycle of the current playback cycle;
[0058] In the embodiment of the present application, the system records the playback position of each playback cycle. The first playback position (Pos1) refers to the starting position of the simulation data in the .dat file at the beginning of the current playback cycle. The second playback position (Pos2) is the simulation data position at the end of the previous playback cycle.
[0059] In the embodiment of the present application, in order to determine the length of the current row of simulation data, the system calculates the difference between the current first playback position (Pos1) and the second playback position (Pos2) of the previous playback cycle. This difference is the length of the current row of simulation data (deltaDataLength); deltaDataLength = Pos1-Pos2.
[0060] In the embodiment of the present application, the calculated difference (deltaDataLength) represents the length of the simulation data from the previous playback position to the current playback position, that is, the length of the first line of the current line.
[0061] Step 130, when the first line length exceeds a first preset threshold and is less than a second preset threshold, update the total length of the playback data and the average line length of the simulation data according to the first line length; wherein the first preset threshold and the second preset threshold are associated with the average line length of the simulation data.
[0062] When the first line length exceeds a first preset threshold and is less than a second preset threshold, updating the total playback data length and the average line length of the simulation data according to the first line length includes:
[0063] Adding the first row length to the total length of the historical playback data of the simulation data to obtain the total length of the playback data after the simulation data is updated;
[0064] Increment the normal magnification playback count of the simulation data by one to obtain the updated normal magnification playback count, and determine the updated average line length based on the ratio of the updated total playback data length to the updated normal magnification playback count.
[0065] In the embodiment of the present application, first, it is determined whether the current line length deltaDataLength falls between two preset thresholds. These two thresholds are associated with the average line length PerLineDataLength. For example, they can be a certain percentage of the average line length.
[0066] The first preset threshold (LowerThreshold) may be set to 0.9 times the average line length to identify data lines with abnormally short lengths. The second preset threshold (UpperThreshold) may be set to 1.1 times the average line length to identify data lines with abnormal lengths.
[0067] If the current line length deltaDataLength meets the above conditions, that is, LowerThreshold < deltaDataLength < UpperThreshold, the system will add the current line length to the total playback data length (DataLength) of the simulation data. DataLength = DataLength + deltaDataLength.
[0068] The system will recalculate the average line length PerLineDataLength using the updated total length DataLength and the total number of times of normal speed playback (ReplayCounter).
[0069] At the same time, the system increments the total number of times of normal speed playback ReplayCounter by 1 to reflect the just completed playback cycle. In this way, the system ensures that during the normal speed playback process, the average line length of the simulation data can be adaptively updated, thus maintaining the synchronization between data playback and video playback.
[0070] In the embodiment of the present application, for the line length of the recorded data, a dynamic calculation method is adopted to automatically determine the length of the current data line by calculating the position difference between adjacent data lines. The average length of the already played-back data can also be statistically calculated, providing an automated and accurate data length calculation benchmark for operations such as speed playback, fast forward, or fast backward. The solution of the embodiment of the present application eliminates the steps of manually setting a fixed data length and recompiling the program, and at the same time reduces the playback positioning deviation caused by the fixed length setting, ensuring the synchronization of the simulation data and video data playback in the simulator data.
[0071] Optionally, the method further comprises:
[0072] When the simulator data is played back at a single rate or multiple rates, obtaining a current video playback time of the video data in the simulator data;
[0073] When the current video playback time is obtained, the start position of the current playback data is determined based on the product of the current video playback time, the data playback frequency and the average line length.
[0074] In the simulator, users can choose to play back data at normal speed (single rate) or accelerated speed (multiple rate) as needed.
[0075] The system obtains the current playback time of the video data in real time, which usually means the cumulative time from the start of video playback to the current moment. The system records the currently selected playback ratio, which can be 1 (single speed), 2 (double speed) or other values, depending on the playback speed selected by the user.
[0076] The system automatically calculates the average length of each line of data based on the previous playback data, which provides a benchmark for determining the playback position. The system multiplies the current video playback time (TimePos), the data playback frequency (ReplayFrequency) and the average line length (PerLineDataLength) to obtain the starting position (Pos) of the current playback data.
[0077] Pos=TimePos×ReplayFrequency×PerLineDataLength
[0078] In an embodiment of the present application, based on the calculated starting position (Pos), the system locates the corresponding data row in the .dat file storing the simulation data to prepare to start or continue playback.
[0079] Optionally, after the step of obtaining the current video playback time of the video data in the simulator data, the method further comprises:
[0080] In the case that the current video playback time is not obtained, the number of simulation data items that should be played back in the current playback cycle is calculated according to the data playback frequency to ensure that the simulation data and the video data are played back synchronously.
[0081] In the embodiment of the present application, the system records the current playback rate, which is the playback speed selected by the user, which may be single speed, double speed or other speed. The system calculates the number of simulation data that should be played back in the current playback cycle based on the data playback frequency. This usually involves matching the number of frames of the video with the number of simulation data.
[0082] Then, the simulation data can be played back according to the calculated number of pieces of data, so as to ensure that the simulation data and the video data can be played back synchronously even in the absence of the current video playback time information.
[0083] If the system detects a time deviation between data playback and video playback, it will use the time synchronization correction mechanism to make the necessary adjustments to maintain synchronization between the two.
[0084] In the embodiment of the present application, regardless of whether the current video playback time can be obtained in real time, the system can flexibly adjust the playback strategy to ensure the synchronization of simulation data and video data. The robustness of the playback process is improved, so that the simulator can provide accurate synchronous playback experience under different conditions.
[0085] Optionally, the method further comprises:
[0086] In the case where the simulator data is played back for a specified time jump, the start position of the current playback data is determined based on the product of the current video playback time, the data playback frequency and the average line length.
[0087] In the embodiment of the present application, the user issues an instruction to request the simulator data to jump to a specified time point for playback. After the system captures the jump operation, it obtains the current playback time of the video data, which is usually the target time point specified by the user.
[0088] The system determines the playback ratio at the time of the jump playback operation. If the playback ratio changes before and after the jump operation, the target ratio after the jump should be used here. The average length of each line of data is automatically calculated based on the previously played data. This value is dynamically updated to reflect the changes in the length of the data line in the .dat file.
[0089] The starting position (Pos) of the current playback data is calculated using the product of the current video playback time (TimePos), the data playback frequency (ReplayFrequency), and the average line length (PerLineDataLength).
[0090] Pos=TimePos×ReplayFrequency×PerLineDataLength
[0091] In the embodiment of the present application, according to the calculated starting position (Pos), the system finds the corresponding data line in the .dat file and prepares to play back the simulation data from this position. The system starts to play back the simulation data from the calculated starting position to match the jump of the video data to ensure the synchronization of the two.
[0092] Throughout the jump playback process, the system may continue to monitor and correct the synchronization between the simulation data and the video data to account for any possible deviations.
[0093] In an embodiment of the present application, even when fast forwarding, rewinding, or jumping to a specific time point is performed, the simulator can ensure that the playback of the simulation data remains precisely synchronized with the playback of the video data, thereby improving the accuracy of the playback and the user experience.
[0094] Optionally, the method further comprises:
[0095] Compiling a description file for recording playback data, wherein the description file includes at least one of the following: a configuration item name, a search number, a playback identifier, a theme, a variable, a unit, and a range;
[0096] When receiving the simulator data recording instruction, a dat file named with date and time is created based on the description file, and the simulation data updated by the simulator is written into the dat file one by one at a fixed frequency to complete the recording of the simulation data.
[0097] Figure 2 The configuration flow chart of playback data provided in the embodiment of the present application is as follows: Figure 2 As shown, including:
[0098] Prepare the data description file in XML format that needs to be recorded and played back. The description file mainly includes:
[0099]
[0100] Then, when the program starts, the contents in the XML file are read and stored in the data container one by one, the description data of the playback record information in the data container is extracted, and the data publishing (playback) / subscription (recording) relationship between the recording module and the simulator simulation calculation is established.
[0101] Receive recording or playback control instructions:
[0102] If it is a record instruction:
[0103] Create a new .dat file named with date and time in the specified directory; open the newly created dat file; write the simulation data updated by the simulator in real time into the dat file one by one at a fixed frequency; when receiving the stop recording instruction, close the dat file.
[0104] If it is a playback command:
[0105] Find the .dat file to be replayed according to the date information in the database directory; open the target .dat file; read the data in the dat file and update it to the simulator network; when receiving the stop playback command, close the dat file.
[0106] In the embodiment of the present application, the configuration file contains the specific description information of the simulator simulation data, and the program will directly read the required recorded data items from the configuration file when running. This method eliminates the need to modify the source code and recompile, and improves the convenience and flexibility of modifying, adding and deleting simulation data items.
[0107] In an alternative embodiment, Figure 3 A schematic diagram of the automatic calculation process of playback data row length provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, including:
[0108] During normal speed playback, the playback position Pos of the current playback cycle is recorded;
[0109] Subtract the playback position PosLast of the previous playback cycle from the playback position Pos of the current playback cycle to obtain the length deltaDataLength of the current row;
[0110] Determine whether deltaDataLength is less than 1.1 times the average line length PerLineDataLength and greater than 0.9 times the average line length PerLineDataLength. If it is not within the range set in the previous step, it means that the previous cycle was not played at a normal speed, and there may be data playback jumps. The following logic will not be executed, and the next round of calculation will be waited for.
[0111] When it is within the range set in the previous step, it can be assumed that the previous playback cycle to this playback cycle is normal speed playback. The total number of normal speed playbacks ReplayCounter++, the original total length of playback data DataLenght plus deltaDataLength to obtain the total length of the current playback data DataLenght;
[0112] Divide DataLength by ReplayCounter to get the average line length PerLineDataLength.
[0113] In the embodiment of the present application, the length of the current data row is automatically determined by calculating the position difference of adjacent data rows. In addition, the system can also count the average length of the replayed data, providing an automated and accurate data length calculation benchmark for operations such as double-speed playback, fast forward or rewind. This method eliminates the steps of manually setting a fixed data length and recompiling the program, while reducing the playback positioning deviation caused by the fixed length setting.
[0114] In an alternative embodiment, Figure 4 A schematic diagram of the time synchronization correction mechanism flow provided in the embodiment of the present application is shown in FIG. Figure 4 As shown, including:
[0115] When the playback module receives the current video playback time TimePos, it directly calculates the starting position of the current playback data Pos = TimePos*ReplayFrequency*PerLineDataLength;
[0116] When the playback module does not receive the current video playback time, it calculates the number of data items that should be played back in the current playback cycle according to the current playback ratio to ensure that the video playback frame number is consistent with the number of data playback items.
[0117] In the embodiment of the present application, the time synchronization correction mechanism ensures that the position of the playback data is recalculated and calibrated every second under the conditions of single-speed and multi-speed playback. When fast-forwarding, rewinding or dragging to a specific time point for playback, the position of the playback data is directly recalculated and calibrated to maintain the progress consistency of data playback and video playback. The time synchronization correction mechanism is particularly important for long-term playback data and video files, and effectively solves the problem of asynchrony between data and video due to the accumulation of data positioning errors.
[0118] The simulator data playback device provided by the present invention is described below. The simulator data playback device described below and the simulator data playback method described above can be referenced to each other.
[0119] Figure 5 A schematic diagram of the structure of the simulator data playback device provided in the embodiment of the present application, such as Figure 5 As shown, including:
[0120] The acquisition module 510 is used for acquiring the first playback position of the simulation data in the current playback cycle when the simulation data in the simulator data is played back at a normal magnification;
[0121] The determination module 520 is used to determine the first line length of the current line of simulation data played back in the current playback cycle according to the difference between the first playback position and the second playback position of the simulation data; wherein the second playback position is the playback position of the simulation data of the previous playback cycle of the current playback cycle;
[0122] The update module 530 is used to update the total length of the playback data and the average line length of the simulation data according to the first line length when the first line length exceeds a first preset threshold and is less than a second preset threshold; wherein the first preset threshold and the second preset threshold are associated with the average line length of the simulation data.
[0123] Optionally, according to a simulator data playback device provided by the present invention, the device is further used for:
[0124] Adding the first row length to the total length of the historical playback data of the simulation data to obtain the total length of the playback data after the simulation data is updated;
[0125] The normal-rate playback times of the simulation data are increased by one to obtain an updated normal-rate playback times, and the updated average row length is determined according to the ratio of the updated total length of the playback data to the updated normal-rate playback times.
[0126] According to a simulator data playback device provided by the present invention, the device is also used for:
[0127] When the simulator data is played back at a single rate or multiple rates, obtaining a current video playback time of the video data in the simulator data;
[0128] When the current video playback time is obtained, the start position of the current playback data is determined based on the product of the current video playback time, the data playback frequency and the average line length.
[0129] According to a simulator data playback device provided by the present invention, the device is also used for:
[0130] In the case that the current video playback time is not obtained, the number of simulation data items that should be played back in the current playback cycle is calculated according to the data playback frequency to ensure that the simulation data and the video data are played back synchronously.
[0131] According to a simulator data playback device provided by the present invention, the device is also used for:
[0132] In the case where the simulator data is played back for a specified time jump, the start position of the current playback data is determined based on the product of the current video playback time, the data playback frequency and the average line length.
[0133] According to a simulator data playback device provided by the present invention, the device is also used for:
[0134] Compiling a description file for recording playback data, wherein the description file includes at least one of the following: a configuration item name, a search number, a playback identifier, a theme, a variable, a unit, and a range;
[0135] When receiving the simulator data recording instruction, a dat file named with date and time is created based on the description file, and the simulation data updated by the simulator is written into the dat file one by one at a fixed frequency to complete the recording of the simulation data.
[0136] In the embodiment of the present application, a dynamic calculation method is used for the row length of the recorded data, and the length of the current data row is automatically determined by calculating the position difference of adjacent data rows. The average length of the replayed data can also be counted, providing an automated and accurate data length calculation benchmark for operations such as double-speed playback, fast forward or backward. The solution of the embodiment of the present application eliminates the steps of manually setting a fixed data length and recompiling the program, while reducing the playback positioning deviation caused by the fixed length setting, and ensuring the synchronization of the playback of simulation data and video data in the simulator data.
[0137] Figure 6 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the simulator data playback method, the method comprising: when the simulation data in the simulator data is played back at a normal magnification, obtaining the first playback position of the simulation data in the current playback cycle;
[0138] Determine the first line length of the current line of simulation data played back in the current playback cycle according to the difference between the first playback position and the second playback position of the simulation data; wherein the second playback position is the playback position of the simulation data in the previous playback cycle of the current playback cycle;
[0139] When the first line length exceeds a first preset threshold and is less than a second preset threshold, the total playback data length and the average line length of the simulation data are updated according to the first line length; wherein the first preset threshold and the second preset threshold are associated with the average line length of the simulation data.
[0140] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0141] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the simulator data playback method provided by the above methods, the method comprising: when the simulation data in the simulator data is played back at a normal magnification, obtaining the first playback position of the simulation data in the current playback cycle;
[0142] Determine the first line length of the current line of simulation data played back in the current playback cycle according to the difference between the first playback position and the second playback position of the simulation data; wherein the second playback position is the playback position of the simulation data in the previous playback cycle of the current playback cycle;
[0143] When the first line length exceeds a first preset threshold and is less than a second preset threshold, the total playback data length and the average line length of the simulation data are updated according to the first line length; wherein the first preset threshold and the second preset threshold are associated with the average line length of the simulation data.
[0144] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the simulator data playback method provided by the above methods, the method comprising: when the simulation data in the simulator data is played back at a normal magnification, obtaining a first playback position of the simulation data in a current playback cycle;
[0145] Determine the first line length of the current line of simulation data played back in the current playback cycle according to the difference between the first playback position and the second playback position of the simulation data; wherein the second playback position is the playback position of the simulation data in the previous playback cycle of the current playback cycle;
[0146] When the first line length exceeds a first preset threshold and is less than a second preset threshold, the total playback data length and the average line length of the simulation data are updated according to the first line length; wherein the first preset threshold and the second preset threshold are associated with the average line length of the simulation data.
[0147] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0148] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A simulator data playback method, characterized in that: include: When the simulation data in the simulator data is played back at a normal magnification, obtaining a first playback position of the simulation data in a current playback cycle; Determine the first line length of the current line of simulation data played back in the current playback cycle according to the difference between the first playback position and the second playback position of the simulation data; wherein the second playback position is the playback position of the simulation data in the previous playback cycle of the current playback cycle; When the first line length exceeds a first preset threshold and is less than a second preset threshold, the total playback data length and the average line length of the simulation data are updated according to the first line length; wherein the first preset threshold and the second preset threshold are associated with the average line length of the simulation data.
2. The simulator data playback method according to claim 1, characterized in that: When the first line length exceeds a first preset threshold and is less than a second preset threshold, updating the total playback data length and the average line length of the simulation data according to the first line length includes: Adding the first row length to the total length of the historical playback data of the simulation data to obtain the total length of the playback data after the simulation data is updated; The normal-rate playback times of the simulation data are increased by one to obtain an updated normal-rate playback times, and the updated average row length is determined according to the ratio of the updated total length of the playback data to the updated normal-rate playback times.
3. The simulator data playback method according to claim 1, characterized in that: The method further comprises: When the simulator data is played back at a single rate or multiple rates, obtaining a current video playback time of the video data in the simulator data; When the current video playback time is obtained, the start position of the current playback data is determined based on the product of the current video playback time, the data playback frequency and the average line length.
4. The simulator data playback method according to claim 3, characterized in that: After the step of obtaining the current video playback time of the video data in the simulator data, the method further comprises: In the case that the current video playback time is not obtained, the number of simulation data items that should be played back in the current playback cycle is calculated according to the data playback frequency to ensure that the simulation data and the video data are played back synchronously.
5. The simulator data playback method according to claim 1, characterized in that: The method further comprises: In the case where the simulator data is played back for a specified time jump, the start position of the current playback data is determined based on the product of the current video playback time, the data playback frequency and the average line length.
6. The simulator data playback method according to claim 1, characterized in that: The method further comprises: Compiling a description file for recording playback data, wherein the description file includes at least one of the following: a configuration item name, a search number, a playback identifier, a theme, a variable, a unit, and a range; When receiving the simulator data recording instruction, a dat file named with date and time is created based on the description file, and the simulation data updated by the simulator is written into the dat file one by one at a fixed frequency to complete the recording of the simulation data.
7. A simulator data playback device, characterized in that: include: An acquisition module, configured to acquire a first playback position of the simulation data in a current playback cycle when the simulation data in the simulator data is played back at a normal magnification; A determination module, configured to determine the length of a first line of the current line of simulation data played back in the current playback cycle according to a difference between a first playback position and a second playback position of the simulation data; wherein the second playback position is a playback position of the simulation data of a previous playback cycle of the current playback cycle; An updating module is used to update the total length of playback data and the average line length of the simulation data according to the first line length when the first line length exceeds a first preset threshold and is less than a second preset threshold; wherein the first preset threshold and the second preset threshold are associated with the average line length of the simulation data.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the simulator data playback method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the simulator data playback method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the simulator data playback method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and device for determining video file trial watching cutoff point, equipment and medium
CN108574856A
Auditing playback data format processing method supporting high-speed playing
CN115934998A
Cache management system and method, private network cache management system and equipment
CN116204455A
Video / audio synchronization apparatus and video / audio synchronization method
US20150235668A1
