Data playback method, device and electronic equipment

By determining the number of sampling points and sampling periods based on display parameters, the problem of large overhead of data playback performance and inability to display a complete envelope curve in the prior art is solved, and rapid playback and memory efficiency are improved.

CN114996332BActive Publication Date: 2025-03-25BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210667668.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-14
Publication Date
2025-03-25
Estimated Expiration
2042-06-14

AI Technical Summary

Technical Problem

Existing data playback methods have huge performance overhead when displaying a complete envelope curve, and cannot effectively avoid memory overflow, and cannot quickly playback simulated data.

Method used

The number of sampling points and sampling periods of the data to be played back are determined based on the display parameters of the display, and the sampling point data of each sampling period is extracted to generate a waveform diagram to achieve fast playback.

Benefits of technology

It realizes rapid playback of data files during simulation, avoids memory overflow, and displays the complete envelope curve of the playback data, meeting the analysis scenario requirements of simulation data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996332B_ABST
    Figure CN114996332B_ABST
Patent Text Reader

Abstract

The present invention discloses a data playback method, device and electronic device, the method comprising: determining the number of sampling points of the data to be played back based on the display parameters of the display; determining the sampling period of the data to be played back based on the number of data points of the data to be played back and the number of sampling points; extracting the sampling point data of the sampling period from the corresponding data to be played back in each sampling period, the total number of sampling periods being the same as the number of sampling points; obtaining a waveform diagram of the data to be played back based on the sampling point data corresponding to all sampling periods. The above scheme calculates the sampling period of the data to be played back and extracts the sampling points according to the display parameters of the display, can quickly play back the data files in the simulation process, can display the complete envelope curve of the playback data while avoiding memory overflow of the playback data, and meets the analysis scenario requirements of the simulation data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of simulation data analysis, and more specifically, to a data playback method, device and electronic equipment. Background Art

[0002] In the field of simulation data analysis, it is often necessary to replay the data saved during the previous simulation run to facilitate related data analysis. There are currently two ways to display the data playback curve: 1. Display all variable data saved during the HIL (Hardware-in-the-Loop) simulation run on the waveform graph. 2. Dynamically complete data addition during the simulation run.

[0003] However, the first method above will extract all the data in the saved run file and display them on the waveform. Its memory overhead and rate overhead are proportional to the playback data, and the performance overhead is huge. The second method simulates the running process and dynamically completes the data addition. Although it saves computing performance overhead, not only the playback time is proportional to the running time, but also only part of the playback data can be displayed, and the complete envelope curve of the data change cannot be viewed. Summary of the invention

[0004] In view of this, the present invention provides the following technical solutions:

[0005] A data playback method, comprising:

[0006] Determining the number of sampling points of the data to be played back based on a display parameter of the display, wherein the display parameter is a resolution of the display;

[0007] Determining a sampling period of the data to be replayed based on the number of data points of the data to be replayed and the number of sampling points;

[0008] In each sampling period, sampling point data of the sampling period is extracted from the corresponding data to be replayed, and the total number of sampling periods is the same as the number of sampling points;

[0009] A waveform diagram of the data to be played back is obtained based on the sampling point data corresponding to all sampling periods.

[0010] Optionally, determining the number of sampling points of the data to be played back based on display parameters of the display includes:

[0011] Determine the number of pixels in the horizontal direction based on the resolution of the display;

[0012] The number of sampling points of the data to be played back is determined based on the number of pixel points, and the number of pixel points is the same as the number of sampling points.

[0013] Optionally, determining the sampling period of the data to be replayed based on the number of data points of the data to be replayed and the number of sampling points includes:

[0014] The ratio T of the number of data points of the data to be replayed to the number of sampling points is determined, and the generation time of T data points is determined as the sampling period of the data to be replayed.

[0015] Optionally, extracting the sampling point data of the sampling period from the corresponding data to be played back in each sampling period includes:

[0016] In each of the sampling periods, at least two data points are extracted from the corresponding data to be replayed.

[0017] Optionally, in each sampling period, extracting at least two data points from the corresponding data to be replayed includes:

[0018] In each of the sampling periods, extracting interval maximum values ​​and interval minimum values ​​from the corresponding data to be replayed;

[0019] or,

[0020] In each of the sampling periods, extracting the first data point and the data points at the middle position from the corresponding data to be replayed;

[0021] or,

[0022] In each of the sampling periods, the first data point, the interval maximum value and the interval minimum value are extracted from the corresponding data to be replayed.

