Simulator data playback method and apparatus

By dynamically calculating the positional difference between adjacent data rows, the length of the data row is automatically determined, which solves the synchronization problem in simulator data playback and enables efficient synchronous playback of simulation data and video data.

CN118945430BActive Publication Date: 2025-11-04BEIJING BLUESKY AVIATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410812061.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2025-11-04
Estimated Expiration
2044-06-21

AI Technical Summary

Technical Problem

Existing methods for recording and replaying simulation data in simulators have limitations in terms of flexibility and synchronization, making it difficult to achieve efficient data replay.

Method used

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, and to calculate the average length of the replayed data to ensure the synchronous playback of simulation data and video data.

Benefits of technology

This eliminates the step of manually setting a fixed data length, reduces playback positioning deviation, ensures the synchronization of simulation data and video data in simulator data, and improves the robustness and accuracy of the playback process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945430B_ABST
    Figure CN118945430B_ABST
Patent Text Reader

Abstract

The application provides a simulator data playback method and device, and relates to the technical field of data processing. The method comprises the following steps: obtaining a first playback position of simulation data in a current playback period under the condition that the simulation data in the simulator data is played back at a normal playback rate; determining a first row length of current row simulation data played back by the current playback period according to a difference between the first playback position and a second playback position of the simulation data; the second playback position is a playback position of simulation data in a previous playback period of the current playback period; updating a total playback data length and an average row length of the simulation data according to the first row length under the condition that the first row length exceeds a first preset threshold and is less than a second preset threshold; the first preset threshold and the second preset threshold are associated with the average row length of the simulation data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a simulator data playback method and device. BACKGROUND

[0002] In the simulation running process of an aviation simulator, it is crucial to record the simulation data of airborne, flight and avionics systems, and the video data of the cockpit pilot operation screen. These recorded simulation data and video data allow playback after training or testing is completed, for detailed flight training evaluation and flight test analysis.

[0003] However, the existing simulator simulation data recording playback method has limitations in flexibility when recording and playing back data, and in synchronization of playback data and recorded video. Therefore, how to better perform simulator data playback has become a problem to be solved in the industry. SUMMARY

[0004] The present application provides a simulator data playback method and device to solve the problem of how to better perform simulator data playback in the prior art.

[0005] The present application provides a simulator data playback method, comprising:

[0006] In the case of playing back simulation data in the simulator data at a normal rate, a first playback position of the simulation data in a current playback period is obtained;

[0007] According to the difference between the first playback position and a second playback position of the simulation data, a first row length of the current row simulation data played back in the current playback period is determined; wherein the second playback position is the playback position of the simulation data in a previous playback period of the current playback period;

[0008] In the case that the first row length exceeds a first preset threshold and is less than a second preset threshold, the total length of the playback data and the average row length of the simulation data are updated according to the first row length; wherein the first preset threshold and the second preset threshold are associated with the average row length of the simulation data.

[0009] According to the simulator data playback method provided by the present application, in the case that the first row length exceeds a first preset threshold and is less than a second preset threshold, the total length of the playback data and the average row length of the simulation data are updated according to the first row length, comprising:

[0010] The first row length is added to the total length of the historical playback data of the simulation data to obtain the updated total length of the playback data of the simulation data;

[0011] The normal playback times of the simulation data are added by one to obtain updated normal playback times, and an updated average line length is determined according to a ratio of an updated total length of the playback data to the updated normal playback times.

[0012] According to the simulator data playback method provided by the application, the method further comprises:

[0013] In the case that the simulator data is played back at a single rate or a multiple rate, a current video playback time of video data in the simulator data is acquired.

[0014] In the case that the current video playback time is acquired, a start position of current playback data is determined based on a product of the current video playback time, a data playback frequency and an average line length.

[0015] According to the simulator data playback method provided by the application, after the step of acquiring 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 acquired, a number of pieces of simulation data that should be played back in a current playback period is calculated according to the data playback frequency, so as to ensure that the simulation data and the video data are played back synchronously.

