Data processing method and device

By performing differential operations on rows or columns of optical fiber sensing data, reducing correlation, and using entropy coding, the problem of poor compression of optical fiber sensing data in the existing technology is solved, and efficient and fast data compression is achieved.

CN118590073APending Publication Date: 2024-09-03HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310237093.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In terms of data compression, the existing technology has poor compression effect on optical fiber sensing data, high transmission and storage costs, high computational complexity of existing algorithms, and insufficient compression rate and compression ratio.

Method used

By performing differential operations on rows or columns of data to be compressed, data correlation is reduced, and entropy coding is used for data compression to achieve efficient and fast data compression.

Benefits of technology

It significantly improves the efficiency and compression ratio of data compression, reduces the computational complexity, and is suitable for efficient compression of large-scale optical fiber sensing data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590073A
    Figure CN118590073A
Patent Text Reader

Abstract

The invention provides a data processing method and device, and relates to the field of data compression. The method comprises the following steps: acquiring to-be-compressed data; sequentially carrying out n times of preset processing on the to-be-compressed data to obtain pre-processed data; wherein the preset processing comprises performing differential operation on rows in the to-be-operated matrix, or performing differential operation on columns in the to-be-operated matrix. The to-be-operated matrix is a matrix obtained after previous preset processing, or the to-be-operated matrix is a matrix composed of to-be-compressed data. And compressing the preprocessed data by using an entropy coding mode to obtain compressed data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application provides a data processing method and device, which relate to the field of data compression. Background Art

[0002] With the development of information technology, the amount of data that needs to be processed in various application scenarios is showing explosive growth, which increases the difficulty of data storage, data transmission and other methods.

[0003] Among them, in the prior art, corresponding data compression methods are often used to compress the data volume, thereby reducing the difficulty of data storage and data transmission.

[0004] How to achieve data compression more efficiently and conveniently is the problem that needs to be solved at present. Summary of the invention

[0005] The present application provides a data processing method and device for realizing data compression more efficiently and conveniently.

[0006] In a first aspect, a data processing method is provided, comprising: obtaining data to be compressed. Performing preset processing on the data to be compressed n times in sequence to obtain preprocessed data. Wherein, the preset processing includes: performing differential operations on rows in a matrix to be operated, or performing differential operations on columns in a matrix to be operated. The matrix to be operated is a matrix obtained after the previous preset processing, or the matrix to be operated is a matrix composed of the data to be compressed. The preprocessed data is compressed using an entropy coding method to obtain compressed data. In the above method, since the rows or columns of the residual data in the preprocessed data obtained after n preset processing no longer have a high correlation, when entropy coding is performed on the preprocessed data, more effective compression can be achieved for the residual data. In this way, the effect of efficient and fast data compression can be achieved.

[0007] In one implementation, the preset processing also includes: calculating a correlation coefficient based on two adjacent rows of data in the matrix to be operated; the correlation coefficient is used to indicate the correlation between the two adjacent rows of data. According to the correlation coefficient, the value of the sign bit used when the two adjacent rows of data are differentially operated is determined. Alternatively, the preset processing also includes: calculating a correlation coefficient based on two adjacent columns of data in the matrix to be operated; the correlation coefficient is used to indicate the correlation between the two adjacent columns of data. According to the correlation coefficient, the value of the sign bit used when the two adjacent columns of data are differentially operated is determined. In the above implementation, by quantifying the correlation between two adjacent rows of data, a coefficient (called a correlation coefficient) used to reflect the correlation between the two adjacent rows of data is obtained. Then, the value of the sign bit used when the two adjacent rows of data are differentially operated is calculated based on the correlation coefficient.

[0008] In one implementation, the data to be compressed is optical fiber sensing data.

[0009] In one implementation, the data to be compressed is earthquake detection data.

[0010] In one implementation, the preprocessed data includes: a first field for storing residual data, a second field for storing the sign bit used for each differential operation in the n preset processings, a third field for storing the number of rows of the data to be compressed, a fourth field for storing the number of columns of the data to be compressed, a fifth field for storing the dimension of the data to which the data to be compressed belongs, a sixth field for storing the number of differential operations performed on rows in the n preset processings, a seventh field for storing the number of differential operations performed on columns in the n preset processings, an eighth field for storing version information of the compression scheme, one or more of the ninth field for indicating the starting position of the data, and one or more of the tenth field for storing verification information.

[0011] In a second aspect, a data processing method is provided, comprising: obtaining compressed data. Decompressing the compressed data using entropy decoding to obtain preprocessed data; the preprocessed data includes residual data and operation information. The operation information is used to indicate the n preset processes that the original data has undergone in sequence, and the preset processes include: performing differential operations on the rows in the matrix to be operated, or performing differential operations on the columns in the matrix to be operated. The matrix to be operated is a matrix obtained after the previous preset process, or the matrix to be operated is a matrix composed of the original data. According to the operation information, the residual data is subjected to the inverse process of the preset process n times to obtain the original data.

[0012] In one implementation, the raw data is optical fiber sensing data.

[0013] In one implementation, the original data is earthquake detection data.

[0014] In one implementation, the preprocessed data includes: a first field for storing residual data, a second field for storing the sign bit used for each differential operation in the n preset processings, a third field for storing the number of rows of the data to be compressed, a fourth field for storing the number of columns of the data to be compressed, a fifth field for storing the dimension of the data to which the data to be compressed belongs, a sixth field for storing the number of differential operations performed on rows in the n preset processings, a seventh field for storing the number of differential operations performed on columns in the n preset processings, an eighth field for storing version information of the compression scheme, one or more of the ninth field for indicating the starting position of the data, and one or more of the tenth field for storing verification information.

[0015] In a third aspect, a data processing device is provided, comprising: an acquisition unit, configured to acquire data to be compressed; a differential unit, configured to perform n preset processes on the data to be compressed in sequence to obtain preprocessed data; wherein the preset processes include: performing differential operations on rows in a matrix to be operated, or performing differential operations on columns in a matrix to be operated; the matrix to be operated is a matrix obtained after the last preset process, or the matrix to be operated is a matrix composed of the data to be compressed. An entropy coding unit, configured to compress the preprocessed data using an entropy coding method to obtain compressed data.

[0016] In one implementation, the preset processing further includes: calculating a correlation coefficient based on two adjacent rows of data in the matrix to be operated; the correlation coefficient is used to indicate the correlation between the two adjacent rows of data. According to the correlation coefficient, determining the value of the sign bit used when performing a differential operation on the two adjacent rows of data. Alternatively, the preset processing further includes: calculating a correlation coefficient based on two adjacent columns of data in the matrix to be operated; the correlation coefficient is used to indicate the correlation between the two adjacent columns of data. According to the correlation coefficient, determining the value of the sign bit used when performing a differential operation on the two adjacent columns of data.

[0017] In one implementation, the data to be compressed is optical fiber sensing data.

[0018] In one implementation, the data to be compressed is earthquake detection data.

[0019] In one implementation, the preprocessed data includes: a first field for storing residual data, a second field for storing the sign bit used for each differential operation in the n preset processings, a third field for storing the number of rows of the data to be compressed, a fourth field for storing the number of columns of the data to be compressed, a fifth field for storing the dimension of the data to which the data to be compressed belongs, a sixth field for storing the number of differential operations performed on rows in the n preset processings, a seventh field for storing the number of differential operations performed on columns in the n preset processings, an eighth field for storing version information of the compression scheme, one or more of the ninth field for indicating the starting position of the data, and one or more of the tenth field for storing verification information.