[0023] Optionally, extracting the sampling point data of the sampling period from the corresponding data to be played back in each sampling period includes:

[0024] In the first sampling period, the first data point on the time axis is obtained;

[0025] In the last sampling period, the last data point on the time axis is obtained.

[0026] Optionally, obtaining the waveform diagram of the data to be played back based on the sampling point data corresponding to all sampling periods includes:

[0027] Determine a one-to-one correspondence between the same number of sampling periods and pixel points;

[0028] The sampling point data of each sampling period is matched to the corresponding pixel point to output a waveform graph on the display.

[0029] Optionally, determining the number of data points of the data to be replayed includes:

[0030] The number of data points of the data to be replayed is determined based on the storage position of the first data point and the storage position of the last data point in the data to be replayed.

[0031] A data playback device, comprising:

[0032] A sampling point number determination module, used to determine the sampling point number of the data to be played back based on a display parameter of the display, wherein the display parameter is the resolution of the display;

[0033] A sampling period determination module, used to determine the sampling period of the data to be replayed based on the number of data points of the data to be replayed and the number of sampling points;

[0034] A data determination module, used to extract the sampling point data of the sampling period from the corresponding data to be replayed in each sampling period, and the total number of sampling periods is the same as the number of sampling points;

[0035] The playback realization module is used to obtain the waveform diagram of the data to be played back based on the sampling point data corresponding to all sampling periods.

[0036] The present application also discloses an electronic device, comprising:

[0037] processor;

[0038] A memory for storing executable program instructions of the processor;

[0039] Among them, the executable program instructions include: determining the number of sampling points of the data to be replayed based on the display parameters of the display, and the display parameters are the resolution of the display; determining the sampling period of the data to be replayed based on the number of data points of the data to be replayed and the number of sampling points; in each sampling period, extracting the sampling point data of the sampling period from the corresponding data to be replayed, and the total number of sampling periods is the same as the number of sampling points; obtaining the waveform diagram of the data to be replayed based on the sampling point data corresponding to all sampling periods.

[0040] It can be known from the above technical scheme that, compared with the prior art, the embodiment of the present invention discloses a data playback method, device and electronic device, the method comprising: determining the number of sampling points of the data to be played back based on the display parameters of the display; determining the sampling period of the data to be played back based on the number of data points of the data to be played back and the number of sampling points; in each of the sampling periods, extracting the sampling point data of the sampling period from the corresponding data to be played back, the total number of sampling periods being the same as the number of sampling points; obtaining the waveform diagram of the data to be played back based on the sampling point data corresponding to all sampling periods. The above scheme calculates the sampling period of the data to be played back and extracts the sampling points according to the display parameters of the display, can quickly play back the data files in the simulation process, can display the complete envelope curve of the playback data while avoiding the memory overflow of the playback data, and can meet the analysis scenario requirements of the simulation data. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0042] Figure 1 A flowchart of a data playback method disclosed in an embodiment of the present invention;

[0043] Figure 2 A flow chart of determining the number of sampling points of data to be played back disclosed in an embodiment of the present invention;

[0044] Figure 3 A schematic diagram of a principle for selecting data points disclosed in an embodiment of the present invention;

[0045] Figure 4 A schematic diagram of the structure of a data playback device disclosed in an embodiment of the present invention;

[0046] Figure 5 The present invention is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] For the purpose of reference and clarity, the descriptions, abbreviations or acronyms of the technical terms used below are summarized as follows:

[0048] Maximum value of interval data: When playing back the data of a certain time interval, the data at a certain time point is not less than the data at all other time points. The minimum time corresponding data that meets this condition is called the maximum value of interval data.

[0049] Minimum value of interval data: When playing back the data of a certain time interval, the data at a certain time point is not greater than the data at all other time points. The minimum time corresponding data that meets this condition is called the minimum value of the interval data.

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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] The embodiments of the present application can be applied to electronic devices. The present application does not limit the product form of the electronic device, which can include but is not limited to smart phones, tablet computers, wearable devices, personal computers (PCs), netbooks, etc., and can be selected according to application requirements.

[0052] The present invention proposes a data playback method, which aims to completely and quickly playback the data files generated by the HIL simulation process, so as to facilitate the simulation data analysis work. Figure 1 This is a flow chart of a data playback method disclosed in an embodiment of the present invention. Figure 1 As shown, the data playback method may include:

[0053] Step 101: Determine the number of sampling points of the data to be played back based on the display parameters of the display.

[0054] The display parameter may be the resolution of the display, and the pixel points of the display may be determined based on the resolution. In order to enable the data to be played back to be fully displayed on the display, it is first necessary to understand the display parameters of the display and determine its display capability, and then determine how to reasonably process and extract the data to be played back based on the display parameters, so that it can be played back more accurately and completely. The specific implementation will be described in detail in the following embodiments, and will not be introduced in detail here.

[0055] The data to be replayed may be simulation variables in the HIL simulation operation, and the simulation variables are continuously generated, updated and saved during the simulation operation.

[0056] Step 102: Determine a sampling period of the data to be replayed based on the number of data points of the data to be replayed and the number of sampling points.

[0057] The commonly used file formats for saving in HIL operation are binary files such as mdf / mat, etc., and the storage characteristics of binary files can be used, such as quickly calculating the length of all data points of the data to be played back based on the positions of the first and last data points in the binary stream files. Therefore, determining the number of data points of the data to be played back may include: determining the number of data points of the data to be played back based on the storage position of the first and last data points in the data to be played back.

[0058] Since the sizes of data files saved during the HIL simulation process vary, and the display parameters of the display are fixed, it is necessary to determine the sampling period for different data files, that is, the data to be played back.

[0059] It can be understood that since the display parameters of the display are fixed and limited, the larger the amount of data to be played back, the longer the time period corresponding to the sampling cycle, and the greater the number of data points contained in the sampling cycle; and the smaller the amount of data to be played back, the shorter the time period corresponding to the sampling cycle, and the smaller the number of data points contained in the sampling cycle.

[0060] Step 103: In each sampling period, sampling point data of the sampling period is extracted from the corresponding data to be played back, and the total number of sampling periods is the same as the number of sampling points.

[0061] After the sampling period is determined, part of the data is extracted from each sampling period as sampling point data. The extracted sampling point data will be used to represent the data within the sampling period range and a waveform graph will be drawn.

[0062] Step 104: Obtain a waveform diagram of the data to be played back based on the sampling point data corresponding to all sampling periods.

[0063] Specifically, after the sampling point data of all sampling cycles are obtained, these data can be input into the waveform tool interface, and the waveform can be automatically generated and transmitted to the display for display output.

[0064] It should be noted that the sampling point data is obtained by uniformly sampling the data to be replayed globally, and represents the entire data to be replayed. Therefore, the waveform diagram finally obtained is also a curve diagram representing the entire data to be replayed.

[0065] The data playback method described in this embodiment calculates the sampling period of the data to be played back and extracts the sampling points according to the display parameters of the display, can quickly play back the data files in the simulation process, and can display the complete envelope curve of the playback data while avoiding memory overflow of the playback data, thereby meeting the analysis scenario requirements of the simulation data.

[0066] Figure 2 The flowchart of determining the number of sampling points of the data to be played back disclosed in the embodiment of the present invention. Figure 2 As shown, in the above embodiment, determining the number of sampling points of the data to be played back based on the display parameters of the display may include:

[0067] Step 201: Determine the number of pixels in the horizontal direction based on the resolution of the display.

[0068] Step 202: Determine the number of sampling points of the data to be played back based on the number of pixel points, where the number of pixel points is the same as the number of sampling points.

[0069] According to the resolution of the computer monitor, the number of pixels distributed in the horizontal panel distance of the monitor is obtained. For example, if the display resolution is 1920*1080 pixels, the horizontal distance of the monitor panel is 1920 pixels. Usually, the maximum height and width of the waveform is the vertical and horizontal panel distance of the monitor. Considering this extreme case, the height and width of the waveform described in this article are the maximum height and width.

[0070] The number of pixels is the same as the number of sampling points, that is, on each pixel point on the horizontal panel of the display, the sampling point data of a sampling point needs to be matched, and the sampling point data can include at least two data points. As for the selection of these at least two data points, there is no fixed restriction. For example, in one implementation, the sampling point data of a sampling point includes three data points, that is, on each pixel point on the horizontal panel of the display, it is necessary to place 3 data points of the data to be played back, and these 3 data points can include the first data point of each sampling cycle, the interval maximum value and the interval minimum value; in addition, in the last sampling cycle, in addition to the above three data points, the last data point needs to be obtained. Therefore, the number of data points that can be displayed on the final waveform diagram of the data to be played back is C=P*3+1; where P=pixel point on the horizontal panel of the display.