[0017] According to the simulator data playback method provided by the application, the method further comprises:

[0018] In the case that the simulator data is played back by jumping to a specified time, a start position of current playback data is determined based on a product of the current video playback time, a data playback frequency and an average line length.

[0019] According to the simulator data playback method provided by the application, the method further comprises:

[0020] A description file used for recording playback data is compiled, wherein the description file comprises at least one of the following: a configuration item name, a retrieval number, a playback identifier, a subject, a variable, a unit and a range.

[0021] In the case that a simulator data recording instruction is received, a dat file named by a date and time is created based on the description file, and simulation data updated by a simulator is written into the dat file piece by piece at a fixed frequency, so as to complete recording of the simulation data.

[0022] The application further provides a simulator data playback device, comprising:

[0023] The acquisition module is configured to acquire a first playback position of simulation data in the simulator data in a current playback period in the case that the simulation data in the simulator data is played back at a normal rate.

[0024] determining a first row length of the current row of simulation data played back in the current playback period according to a difference between the first playback position and a second playback position of the simulation data; wherein the second playback position is a playback position of simulation data of a previous playback period of the current playback period;

[0025] updating the total length of playback data and the average row length of the simulation data according to the first row length in a case that the first row 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 row length of the simulation data.

[0026] According to the simulator data playback device provided by the application, the device is further used for:

[0027] adding the first row length to the total length of historical playback data of the simulation data to obtain an updated total length of playback data of the simulation data;

[0028] adding one to the normal multiple playback times of the simulation data to obtain updated normal multiple playback times, and determining an updated average row length according to a ratio of the updated total length of playback data to the updated normal multiple playback times.

[0029] According to the simulator data playback device provided by the application, the device is further used for:

[0030] in a case that the simulator data is played back at a single multiple or a multiple, obtaining a current video playback time of video data in the simulator data;

[0031] in a case that the current video playback time is obtained, determining a start position of current playback data based on a product of the current video playback time, a data playback frequency and an average row length.

[0032] According to the simulator data playback device provided by the application, the device is further used for:

[0033] in a case that the current video playback time is not obtained, calculating a number of pieces of simulation data that should be played back in a current playback period according to a data playback frequency, to ensure that the simulation data and the video data are played back synchronously.

[0034] According to the simulator data playback device provided by the application, the device is further used for:

[0035] in a case that the simulator data is played back at a specified time, determining a start position of current playback data based on a product of a current video playback time, a data playback frequency and an average row length.

[0036] According to the simulator data playback device provided by the application, the device is also used for:

[0037] Compiling a description file for recording playback data, wherein the description file comprises at least one of the following: configuration item name, retrieval number, playback identification, subject, variable, unit and range;

[0038] In the case of receiving a simulator data recording instruction, based on the description file, creating a dat file named by date and time, and writing simulation data updated by the simulator into the dat file in a fixed frequency, to complete the recording of the simulation data.

[0039] The application further provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the simulator data playback method according to any one of the above-mentioned methods when executing the program.

[0040] The application further provides a non-transitory computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the simulator data playback method according to any one of the above-mentioned methods.

[0041] The application further provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the simulator data playback method according to any one of the above-mentioned methods.

[0042] The simulator data playback method and device provided by the application adopt a dynamic calculation method for the length of a data row, automatically determine the length of a current data row by calculating the position difference of adjacent data rows, and can also statistically calculate the average length of the played data, thereby providing an automatic and accurate data length calculation basis for operations such as fast play, fast forward or fast backward. The scheme of the embodiments of the application eliminates the step of manually setting a fixed data length and recompiling a program, and reduces the playback positioning deviation caused by the fixed length setting, thereby ensuring the synchronization of the playback of simulation data and video data in the simulator data. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0044] Figure 1 The flowchart of the simulator data playback method provided by the embodiments of the application is shown in the figure;

[0045] Figure 2 A configuration flowchart of playback data provided for the embodiment of the present application is shown in FIG. 1.