[0020] In a fourth aspect, a data processing device is provided, comprising: an acquisition unit, configured to acquire compressed data. An entropy decoding unit, configured to decompress the compressed data using entropy decoding to obtain preprocessed data; the preprocessed data includes residual data and operation information; the operation information is used to indicate the n preset processes that the original data has undergone in sequence, and the preset processes include: performing differential operations on the rows in the matrix to be operated, or performing differential operations on the columns in the matrix to be operated; the matrix to be operated is a matrix obtained after the last preset process, or the matrix to be operated is a matrix composed of the original data. A differential unit, configured to perform n times of inverse processing of the preset process on the residual data according to the operation information to obtain the original data.

[0021] In one implementation, the raw data is optical fiber sensing data.

[0022] In one implementation, the original data is earthquake detection data.

[0023] In one implementation, the preprocessed data includes: a first field for storing residual data, a second field for storing the sign bit used for each differential operation in the n preset processings, a third field for storing the number of rows of the data to be compressed, a fourth field for storing the number of columns of the data to be compressed, a fifth field for storing the dimension of the data to which the data to be compressed belongs, a sixth field for storing the number of differential operations performed on rows in the n preset processings, a seventh field for storing the number of differential operations performed on columns in the n preset processings, an eighth field for storing version information of the compression scheme, one or more of the ninth field for indicating the starting position of the data, and one or more of the tenth field for storing verification information.

[0024] In a fifth aspect, the present application provides a data processing device, comprising a processor and an interface circuit, wherein the processor receives or sends data through the interface circuit, and the processor uses a logic circuit or executes code instructions to implement a method as described in the first aspect or any one of the implementations in the first aspect or the second aspect or any one of the implementations in the second aspect.

[0025] In a sixth aspect, the present application provides a computer-readable storage medium, characterized in that a computer program is stored in the storage medium, and when the computer program is executed by a processor, it is used to implement a method such as the first aspect or any one of the implementation methods in the first aspect or the second aspect or any one of the implementation methods in the second aspect.

[0026] In the seventh aspect, the present application provides a computer program product, characterized in that the computer program product includes instructions, which, when the instructions are executed on a processor, are used to implement a method as described in the first aspect or any one of the implementations in the first aspect or the second aspect or any one of the implementations in the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of optical fiber sensing data provided by an embodiment of the present application;

[0028] Figure 2 A schematic diagram of the structure of a neural network provided in an embodiment of the present application;

[0029] Figure 3 One of the flowcharts of a data processing method provided in an embodiment of the present application;

[0030] Figure 4 A schematic diagram of the structure of an information system provided in an embodiment of the present application;

[0031] Figure 5 A second flowchart of a data processing method provided in an embodiment of the present application;

[0032] Figure 6 A third flowchart of a data processing method provided in an embodiment of the present application;

[0033] Figure 7 One of the schematic diagrams of a frame structure provided in an embodiment of the present application;

[0034] Figure 8 A second schematic diagram of a frame structure provided in an embodiment of the present application;

[0035] Fig. 9 One of the schematic diagrams of data distribution provided in the embodiment of the present application;

[0036] Fig.10A second schematic diagram of data distribution provided in an embodiment of the present application;

[0037] Fig.11 A fourth flowchart of a data processing method provided in an embodiment of the present application;

[0038] Fig.12 One of the structural schematic diagrams of a data processing device provided in an embodiment of the present application;

[0039] Fig.13 A second structural diagram of a data processing device provided in an embodiment of the present application;

[0040] Fig.14 The third structural diagram of a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] The technical solution in the present embodiment will be described below in conjunction with the accompanying drawings in the present embodiment. Among them, in order to facilitate the clear description of the technical solution of the present embodiment, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. It can be understood by those skilled in the art that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the difference. At the same time, in the present embodiment, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present embodiment should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for easy understanding.

[0042] In order to facilitate understanding of the technical solutions provided by the embodiments of the present application, the relevant technologies involved in the embodiments of the present application are first introduced:

[0043] 1. Data compression refers to a technical method that reduces the amount of data to reduce storage space, improves its transmission, storage and processing efficiency, or reorganizes data according to a certain algorithm to reduce data redundancy and storage space without losing useful information. Commonly used data compression technologies include: PAQ8, ZLIB, ZSTD and 7zip, etc.

[0044] 2. Fiber optic sensing is an important technology in modern industry. Fiber optic sensing technology is extremely sensitive and can send out instant alarms when changes are detected and provide precise line locations for events detected on the optical fiber. Therefore, fiber optic sensing technology has now been widely used in protection, detection and monitoring scenarios, and has been deployed in defense, military, aerospace, industrial control, medicine and health and other fields.

[0045] Fiber optic sensor data usually has a high acquisition frequency, a wide range, and a large amount of normally distributed background noise. Specifically, taking the fiber optic sensor data in OSD format as an example, the fiber optic sensor data may include four parts: the real part of the x-axis polarization, the imaginary part of the x-axis polarization, the real part of the y-axis polarization, and the imaginary part of the y-axis polarization. Any of the above four parts includes the acquired data.

[0046] Take the example of using a 120-meter-long optical fiber to collect optical fiber sensor data. When every 1-meter interval is used as a sampling point and sampling is performed every 1 millisecond, the optical fiber sensor data collected after continuous sampling for 20,000 milliseconds is as follows: Figure 1 As shown. As mentioned above, the optical fiber sensing data may include four parts: the real part of the x-axis polarization, the imaginary part of the x-axis polarization, the real part of the y-axis polarization and the imaginary part of the y-axis polarization. Figure 1 Only one of the four parts is shown. The data of the other three parts can also be used. Figure 1 In a similar way, the following mainly uses Figure 1 The data shown is used as an example for explanation. Similar processing can be performed on the data of the other three parts, and repeated content will not be repeated in the embodiments of this application.

[0047] It is understandable that the embodiment of the present application mainly takes a 120-meter-long optical fiber, adopts a sampling point every 1 meter and performs sampling every 1 millisecond, and takes the optical fiber sensing data collected after continuous collection for 20,000 milliseconds as an example to illustrate the provided technical solution. In actual application, the optical fiber sensing data required to be compressed can be collected using an optical fiber longer or shorter than 120 meters. In addition, the interval between the sampling points can be greater than 1 meter or less than 1 meter. In addition, the sampling period used can also be greater than 1 millisecond or less than 1 millisecond, and the total sampling time can be greater than 20,000 milliseconds or less than 20,000 milliseconds. There is no limitation on the specific values ​​of the above parameters in the embodiment of the present application.

[0048] exist Figure 1 In the figure, the pixel value of any row of pixels represents the data collected by the sampling point at the corresponding position within 20000ms. nThe pixel values ​​of the pixels in the box represent the data collected by a sampling point within 20000ms. Figure 1 The pixel value of any column represents the data collected by each sampling point within 120m at the same time. n The pixel values ​​of the pixels in the box represent the data collected by each sampling point at that moment. Figure 1 In the example, the pixel value of any point is used to represent the data collected at the corresponding time and space. For example, the pixel value of the pixel with the ordinate 40 and the abscissa 2500 is the data collected at the sampling point 40 meters away at the 2500th ms.