[0071] Based on the above content, the waveform diagram of the data to be played back is obtained based on the sampling point data corresponding to all sampling periods, which may include: determining a one-to-one correspondence between the same number of sampling periods and pixel points; matching the sampling point data of each sampling period to the corresponding pixel point to output the waveform diagram on the display.

[0072] One sampling cycle samples the data to be replayed only once, so under the premise that the number of sampling points is the same as the number of pixels on the horizontal panel of the display, the number of sampling cycles is also the same as the number of pixels on the horizontal panel of the display. In this way, after obtaining the sampling point data of each sampling cycle, the corresponding relationship between the sampling point data and the pixel points has also been determined, and the extracted sampling point data can be added to the waveform interface accordingly to realize the envelope curve display of the data to be replayed.

[0073] In the above embodiment, determining the sampling period of the data to be replayed based on the number of data points of the data to be replayed and the number of sampling points may include: determining a ratio T of the number of data points of the data to be replayed and the number of sampling points, and determining the generation time of T data points as the sampling period of the data to be replayed.

[0074] A sampling period includes multiple data points within a period of time represented by a pixel on the horizontal panel of the display. If the number of all data points included in the data to be played back is not greater than the number of data points allowed to be displayed by the display, that is, C mentioned above, all data points of the data to be played back can be displayed on the display, that is, the sampling period T = 1; if the number of all data points included in the data to be played back is greater than the number of data points allowed to be displayed by the display, then the sampling period T = R / C.

[0075] In the above embodiment, extracting the sampling point data of the sampling period from the corresponding data to be replayed in each sampling period may include: extracting at least two data points from the corresponding data to be replayed in each sampling period.

[0076] Specifically, there are multiple implementation methods for extracting at least two data points from the corresponding data to be replayed within each sampling period, which may include but are not limited to the following: extracting the interval maximum and interval minimum from the corresponding data to be replayed within each sampling period; or, extracting the first data point and the data point in the middle position from the corresponding data to be replayed within each sampling period; or, extracting the first data point, the interval maximum and the interval minimum from the corresponding data to be replayed within each sampling period.

[0077] Of course, in order to make the final waveform graph "have a beginning and an end", in the first sampling cycle, it is necessary to obtain the first data point on the time axis; in the last sampling cycle, it is also necessary to obtain the last data point on the time axis.

[0078] Specifically, in one example, in each sampling period T of the data to be played back (except the last sampling period), the first data point S1 in the sampling period is extracted; from the other data points in the sampling period, by comparison, the data points corresponding to the data maximum and data minimum in the time region are obtained as the second data point S2 and the third data point S3.

[0079] In the last sampling period T, the first sampling point S1 in the sampling period is extracted; from the other data points in the sampling period, by comparison, the data points corresponding to the interval maximum and interval minimum in the time region are obtained as the second data point S2 and the third data point S3; the last data point is extracted as the fourth sampling point S4.

[0080] If the number of data points to be replayed is not more than 3 within the sampling period T, all data points are taken as valid sampling points, that is, the last retained sampling points; if there are no data points in the data to be replayed within the sampling period T, no sampling point extraction is performed within the sampling period T.

[0081] It should be noted that if there are too many data points to be replayed within the sampling period T, if each data point participates in the calculation of the interval maximum and interval minimum, the comparison calculation will take too long, affecting the efficiency of data playback. In this case, the calculation of the interval maximum and interval minimum can be canceled to extract the second data point S2 and the third data point S3. The binary file storage feature can be used to quickly calculate the data point at the middle position F1 / 2 between the flow position F1 and the flow position F2 of the last data point within the sampling period T as the sampling point S2, where F1 / 2=F1+(F2-F1) / 2. It can be combined with Figure 3 Understand the implementation.

[0082] As mentioned above, the present invention proposes a method for fast playback of data saved files, which uses the display resolution to calculate the sampling period and extract the sampling points. Using this method, the tool software can quickly play back the very large data files in the HIL simulation process, and can improve the speed of data playback while avoiding memory overflow of playback data.

[0083] For the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the order of the actions described, because according to the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0084] The above embodiments disclosed in the present invention describe the method in detail. The method of the present invention can be implemented by various devices. Therefore, the present invention also discloses a device, and a specific embodiment is given below for detailed description.