[0046] Figure 3 A flowchart of automatic calculation of line length of playback data provided for the embodiment of the present application is shown in FIG. 2.

[0047] Figure 4 A flowchart of time synchronization correction mechanism provided for the embodiment of the present application is shown in FIG. 3.

[0048] Figure 5 A structure diagram of a simulator data playback device provided for the embodiment of the present application is shown in FIG. 4.

[0049] Figure 6 A structure diagram of an electronic device provided by the present application is shown in FIG. 5. DETAILED DESCRIPTION

[0050] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are some embodiments of the present application, but not all embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0051] Figure 1 A flowchart of a simulator data playback method provided for the embodiment of the present application is shown in FIG. 6, which includes the following steps: Figure 1

[0052] Step 110, acquiring a first playback position of simulation data in a current playback period under the condition that the simulation data in the simulator data is played back at a normal rate.

[0053] In the embodiment of the present application, before starting playback, the system needs to be positioned to 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 description file in XML format to determine which data items need to be played back and their playback order. The system automatically calculates the average length of each line of data (PerLineDataLength) according to the previous playback data, which is obtained by accumulating the length of all played back data and dividing by the number of data lines. The playback frequency is ReplayFrequency.

[0055] ​The first replay position (Pos) is calculated using the formula Pos = TimePos * ReplayFrequency * PerLineDataLength, where: TimePos is the start time position of the current replay cycle. ReplayFrequency is the frequency of replay. PerLineDataLength is the average length of data per line.

[0056] According to the calculated Pos value, the system locates to the first replay position in the.dat file, and prepares to start replay.

[0057] In step 120, a first line length of the current line simulation data replayed in the current replay cycle is determined according to a difference between the first replay position and a second replay position of the simulation data, where the second replay position is a replay position of simulation data in a previous replay cycle of the current replay cycle.

[0058] In the embodiment of the present application, the system records the replay position of each replay cycle. The first replay position (Pos1) refers to the start position of the simulation data in the.dat file at the beginning of the current replay cycle. The second replay position (Pos2) refers to the position of the simulation data at the end of the previous replay cycle.

[0059] In the embodiment of the present application, in order to determine the length of the current line simulation data, the system calculates the difference between the current first replay position (Pos1) and the second replay position (Pos2) of the previous replay cycle. The difference is the length of the current line 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 between the previous replay position and the current replay position, that is, the first line length of the current line.

[0061] In step 130, in a case where the first line length exceeds a first preset threshold and is less than a second preset threshold, the total length of replay data and the average line length of the simulation data are updated according to the first line length, where the first preset threshold and the second preset threshold are associated with the average line length of the simulation data.

[0062] In the case where the first line length exceeds the first preset threshold and is less than the second preset threshold, updating the total length of replay data and the average line length of the simulation data according to the first line length includes:

[0063] The first line length is added to the total length of historical replay data of the simulation data to obtain the updated total length of replay data of the simulation data.

[0064] The normal playback times of the simulation data are added by one to obtain an updated normal playback times, and an updated average line length is determined according to a ratio of the updated total length of the playback data to the updated normal playback times.

[0065] In the embodiments of the present application, firstly, it is judged whether the current line length deltaDataLength falls between two preset thresholds. The 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) can be set to 0.9 times of the average line length to identify the data line with an abnormally short length. The second preset threshold (UpperThreshold) can be set to 1.1 times of the average line length to identify the data line with an abnormal length.

[0067] If the current line length deltaDataLength satisfies the above condition, i.e. LowerThreshold < deltaDataLength < UpperThreshold, the system will add the current line length to the total length of the playback data (DataLength) of the simulation data. DataLength = DataLength + deltaDataLength.

[0068] The system will use the updated total length DataLength and the total number of normal speed playback (ReplayCounter) to recalculate the average line length PerLineDataLength.