[0049] The amount of optical fiber sensor data is usually very large. If the data is collected continuously for one minute in a 1,000-meter optical fiber, it can reach 1GB. Due to the huge amount of optical fiber sensor data, whether it is transmitted through the network or replaced with a hard disk, the cost of data sharing and storage is relatively high, which seriously affects the efficiency and cost of subsequent data use. Therefore, if the optical fiber sensor data can be effectively compressed, it can save storage space, improve transmission efficiency, and reduce the frequency of disk reading, which has a wide range of applications and strong commercial value.

[0050] When the existing data compression algorithms compress the optical fiber sensor data, the storage compression effect is usually poor. For example, Table 1 below shows the compression ratios when the optical fiber sensor data is compressed using four data compression algorithms, namely, ZLIB-5, ZSTD-5, 7-zip and ZPAQ, and Table 2 shows the compression speeds when the optical fiber sensor data is compressed using four data compression algorithms, namely, ZLIB-5, ZSTD-5, 7-zip and ZPAQ.

[0051] Table 1

[0052] File / Compression Ratio zlib-5 zstd-5 7-Zip zpaq noise.osd 1.24 1.23 1.39 1.45 Before / After compression event.osd 1.14 1.15 1.23 1.28 Before / After compression

[0053] Table 2

[0054] File / Compression Speed zlib-5 zstd-5 7-Zip zpaq noise.osd 25.9 179 18 2 MB / s event.osd 35.61 243 5.8 2.6 MB / s

[0055] Among them, noise.osd is a file that records the background noise data collected when no event occurs. event.osd is a file that records the data collected when an event occurs. It can be seen that, taking event.osd as an example, the zpaq with the highest compression ratio can only reach 1.28, and the compression rate that can be achieved by using zpaq is only 2.6MB / s.

[0056] In order to achieve efficient compression of data such as fiber optic sensor data, PAQ8 compression can be used in a related technology to compress data. PAQ8 is an arithmetic coding compression scheme based on probability prediction, invented by Matt Mahoney. This scheme predicts the probability distribution of the next bit based on multiple empirical models and mixes these prediction results. Figure 2 As shown, the hybrid method is to use a sparsely connected neural network to adaptively update the neural network parameters during the compression process. After obtaining the final prediction result, the prediction is used to perform arithmetic coding on the compressed bits.

[0057] When using PAQ8 to compress fiber optic sensor data, on the one hand, because the solution processes in bits, each bit needs to go through hundreds of model predictions, and the mixing parameters need to be adaptively updated when mixing, the calculation complexity is extremely high, and the operation speed is only 10KB / s. Therefore, the compression rate of using this solution to compress fiber optic sensor data is still not high enough. On the other hand, because fiber optic sensor data has high-dimensional characteristics, and PAQ8 has a high compression ratio mainly for one-dimensional data, the compression ratio of using this solution to compress fiber optic sensor data is not high enough.

[0058] In view of the above situation, the embodiments of the present application take into account that in some data that can be represented as a matrix, there may be a certain correlation between the data in adjacent rows (or data in adjacent columns) in the matrix.

[0059] Taking optical fiber sensing data as an example, Figure 1 The fiber optic sensing data shown in is represented as a matrix of 120 rows × 20,000 columns, where each value in the matrix is ​​used to represent the data collected at the corresponding time and space. Among them, on the one hand, the data collected at adjacent sampling points are often correlated. For example, the data collected at a distance of 60m is correlated with the data collected at a distance of 61m. Therefore, in the above matrix, the data in adjacent rows are usually correlated; on the other hand, the data collected from the same sampling point at multiple consecutive time points are often correlated. For example, in the data collected from the sampling point at a distance of 60m, the data collected at adjacent time points are correlated. Therefore, in the above matrix, the data in adjacent columns are usually correlated.

[0060] Therefore, the embodiment of the present application provides a data processing method, in which the correlation between the data in adjacent rows and the correlation between the data in adjacent columns in the data to be compressed are taken into consideration, and then the following is adopted: Figure 3The method shown compresses data. Specifically, in this method, after obtaining the data to be compressed (S101), the rows in the data to be compressed can be differentially operated, and / or the columns in the data to be compressed can be differentially operated; and for the matrix output by the differential operation, the rows in the matrix can be differentially operated again, and / or the columns in the matrix can be differentially operated (hereinafter, for the convenience of expression, the differential operation on the rows in the matrix, or the differential operation on the columns in the matrix, are collectively referred to as "preset processing"). After performing n times of preset processing (S102), the obtained pre-processed data (hereinafter, for the convenience of expression, the data obtained after n times of preset processing are collectively referred to as "preset processing") are entropy encoded (S103) to obtain compressed data, so as to obtain compressed data.

[0061] by Figure 1 Taking the optical fiber sensing data shown in as an example, after obtaining the data to be compressed (which may be a matrix of 120 rows×20000 columns), on the one hand, the algorithm of the following formula 1 may be used to perform differential operations on the rows of the data to be compressed.

[0062] NewR n+1 =R n+1 -S n ×R n Formula 1

[0063] Among them, R n The nth row (i.e. Figure 1 Middle Row n ) data, R n+1 The n+1th row (i.e. Figure 1 Middle Row n+1 ) data, S n is the sign bit used when performing differential operations on the data in the nth row and the n+1th row in the matrix, NewR n+1 is the data of the n+1th row in the matrix obtained after the difference operation (hereinafter, the matrix obtained after the difference operation is referred to as "residual data"). n The value of can be determined in different ways according to the actual application needs. For example, S n Set to a specific constant; for example, S can also be calculated according to a preset algorithm n For S n The value determination method of will be described in detail in S401 below and will not be introduced here.

[0064] On the other hand, the algorithm of the following formula 2 may also be used to perform a differential operation on the column of data to be compressed.

[0065] NewCn+1 =C n+1 -K n ×C n Formula 2

[0066] Among them, C n The nth column (i.e. Figure 1 Middle Col n ) data, C n+1 The n+1th column (i.e. Figure 1 Middle Col n+1 ) data, K n NewC is the sign bit used when performing a differential operation on the data in the nth column and the n+1th column of the matrix. n+1 is the data of the n+1th column in the residual data obtained after the difference operation. n The value determination method can refer to the following S401 to determine S n The implementation process is not described here.

[0067] In addition, after performing a differential operation on the rows or columns of the data to be compressed, the differential operation process may be repeated on the results obtained by the differential operation, thereby further reducing the correlation between the rows or columns in the matrix.

[0068] After n preset processes, the rows or columns of the residual data in the obtained preprocessed data no longer have a high correlation. Therefore, when entropy coding is performed on the preprocessed data, more effective compression can be achieved for the residual data. In this way, the effect of efficient and fast data compression can be achieved.

[0069] The data processing method provided in the embodiment of the present application is described in detail below with reference to examples.

[0070] First, the application scenario of the data processing method provided in the embodiment of the present application is introduced: the data processing method provided in the embodiment of the present application can be applied to various information systems to compress data. For example, Figure 4 The figure is a schematic diagram of the structure of an information system provided in an embodiment of the present application.

