A data readback method, device, equipment and storage medium
By writing data in blocks in the recorder and processing the user-specified data range first, the problem of low data readback efficiency in the existing technology is solved, enabling rapid acquisition of analysis results and improving work efficiency.
Patent Information
- Application Number
- CN202311412098.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-10-27
AI Technical Summary
When reading back data, existing recorders need to wait for the entire data file to be read back before observation and analysis can be performed, resulting in low work efficiency, especially when processing large-scale data, which takes a long time.
By receiving the readback initiation command, the original data in the storage unit is sequentially written into the second data processing unit in data block units according to the preset block data length, and the user-specified data range is prioritized during the writing process, and is sent Data processing instructions for analysis and processing to avoid waiting for the entire data file readback to complete.
It shortens the data readback time of key data, improves the efficiency of data readback and analysis processing, enables users to quickly obtain the analysis results of the required data, and improves the overall work efficiency.
Smart Images

Figure CN117609152B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data reading technology, and in particular to a data readback method, device, equipment and storage medium. Background Art
[0002] A recorder is an instrument that measures the characteristics of electronic signals. It includes a series of functions such as data acquisition, analysis, storage and readback. Recorders are widely used in the fields of electronic engineering, communications and embedded systems. Recorders usually have a data readback function, which can save the collected measurement data to a storage medium. When data processing and analysis are required later, the corresponding measurement data can be read back from the storage medium.
[0003] When reading back data, existing recorders usually need to read back the entire measurement data file completely before they can observe the data and perform data analysis and processing. The measurement data collected over a long period of time has a large storage file. If you need to wait for all the data to be read back, it will take a long time. In actual data analysis, users usually only want to observe part of the measurement data and perform corresponding data analysis and processing based on this part of the measurement data. In order to locate the part of the measurement data that the user wants to observe, the existing data readback method still needs to read back the entire data before data observation and data analysis can be performed.
[0004] The existing recorder requires complete data readback before data observation and data analysis can be performed, which requires a long waiting time, resulting in low overall work efficiency of data readback and data analysis. Summary of the invention
[0005] The embodiments of the present application provide a data readback method, device, equipment and storage medium method and device, which can solve the problem of low overall work efficiency, shorten the data readback time of key data, and improve overall work efficiency.
[0006] In a first aspect, an embodiment of the present application provides a data readback method, which is used in a first data processing unit, comprising:
[0007] receiving a read-back initiation instruction, and writing the original data in the storage unit into the second data processing unit in sequence according to a preset block data length and in units of data blocks according to the read-back initiation instruction;
[0008] During the writing process, when a first instruction is received, a corresponding first data range is determined according to the first instruction, and data corresponding to the first data range is preferentially written into the second data processing unit in sequence in units of data blocks according to a preset block data length;
[0009] When it is identified that the writing of the last data block of the first data range is completed, a data processing instruction is sent to the second data processing unit, and the remaining original data continues to be sequentially written into the second data processing unit in units of data blocks according to a preset block data length;
[0010] Receive a data analysis result fed back by the second data processing unit based on the data processing instruction, wherein the data analysis result is a result obtained by the second data processing unit analyzing and processing the data corresponding to the first data range after receiving the data corresponding to the first data range.
[0011] Further, the receiving of the read-back initiation instruction and writing the original data in the storage unit into the second data processing unit in sequence in units of data blocks according to a preset block data length according to the read-back initiation instruction include:
[0012] receiving a readback initiation instruction, determining a corresponding storage file according to the readback instruction, and obtaining an original data length by reading the storage file, wherein the storage file stores the original data;
[0013] Perform block processing according to the original data length and preset index information to obtain block data length;
[0014] The original data in the storage unit is sequentially written into the second data processing unit in units of data blocks according to the block data length to obtain a written data range.
[0015] Furthermore, during the writing process, when a first instruction is received, a corresponding first data range is determined according to the first instruction, and data corresponding to the first data range is preferentially written into the second data processing unit according to a preset block data length, including:
[0016] During the writing process, when a first instruction is received, a first data range is determined according to the first instruction;
[0017] The first data range is compared with the written data range. If the data corresponding to the first data range has not been written into the second data processing unit, the writing of the current data block is suspended, and the data blocks corresponding to the first data range are written into the second data processing unit in sequence.
[0018] Furthermore, during the writing process, when the first instruction is received, after determining the first data range according to the first instruction, the following steps are performed:
[0019] Comparing the first data range with the written data range, and sending a data processing instruction to the data processing module if the data corresponding to the first data range has been written into the second data processing unit;
[0020] Receive the data analysis result fed back by the second data processing unit.
[0021] Further, when it is identified that the writing of the last data block of the first data range is completed, the remaining original data continues to be sequentially written into the second data processing unit in units of data blocks according to the preset block data length, and a data processing instruction is sent to the second data processing unit, including:
[0022] When it is identified that the writing of the last data block of the first data range is completed, a data processing instruction is sent to the second data processing unit, and the original data after the first data range is sequentially written into the second data processing unit in units of data blocks according to a preset block data length;
[0023] When it is identified that all original data after the first data range has been written, the remaining original data before the first data range is written into the second data processing unit in sequence in units of data blocks according to a preset block data length until all original data has been written.
[0024] Further, after receiving the data analysis result fed back by the second data processing unit based on the data processing instruction, the method further comprises:
[0025] The data corresponding to the first data range and the data analysis result are transmitted to a display unit for display.
[0026] In a second aspect, an embodiment of the present application provides a data readback method, which is used in a second data processing unit, comprising:
[0027] Receiving original data written in data blocks according to a preset block data length;
[0028] receiving a data processing instruction sent by the first data processing unit, and determining a corresponding first data range according to the data processing instruction;
[0029] Performing data analysis and processing on the data corresponding to the first data range according to the data processing instruction to obtain a data analysis result;
[0030] The data analysis result is sent to the first data processing unit.
[0031] In a third aspect, an embodiment of the present application provides a data readback device, used in a first data processing unit, comprising:
[0032] An instruction receiving module, used for receiving a read-back initiating instruction, and writing the original data in the storage unit into the second data processing unit in sequence according to a preset block data length and in units of data blocks according to the read-back initiating instruction;
[0033] a data writing module, configured to, during a writing process, determine a corresponding first data range according to a first instruction when receiving the first instruction, and preferentially write the data corresponding to the first data range into the second data processing unit in sequence in units of data blocks according to a preset block data length;
[0034] an instruction sending module, configured to, when recognizing that the writing of the last data block of the first data range is completed, continue to write the remaining original data into the second data processing unit in sequence in units of data blocks according to a preset block data length, and send a data processing instruction to the second data processing unit;
[0035] A result receiving module is used to receive the data analysis result fed back by the second data processing unit based on the data processing instruction, wherein the data analysis result is the result obtained by the second data processing unit analyzing and processing the data corresponding to the first data range based on the first instruction after receiving the data corresponding to the first data range.
[0036] Further, the instruction receiving module includes a file reading submodule, an indexing submodule and a writing submodule;
[0037] The file reading submodule is used to receive a read-back initiation instruction, determine a corresponding storage file according to the read-back instruction, and obtain the original data length by reading the storage file, wherein the storage file stores the original data;
[0038] The index submodule is used to perform block processing according to the original data length and preset index information to obtain block data length;
[0039] The writing submodule is used to write the original data in the storage unit into the second data processing unit in sequence according to the block data length in units of data blocks to obtain a written data range.
[0040] Further, the data writing module includes a first range determination submodule and a comparison submodule;
[0041] The first range determination submodule is used to determine the first data range according to the first instruction when receiving the first instruction during the writing process;
[0042] The comparison submodule is used to compare the first data range with the written data range. If the data corresponding to the first data range has not been written into the second data processing unit, the writing of the current data block is suspended, and the data blocks corresponding to the first data range are written into the second data processing unit in sequence.
[0043] Furthermore, the instruction sending module is further used to compare the first data range with the written data range, and if the data corresponding to the first data range has been written into the second data processing unit, send a data processing instruction to the data processing module;
[0044] The result receiving module is further used to receive the data analysis result fed back by the second data processing unit.
[0045] Furthermore, the instruction sending module is further configured to send a data processing instruction to the second data processing unit when it is identified that the writing of the last data block of the first data range is completed, and write the original data after the first data range into the second data processing unit in sequence in units of data blocks according to a preset block data length;
[0046] When it is identified that all original data after the first data range has been written, the remaining original data before the first data range is written into the second data processing unit in sequence in units of data blocks according to a preset block data length until all original data has been written.
[0047] Furthermore, the device also includes a display module;
[0048] The display module is used to transmit the data corresponding to the first data range and the data analysis result to the display unit for display.
[0049] In a fourth aspect, an embodiment of the present application provides a data readback device, including:
[0050] memory and one or more processors;
[0051] The memory is used to store one or more programs;
[0052] When the one or more programs are executed by the one or more processors, the one or more processors implement the data read back method as described in the first aspect or the second aspect.
[0053] In a fifth aspect, an embodiment of the present application provides a storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the data read back method as described in the first aspect or the second aspect.
[0054] In the embodiment of the present application, the original data in the storage unit is sequentially written into the second data processing unit in units of data blocks according to the preset block data length according to the readback initiation instruction. During the writing process, when the first instruction is received, the data of the corresponding first data range is sequentially written into the second data processing unit in units of data blocks according to the preset block data length according to the first instruction. When it is recognized that the writing of the last data block of the first data range is completed, the data processing instruction is sent to the second data processing unit, and the remaining original data continues to be sequentially written into the second data processing unit in units of data blocks according to the preset data block length, and the data analysis result fed back by the second data processing unit based on the data processing instruction is received. By adopting the above technical means, the data corresponding to the first data range can be written preferentially through the first instruction during the process of writing data into the second data processing unit, the data readback time of the data in the first data range can be shortened, and the work efficiency of the data readback of the key data can be improved; and after the writing of the data in the first data range is completed, the data corresponding to the first data range is analyzed and processed by the second data processing unit to obtain the data analysis result, so as to avoid the problem of low work efficiency caused by the need to complete the writing of all original data before starting the key data analysis, and improve the speed of data analysis and processing, thereby improving the overall work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 is a flow chart of a data readback method provided in an embodiment of the present application;
[0056] Figure 2 is a connection diagram of various equipment units provided in an embodiment of the present application;
[0057] Figure 3 is a flow chart of another data readback method provided by an embodiment of the present application;
[0058] Figure 4 is a flow chart of another data readback method provided in an embodiment of the present application;
[0059] Figure 5 It is a structural schematic diagram of a data readback device provided in an embodiment of the present application;
[0060] Figure 6 It is a structural schematic diagram of a data readback device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0062] A recorder is an instrument for measuring the characteristics of electronic signals, which includes a series of functions such as data acquisition, analysis, storage and readback. Recorders are widely used in the fields of electronic engineering, communications and embedded systems. Recorders usually have a data readback function, which can save the collected measurement data to a storage medium. When data processing and analysis are required later, the corresponding measurement data can be read back from the storage medium. In some application scenarios, users need to monitor a signal for a long time with a fixed sampling frequency, such as 10MSa / s for a long time to monitor an electrical signal. At this time, the amount of data collected per hour will be 36G. The recorder itself can perform high-speed data analysis and calculation through the built-in FPGA digital circuit, and the collected data is stored in a storage medium such as a disk. When data analysis is required later, the data is read back from the storage medium and written to the built-in FPGA digital circuit for re-analysis.
[0063] When reading back data, the existing recorder usually needs to read back the entire measurement data file completely before observing the data and performing data analysis and processing. The measurement data obtained after a long period of collection has a large corresponding storage file. If it is necessary to wait for all the data to be read back, it will take a long time. For example, the storage file may reach a scale of more than 10G, or even more than 100G or 1000G. According to the average readback speed of 100M / s, a 10G file requires 100s of readback time, and a file of 100G or more than 1000G requires a longer readback time. In actual data analysis, users usually only want to observe part of the measurement data and perform corresponding data analysis and processing based on this part of the measurement data. In the existing data readback method, in order to locate the part of the measurement data that the user wants to observe, it is still necessary to read back the complete data before data observation and data analysis can be performed, and during the data readback period, the user is generally not allowed to operate the device. Therefore, in order to analyze part of the data locally, the entire file has to be read back completely, resulting in unnecessary time waiting overhead.
[0064] The data readback method, device, equipment and storage medium method and device provided by the present application are intended to read back the data, and in the process of writing the data into the second data processing unit, the data corresponding to the first data range is written preferentially through the first instruction to shorten the data readback time of the data in the first data range and improve the work efficiency of the data readback of the key data; and after the data writing in the first data range is completed, the data corresponding to the first data range is analyzed and processed by the second data processing unit to obtain the data analysis result, so as to improve the speed of data analysis and processing and improve the overall work efficiency. Compared with the traditional data readback method, it usually needs to read back the entire measurement data file completely before observing the data and performing data analysis and processing. The measurement data obtained after a long period of collection has a large corresponding storage file. If it is necessary to wait for all the data to be read back, it will take a long time. In actual data analysis, users usually only want to observe part of the measurement data and perform corresponding data analysis and processing based on the part of the measurement data. In order to locate the part of the measurement data that the user wants to observe, the existing data readback method still needs to read back the complete data before data observation and data analysis can be performed. In the traditional data recorder, the data observation and data analysis can only be performed after the complete data reading is completed during data reading back, which requires a long waiting time, resulting in low overall work efficiency of data reading back and data analysis. Based on this, a data reading back method according to an embodiment of the present application is provided to solve the problem of low overall work efficiency in the existing data reading back process.
[0065] Figure 1A flow chart of a data readback method provided in an embodiment of the present application is provided. The data readback method provided in this embodiment can be executed by a data readback device, which can be implemented by software and / or hardware. The data readback device can be composed of two or more physical entities, or can be composed of one physical entity. Generally speaking, the data readback device can be a terminal device, such as a recorder, etc.
[0066] The following description takes the recorder as the main body of the data readback method as an example. Figure 1 The data readback method is used in a first data processing unit and specifically includes:
[0067] S101 , receiving a read-back initiation instruction, and writing original data in a storage unit into a second data processing unit in sequence according to a preset block data length and in units of data blocks according to the read-back initiation instruction.
[0068] The first data processing unit can be understood as a unit with certain data processing functions, such as the X86 memory in the recorder, and the second data processing unit can be understood as a unit with high-speed data processing functions, such as FPGA memory. The storage unit can be understood as a unit with storage functions, such as the X86 disk in the recorder, which is used to store the data collected by the recorder in the form of storage files. When the user needs to view or analyze data, the readback initiation instruction generated based on the user operation is received, and the first data processing unit determines the corresponding storage file stored in the storage unit according to the readback initiation instruction. Based on the fact that there are multiple files stored in the storage unit, the corresponding storage file can be determined according to the tag information in the readback initiation instruction. The first data processing unit reads the storage file to obtain the original data length.
[0069] Figure 2 is a connection diagram of each device unit provided in the embodiment of the present application, refer to Figure 2 The recorder 1 includes a first data processing unit 11, a second data processing unit 12, a storage unit 13 and a display unit 14. The first data processing unit 11 is communicatively connected with the storage unit 13 and the display unit 14, and the first data processing unit 11 is communicatively connected with the second data processing unit 12.
[0070] Since the amount of the corresponding original data in the storage file is large, the original data can be classified and processed based on the preset index information when the data is read back. Block processing is performed according to the original data length of the data to be read back and the preset index information to obtain the block data length. It should be noted that the block processing is based on the original data length and each data block is marked according to the block data length, and it is not a block in the actual physical sense. According to the data read back instruction, the corresponding original data in the storage unit is written into the second data processing unit in units of data blocks according to the block data length to obtain the written data range.
[0071] As described above, when the data is read back, the original data in the storage unit is written into the second data processing unit in sequence in units of data blocks according to the preset block data length according to the read back initiation instruction, and the written data range is obtained, so that when the key data needs to be viewed and analyzed later, it can be determined whether the key data is written based on the written data range, and the original data can be segmented and marked based on the data block length, and the corresponding key data can be written based on the mark of the data block length, thereby avoiding the need to complete data writing before viewing and analyzing the key data, thereby improving the flexibility and speed of data viewing.
[0072] S102. During the writing process, when a first instruction is received, a corresponding first data range is determined according to the first instruction, and data corresponding to the first data range is preferentially written into the second data processing unit in sequence in units of data blocks according to a preset block data length.
[0073] In the process of writing the original data into the second data processing unit in sequence according to the preset block data length in units of data blocks, when the user needs to obtain some analysis results of some key data in the original data, a first instruction is generated through the user's input operation. The user's input operation includes selecting a data range through a cursor based on the length display content corresponding to the length of the original data. The first instruction includes a data range corresponding to the key data and a corresponding data analysis requirement. When the first data processing unit receives the first instruction, the corresponding first data range is determined according to the first instruction. The first data range is the data range of the key data that the user needs to view. When the first instruction is received, the data corresponding to the first data range is preferentially written into the second data processing unit in sequence according to the preset block length in units of data blocks.
[0074] Before receiving the first instruction, data reading has been performed, so part of the data has been written into the second data processing unit. If the data corresponding to the first data range has been completely written into the second data processing unit when the first instruction is received, data analysis and processing can be performed directly. If the data corresponding to the first data range has not been completely written into the second data processing unit when the first instruction is received, the writing of the data corresponding to the first data range needs to be completed before data analysis and processing can be performed. Therefore, the first data range can be compared with the written data range to determine whether the data corresponding to the first data range has been completely written into the second data processing unit.
[0075] The first data range is compared with the written data range. If the first data range is not within the written data range, it is determined that the data corresponding to the first data range has not been written into the second data processing unit, and the writing of the current data block is paused, and the data blocks corresponding to the first data range are written into the second data processing unit in sequence until the last data block of the first data range is written.
[0076] The first data range is compared with the written data range. If the first data range is within the written data range, it is determined that the data corresponding to the first data range has been written into the second data. If the first data range and the written data range have an intersection, the writing operation is continued until the last data block of the first data range is written.
[0077] As described above, during the data writing process, when the first instruction is received, the first data range is preferentially written into the second data processing unit according to the first instruction, so that the second data processing unit can preferentially perform analysis and processing of the data corresponding to the first data range, thereby avoiding the long waiting time caused by the need to wait until all the original data is written before performing analysis and processing, thereby improving the efficiency of the analysis and processing of key data, allowing users to quickly obtain the analysis results of key data and avoid waiting time, thereby improving the user experience.
[0078] S103. When it is identified that the writing of the last data block in the first data range is completed, a data processing instruction is sent to the second data processing unit, and the remaining original data continues to be written into the second data processing unit in sequence in units of data blocks according to a preset block data length.
[0079] The first data processing unit generates a data processing instruction based on the data analysis requirement in the first instruction. When it is identified that the writing of the last data block of the first data range is completed, which means that all the data corresponding to the first data range are written into the second data processing unit, the data processing instruction is sent to the second data processing unit, so that the second data processing unit performs data analysis processing on the data corresponding to the first data range based on the data processing instruction to obtain a data analysis result.
[0080] When it is identified that the last data block of the first data range has been written, it means that all the data corresponding to the first data range has been written into the second data processing unit, and the remaining original data will continue to be written into the second data processing unit in units of data blocks according to the preset block data length. Usually, during data collection, there are usually certain errors in the data in the previous stage, so the data of the middle and later data segments are generally used preferentially during data analysis. Therefore, after the data corresponding to the first data range has been written, the original data after the first data range can be preferentially written into the second data processing unit in units of data blocks according to the preset block data length. When it is identified that all the original data after the first data range has been written, it means that all the original data after the first data range has been written into the second data processing unit, and the remaining original data before the first data range will be written into the second data processing unit in units of data blocks according to the preset block data length until all the original data have been written.
[0081] As described above, after the data in the first data range is written, the data processing instruction is sent to the second data processing unit and the writing of the remaining original data is continued, so that the data in the first data range can be written first, and the analysis and processing of the data corresponding to the first data range can be performed while the writing of the remaining original data is continued, without waiting for all the original data to be written before performing data analysis, which results in a long waiting time, thereby shortening the speed of key data analysis and processing, allowing users to quickly obtain the analysis results of key data, thereby improving the overall work efficiency of data readback and data analysis, and enhancing the user experience. In addition, after the data in the first data range is written, the data after the first data range is written to the second data processing unit first, so that subsequent users need to analyze and process the data after the first data, reducing the time waiting for data writing, thereby improving the speed of subsequent data analysis and processing, and further improving the user experience.
[0082] S104, receiving a data analysis result fed back by the second data processing unit based on the data processing instruction, where the data analysis result is a result obtained by the second data processing unit analyzing and processing the data corresponding to the first data range after receiving the data corresponding to the first data range.
[0083] After the first data processing unit sends the data processing instruction to the second data processing unit, the second data processing unit determines the first data range that needs to be analyzed and processed according to the data processing instruction, performs corresponding analysis and processing on the data corresponding to the first data range in the written data according to the data processing instruction, obtains the data analysis result, and feeds back the corresponding data analysis result to the first data processing unit. The first data processing unit receives the data analysis result, and transmits the data corresponding to the first data range and the data analysis result to the display unit for display, so that the user can view the data corresponding to the first data range and the corresponding data analysis result.
[0084] In one embodiment, during the data writing process, when the first data processing unit receives a stop instruction, the writing of the current data block is suspended, and when a restart instruction is received, the writing of the current data block is continued. During the data writing process, data writing is started and stopped according to the actual needs of the user, so that after obtaining the appropriate data analysis results, the writing of invalid data is suspended through the stop instruction, the invalid waiting time is reduced, and the user experience is improved.
[0085] In the above, the original data in the storage unit is sequentially written into the second data processing unit in units of data blocks according to the preset block data length according to the readback initiation instruction. During the writing process, when the first instruction is received, the data of the corresponding first data range is sequentially written into the second data processing unit in units of data blocks according to the preset block data length according to the first instruction. When it is recognized that the writing of the last data block of the first data range is completed, the data processing instruction is sent to the second data processing unit, and the remaining original data continues to be sequentially written into the second data processing unit in units of data blocks according to the preset data block length, and the data analysis result fed back by the second data processing unit based on the data processing instruction is received. By adopting the above technical means, in the process of writing data into the second data processing unit, the data corresponding to the first data range can be written preferentially through the first instruction, which can shorten the data readback time of the data in the first data range and improve the work efficiency of the data readback of the key data; and after the writing of the data in the first data range is completed, the data corresponding to the first data range is analyzed and processed by the second data processing unit to obtain the data analysis result, so as to avoid the problem of low work efficiency caused by the need to complete the writing of all original data before starting the key data analysis, and improve the speed of data analysis and processing, thereby improving the overall work efficiency.
[0086] Based on the above implementation, Figure 3 is a flowchart of another data readback method provided in an embodiment of the present application, referring to Figure 3 , the data readback method specifically includes:
[0087] S201, initiate read back.
[0088] When the user needs to view or analyze data, the user initiates a read-back operation based on the interactive unit, generates a read-back initiation instruction based on the read-back operation, and transmits the read-back initiation instruction to the first data processing unit. The first data processing unit receives the read-back initiation instruction generated based on the user operation, and determines the corresponding storage file stored in the storage unit according to the read-back initiation instruction. Based on the fact that there are multiple files stored in the storage unit, the corresponding storage file can be determined according to the tag information in the read-back initiation instruction. The first data processing unit reads the storage file to obtain the original data length.
[0089] S202: Read index data.
[0090] When reading back the data, the storage file is preliminarily checked according to the read-back initiation instruction, and then the index data in the storage unit is read. Exemplarily, the data is in the storage unit, such as a hard disk, and the first data processing unit is required to extract the index data of the data, and the extraction rate is 1 / 1000 as an example. The original data is 10G data, and one pair of peak-to-peak values is calculated according to the peak-to-peak value statistics for every 1000 points, which will obtain 10M pairs of peak-to-peak value data.
[0091] S203. Respond to the user.
[0092] When performing waveform observation at the big data level, the extraction and drawing operations can be performed by replacing the original data with index data (i.e., peak-to-peak value). The user only needs to read the index data to notify the user that the readback has been completed. The readback end mark can be sent to the display unit through the first data processing unit, and the readback end mark can be displayed through the display unit to notify the user that the readback has been completed. At this time, the entire acquisition information drawn by the indexed data is displayed in the corresponding display unit, and the user can observe the complete waveform information through the display unit, so that the user can select the corresponding first data range based on the displayed waveform information, so that the corresponding first instruction can be generated later.
[0093] In one embodiment, for example, when a user wants to observe data with 10G of raw data, and the observation window in the display unit is a display window with 1000 pixels on the horizontal axis, a single pixel will accommodate 10G / 1000=10M raw points, and a pair of peak-to-peak values is counted in the 10M raw data; this is the same as first counting a pair of peak-to-peak values for every 1000 data points, and then counting a bunch of peak-to-peak values again in the 10K statistical results. Therefore, the operation of extracting a pair of peak-to-peak values from 10M raw data can be replaced by directly extracting a pair of peak-to-peak values from 10K pairs of peak-to-peak values through the first data processing unit.
[0094] S204, start step-by-step reading back.
[0095] The first data processing unit performs step-by-step readback through S101. Exemplarily, the first data processing unit reads the preset index information, performs block processing according to the original data length of the data to be read back and the preset index information, and obtains the block data length. The first data processing unit starts the step-by-step readback process. The step-by-step readback process is to write the original data in the storage unit into the second data processing unit in units of data blocks according to the preset block data length according to the readback initiation instruction. The readback time of a single data block (that is, the time it takes to write each data block to the second data processing unit) is set to 0.1s, and the device readback performance of 100M / s is used as an example for explanation. A single data block will be set to 10M data points, and 10G of original data will be divided into 1000 blocks and written (read back) to the second data processing unit (that is, FPGA memory) in the initial order. Through the above-mentioned block processing, it is convenient to insert and adjust tasks midway and improve the user operation experience.
[0096] It should be noted that each written data block includes the start offset address and length of the read file, the second data processing unit (ie, FPGA memory) target address, and its own write status information. The second data processing unit target address is the address where the data block should be written.
[0097] S205: Whether to initiate abort of the readback.
[0098] During the data readback process, it is detected whether the readback is terminated. If it is detected that the readback is terminated, S213 is executed. If it is not detected that the readback is terminated, S206 is executed. It should be noted that the readback termination can be initiated by the user or by the device itself.
[0099] S206: Whether to initiate an analysis command.
[0100] Detect whether to initiate an analysis command. If the user needs to perform analysis and processing such as local magnification observation, measurement, and search on the data during the aforementioned data readback, the user can initiate an analysis command through the interactive unit (which can be the aforementioned display unit). The interactive unit generates a first instruction based on the analysis command initiated by the user and sends it to the first data processing unit. When the initiation of aborting the readback is not detected and the initiation of the analysis command is detected, S207 is executed. When the initiation of aborting the readback is not detected and the initiation of the analysis command is not detected, S211 is executed.
[0101] S207: Whether the data exists in the second data processing unit.
[0102] When the user needs to perform analysis and processing such as local magnification observation, measurement and search on the data during the aforementioned data readback period, the first data processing unit receives the first instruction and determines the corresponding first data range according to the first instruction. The first data range is the data range corresponding to the analysis command initiated by the user. It is determined whether the data corresponding to the first data range is in the second data processing unit. If the data corresponding to the first data range is not in the second data processing unit, S208 is executed; if the data corresponding to the first data range is in the second data processing unit, S209 is executed.
[0103] During the data read back process, the written data range can be obtained, and the first data range is compared with the written data range. If the first data range is not within the written data range, it is determined that the data corresponding to the first data range is not in the second data processing unit; if the first data range is within the written data range, it is determined that the data corresponding to the first data range is in the second data processing unit.
[0104] S208: Write the data into the second data processing unit.
[0105] If the data corresponding to the first data range is not in the second data processing unit, after the writing of the current data block is completed, the writing of the original data block is suspended, and the data corresponding to the first data range is written into the second data processing unit in sequence according to the data block. When it is identified that the writing of the last data block of the first data range is completed, S209 is executed.
[0106] S209. Initiate analysis.
[0107] When it is identified that the writing of the last data block of the first data range is completed, a data processing instruction is sent to the second data processing unit, and S210 is executed. When it is identified that the writing of the last data block of the first data range is completed, it means that all the data corresponding to the first data range is written into the second data processing unit, and a data processing instruction is sent to the second data processing unit, so that the second data processing unit performs data analysis processing on the data corresponding to the first data range based on the data processing instruction to obtain a data analysis result.
[0108] S210, adjusting the order of reading back the data table step by step.
[0109] While performing data analysis in S209, the order of writing blocks is adjusted, and S204 is re-executed to start the background writing process. The writing order is adjusted to give priority to writing data blocks adjacent to the area currently observed by the user (i.e., the first data range). The order can be set to write the data after the first data range first, and then write the data before the first data range.
[0110] S211: Is the data block list empty?
[0111] When no abort readback is detected and no analysis command is detected, it is determined whether the data block list is empty. When it is detected that the data block list is empty, it means that no data block needs to be read back, and S213 is executed. When it is detected that the data block list is not empty, S212 is executed.
[0112] S212: Write the highest priority data block into the second data processing unit.
[0113] The most prioritized data block in the original data to be written is written into the second data processing unit, and then S204 is re-executed to continuously write the remaining original data into the second data processing unit in units of data blocks according to the block data length.
[0114] S213, exit the step-by-step reading.
[0115] During the data readback process, it is detected whether there is an initiation to terminate the readback. If it is detected that there is an initiation to terminate the readback, the step-by-step readback process is exited. When no initiation to terminate the readback is detected and no initiation of the analysis command is detected, it is determined whether the data block list is empty. When it is detected that the data block list is empty, it means that there is no data block to be read back, and the step-by-step readback process is exited.
[0116] As mentioned above, when the data is read back, there is no need to wait for the complete data read back to be completed. The complete observation and operation of the waveform can be supported after the index data is loaded. Within the range allowed by the index data, the waveform can be smoothly enlarged, moved and observed.
[0117] As described above, the user can observe the overhead of the readback time, and only the time for reading the index from the storage unit is left. During the period when the user observes the data and configures the analysis parameters, the background has quickly written most of the data into the second data processing unit (i.e., FPGA memory) area. Without the user's awareness, the subsequent analysis and processing flow is accelerated, and the time for a complete readback that would have taken several minutes or even dozens of minutes can be skipped, so that the key data segments (i.e., the first data range) can be analyzed first. After the analysis is completed, the process can be terminated by initiating a readback abort, which immediately responds to the user and avoids waiting for invalid data to be written, thereby improving the flexibility of data readback and data analysis, thereby enhancing the user experience.
[0118] Figure 4 is a flowchart of another data readback method provided in an embodiment of the present application, referring to Figure 4 The data readback method is used in the second data processing unit and specifically includes:
[0119] S301: Receive original data written in data blocks according to a preset block data length.
[0120] The first data processing unit can be understood as a unit with certain data processing functions, such as the X86 memory in the recorder, and the second data processing unit can be understood as a unit with high-speed data processing functions, such as FPGA memory. The second data processing unit receives the original data written by the first data unit in data blocks according to the preset block data length, and obtains the written data range. The received data is cached for subsequent data analysis.
[0121] S302: Receive a data processing instruction sent by a first data processing unit, and determine a corresponding first data range according to the first instruction.
[0122] In the process of receiving data block writing, when the user needs to obtain some analysis results of some key data in the original data, a first instruction is generated through the user's input operation, and the first data processing unit determines the corresponding first data range according to the first instruction, and preferentially writes the data corresponding to the first data range into the second data processing unit in units of data blocks according to the preset block data length. When it is recognized that the writing of the last data block of the first data range is completed, a data processing instruction is sent to the second data processing unit, and the remaining original data continues to be written into the second data processing unit in units of data blocks according to the preset block data length.
[0123] When the second data processing unit receives the data processing instruction sent by the first data processing unit, it determines the corresponding first data range according to the data processing instruction, so as to subsequently perform corresponding data analysis and processing according to the first data processing unit.
[0124] It should be noted that, when the second data processing unit receives the data processing instruction, it continues to receive the original data written in data blocks according to the preset block data length.
[0125] S303: Perform data analysis on the data corresponding to the first data range according to the data processing instruction to obtain a data analysis result.
[0126] After receiving the data analysis instruction, the second data processing unit determines the corresponding first data range according to the data processing instruction, and performs data analysis and processing on the data corresponding to the first data range according to the data analysis instruction to obtain a data analysis result. By analyzing and processing the data corresponding to the first data range through the data processing instruction, it is avoided that the data analysis needs to be completed after the complete original data is written, which causes a long waiting time, and improves the work efficiency of data analysis.
[0127] S304: Send the data analysis result to the first data processing unit.
[0128] The data analysis result is sent to the first data processing unit, so that the first data processing unit sends the data analysis result to the display unit for display, so as to be viewed by the user.
[0129] As described above, when the second data processing unit receives the data processing instruction, it performs data analysis processing on the data corresponding to the first data range to obtain the data analysis result corresponding to the first data range, thereby avoiding the need to wait for the entire original data to be written before performing data analysis, which results in a long waiting time, and improves the work efficiency of data analysis. In addition, through the data processing instruction, data reading back and data analysis processing of some key data can be flexibly performed, which improves the flexibility of data reading back and data analysis processing, reduces the time-consuming waste of waiting for invalid data to be read back, and thus improves the user experience.
[0130] Based on the above embodiments, Figure 5 This is a schematic diagram of the structure of a data readback device provided in an embodiment of the present application. Figure 5 The data read-back device provided in this embodiment is used in the first data processing unit, and specifically includes: an instruction receiving module 21, a data writing module 22, an instruction sending module 23 and a result receiving module 24.
[0131] The instruction receiving module 21 is used to receive a read-back initiating instruction, and write the original data in the storage unit into the second data processing unit in sequence according to the preset block data length and in units of data blocks according to the read-back initiating instruction;
[0132] The data writing module 22 is used for, during the writing process, when receiving the first instruction, determining the corresponding first data range according to the first instruction, and preferentially writing the data corresponding to the first data range into the second data processing unit in sequence in units of data blocks according to a preset block data length;
[0133] The instruction sending module 23 is used for, when it is recognized that the writing of the last data block of the first data range is completed, writing the remaining original data into the second data processing unit in sequence in units of data blocks according to the preset block data length, and sending a data processing instruction to the second data processing unit;
[0134] The result receiving module 24 is used to receive the data analysis result fed back by the second data processing unit based on the data processing instruction. The data analysis result is the result obtained by the second data processing unit analyzing and processing the data corresponding to the first data range based on the first instruction after receiving the data corresponding to the first data range.
[0135] In one embodiment, the instruction receiving module 21 includes a file reading submodule, an indexing submodule and a writing submodule;
[0136] The file reading submodule is used to receive a readback initiation instruction, determine the corresponding storage file according to the readback instruction, and obtain the original data length by reading the storage file, where the storage file stores the original data;
[0137] The index submodule is used to perform block processing according to the original data length and preset index information to obtain the block data length;
[0138] The writing submodule is used to write the original data in the storage unit into the second data processing unit in sequence according to the block data length and in units of data blocks to obtain the written data range.
[0139] In one embodiment, the data writing module 22 includes a first range determination submodule and a comparison submodule;
[0140] A first range determination submodule, configured to determine a first data range according to the first instruction when receiving the first instruction during the writing process;
[0141] The comparison submodule is used to compare the first data range with the written data range. If the data corresponding to the first data range has not been written into the second data processing unit, the writing of the current data block is suspended, and the data blocks corresponding to the first data range are written into the second data processing unit in sequence.
[0142] In one embodiment, the instruction sending module 23 is further used to compare the first data range with the written data range, and if the data corresponding to the first data range has been written into the second data processing unit, send the data processing instruction to the data processing module;
[0143] The result receiving module 24 is further used to receive the data analysis result fed back by the second data processing unit.
[0144] In one embodiment, the instruction sending module 23 is further used to send a data processing instruction to the second data processing unit when it is recognized that the writing of the last data block of the first data range is completed, and write the original data after the first data range into the second data processing unit in sequence according to the preset block data length in units of data blocks;
[0145] When it is recognized that all original data after the first data range has been written, the remaining original data before the first data range is sequentially written into the second data processing unit in units of data blocks according to a preset block data length until all original data has been written.
[0146] In one embodiment, the device further comprises a display module;
[0147] The display module is used to transmit the data corresponding to the first data range and the data analysis result to the display unit for display.
[0148] In the above, the original data in the storage unit is sequentially written into the second data processing unit in units of data blocks according to the preset block data length according to the read-back initiation instruction. During the writing process, when the first instruction is received, the data of the corresponding first data range is sequentially written into the second data processing unit in units of data blocks according to the preset block data length according to the first instruction. When it is recognized that the writing of the last data block of the first data range is completed, the data processing instruction is sent to the second data processing unit, and the remaining original data continues to be sequentially written into the second data processing unit in units of data blocks according to the preset data block length, and the data analysis result fed back by the second data processing unit based on the data processing instruction is received. By adopting the above technical means, the data corresponding to the first data range can be written preferentially through the first instruction during the process of writing data into the second data processing unit, the data read-back time of the data in the first data range can be shortened, and the work efficiency of the data read-back of the key data can be improved; and after the writing of the data in the first data range is completed, the data corresponding to the first data range is analyzed and processed by the second data processing unit to obtain the data analysis result, avoiding the problem of low work efficiency caused by the need to complete the writing of all original data before starting the key data analysis, improving the speed of data analysis processing, and thus improving the overall work efficiency.
[0149] The data readback device provided in the embodiment of the present application can be used to execute the data readback method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0150] The present application embodiment provides a data readback device, referring to Figure 6 The data readback device includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The number of processors in the data readback device can be one or more, and the number of memories in the data readback device can be one or more. The processor, memory, communication module, input device and output device of the data readback device can be connected via a bus or other methods.
[0151] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the data readback method of any embodiment of the present application (for example, the instruction receiving module, data writing module, instruction sending module and result receiving module in the data readback device). The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device or other non-volatile solid-state storage device. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0152] The communication module 33 is used for data transmission.
[0153] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, implements the above-mentioned data readback method.
[0154] The input device 34 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 35 may include a display device such as a display screen.
[0155] The data readback device provided above can be used to execute the data readback method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0156] The embodiment of the present application also provides a storage medium storing computer executable instructions, which are used to execute a data readback method when executed by a computer processor. The data readback method includes: receiving a readback initiation instruction, and writing the original data in the storage unit into the second data processing unit in sequence according to a preset block data length in units of data blocks according to the readback initiation instruction; during the writing process, when a first instruction is received, determining the corresponding first data range according to the first instruction, and preferentially writing the data corresponding to the first data range into the second data processing unit in sequence according to the preset block data length in units of data blocks; when it is identified that the writing of the last data block of the first data range is completed, sending a data processing instruction to the second data processing unit, and continuing to write the remaining original data into the second data processing unit in sequence according to the preset block data length in units of data blocks; receiving a data analysis result fed back by the second data processing unit based on the data processing instruction, wherein the data analysis result is a result obtained by the second data processing unit analyzing and processing the data corresponding to the first data range after receiving the data corresponding to the first data range.
[0157] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.
[0158] Of course, the computer executable instructions of a storage medium storing computer executable instructions provided in an embodiment of the present application are not limited to the above data readback method, and can also execute related operations in the data readback method provided in any embodiment of the present application.
[0159] The data readback device, storage medium and data readback equipment provided in the above embodiments can execute the data readback method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the data readback method provided in any embodiment of the present application.
[0160] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the protection scope of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A data readback method, characterized in that: For a first data processing unit, comprising: receiving a readback initiation instruction, reading index data according to the readback initiation instruction, and drawing and displaying waveform information according to the index data, wherein the index data is peak-to-peak value data; Writing the original data in the storage unit into the second data processing unit in sequence in units of data blocks according to a preset block data length according to the read-back initiation instruction; During the writing process, when a first instruction is received, a first data range is determined according to the first instruction, the first data range being selected based on the waveform information; Compare the first data range with the written data range, and if the data corresponding to the first data range has not been written into the second data processing unit, suspend the writing of the current data block, and write the data blocks corresponding to the first data range into the second data processing unit in sequence; When it is identified that the writing of the last data block of the first data range is completed, a data processing instruction is sent to the second data processing unit, and the remaining original data continues to be sequentially written into the second data processing unit in units of data blocks according to a preset block data length; Receive a data analysis result fed back by the second data processing unit based on the data processing instruction, wherein the data analysis result is a result obtained by the second data processing unit analyzing and processing the data corresponding to the first data range after receiving the data corresponding to the first data range.
2. The method according to claim 1, characterized in that: The receiving of the read-back initiation instruction and writing the original data in the storage unit into the second data processing unit in sequence according to the preset block data length in units of data blocks according to the read-back initiation instruction include: receiving a read-back initiation instruction, determining a corresponding storage file according to the read-back initiation instruction, and obtaining an original data length by reading the storage file, wherein the storage file stores the original data; Perform block processing according to the original data length and preset index information to obtain block data length; The original data in the storage unit is sequentially written into the second data processing unit in units of data blocks according to the block data length to obtain a written data range.
3. The method according to claim 1, characterized in that In the writing process, when the first instruction is received, after determining the first data range according to the first instruction, the method includes: Comparing the first data range with the written data range, and sending a data processing instruction to the data processing module if the data corresponding to the first data range has been written into the second data processing unit; Receive the data analysis result fed back by the second data processing unit.
4. The method according to claim 1, characterized in that: When it is identified that the writing of the last data block of the first data range is completed, the remaining original data continues to be sequentially written into the second data processing unit in units of data blocks according to the preset block data length, and a data processing instruction is sent to the second data processing unit, including: When it is identified that the writing of the last data block of the first data range is completed, a data processing instruction is sent to the second data processing unit, and the original data after the first data range is sequentially written into the second data processing unit in units of data blocks according to a preset block data length; When it is identified that all original data after the first data range has been written, the remaining original data before the first data range is written into the second data processing unit in sequence in units of data blocks according to a preset block data length until all original data has been written.
5. The method according to claim 1, characterized in that After receiving the data analysis result fed back by the second data processing unit based on the data processing instruction, the method includes: The data corresponding to the first data range and the data analysis result are transmitted to a display unit for display.
6. A data readback device, characterized in that: For a first data processing unit, comprising: An instruction receiving module, used for receiving a readback initiation instruction, reading index data according to the readback initiation instruction, and drawing and displaying waveform information according to the index data, wherein the index data is peak-to-peak value data; Writing the original data in the storage unit into the second data processing unit in sequence in units of data blocks according to a preset block data length according to the read-back initiation instruction; A data writing module, configured to determine a first data range according to a first instruction when receiving the first instruction during a writing process, wherein the first data range is selected based on the waveform information; Compare the first data range with the written data range, and if the data corresponding to the first data range has not been written into the second data processing unit, suspend the writing of the current data block, and write the data blocks corresponding to the first data range into the second data processing unit in sequence; an instruction sending module, configured to, when recognizing that the writing of the last data block of the first data range is completed, continue to write the remaining original data into the second data processing unit in sequence in units of data blocks according to a preset block data length, and send a data processing instruction to the second data processing unit; A result receiving module is used to receive the data analysis result fed back by the second data processing unit based on the data processing instruction, wherein the data analysis result is the result obtained by the second data processing unit analyzing and processing the data corresponding to the first data range based on the first instruction after receiving the data corresponding to the first data range.
7. A data readback device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a processor, they are used to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for writing data from cache to memory
CN102135941A
Data processing system capable of separately storing external data and method thereof
CN103136291A
Method of voice dataanalyses
CN103198837A
Data storage method and storage equipment
CN106980680A
Disk management method and system, electronic device and storage medium
CN109634523A