[0069] Meanwhile, the system will increase the total number of normal speed playback ReplayCounter by 1 to reflect the just completed playback period. In this way, the system ensures that the average line length of the simulation data can be adaptively updated during the normal speed playback, thereby maintaining the synchronization between the data playback and the video playback.

[0070] In the embodiments 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 of adjacent data lines. The average length of the played back data can also be counted to provide an automated and accurate data length calculation benchmark for the fast playback, fast forward or fast backward operations. The scheme of the embodiments of the present application eliminates the step 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, thereby ensuring the synchronization between the simulation data and the video data playback in the simulator data.

[0071] Optionally, the method further includes:

[0072] When the simulator data is played back at a single or multiple rate, the current video playback time of the video data in the simulator data is obtained.

[0073] Given the current video playback time, the starting 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 replay data at normal speed (single magnification) or faster speed (multiple magnification) as needed.

[0075] The system acquires the current playback time of the video data in real time, which typically represents the cumulative time from the start of video playback to the current moment. The system records the currently selected playback magnification, 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 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 this embodiment of the application, based on the calculated start position (Pos), the system locates the corresponding data row in the .dat file storing the simulation data in preparation for starting or continuing playback.

[0079] Optionally, after the step of obtaining the current video playback time of the video data in the simulator data, the method further includes:

[0080] If the current video playback time is not obtained, the number of simulated data entries that should be played back in the current playback cycle is calculated based on the data playback frequency to ensure that the simulated data and video data are played back synchronously.

[0081] In this embodiment, the system records the current playback magnification, which is the playback speed selected by the user, and may be single speed, double speed, or other speeds. The system calculates the number of simulated data entries that should be played back within the current playback cycle based on the data playback frequency. This typically involves matching the number of video frames with the number of simulated data entries.

[0082] Then, the playback can be performed according to the calculated number of simulation data to ensure that the simulation data and the video data can be played back synchronously even without the current video playback time information.

[0083] If the system detects a time deviation between the data playback and the video playback, the necessary adjustment will be made using a time synchronization correction mechanism to maintain the synchronization between the two.

[0084] In the embodiments of the present application, whether the current video playback time can be obtained in real time or not, the system can flexibly adjust the playback strategy to ensure the synchronization of the simulation data and the 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 of jump playback of the simulator data to a specified time, the starting 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 embodiments of the present application, the user issues an instruction to request the simulator data to perform jump playback to a specified time point. After capturing the jump operation, the system 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 rate at the time of the jump playback operation. If the playback rate changes before and after the jump operation, the target rate after the jump should be used here. The length of the average data line is automatically calculated based on the previously played data, and this value is dynamically updated to reflect the change in the length of the data line in the.dat file.

[0089] The product of the current video playback time (TimePos), the data playback frequency (ReplayFrequency) and the average line length (PerLineDataLength) is used to calculate the starting position (Pos) of the current playback data.

[0090] Pos = TimePos x ReplayFrequency x PerLineDataLength

[0091] In the embodiments 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 start playing back the simulation data from this position. The system starts playing back the simulation data from the calculated starting position to match the jump of the video data, ensuring the synchronization of the two.

[0092] Throughout the jump playback process, the system can continue to monitor and correct the synchronization between the simulation data and the video data to cope with any possible deviation.

[0093] In the embodiments of the present application, even when fast forward, fast backward or jump to a specific time point operations are performed, the simulator can ensure that the playback of the simulation data and the playback of the video data remain accurately synchronized, 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 comprises at least one of the following: a configuration item name, a retrieval number, a playback identifier, a subject, a variable, a unit and a range;

[0096] Upon receiving a simulator data recording instruction, creating a dat file named by date and time based on the description file, and writing the simulation data updated by the simulator into the dat file at a fixed frequency, thereby completing the recording of the simulation data.

[0097] Figure 2 The configuration flowchart of the playback data provided by the embodiments of the present application is shown in Figure 2 as follows, comprising:

[0098] Compiling a data description file in xml format that needs to be recorded for playback, and the description file mainly comprises:

[0099]