[0071] For example, the information system 20 may be a security fiber optic sensing system for oil and gas pipeline intrusion detection and perimeter security detection.

[0072] For another example, the information system 20 may be a seismic wave data system. The seismic wave data system collects seismic wave intensity over a period of time by arranging detectors at multiple locations with uniform intervals. After analyzing the data, the geological structure can be detected and imaged, which has great application prospects in oil exploration, geological detection and other fields.

[0073] The information system 20 may include one or more of a data acquisition device 201 , a data processing device 202 , a data storage device 203 and a data analysis device 204 .

[0074] The data acquisition device 201 is used to collect data. For example, the data acquisition device 201 may be an optical fiber device or an earthquake monitoring device.

[0075] The data processing device 202 is used to clean and annotate the data collected by the data collection device 201. In addition, the data processing device 202 can also use the data processing method provided in the embodiment of the present application to compress the data. In addition, the data processing device 202 can also send the compressed data to the data storage device 203 for storage.

[0076] The data storage device 203 is used to store data from the data storage device 203. In one implementation, the data storage device 203 may be a cloud device. In another implementation, the storage resources in the data processing device 202 may be used to store data, and the data storage device 203 may be a part of the data processing device 202.

[0077] The data analysis device 204 is used to read the data stored in the data storage device 203, decompress the data according to the data processing method provided in the embodiment of the present application, and then analyze the decompressed data. Taking the optical fiber sensing data as an example, the data analysis device 204 can use the optical fiber sensing data to train the feature model so as to import the trained feature model into the optical fiber device (which can be the data acquisition device 201) for event monitoring.

[0078] In actual application, the functions of each device in the above information system 20 can be implemented by a personal computer (including desktop computers, laptop computers, handheld computers, and notebook computers, etc.), an ultra-mobile personal computer (UMPC), or a smart phone, a server, and other electronic devices; or, the functions of each device in the above information system 20 can also be implemented by some hardware / software devices in the above electronic devices. The embodiment of the present application does not impose any special restrictions on the specific form of each device in the information system 20.

[0079] The following is a detailed description of the data processing method provided by the embodiment of the present application in conjunction with the operation process of the information system 20. Specifically, taking the information system 20 as a security optical fiber sensor system as an example, Figure 5 As shown, the method may include:

[0080] S301, the data processing device 202 obtains an osd file.

[0081] For example, after the optical fiber sensing device serving as the data acquisition device 201 acquires optical fiber sensing data, the sensing data can be packaged into data in an osd format (ie, an osd file) and sent to the data processing device 202 .

[0082] S302: The data processing device 202 parses the osd file.

[0083] By parsing the osd file, the data processing device 202 can obtain the frame header information included in the osd file and the high-dimensional tensor used to represent the optical fiber sensing data.

[0084] For example, the high-dimensional tensor can be a three-dimensional tensor, in which a two-dimensional matrix is ​​used to represent the optical fiber sensing data of the four parts of the real part of the x-axis polarization, the imaginary part of the x-axis polarization, the real part of the y-axis polarization and the imaginary part of the y-axis polarization.

[0085] S303: The data processing device 202 obtains data to be compressed.

[0086] Specifically, the data processing device 202 may divide the high-dimensional tensor into two-dimensional matrices by dividing the high-dimensional tensor. The data to be compressed may be any matrix in the two-dimensional matrices obtained by the division.

[0087] For example, the data to be compressed may be optical fiber sensing data for representing any one of the real part of x-axis polarization, the imaginary part of x-axis polarization, the real part of y-axis polarization, and the imaginary part of y-axis polarization.

[0088] S304, the data processing device 202 performs n preset processes on the data to be compressed in sequence to obtain pre-processed data (for the convenience of description herein, the data obtained after n preset processes are referred to as “pre-processed data”).

[0089] The preset processing may include: performing differential operations on rows in the matrix to be operated; or the preset processing may include: performing differential operations on columns in the matrix to be operated. The matrix to be operated is a matrix obtained after the last preset processing, or the matrix to be operated is a matrix composed of data to be compressed (hereinafter, the matrix composed of data to be compressed is referred to as "matrix to be compressed").

[0090] That is to say, when the first preset processing is performed, a differential operation is performed on the rows or columns of the matrix to be compressed to obtain a residual matrix (called the "first residual matrix"). Then, when the second preset processing is performed, a differential operation is performed on the rows or columns of the first residual matrix to obtain a second residual matrix. When the next preset processing is performed, a differential operation is performed on the rows or columns of the second residual matrix to obtain a third residual matrix. This is repeated until n preset processings are completed.

[0091] The following is an introduction to the implementation process of performing differential operations on the rows of the compressed matrix. It is understandable that the differential operations on the columns of the compressed matrix and the preset processing process of each residual matrix can refer to the process of performing differential operations on the rows of the compressed matrix, and the repeated content will not be repeated in the embodiments of this application.

[0092] Specifically, Figure 6 As shown, the differential operation is performed on the rows of the compressed matrix, including:

[0093] S401 : The data processing device 202 determines the value of the sign bit used in the differential operation.

[0094] In one implementation, the correlation between two adjacent rows of data can be quantified to obtain a coefficient (called a correlation coefficient) for reflecting the correlation between the two adjacent rows of data. Then, the value of the sign bit used when performing a differential operation on the two adjacent rows of data is calculated based on the correlation coefficient. Therefore, S401 may specifically include:

[0095] S4011, the data processing device 202 calculates the nth row data R of the matrix to be compressed n and the n+1th row of data R n+1 The correlation coefficient of .

[0096] For example, the nth row of the matrix to be compressed R n and the n+1th row of data R n+1 The correlation coefficient P n It can be expressed as:

[0097]

[0098] That is, we can use the vector R n+1 In vector R n The projection length in the direction of n The length of the result is used to express the correlation coefficient P n .

[0099] It should be noted that in actual application, other calculation methods besides Formula 3 can also be used to determine the nth row of data R n and the n+1th row of data Rn+1 The correlation coefficient P n , there is no limitation on the specific calculation method in the embodiments of the present application.

[0100] S4012, the data processing device 202 calculates the correlation coefficient P n , determine the nth row of data R n and the n+1th row of data R n+1 The value of the sign bit when performing a differential operation S n .

[0101] For example, for the nth row of data R n and the n+1th row of data R n+1 The value of the sign bit when performing a differential operation S n It can be expressed as:

[0102] S n =floor(P n ) Formula 4

[0103] In other words, the correlation coefficient P can be n Round to represent the value of the sign bit S n .

[0104] It should be noted that in actual application, other calculation methods besides Formula 4 can also be used to determine the value S of the sign bit. n , there is no limitation on the specific calculation method in the embodiments of the present application.

[0105] S402: The data processing device 202 performs a differential operation on the matrix to be compressed according to the value of the sign bit used in the differential operation to obtain a first residual matrix.

[0106] Specifically, after determining the nth row of data R n and the n+1th row of data R n+1 The value of the sign bit when performing a differential operation S n Afterwards, the data processing device 202 can calculate the data NewR of the n+1th row in the first residual matrix according to Formula 1: n+1 .

[0107] NewR n+1 =R n+1 -S n ×R n Formula 1

[0108] After calculating each row of data in the first residual matrix according to the above method, the first residual matrix can be obtained. The first residual matrix can be expressed as:

[0109] R1,NewR2,NewR3,...,,NewRN

[0110] Wherein, N represents the number of rows of the first residual matrix.

[0111] In addition, the sign bit corresponding to the first residual matrix can be expressed as:

[0112] S1,S2,...,S N-1

[0113] The above S401-S402 is mainly introduced by the implementation process of performing differential operation on the rows of the compressed matrix. It can be understood that when performing differential operation on the columns of the compressed matrix and performing preset processing on each residual matrix (including performing differential operation on the rows or performing differential operation on the columns), it can also be implemented by referring to the contents of S401-S402.

[0114] For example, when performing a differential operation on the columns of the matrix to be compressed, the data of the nth column and the data of the n+1th column of the matrix to be compressed can be used as R n and R n+1 Substitute it into Formula 3 to get the correlation coefficient P used to represent the correlation between the nth column data and the n+1th column data. n Then, use Formula 4 to get the value S of the sign bit when performing a differential operation between the nth column data and the n+1th column data: n Then use Formula 1 to get the data of the n+1th column in the first residual matrix.

[0115] In one implementation, in order to facilitate the encoding and decoding of the pre-processed data, the present application also provides a frame structure of the pre-processed data. Figure 7 As shown, the preprocessed data may specifically include: one or more of: a first field, a second field, a third field, a fourth field, a fifth field, a sixth field, a seventh field, an eighth field, a ninth field and a tenth field.

[0116] The first field is used to store residual data after n preset processes. Figure 7 In the embodiment, the pre-processed data may include a frame header, a parameter part and a data buff part. The data buff part includes a BD field (ie, the first field) for storing a bulk data of residual data.

[0117] The second field is used to store the sign bit used in each differential operation in the n preset processes. Figure 7In the data stack part, the DSR field is used to record the sign bit (data sign of rows) when performing row differential operation, and the DSC field is used to record the sign bit (data sign of columns) when performing column differential operation. Among them, DSR and DSC are the second field.

[0118] The third field is used to record the number of rows of data to be compressed. For example Figure 7 In the parameter part, a NR field (ie, the third field) for storing the number of rows is included. In an exemplary practical application process, 32-bit unsigned integer (unsigned int, uint) data can be used as the NR field.

[0119] The fourth field is used to record the number of columns of data to be compressed. Figure 7 In the parameter part, the NC field (ie, the fourth field) for storing the number of columns is included. In an exemplary practical application process, 32-bit unsigned integer data can be used as the NC field.

[0120] The fifth field is used to record the dimension of the data to be compressed. Figure 7 In the parameter part, a ND field (ie, the fifth field) for storing the number of dimensions is included. For example, in actual application, 32-bit unsigned integer data can be used as the ND field.

[0121] The sixth field is used to record the number of times the differential operation is performed on the row in the n preset processes. Figure 7 In the parameter part, a CLR field (ie, the sixth field) for storing the compression level of a row is included. For example, in actual application, an 8-bit unsigned integer data may be used as the CLR field.

[0122] The seventh field is used to record the number of times the differential operation is performed on the column in the n preset processes. Figure 7 In the parameter part, a CLC field (ie, the seventh field) for storing the compression level of columns is included. For example, in actual application, an 8-bit unsigned integer data may be used as the CLC field.

[0123] The eighth field is used to record the version information of the compression scheme. For example Figure 7In the frame header part, a VS field (ie, the eighth field) for storing a version is included. For example, in actual application, an 8-bit unsigned integer data may be used as the VS field.

[0124] The ninth field is used to indicate the starting position of the data. Figure 7 In the frame header, the frame header includes a MN field (ie, the ninth field) for storing a magic number. For example, in actual application, a 16-bit unsigned integer data may be used as the MN field.

[0125] The tenth field is used to store verification information. For example Figure 7 In the data heap part, the AD field (ie, the tenth field) is used to store Adler-32 checksum data.

[0126] For example, the above Figure 1 Take the optical fiber sensor data shown in the figure as an example, where the data to be compressed is a two-dimensional matrix of 120 rows × 20,000 columns. In addition, n is 4, that is, the data to be compressed is subjected to 4 preset processing, including 2 differential operations on rows and 2 differential operations on columns. Among them, the 4 preset processings include 1 differential operation on rows, 1 differential operation on columns, 1 differential operation on rows, and 1 differential operation on columns. The preprocessed data after 4 preset processing can be as follows Figure 8 As shown in the figure, the CLR field is 2, indicating that two differential operations are performed on the rows; the CLC field is 2, indicating that two differential operations are performed on the columns; and the ND field is 2, indicating that the data to be compressed is two-dimensional data. In another implementation, the ND field can also be used to indicate the number of matrices with the same specifications as the data to be compressed (i.e., 120×20000) included in the optical fiber sensor data to which the data to be compressed belongs. For example, when Figure 1 When the data to be compressed is only one of the four parts included in the optical fiber sensing data, the ND field is 4 at this time.

[0127] The NR field is 120, indicating that there are 120 rows of data to be compressed; the NC field is 20000, indicating that there are 20000 columns of data to be compressed; in addition, the preprocessed data also includes the DSR-1 field, which is used to store the value of the sign bit used in the first differential operation on the row; the DSC-1 field, which is used to store the value of the sign bit used in the first differential operation on the column; the DSR-2 field, which is used to store the value of the sign bit used in the second differential operation on the row; the DSC-2 field, which is used to store the value of the sign bit used in the second differential operation on the column. In addition, the contents of the MN, VS, BD and AD fields can be filled in according to the description above, which will not be repeated here.

[0128] In addition, in one implementation, considering that in the compression process, the calculation of the correlation coefficient (i.e., S4011), the calculation of the value of the sign bit in the differential operation (i.e., S4012), and the differential operation according to the numerical value of the sign bit included in the process of pre-setting the compressed data in the embodiment of the present application involve a large number of multiplications and additions without serial relations. Therefore, the method provided in the embodiment of the present application can be implemented by a single instruction multiple data (SIMD) instruction, thereby improving the compression efficiency. Therefore, in the embodiment of the present application, S304 can specifically include: by SIMD instructions, the compressed data is sequentially subjected to n preset processes to obtain pre-processed data.

[0129] In addition, in one implementation, by running the method provided in the embodiment of the present application on a GPU, the parallel computing capability of the GPU is fully utilized, thereby further improving the compression efficiency.

[0130] In addition, if Figure 5 As shown, after performing n preset processes on the compressed data to obtain preprocessed data, the method may further include:

[0131] S305 : The data processing device 202 performs entropy coding on the pre-processed data to obtain compressed data.

[0132] For example, the data processing device 202 may encode the preprocessed data using any entropy coding method such as Shannon-Fano coding, Huffman coding, arithmetic coding, or run length encoding (RLE) to obtain compressed data.

[0133] Among them, since after n times of preset processing, the correlation between data in the residual data is greatly reduced compared with the data to be compressed, the amount of data can be greatly compressed through entropy coding, thereby achieving the effect of highly efficient data compression.