[0085] Figure 4 Schematic diagram of the structure of a data playback device disclosed in an embodiment of the present invention. Figure 4 As shown, the data playback device 40 may include:

[0086] The sampling point number determination module 401 is used to determine the sampling point number of the data to be played back based on the display parameters of the display.

[0087] The sampling period determination module 402 is used to determine the sampling period of the data to be replayed based on the number of data points of the data to be replayed and the number of sampling points.

[0088] The data determination module 403 is used to extract the sampling point data of the sampling period from the corresponding data to be played back in each sampling period, and the total number of sampling periods is the same as the number of sampling points.

[0089] The playback realization module 404 is used to obtain the waveform diagram of the data to be played back based on the sampling point data corresponding to all sampling periods.

[0090] The data playback device described in this embodiment calculates the sampling period of the data to be played back and extracts the sampling points according to the display parameters of the display, can quickly play back the data files in the simulation process, and can display the complete envelope curve of the playback data while avoiding memory overflow of the playback data, thereby meeting the analysis scenario requirements of the simulation data.

[0091] In one implementation, the sampling point number determination module can be specifically used to: determine the number of pixels in the horizontal direction based on the resolution of the display; determine the number of sampling points of the data to be played back based on the number of pixels, and the number of pixels is the same as the number of sampling points.

[0092] In one implementation, the sampling period determination module may be specifically configured to: determine a ratio T between the number of data points of the data to be replayed and the number of sampling points, and determine the generation time of T data points as the sampling period of the data to be replayed.

[0093] In one implementation, the data determination module may be configured to extract at least two data points from the corresponding data to be replayed within each sampling period.

[0094] Specifically, the data determination module can be used to: extract the interval maximum and interval minimum from the corresponding data to be replayed within each sampling period; or, extract the first data point and the data point in the middle position from the corresponding data to be replayed within each sampling period; or, extract the first data point, the interval maximum and the interval minimum from the corresponding data to be replayed within each sampling period.

[0095] In one implementation, the data determination module may be used to: obtain the first data point on the time axis in the first sampling cycle; and obtain the last data point on the time axis in the last sampling cycle.

[0096] In one implementation, the playback implementation module can be specifically used to: determine a one-to-one correspondence between the same number of sampling periods and pixel points; match the sampling point data of each sampling period to the corresponding pixel point to output a waveform graph on the display.

[0097] In one implementation, determining the number of data points of the data to be replayed may include: determining the number of data points of the data to be replayed based on a storage position of a first data point and a storage position of a last data point in the data to be replayed.

[0098] Any one of the data playback devices described in the above embodiments includes a processor and a memory. The sampling point number determination module, sampling period determination module, data determination module, playback implementation module, etc. in the above embodiments are all stored in the memory as program modules, and the processor executes the above program modules stored in the memory to implement corresponding functions.

[0099] The processor includes a kernel, which retrieves the corresponding program module from the memory. One or more kernels can be set, and the processing of the access data can be realized by adjusting the kernel parameters.

[0100] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0101] In an exemplary embodiment, a computer-readable storage medium is also provided, which can be directly loaded into the internal memory of a computer and contains software code. After being loaded and executed by a computer, the computer program can implement the steps shown in any embodiment of the above-mentioned data playback method.

[0102] In an exemplary embodiment, a computer program product is also provided, which can be directly loaded into the internal memory of a computer and contains software codes. After being loaded and executed by a computer, the computer program can implement the steps shown in any embodiment of the data playback method described above.

[0103] Furthermore, an embodiment of the present invention provides an electronic device. Figure 5 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. Figure 5As shown, the electronic device includes at least one processor 501, and at least one memory 502 and a bus 503 connected to the processor; wherein the processor and the memory communicate with each other via the bus; the processor is used to call the program instructions in the memory to execute the above-mentioned data playback method.

[0104] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0105] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0106] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0107] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data playback method, characterized in that: include: Determining the number of sampling points of the data to be played back based on a display parameter of the display, wherein the display parameter is a resolution of the display; Determining a sampling period of the data to be replayed based on the number of data points of the data to be replayed and the number of sampling points; In each sampling period, sampling point data of the sampling period is extracted from the corresponding data to be replayed, and the total number of sampling periods is the same as the number of sampling points; Obtaining a waveform diagram of the data to be played back based on the sampling point data corresponding to all sampling periods; The step of determining the number of sampling points of the data to be played back based on the display parameters of the display comprises: Determine the number of pixels in the horizontal direction based on the resolution of the display; Determining the number of sampling points of the data to be played back based on the number of pixel points, the number of pixel points being the same as the number of sampling points; The determining the sampling period of the data to be replayed based on the number of data points of the data to be replayed and the number of sampling points includes: Determine a ratio T of the number of data points of the data to be replayed to the number of sampling points, and determine the generation time of T data points as the sampling period of the data to be replayed; The step of extracting the sampling point data of the sampling period from the corresponding data to be played back in each sampling period includes: In each of the sampling periods, at least two data points are extracted from the corresponding data to be replayed.