[0100] Then, the program reads the content in the xml file when starting, and stores the content into a data container, extracts the description data of the playback recording information in the data container, and establishes the data publishing (playback) / subscription (recording) relationship between the recording module and the simulation calculation of the simulator.

[0101] Receiving a recording or playback control instruction:

[0102] If it is a recording instruction:

[0103] Creating a.dat file named by date and time under a specified directory; opening the newly created dat file; writing the simulation data updated by the simulator in real time into the dat file at a fixed frequency; and closing the dat file when a stop recording instruction is received.

[0104] If it is a playback instruction:

[0105] Finding the.dat file that needs to be played back according to the date information under the database directory; opening the target.dat file; reading the data in the dat file and updating the data to the simulator network; and closing the dat file when a stop playback instruction is received.

[0106] In the embodiment of the present application, the configuration file contains specific description information of the simulator simulation data, and the program directly reads the required recorded data items from the configuration file during running. This method eliminates the need for modifying the source code and recompiling, and improves the convenience and flexibility of the modification, addition and deletion operation of the simulation data items.

[0107] In an alternative embodiment, Figure 3 The automatic calculation flowchart of the length of the playback data line provided by the embodiment of the present application is shown in FIG. 2, which includes the following steps: Figure 3

[0108] When the normal speed playback is performed, the current playback period playback position Pos is recorded;

[0109] The current playback period playback position Pos is subtracted from the previous playback period playback position PosLast to obtain the length of the current line deltaDataLength;

[0110] It is judged whether the deltaDataLength is less than 1.1 times of the average line length PerLineDataLength and greater than 0.9 times of the average line length PerLineDataLength. When it is not within the range set in the previous step, it is indicated that the previous period is not normal speed playback, and there may be data playback jump, and the following logic is not executed, and the next round of calculation is waited.

[0111] When it is within the range set in the previous step, it is assumed that the previous playback period to the current playback period is normal speed playback. The total number of normal speed playback ReplayCounter is incremented, and the original total length of the playback data DataLenght is added to the deltaDataLength to obtain the total length of the current playback data DataLenght;

[0112] The average line length PerLineDataLength is obtained by dividing the DataLength by the ReplayCounter.

[0113] In the embodiment of the present application, the length of the current data line is automatically determined by calculating the position difference of adjacent data lines. In addition, the system can also count the average length of the played data, and provide an automatic and accurate data length calculation benchmark for the speed playback, fast forward or backward operation. This method eliminates the step of manually setting the fixed data length and recompiling the program, and reduces the playback positioning deviation caused by the fixed length setting.

[0114] In an alternative embodiment, Figure 4 The time synchronization correction mechanism flowchart provided by the embodiment of the present application is shown in FIG. 3, which includes the following steps:​Figure 4 As shown in the figure, comprising:

[0115] When the playback module receives the current video playback time TimePos, the starting position Pos of the current playback data is directly calculated as TimePos*ReplayFrequency*PerLineDataLength.

[0116] When the playback module does not receive the current video playback time, the number of data strips that should be played back in the current playback period is calculated according to the current playback speed, so as to ensure that the number of video playback frames and the number of data playback strips are consistent.

[0117] In the embodiments 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 playing at single speed and multiple speeds. When fast forward, fast backward or drag-to-specific-time-point playback operations are performed, the position of the playback data is directly recalculated and calibrated, so as to maintain the consistency of the progress of data playback and video playback. The time synchronization correction mechanism is particularly important for long playback data and video files, and effectively solves the problem of asynchronization between data and video caused by cumulative data positioning errors.

[0118] The simulator data playback device provided by the present application will be described below. The simulator data playback device described below can be referred to in correspondence with the simulator data playback method described above.

[0119] Figure 5 The structure diagram of the simulator data playback device provided by the embodiments of the present application is shown in the figure, comprising: Figure 5 As shown in the figure, comprising:

[0120] The acquisition module 510 is configured to acquire a first playback position of simulation data in a current playback period under the condition that the simulation data in the simulator data is played back at a normal speed.