[0134] For example, when the above method of the embodiment of the present application is used to compress the noise data in the optical fiber sensing data, Fig. 9 As shown. Among them, Fig. 9 (a) is the distribution of the values ​​in the optical fiber sensing data before the n-times preset processing according to the method provided in the embodiment of the present application, wherein the horizontal axis is the value and the vertical axis is the number. That is, Fig. 9 The integral result of the shaded part in (a) is the total number of values ​​included in the optical fiber sensing data. Fig. 9 (b) is the distribution of values ​​in the optical fiber sensing data after n preset processing according to the method provided in the embodiment of the present application. It can be seen that compared with the values ​​before the n preset processing, which are concentrated between -3000 and 3000, the values ​​after the n preset processing are concentrated between -250 and 250. Since the types of values ​​are greatly reduced, when entropy encoding is performed on the optical fiber sensing data after n preset processing, the amount of data can be greatly compressed.

[0135] As another example, when the above method of the embodiment of the present application is used to compress event data in optical fiber sensing data, as shown in FIG. Fig.10 As shown. Among them, Fig.10 (a) is the distribution of the values ​​in the optical fiber sensing data before the n-times preset processing according to the method provided in the embodiment of the present application, wherein the horizontal axis is the value and the vertical axis is the number. That is, Fig.10 The integral result of the shaded part in (a) is the total number of values ​​included in the event-type data in the optical fiber sensing data. Fig.10 (b) is the distribution of values ​​in the optical fiber sensing data after n preset processing according to the method provided in the embodiment of the present application. It can be seen that compared with the values ​​before the n preset processing, which are concentrated between -6000 and 6000, the values ​​after the n preset processing are approximately concentrated between -500 and 500. Since the types of values ​​are greatly reduced, when entropy encoding is performed on the optical fiber sensing data after n preset processing, the amount of data can be greatly compressed.

[0136] In addition, after obtaining the compressed data, such as Figure 5As shown, on the one hand, the data processing device 202 can store the compressed data in the disk so as to read the compressed data from the disk later; on the other hand, the data processing device 202 sends the compressed data to the data analysis device 204 (for example, the data processing device 202 can send the compressed data to the data storage device 203, and then the data storage device 203 sends the compressed data to the data analysis device 204. For another example, the data processing device 202 can also directly send the compressed data to the data analysis device 204), so that the data analysis device 204 obtains the compressed data and processes the compressed data.

[0137] The following describes the process of decompressing data in the method provided in the embodiment of the present application in conjunction with the operation process of the data analysis device 204. Figure 5 As shown, the method also includes:

[0138] S306: The data analysis device 204 obtains compressed data.

[0139] For example, the data analysis device 204 can access Figure 5 For another example, the data analysis device 204 may receive the compressed data from the data processing device 202 .

[0140] S307 . The data analysis device 204 performs entropy decoding on the compressed data to obtain preprocessed data.

[0141] Specifically, the preprocessed data includes residual data and operation information. The operation information is used to indicate the n preset processes that the original data has undergone in sequence. The preset processes include: performing differential operations on the rows in the matrix to be operated, or performing differential operations on the columns in the matrix to be operated. The matrix to be operated is a matrix obtained after the last preset process, or the matrix to be operated is a matrix composed of original data.

[0142] Specifically, the above-mentioned operation information may include Figure 7 The contents of all or part of the second to tenth fields in .

[0143] For the content and frame structure of the preprocessed data, please refer to the above description. Figure 7 The corresponding description is given above, and the repeated content will not be repeated here.

[0144] S308 , the data analysis device 204 performs n times of inverse processing of the preset processing on the residual data according to the operation information to obtain the original data.

[0145] Among them, the content included in the original data can refer to the content included in the data to be compressed in the above text; in addition, the data analysis device 204 performs n times of inverse processing of the preset processing on the residual data according to the operation information, which can be specifically the inverse processing of S303, and the repeated content is not repeated here.

[0146] S309 , the data analysis device 204 combines the original data into a high-dimensional tensor.

[0147] For example, the high-dimensional tensor can be a three-dimensional tensor, in which a two-dimensional matrix is ​​used to represent the optical fiber sensing data of the four parts of the real part of the x-axis polarization, the imaginary part of the x-axis polarization, the real part of the y-axis polarization and the imaginary part of the y-axis polarization.

[0148] S310 , the data analysis device 204 combines the high-dimensional tensors into an osd file.

[0149] In this way, the data analysis device 204 can obtain the osd file obtained by the data processing device 202 in S301.

[0150] S311. The data analysis device 204 performs data analysis using the osd file.

[0151] For example, the data analysis device 204 can use the osd file to train the feature model so as to import the trained feature model into the data collection device 201 for event monitoring.

[0152] In addition, when the information system 20 is a seismic wave data system, for example, Fig.11 As shown, the method may include:

[0153] S501. The data processing device 202 obtains monitoring data of seismic waves.

[0154] For example, the monitoring data of seismic waves may be a file in sgy format (hereinafter referred to as “sgy file”).

[0155] S502: The data processing device 202 parses the sgy file.

[0156] The principle of the data processing device 202 parsing the sgy file is similar to the principle of the data processing device 202 parsing the osd file in S302. Therefore, the implementation process of S502 can refer to the corresponding content of S302.

[0157] S503: The data processing device 202 obtains data to be compressed.

[0158] Specifically, the data processing device 202 may divide the high-dimensional tensor included in the sgy file into two-dimensional matrices. The data to be compressed may be any matrix in the two-dimensional matrices obtained by the division.

[0159] The implementation process of S503 may refer to the corresponding content of S303.

[0160] S504, the data processing device 202 performs n preset processes on the data to be compressed in sequence to obtain pre-processed data (for the convenience of description herein, the data obtained after n preset processes are referred to as “pre-processed data”).

[0161] The implementation process of S504 may refer to the corresponding content of S304.

[0162] In addition, in one implementation, S504 in the embodiment of the present application may specifically include: performing n preset processes on the data to be compressed in sequence through SIMD instructions to obtain preprocessed data.

[0163] In addition, in one implementation, by running the method provided in the embodiment of the present application on a GPU, the parallel computing capability of the GPU is fully utilized, thereby further improving the compression efficiency.

[0164] In addition, if Fig.11 As shown, after performing n preset processes on the compressed data to obtain preprocessed data, the method may further include:

[0165] S505: The data processing device 202 performs entropy coding on the pre-processed data to obtain compressed data.

[0166] The implementation process of S505 may refer to the corresponding content of S305.

[0167] The following describes the process of decompressing data in the method provided in the embodiment of the present application in conjunction with the operation process of the data analysis device 204. Fig.11 As shown, the method also includes:

[0168] S506: The data analysis device 204 obtains compressed data.

[0169] S507 : The data analysis device 204 performs entropy decoding on the compressed data to obtain preprocessed data.

[0170] S508 , the data analysis device 204 performs n times of inverse processing of the preset processing on the residual data according to the operation information to obtain the original data.

[0171] S509 , the data analysis device 204 combines the original data into a high-dimensional tensor.

[0172] S510 , the data analysis device 204 combines the high-dimensional tensors into an sgy file.

[0173] The implementation process of the above S506-S510 may refer to the corresponding content of S306-S310.

[0174] Additionally, the method may further include:

[0175] S511 . The data analysis device 204 performs data analysis using the sgy file.

[0176] For example, the data analysis device 204 may use the sgy file to perform tasks such as detection and imaging of geological structures.

[0177] Combined with the above Figure 3-Figure 11 , describes in detail the data processing method provided according to this embodiment, and the various devices and equipment corresponding to the data processing method provided by this embodiment will be described below.