2. The data playback method according to claim 1, characterized in that: The step of extracting at least two data points from the corresponding data to be replayed in each sampling period includes: In each of the sampling periods, extracting interval maximum values ​​and interval minimum values ​​from the corresponding data to be replayed; or, In each of the sampling periods, extracting the first data point and the data points at the middle position from the corresponding data to be replayed; or, In each of the sampling periods, the first data point, the interval maximum value and the interval minimum value are extracted from the corresponding data to be replayed.

3. The data playback method according to claim 1, characterized in that: The step of extracting the sampling point data of the sampling period from the corresponding data to be replayed in each sampling period also includes: In the first sampling period, the first data point on the time axis is obtained; In the last sampling period, the last data point on the time axis is obtained.

4. The data playback method according to claim 1, characterized in that: The step of obtaining the waveform diagram of the data to be played back based on the sampling point data corresponding to all sampling periods includes: Determine a one-to-one correspondence between the same number of sampling periods and pixel points; The sampling point data of each sampling period is matched to the corresponding pixel point to output a waveform graph on the display.

5. The data playback method according to claim 1, characterized in that: The determination of the number of data points of the data to be replayed includes: The number of data points of the data to be replayed is determined based on the storage position of the first data point and the storage position of the last data point in the data to be replayed.

6. A data playback device, characterized in that: include: A sampling point number determination module, used to determine the sampling point number of the data to be played back based on a display parameter of the display, wherein the display parameter is the resolution of the display; A sampling period determination module, used to determine the sampling period of the data to be replayed based on the number of data points of the data to be replayed and the number of sampling points; A data determination module, used to extract the sampling point data of the sampling period from the corresponding data to be replayed in each sampling period, and the total number of sampling periods is the same as the number of sampling points; A playback implementation module, used to obtain a waveform diagram of the data to be played back based on the sampling point data corresponding to all sampling periods; The sampling point number determination module is specifically used for: Determine the number of pixels in the horizontal direction based on the resolution of the display; Determining the number of sampling points of the data to be played back based on the number of pixel points, the number of pixel points being the same as the number of sampling points; The sampling period determination module is specifically used for: Determine a ratio T of the number of data points of the data to be replayed to the number of sampling points, and determine the generation time of T data points as the sampling period of the data to be replayed; The data determination module is specifically used for: In each of the sampling periods, at least two data points are extracted from the corresponding data to be replayed.

7. An electronic device, characterized in that: include: processor; A memory for storing executable program instructions of the processor; The executable program instructions include: determining the number of sampling points of the data to be replayed based on the display parameters of the display, wherein the display parameters are the resolution of the display; determining the sampling period of the data to be replayed based on the number of data points of the data to be replayed and the number of sampling points; extracting the sampling point data of the sampling period from the corresponding data to be replayed in each sampling period, wherein the total number of sampling periods is the same as the number of sampling points; obtaining a waveform diagram of the data to be replayed based on the sampling point data corresponding to all sampling periods; The step of determining the number of sampling points of the data to be played back based on the display parameters of the display comprises: Determine the number of pixels in the horizontal direction based on the resolution of the display; Determining the number of sampling points of the data to be played back based on the number of pixel points, the number of pixel points being the same as the number of sampling points; The determining the sampling period of the data to be replayed based on the number of data points of the data to be replayed and the number of sampling points includes: Determine a ratio T of the number of data points of the data to be replayed to the number of sampling points, and determine the generation time of T data points as the sampling period of the data to be replayed; The step of extracting the sampling point data of the sampling period from the corresponding data to be played back in each sampling period includes: In each of the sampling periods, at least two data points are extracted from the corresponding data to be replayed.

Citation Information

Patent Citations

  • Method for power system wave record playback based on real-time simulation system

    CN101247039A

  • An audio acquisition analyzer and signal generator design based on a sound card

    CN109815510A