[0121] The determination module 520 is configured to determine a first row length of a current row of simulation data played back in the current playback period according to a difference between the first playback position and a second playback position of the simulation data; the second playback position is a playback position of simulation data in a previous playback period of the current playback period.

[0122] The update module 530 is configured to update a total length of playback data and an average row length of the simulation data according to the first row length under the condition that the first row length exceeds a first preset threshold and is less than a second preset threshold; the first preset threshold and the second preset threshold are associated with the average row length of the simulation data.

[0123] Optionally, according to the simulator data playback device provided by the present application, the device is further configured to:

[0124] Adding the first line length to the total length of the historical playback data of the simulation data to obtain an updated total length of the playback data of the simulation data;

[0125] Adding one to the normal multiple playback times of the simulation data to obtain an updated normal multiple playback times, and determining an updated average line length according to a ratio of the updated total length of the playback data to the updated normal multiple playback times.

[0126] According to the simulator data playback device provided by the application, the device is also used for:

[0127] In the case that the simulator data is played back at a single multiple or a multiple, the current video playback time of the video data in the simulator data is acquired;

[0128] In the case that the current video playback time is acquired, the starting position of the current playback data is determined based on a product of the current video playback time, the data playback frequency and the average line length.

[0129] According to the simulator data playback device provided by the application, the device is also used for:

[0130] In the case that the current video playback time is not acquired, the number of pieces of simulation data that should be played back in a current playback period is calculated according to the data playback frequency, so as to ensure that the simulation data and the video data are played back synchronously.

[0131] According to the simulator data playback device provided by the application, the device is also used for:

[0132] In the case that the simulator data is played back by jumping for a specified time, the starting position of the current playback data is determined based on a product of the current video playback time, the data playback frequency and the average line length.

[0133] According to the simulator data playback device provided by the application, the device is also used for:

[0134] A description file used for recording playback data is compiled, wherein the description file comprises at least one of the following: a configuration item name, a retrieval number, a playback identifier, a subject, a variable, a unit and a range;

[0135] In the case that a simulator data recording instruction is received, a dat file named by a date and time is created based on the description file, and the simulation data updated by the simulator is written into the dat file piece by piece at a fixed frequency, so as to complete the recording of the simulation data.

[0136] In the embodiment of the present application, for the length of the data line, a dynamic calculation method is adopted to automatically determine the length of the current data line by calculating the position difference of adjacent data lines. The average length of the played data can also be counted to provide an automatic and accurate data length calculation basis for the fast play, fast forward or fast backward operation. The scheme of the embodiment of the present application eliminates the step of manually setting the fixed data length and recompiling the program, and reduces the playback positioning deviation caused by the fixed length setting, thereby ensuring the synchronization of the simulation data and the video data playback in the simulator data.

[0137] Figure 6 is a structural schematic diagram of an electronic device provided by the present application, as shown in Figure 6 The electronic device can include a processor 610, a communications interface 620, a memory 630 and a communications bus 640, wherein the processor 610, the communications interface 620 and the memory 630 complete mutual communication through the communications bus 640. The processor 610 can call the logical instructions in the memory 630 to execute the simulator data playback method, which includes: in the case that the simulation data in the simulator data is played back at a normal speed, obtaining a first playback position of the simulation data in a current playback period;

[0138] According to the difference between the first playback position and the second playback position of the simulation data, the first line length of the current line simulation data played back in the current playback period is determined; wherein the second playback position is the playback position of the simulation data in the previous playback period of the current playback period;

[0139] In the case that the first line length exceeds a first preset threshold and is less than a second preset threshold, the playback data total 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] Further, the logic instructions in the memory 630 described above can be implemented in the form of software functional units and sold or used as standalone products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or partially contribute to the prior art, or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0141] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program is executed by a processor, so that the computer can execute the simulator data playback method provided by the above-mentioned methods. The method comprises: in the case that simulation data in the simulator data is played back at a normal speed, obtaining a first playback position of the simulation data in a current playback period;