[0178] like Fig.12 As shown, it is a schematic diagram of the structure of a data processing device provided in this embodiment. The data processing device 60 can be various types of devices used to implement the functions of the above-mentioned data processing device 202. Specifically, the data processing device 60 can include a desktop computer, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, as well as a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR)\virtual reality (virtual reality, VR) device and other devices that can perform data processing, or the data processing device 60 can also be an AI hardware accelerator. The data processing device 60 can be used to execute the above Figure 3 All or part of the steps in, or the data processing device 60 can be used to execute the above Figure 5 , Figure 6 or Fig.11 Specifically, the data processing device 60 includes: one or more of an acquisition unit 601, a difference unit 602 and an entropy coding unit 603.

[0179] The acquisition unit 601 is used to acquire the data to be compressed.

[0180] The differential unit 602 is used to perform n preset processes on the data to be compressed in sequence to obtain preprocessed data. The preset process includes: performing differential operations on rows in the matrix to be operated, or performing differential operations on columns in the matrix to be operated. The matrix to be operated is a matrix obtained after the previous preset process, or the matrix to be operated is a matrix composed of the data to be compressed.

[0181] The entropy coding unit 603 is used to compress the pre-processed data by using an entropy coding method to obtain compressed data.

[0182] In one implementation, the preset processing further includes: calculating a correlation coefficient based on two adjacent rows of data in the matrix to be operated; the correlation coefficient is used to indicate the correlation between the two adjacent rows of data. According to the correlation coefficient, determining the value of the sign bit used when performing a differential operation on the two adjacent rows of data.

[0183] Alternatively, the preset processing further includes: calculating a correlation coefficient based on two adjacent columns of data in the matrix to be operated, wherein the correlation coefficient is used to indicate the correlation between the two adjacent columns of data, and determining a sign bit value used when performing a differential operation on the two adjacent columns of data based on the correlation coefficient.

[0184] In one implementation, the data to be compressed is optical fiber sensing data.

[0185] In one implementation, the data to be compressed is earthquake detection data.

[0186] In one implementation, the preprocessed data includes: a first field for storing residual data, a second field for storing the sign bit used for each differential operation in the n preset processings, a third field for storing the number of rows of the data to be compressed, a fourth field for storing the number of columns of the data to be compressed, a fifth field for storing the dimension of the data to which the data to be compressed belongs, a sixth field for storing the number of differential operations performed on rows in the n preset processings, a seventh field for storing the number of differential operations performed on columns in the n preset processings, an eighth field for storing version information of the compression scheme, one or more of the ninth field for indicating the starting position of the data, and one or more of the tenth field for storing verification information.

[0187] like Fig.13As shown, it is a schematic diagram of the structure of another data processing device provided in this embodiment. The data processing device 70 can be various types of devices used to implement the functions of the above-mentioned data analysis device 204. Specifically, the data processing device 70 may include a desktop computer, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, as well as a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR)\virtual reality (virtual reality, VR) device and other devices that can perform data processing, or the data processing device 70 may also be an AI hardware accelerator. The data processing device 70 can be used to execute the above Figure 5 or Fig.11 Specifically, the data processing device 70 includes: one or more of an acquisition unit 701, an entropy decoding unit 702 and a difference unit 703.

[0188] The acquisition unit 701 is used to acquire compressed data.

[0189] The entropy decoding unit 702 is used to decompress the compressed data by entropy decoding to obtain pre-processed data. The pre-processed data includes residual data and operation information. The operation information is used to indicate the n preset processes that the original data has undergone in sequence. The preset processes include: performing differential operations on the rows in the matrix to be operated, or performing differential operations on the columns in the matrix to be operated. The matrix to be operated is a matrix obtained after the last preset process, or the matrix to be operated is a matrix composed of the original data.

[0190] The difference unit 703 is used to perform the inverse processing of the preset processing on the residual data n times according to the operation information to obtain the original data.

[0191] In one implementation, the raw data is optical fiber sensing data.

[0192] In one implementation, the original data is earthquake detection data.

[0193] In one implementation, the preprocessed data includes: a first field for storing residual data, a second field for storing the sign bit used for each differential operation in the n preset processings, a third field for storing the number of rows of the data to be compressed, a fourth field for storing the number of columns of the data to be compressed, a fifth field for storing the dimension of the data to which the data to be compressed belongs, a sixth field for storing the number of differential operations performed on rows in the n preset processings, a seventh field for storing the number of differential operations performed on columns in the n preset processings, an eighth field for storing version information of the compression scheme, one or more of the ninth field for indicating the starting position of the data, and one or more of the tenth field for storing verification information.

[0194] like Fig.14 As shown, it is a schematic diagram of the structure of another data processing device provided in this embodiment. The data processing device 80 can be various types of devices for realizing the functions of the above-mentioned data processing device 202 or for realizing the functions of the above-mentioned data analysis device 204. Specifically, the data processing device 80 can be a chip or a system on a chip. Specifically, it can include desktop computers, tablet computers, desktops, laptops, handheld computers, notebook computers, ultra-mobile personal computers (ultra-mobile personal computers, UMPC), netbooks, as well as cellular phones, personal digital assistants (personal digital assistants, PDAs), augmented reality (augmented reality, AR) \ virtual reality (virtual reality, VR) devices and other devices that can perform data processing. In another implementation, the data processing device 80 can also be all or part of the software / hardware devices in the AI ​​hardware accelerator.

[0195] The data processing device 80 may include: a processor 801 , a communication line 802 , a memory 803 , and part or all of at least one communication interface 804 .

[0196] The processor 801 is used to execute the Figure 4 All or part of the steps in the method shown, or the processor 801 is used to execute the above Figure 5 , Figure 6 or Fig.11 All or part of the steps executed by the data processing device 202, or the processor 801 is used to execute the above Figure 5 or Fig.11 All or part of the steps performed by the data analysis device 204.

[0197] Specifically, the processor 801 may include a general-purpose central processing unit (CPU), and the processor 801 may also include a microprocessor, a field programmable gate array (Field Programmable Gate Array, FPGA), a digital signal processor (digital signal processing, DSP) or an application-specific integrated circuit (application-specific integrated circuit, ASIC), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0198] In a specific implementation, as an embodiment, the processor 801 may include one or more CPUs, such as Fig.14 CPU0 and CPU1 in.

[0199] In a specific implementation, as an embodiment, the data processing device 80 may include multiple processors, such as Fig.14 801 and processor 808 in the embodiment of the present invention. Each of these processors can be a single-CPU processor or a multi-CPU processor. The processor here can refer to one or more devices, circuits, and / or processing cores for processing, for example, computer data (computer program instructions).

[0200] In addition, the memory 803 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM). Memory 803 can be independent and connected to processor 801 via communication line 802. Memory 803 can also be integrated with processor 801.

[0201] The memory 803 stores computer instructions. The processor 801 can execute the computer instructions stored in the memory 803 to perform the embodiments of the present application. Figure 4 All or part of the steps in the method shown, or thereby perform the above Figure 5 , Figure 6 or Fig.11 All or part of the steps executed by the data processing device 202 in the above Figure 5 or Fig.11 All or part of the steps performed by the data analysis device 204.

[0202] Optionally, the computer-executable instructions in this embodiment may also be referred to as application program codes, which is not specifically limited in this embodiment.

[0203] In addition, the communication interface 804 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.

[0204] In addition, the communication line 802 is used to connect the various components in the data processing device 80. Specifically, the communication line 802 may include a data bus, a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are marked as communication lines 802 in the figure.

[0205] In a specific implementation, as an embodiment, the data processing device 80 may further include an output device 807 and an input device 806. The output device 807 may communicate with the processor 801 and may display information in a variety of ways. For example, the output device 807 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 806 may communicate with the processor 801 and may receive user input in a variety of ways. For example, the input device 806 may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0206] In addition, the data processing device 80 may further include a storage medium 805. The storage medium 805 is used to store computer instructions and various data for implementing the technical solution of this embodiment. When the data processing device 80 executes the sample picture generation method of this embodiment, the computer instructions and various data stored in the storage medium 805 are loaded into the memory 803, so that the processor 801 can execute the computer instructions stored in the memory 803 to execute the data processing method provided by this embodiment.

[0207] The method steps in this embodiment can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in RAM, flash memory, ROM, PROM, EPROM, EEPROM, registers, hard disks, mobile hard disks, CD-ROMs or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a data processing device. Of course, the processor and the storage medium can also be present in the data processing device as discrete components.

[0208] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in this embodiment is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a communication device, a user device or other programmable device. The computer program or instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instruction can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a tape; it can also be an optical medium, such as a digital video disc (DVD); it can also be a semiconductor medium, such as an SSD.

[0209] In this embodiment, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different implementations are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form a new embodiment based on their internal logical relationships.

[0210] In this embodiment, "at least one" means one or more, "more than one" means two or more, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, for elements (element) in the singular form "a", "an" and "the", unless the context clearly stipulates otherwise, it does not mean "one or only one", but means "one or more than one". For example, "a device" means one or more such devices. Furthermore, at least one (at least one of) ......." means one or any combination of subsequent associated objects, for example, "at least one of A, B and C" includes A, B, C, AB, AC, BC, or ABC. In the text description of this embodiment, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula of this embodiment, the character " / " indicates that the previous and next associated objects are in a "division" relationship.

Claims

1. A data processing method, characterized in that: include: Get the data to be compressed; Performing n preset processes on the data to be compressed in sequence to obtain preprocessed data; wherein the preset processes include: performing differential operations on rows in a matrix to be operated, or performing differential operations on columns in a matrix to be operated; the matrix to be operated is a matrix obtained after the previous preset process, or the matrix to be operated is a matrix composed of the data to be compressed; The preprocessed data is entropy encoded to obtain compressed data.

2. The method according to claim 1, characterized in that The preset processing further includes: Calculating a correlation coefficient based on two adjacent rows of data in the matrix to be operated; the correlation coefficient is used to indicate the correlation between the two adjacent rows of data; Determining, according to the correlation coefficient, a value of a sign bit used when performing a differential operation on the two adjacent rows of data; Alternatively, the preset processing further includes: Calculating a correlation coefficient based on two adjacent columns of data in the matrix to be operated; the correlation coefficient is used to indicate the correlation between two adjacent columns of data; The value of the sign bit used when performing a differential operation on the two adjacent columns of data is determined according to the correlation coefficient.

3. The method according to claim 1 or 2, characterized in that: The data to be compressed is optical fiber sensing data.

4. The method according to claim 1 or 2, characterized in that: The data to be compressed is earthquake detection data.

5. The method according to any one of claims 1 to 4, characterized in that: The preprocessed data includes: a first field for storing residual data, a second field for storing a sign bit used for each differential operation in the n preset processes, a third field for storing the number of rows of the data to be compressed, a fourth field for storing the number of columns of the data to be compressed, a fifth field for storing the dimension of the data to which the data to be compressed belongs, a sixth field for storing the number of differential operations performed on rows in the n preset processes, a seventh field for storing the number of differential operations performed on columns in the n preset processes, an eighth field for storing version information of the compression scheme, one or more of the ninth field for indicating the starting position of the data, and one or more of the tenth field for storing verification information.

6. A data processing method, characterized in that: include: Get compressed data; Performing entropy decoding on the compressed data to obtain preprocessed data; The preprocessed data includes residual data and operation information; The operation information is used to indicate the n preset processes that the original data has undergone in sequence, and the preset processes include: performing differential operations on rows in a matrix to be operated, or performing differential operations on columns in a matrix to be operated; the matrix to be operated is a matrix obtained after the previous preset process, or the matrix to be operated is a matrix composed of the original data; According to the operation information, the residual data is subjected to the inverse process of the preset process n times to obtain the original data.

7. The method according to claim 6, characterized in that The original data is optical fiber sensing data.

8. The method according to claim 6, characterized in that The original data is earthquake detection data.

9. The method according to any one of claims 6 to 8, characterized in that: The preprocessed data includes: a first field for storing residual data, a second field for storing a sign bit used for each differential operation in the n preset processes, a third field for storing the number of rows of the data to be compressed, a fourth field for storing the number of columns of the data to be compressed, a fifth field for storing the dimension of the data to which the data to be compressed belongs, a sixth field for storing the number of differential operations performed on rows in the n preset processes, a seventh field for storing the number of differential operations performed on columns in the n preset processes, an eighth field for storing version information of the compression scheme, one or more of the ninth field for indicating the starting position of the data, and one or more of the tenth field for storing verification information.

10. A data processing device, characterized in that: include: An acquisition unit, used for acquiring data to be compressed; A differential unit, used for performing n preset processes on the data to be compressed in sequence to obtain preprocessed data; wherein the preset processes include: performing differential operations on rows in a matrix to be operated, or performing differential operations on columns in a matrix to be operated; the matrix to be operated is a matrix obtained after the previous preset process, or the matrix to be operated is a matrix composed of the data to be compressed; The entropy coding unit is used to compress the pre-processed data by using an entropy coding method to obtain compressed data.

11. A data processing device, characterized in that: include: An acquisition unit, used for acquiring compressed data; An entropy decoding unit, used to decompress the compressed data by using an entropy decoding method to obtain preprocessed data; The preprocessed data includes residual data and operation information; The operation information is used to indicate the n preset processes that the original data has undergone in sequence, and the preset processes include: performing differential operations on rows in a matrix to be operated, or performing differential operations on columns in a matrix to be operated; the matrix to be operated is a matrix obtained after the previous preset process, or the matrix to be operated is a matrix composed of the original data; A difference unit is used to perform n times of inverse processing of the preset processing on the residual data according to the operation information to obtain the original data.

12. A data processing device, characterized in that: The method comprises a processor and an interface, wherein the processor receives or sends data through the interface, and the processor is used to implement the method according to any one of claims 1 to 5, or the processor is used to implement the method according to any one of claims 6 to 9.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a processor, the method according to any one of claims 1 to 5 is implemented, or the method according to any one of claims 6 to 9 is implemented.

14. A computer program product, characterized in that The computer program product comprises instructions, and when the instructions are executed on a processor, the method according to any one of claims 1 to 5 is implemented, or the method according to any one of claims 6 to 9 is implemented.

Citation Information

Cited By

  • Data processing method and apparatus

    EP4668587A1

  • Data processing method and apparatus

    WO2024179270A1