[0142] According to the difference between the first playback position and the second playback position of the simulation data, a first row length of the current row simulation data played back in the current playback period is determined; wherein the second playback position is a playback position of the simulation data in a previous playback period of the current playback period;

[0143] In the case that the first row length exceeds a first preset threshold and is less than a second preset threshold, the playback data total length and the average row length of the simulation data are updated according to the first row length; wherein the first preset threshold and the second preset threshold are associated with the average row length of the simulation data.

[0144] In another aspect, the present application also provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the simulator data playback method provided by the above-mentioned methods. The method comprises: in the case that simulation data in the simulator data is played back at a normal speed, obtaining a first playback position of the simulation data in a current playback period;

[0145] determine a first row length of the current row of simulation data played back in the current playback period 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 simulation data of a previous playback period of the current playback period;

[0146] in a case where the first row length exceeds a first preset threshold and is less than a second preset threshold, update the total length of playback data and the average row length of the simulation data according to the first row length, wherein the first preset threshold and the second preset threshold are associated with the average row length of the simulation data.

[0147] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs, and those skilled in the art can understand and implement without creative labor.

[0148] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software plus necessary universal hardware platforms, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software products, which can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and include a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) 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 application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for replaying simulator data, characterized in that, include: When the simulation data in the simulator data is played back at normal magnification, the first playback position of the simulation data in the current playback cycle is obtained; Based on the difference between the first playback position and the second playback position of the simulation data, the length of the first line of the current line of simulation data played back in the current playback cycle is determined; wherein, the second playback position is the playback position of the simulation data in the previous playback cycle of the current playback cycle; If the length of the first row exceeds a first preset threshold but is less than a second preset threshold, the total length and average row length of the simulation data playback are updated according to the length of the first row; wherein the first preset threshold and the second preset threshold are associated with the average row length of the simulation data. The method further includes: When the simulator data is played back at a single or multiple rate, the current video playback time of the video data in the simulator data is obtained. Given the current video playback time, the starting 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.

2. The simulator data playback method according to claim 1, characterized in that, If the length of the first row exceeds a first preset threshold but is less than a second preset threshold, update the total length and average row length of the simulation data playback based on the length of the first row, including: The length of the first row is added 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 magnification playback count of the simulation data is incremented by one to obtain the updated normal magnification playback count. The updated average line length is determined based on the ratio of the updated total length of the playback data to the updated normal magnification playback count.

3. The simulator data playback method according to claim 1, characterized in that, After obtaining the current video playback time from the simulator data, the method further includes: If the current video playback time is not obtained, the number of simulated data entries that should be played back in the current playback cycle is calculated based on the data playback frequency to ensure that the simulated data and video data are played back synchronously.

4. The simulator data playback method according to claim 1, characterized in that, The method further includes: When the simulator data is played back at a specified time, the starting 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.

5. The simulator data playback method according to claim 1, characterized in that, The method further includes: Compile a description file for recording playback data, wherein the description file includes at least one of the following: configuration item name, retrieval number, playback identifier, topic, variable, unit, and range; Upon receiving a simulator data recording instruction, a .dat file named with the date and time is created based on the description file, and the simulator updated the simulation data one by one and written into the .dat file at a fixed frequency to complete the recording of the simulation data.

6. A simulator data playback device, characterized in that, include: The acquisition module is used to acquire 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 normal magnification. The determining module is used to determine the length of the first line of the simulation data to be played in the current playback cycle based on 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; The update module is used to update the total length and average line length of the simulation data playback 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 related to the average line length of the simulation data. The device is also used for: When the simulator data is played back at a single or multiple rate, the current video playback time of the video data in the simulator data is obtained. Given the current video playback time, the starting 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.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the simulator data playback method as described in any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the simulator data playback method as described in any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the simulator data playback method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for determining video file trial watching cutoff point, equipment and medium

    CN108574856A

  • Cache management system and method, private network cache management system and equipment

    CN116204455A