Method and device for compressing, decompressing and transmitting downhole drilling data

By adopting the Huffman compression encoding method based on packet prediction encoding in the while-drilling measurement technology, the downhole data is compressed and decompressed without losslessly, and the problems of low downhole data transmission rate and poor anti-code error resistance are solved, and more efficient data is achieved Transfer and store.

CN114629962BActive Publication Date: 2024-11-15CHINA NAT PETROLEUM CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110897236.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-05
Publication Date
2024-11-15
Estimated Expiration
2041-08-05

AI Technical Summary

Technical Problem

In the existing drilling-as-a-drilling measurement technology, the downhole data transmission rate is low, making it difficult to meet the real-time transmission requirements of high-speed drilling, and the existing algorithms have poor bit error resistance, which is not suitable for hardware implementation such as microcontrollers.

Method used

Using the Huffman compression encoding method based on packet prediction encoding, the downhole drilling data is compressed losslessly by making a Huffman code table and decompressed at the ground end. Intra- and inter-prediction encoding combined with Huffman encoding can improve data transmission efficiency and Anti-coding error.

Benefits of technology

It improves data transmission rate, reduces file storage space, and has better anti-code error resistance. It is suitable for implementation on underground hardware equipment such as microcontrollers and will not affect the real-time performance of underground equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114629962B_ABST
    Figure CN114629962B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for compressing, decompressing and transmitting downhole drilling data. The compression method comprises preparing a Huffman code table based on historical downhole drilling data obtained in the same survey area. Lossless data compression is performed on real-time downhole drilling data. According to the present invention, the space occupied by file storage can be reduced, and better error resistance and compression effect can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of measurement while drilling of oil and gas drilling or drilling engineering, and in particular to a method and device for compressing downhole data while drilling, a method and device for decompressing downhole data while drilling, and a method and system for transmitting downhole data while drilling. Background Art

[0002] Measurement while drilling technology is a technology that can measure and collect geological and engineering data near the drill bit during the downhole drilling process, and transmit the downhole data to the ground system in real time. It provides good real-time monitoring conditions for the drilling of directional wells and horizontal wells, and plays an increasingly important role in oil exploration and development. At present, a major factor restricting the development of measurement while drilling technology is the problem of measurement while drilling data transmission. Due to the complex downhole environment, as well as data transmission technology and cost issues, the data transmission rate of the mud pulse transmission technology most used in downhole data transmission is very low, which is difficult to meet the needs of real-time transmission in high-speed drilling. Summary of the invention

[0003] The purpose of the present invention is to solve at least one of the above-mentioned deficiencies in the prior art. For example, one of the purposes of the present invention is to provide a technical solution for effectively compressing downhole while-drilling data.

[0004] In order to achieve the above-mentioned purpose, one aspect of the present invention provides a method for compressing downhole drilling data, the compression method comprising: S1, based on historical downhole drilling data obtained in the same survey area, preparing a Huffman code table, comprising: dividing the historical drilling data into multiple frame groups by frame, taking the data frame at the position of the first frame in each frame group as the historical reference frame, and taking the data frames at the positions of other frames except the reference frame as the historical prediction frames; performing intra-frame prediction coding processing on data with multiple identical items in the historical prediction frame; performing inter-frame prediction coding processing on other items of data in the historical prediction frame that have not been processed by intra-frame prediction coding; and counting the frequency of the value of each byte data in units of bytes for all historical prediction frame data that have been processed by intra-frame prediction coding and inter-frame prediction coding, and preparing a Huffman code table. S2. Lossless data compression is performed on the real-time drilling data, including: dividing the real-time drilling data received into multiple frame groups by frame, taking the first frame received in each frame group as the real-time reference frame, and taking the subsequently received data frames as the real-time prediction frames; compressing and encoding the data in the real-time reference frame according to the number of valid data bits; performing intra-frame prediction encoding processing on the data with multiple identical items in the real-time prediction frame; performing inter-frame prediction encoding processing on other items of data in the real-time prediction frame that have not been subjected to intra-frame prediction encoding processing; and performing Huffman encoding on the prediction frame data in sequence in bytes.

[0005] In an exemplary embodiment of the present invention, the intra-frame prediction coding process may include: except for the first data of the same item in the frame, for subsequent data of the same item, subtracting the value of the previous data adjacent to the same item from the value of the current data, and using the difference value obtained as the value of the current position data;

[0006] In an exemplary embodiment of the present invention, the inter-frame prediction coding process may include: within each frame group, for other items of data that have not undergone intra-frame prediction coding processing, the value of the current position data is subtracted from the original value of the data at the same position in the previous frame, and the resulting difference is used as the value of the current position data.

[0007] In an exemplary embodiment of the present invention, the method may further include modifying the produced Huffman code table file, which may specifically include: extracting the value of each byte data in the Huffman code table and its corresponding codeword length, codeword and statistical frequency; assuming that the codeword information consists of the codeword length, codeword and statistical frequency, arranging the codeword information of all data in order from small to large according to the size of the data value; writing the arranged codeword information into the file in order to generate a Huffman code table file.

[0008] In an exemplary embodiment of the present invention, if it is found that the minimum value of the arranged data is not 0 or there is a missing integer between the minimum value and the maximum value, the missing value can be added artificially (manually) and the frequency can be set to 1. Then a Huffman code table is created and the code word information is saved in a file in an arranged manner according to the size of the value.

[0009] In an exemplary embodiment of the present invention, the step of compressing and encoding the real-time reference frame data according to the number of effective bits may include: storing a copy of the data in the real-time reference frame for inter-frame prediction coding processing; extracting the effective data from each data in the real-time reference frame according to the number of effective data bits given by the accuracy of the measuring instrument; and encoding all the effective data in the real-time reference frame in turn.

[0010] In an exemplary embodiment of the present invention, the step of performing Huffman encoding on the real-time prediction frame data in bytes may include: adding 255 to the value of the real-time prediction frame data after the prediction encoding process, and using the obtained value as the addressing value in the Huffman code table file generated in the step S1; finding the codeword information of the corresponding position number in the Huffman code table file generated in the step S1 according to the addressing value; extracting the Huffman code corresponding to the value of the real-time prediction frame data according to the codeword length and the codeword in the codeword information; and encoding the Huffman code bit by bit in turn to complete the Huffman encoding of the real-time prediction frame data.

[0011] Another aspect of the present invention provides a downhole while-drilling data compression device, the compression device being arranged downhole. The compression device may include a Huffman code table making module and a compression module, wherein the Huffman code table making module is used to make a Huffman code table based on historical downhole while-drilling data acquired in the same survey area. The compression module is used to perform lossless data compression on real-time while-drilling data.

[0012] In an exemplary embodiment of the present invention, the Huffman code table production module may include: a first grouping unit, configured to divide the historical downhole drilling data into multiple frame groups by frame, and use the data frame at the position of the first frame in each frame group as the historical reference frame, and the data frames at the positions of other frames except the reference frame as the historical prediction frames; a first intra-frame prediction coding unit, configured to perform intra-frame prediction coding processing on data with multiple identical items in the historical prediction frame; a first inter-frame prediction coding unit, configured to perform inter-frame prediction coding processing on other items of data in the historical prediction frame data that have not been processed by intra-frame prediction coding; and a Huffman code table production unit, configured to count the frequency of the value of each byte data in units of bytes for all historical prediction frame data that have been processed by intra-frame prediction coding and inter-frame prediction coding, and produce a Huffman code table.

[0013] In an exemplary embodiment of the present invention, the compression module may include: a second grouping unit, configured to divide the downhole drilling data received in real time into multiple frame groups by frame, and use the first frame received in each frame group as a real-time reference frame, and the subsequently received data frames as real-time prediction frames; a reference frame compression coding unit, configured to compress and encode the data in the real-time reference frame according to the number of valid data bits; a second intra-frame prediction coding unit, configured to perform intra-frame prediction coding processing on data with multiple identical items in the real-time prediction frame; a second inter-frame prediction coding unit, configured to perform inter-frame prediction coding processing on other items of data in the real-time prediction frame that have not been subjected to intra-frame prediction coding processing; and a Huffman coding unit, configured to perform Huffman coding on the prediction frame data in sequence in bytes.

[0014] On the other hand, the present invention provides a method for decompressing downhole data while drilling, which decodes the data transmitted from the downhole at the ground end, reconstructs the decoded data, and obtains reconstructed data while drilling, wherein the data transmitted from the downhole is compressed encoded data obtained by compression using the compression method described above.

[0015] In an exemplary embodiment of the present invention, the decompression method may include: decoding the received real-time reference frame data according to the number of valid data bits; performing Huffman decoding on the received real-time prediction frame data; and reconstructing the real-time prediction frame data obtained after Huffman decoding, wherein the reconstruction step includes: performing intra-frame prediction decoding processing on data with multiple identical items in the real-time prediction frame data obtained after Huffman decoding; and performing inter-frame prediction decoding processing on other items of data in the real-time prediction frame data obtained after Huffman decoding that have not been subjected to intra-frame prediction decoding processing.

[0016] In an exemplary embodiment of the present invention, the step of decoding the received real-time reference frame data according to the number of valid data bits may include: for the received compressed coded data, according to the number of valid data bits, reading the corresponding valid bit data bit by bit in sequence, and storing them in a first array, wherein if the received compressed coded data is less than the number of valid data bits, padding the high bits with zeros to fill up to the number of valid data bits, thereby completing the decoding of the real-time reference frame data in each frame group.

[0017] In an exemplary embodiment of the present invention, the intra-frame prediction decoding process may include: except for the first data of the same item in the frame, for subsequent data of the same item, the value of the current data is added to the value of the previous adjacent data of the same item, and the sum is used as the value of the current position data.

[0018] In an exemplary embodiment of the present invention, the inter-frame prediction decoding process may include: within each frame group, for other items of data that have not undergone intra-frame prediction encoding processing, the value of the current position data is added to the value of the data at the same position in the previous frame, and the sum is used as the value of the current position data.

[0019] Another aspect of the present invention provides a decompression device for downhole drilling data, which is arranged on the ground end and is used to communicate with the downhole drilling data compression device as described above to decode the compressed encoded data transmitted from the downhole, reconstruct the decoded data, and obtain the reconstructed downhole data.

[0020] In an exemplary embodiment of the present invention, the decompression device may include: a reference frame decoding unit, configured to decode the received real-time reference frame data according to the number of valid data bits; a prediction frame Huffman decoding unit, configured to perform Huffman decoding on the received real-time prediction frame data; and a prediction frame reconstruction unit, configured to reconstruct the real-time prediction frame data obtained after Huffman decoding.

[0021] In an exemplary embodiment of the present invention, the prediction frame reconstruction unit may include: an intra-frame prediction decoding submodule, configured to perform intra-frame prediction decoding processing on data with multiple identical items in the real-time prediction frame data obtained after Huffman decoding; and an inter-frame prediction decoding submodule, configured to perform inter-frame prediction decoding processing on other items of data in the real-time prediction frame data obtained after Huffman decoding that have not been subjected to intra-frame prediction decoding processing.

[0022] Another aspect of the present invention provides a method for transmitting downhole drilling data, the transmission method comprising: using the compression method as described above to compress and encode the drilling data collected in real time; and using the decompression method as described above to decompress the compressed encoded data.

[0023] Another aspect of the present invention provides a downhole data while drilling transmission system, the transmission system comprising: the downhole data while drilling compression device as described above; and the downhole data while drilling decompression device as described above.

[0024] Yet another aspect of the present invention provides a device, which may include: a processor; a memory storing a computer program, which, when executed by the processor, implements at least one of the compression method, the decompression method, and the transmission method described above.

[0025] On the other hand, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements at least one of the compression method described above, and / or the decompression method described above, and the transmission method described above.

[0026] In another aspect, the present invention provides an application of the downhole drilling data compression device, decompression device or downhole drilling data transmission system as described above in oil and gas drilling or exploration.

[0027] Compared with the prior art, the beneficial effects of the present invention include at least: reducing the space occupied by file storage, having better error resistance and compression effect, and being easier to implement on downhole hardware equipment such as single-chip microcomputers without affecting the real-time operation of the downhole equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 Schematic diagram of a downhole data transmission system while drilling according to an exemplary embodiment of the present invention.

[0029] Figure 2 A schematic flow chart of a method for transmitting downhole data while drilling according to an exemplary embodiment of the present invention is shown. DETAILED DESCRIPTION

[0030] Hereinafter, the downhole drilling data compression method and compression device, the downhole drilling data decompression method and decompression device, and the downhole drilling data transmission method and transmission system of the present invention will be described in detail in combination with the accompanying drawings and exemplary embodiments.

[0031] In the description of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.

[0032] In addition, the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be performed in an order different from that shown here.

[0033] In order to improve the data transmission rate, using lossless data compression method to compress downhole drilling data before transmission is an effective and feasible way to improve the data transmission rate.

[0034] The main lossless compression methods for downhole drilling data include LZW algorithm and its improved algorithm, predictive coding and Huffman coding. LZW and its improved algorithm need to dynamically create a string code table during the compression and decompression process, and the error resistance is not high. Predictive coding and Huffman coding are simple to implement, but if one of the methods is used alone, the efficiency of data compression is limited. After studying the characteristics of downhole drilling data, the related technology proposed and discussed the method of combining predictive coding with adaptive Huffman coding. However, since adaptive Huffman coding dynamically constructs the Huffman tree during the compression process, if an error occurs in the transmitted data, the Huffman tree construction error at the decoding end will have a very large impact on the subsequent data decoding. Therefore, the error resistance of this method is not high.

[0035] Aiming at the current situation that the correlation between downhole drilling data cannot be reasonably utilized in the relevant downhole drilling data compression algorithms, and the problems that the existing algorithms have poor error resistance and are not suitable for hardware implementation such as single-chip microcomputers, after studying the problems of the above algorithms, the present invention proposes a Huffman compression coding method based on group prediction coding, which is more suitable for hardware implementation such as single-chip microcomputers according to the characteristics of downhole drilling data.

[0036] In an exemplary embodiment of the present invention, a method and system for transmitting downhole data while drilling are provided. The method for transmitting downhole data while drilling may include a method for compressing downhole data while drilling and a method for decompressing downhole data while drilling that cooperate with each other to realize data transmission while drilling. The downhole data while drilling includes data collected by a downhole data acquisition device (e.g., a data acquisition module in a rotary steering device, near the drill bit, etc.), such as one or more of measurement while drilling data MWD, logging while drilling data LWD, seismic while drilling, rotary geosteering data, near the drill bit data, etc.

[0037] Figure 1 A schematic diagram of a system for transmitting while-drilling data in an exemplary embodiment of the present invention is shown.

[0038] like Figure 1 As shown in , in this embodiment, the transmission system of downhole data may include a downhole downhole data compression device 101 and a downhole downhole data decompression device 102 that cooperate with each other to realize the transmission of downhole data from downhole to the ground. The downhole downhole data compression device 101 is set in the downhole, which can realize data compression and encoding of downhole data obtained by downhole measurement, thereby effectively reducing the amount of data required to be transmitted. The downhole downhole data decompression device 102 is set at the ground end, which can decode the data transmitted by the downhole downhole data compression device 101 at the ground end, and decompress the decoded data, thereby obtaining downhole reconstructed data.

[0039] In order to more clearly explain the working principle and process of the drilling data transmission system provided by the present invention, the following Figure 2 The implementation flow diagram of the method for transmitting data while drilling is further described. The compression method of the data while drilling represented by steps S1 to S2 can be executed by a downhole data while drilling compression device 101 disposed in the well, and the decompression method of the data while drilling represented by step S3 can be executed by a decompression device 102 for the data while drilling disposed on the ground.

[0040] like Figure 2 As shown in , in this embodiment, the drilling data compression device 101 generates a Huffman code table based on the historical downhole drilling data obtained in the same measurement area in step S1.

[0041] Specifically, step S1 may include: dividing the historical downhole drilling data into multiple frame groups by frame, taking the data frame at the location of the first frame in each frame group as the historical reference frame, and taking the data frames at the locations of other frames except the reference frame as the historical prediction frames. Then, intra-frame prediction coding is performed on the data with multiple identical items in the historical prediction frame. Inter-frame prediction coding is performed on other items of data in the historical prediction frame data that have not been processed by intra-frame prediction coding. Finally, all historical prediction frame data that have been processed by intra-frame prediction coding and inter-frame prediction coding are counted in bytes to calculate the frequency of the value of each byte data, and a Huffman code table is prepared.

[0042] Among them, the intra-frame prediction coding processing includes: except for the first data of the same item in the frame, for the subsequent data of the same item, the value of the current data is subtracted from the value of the previous data adjacent to the same item, and the difference is used as the value of the current position data.

[0043] The inter-frame prediction coding process includes: within each frame group, for other items of data that have not undergone intra-frame prediction coding, the value of the current position data is subtracted from the original value of the data at the same position in the previous frame, and the resulting difference is used as the value of the current position data.

[0044] The Huffman code table file can also be modified and produced, specifically including: extracting the value of each byte data in the Huffman code table and its corresponding codeword length, codeword and statistical frequency; assuming that the codeword information is composed of codeword length, codeword and statistical frequency, the codeword information of all data is arranged in order from small to large according to the size of the data value; the arranged codeword information is written into the file in order to generate a Huffman code table file. Among them, if it is found that the minimum value of the arranged data value is not 0 or there is a missing integer between the minimum and maximum values, the missing value can be added artificially, and the frequency is set to 1, and then the Huffman code table is produced, and the codeword information is saved in the file in order according to the size of the value.

[0045] The compression device 101 for drilling data can perform lossless data compression on the real-time drilling data in step S2. Specifically, the real-time drilling data received is divided into multiple frame groups according to frames, and the first frame received in each frame group is used as a real-time reference frame, and the subsequently received data frames are used as real-time prediction frames; the data in the real-time reference frame is compressed and encoded according to the number of valid data bits; the data with multiple identical items in the real-time prediction frame is processed by intra-frame prediction encoding; the other items of data in the real-time prediction frame that have not been processed by intra-frame prediction encoding are processed by inter-frame prediction encoding; and the prediction frame data is Huffman encoded in bytes.

[0046] In this embodiment, the downhole data compression device 101 may include a Huffman code table making module and a compression module.

[0047] The Huffman code table making module is used to make a Huffman code table based on the historical downhole drilling data obtained in the same survey area.

[0048] The Huffman code table making module may include a first grouping unit, a first intra-frame prediction encoding unit, a first inter-frame prediction encoding unit and a Huffman code table making unit.

[0049] The first grouping unit is configured to divide the historical downhole drilling data into multiple frame groups by frame, and use the data frame at the location of the first frame in each frame group as the historical reference frame, and the data frames at the locations of other frames except the reference frame as the historical prediction frames.

[0050] The first intra-frame prediction encoding unit is configured to perform intra-frame prediction encoding processing on data having a plurality of identical items in a historical prediction frame.

[0051] The first inter-frame prediction encoding unit is configured to perform inter-frame prediction encoding processing on other items of data in the historical prediction intra-frame data that have not been subjected to the intra-frame prediction encoding processing.

[0052] The Huffman code table preparation unit is configured to count the frequency of the value of each byte data in units of bytes for all historical prediction frame data that have undergone intra-frame prediction coding processing and inter-frame prediction coding processing, and prepare a Huffman code table.

[0053] The compression module is used to perform lossless data compression on real-time downhole drilling data and transmit the compressed and encoded data to the ground end. The compression module may include a second grouping unit, a reference frame compression encoding unit, a second intra-frame prediction encoding unit, and a second inter-frame prediction encoding unit.

[0054] The second grouping unit is configured to divide the downhole drilling data received in real time into multiple frame groups by frame, and use the first frame received in each frame group as a real-time reference frame and the subsequently received data frames as real-time prediction frames.

[0055] The reference frame compression encoding unit is configured to compress and encode the data in the real-time reference frame according to the number of valid data bits. Specifically, it may include: storing a copy of the data in the real-time reference frame for use in subsequent steps; extracting valid data from each data in the real-time reference frame according to the number of valid data bits given by the accuracy of the measuring instrument; and encoding all valid data in the real-time reference frame in sequence.

[0056] The second intra-frame prediction encoding unit is configured to perform intra-frame prediction encoding processing on data having a plurality of identical items in a real-time prediction frame.

[0057] The second inter-frame prediction encoding unit is configured to perform inter-frame prediction encoding processing on other items of data in the real-time prediction intra-frame data that have not been subjected to the intra-frame prediction encoding processing.

[0058] The Huffman encoding unit is configured to perform Huffman encoding on the predicted frame data in bytes in sequence. Specifically, it may include: using the numerical value of the real-time predicted frame data after the predictive encoding process to determine the addressing value in the Huffman code table file generated in the step S1, the addressing value is a natural number, for example, the addressing value is 0 to 1023. In an embodiment, the numerical value of the real-time predicted frame data after the predictive encoding process can be added with 255, and the resulting value can be used as the addressing value in the Huffman code table file generated in step S1; according to the addressing value, the codeword information of the corresponding position number in the Huffman code table file generated in step S1 is found; according to the codeword length and codeword in the codeword information, the Huffman code corresponding to the numerical value of the real-time predicted frame data is extracted; the Huffman code is encoded bit by bit in sequence to complete the Huffman encoding of the real-time predicted frame data.

[0059] In this embodiment, the downhole data while drilling compression device 101 can use mud pulses to transmit the encoded data to the data while drilling decompression device 102 at the surface end after step S2. Of course, in other embodiments of the present invention, the data transmission method between the data while drilling compression device 101 and the data while drilling decompression device 102 can also be configured as other reasonable methods, and the present invention is not limited to this.

[0060] In this embodiment, the principles and processes of the Huffman code table production module and the compression module to achieve their respective functions have been fully reflected in the above steps S1 to S2, so the specific contents of the data Huffman code table production module and the compression module will not be repeated here.

[0061] like Figure 1 and Figure 2 As shown in , in this embodiment, the decompression device 102 of the downhole drilling data is arranged on the ground end, which is used to communicate with the compression device 101 of the downhole drilling data. After receiving the data transmitted by the compression device 101 of the downhole drilling data, the decompression device 102 of the downhole drilling data can decode the above data and reconstruct the decoded data in step S3, so as to obtain the reconstructed drilling data.

[0062] The decompression device may include a reference frame decoding unit, a prediction frame Huffman decoding unit, and a prediction frame reconstruction unit.

[0063] The reference frame decoding unit is configured to decode the received real-time reference frame data according to the number of valid data bits.

[0064] The prediction frame Huffman decoding unit is configured to perform Huffman decoding on the received real-time prediction frame data.

[0065] The prediction frame reconstruction unit is configured to reconstruct the real-time prediction frame data obtained after Huffman decoding. The prediction frame reconstruction unit may include an intra-frame prediction decoding submodule and an inter-frame prediction decoding submodule. The intra-frame prediction decoding submodule is configured to perform intra-frame prediction decoding processing on data with multiple identical items in the real-time prediction frame data obtained after Huffman decoding. The inter-frame prediction decoding submodule is configured to perform inter-frame prediction decoding processing on other items of data in the real-time prediction frame data obtained after Huffman decoding that have not been subjected to intra-frame prediction decoding processing.

[0066] Corresponding to the compression method of the downhole drilling data compression device 101, in this embodiment, the downhole drilling data decompression device 102 can decode the received real-time reference frame data according to the number of valid data bits, perform Huffman decoding on the received real-time prediction frame data, and reconstruct the real-time prediction frame data obtained after Huffman decoding.

[0067] Among them, decoding the received real-time reference frame data according to the number of valid data bits may include: for the received compressed encoded data, according to the number of valid data bits, reading the corresponding valid bit data bit by bit in sequence, and storing them in a first array, wherein, if the received compressed encoded data is less than the number of valid data bits, padding the high bits with zeros to fill up to the number of valid data bits, thereby completing the decoding of the real-time reference frame data in each frame group.

[0068] The intra-frame prediction decoding process may include: except for the first data of the same item in the frame, for the subsequent data of the same item, the value of the current data is added to the value of the previous adjacent data of the same item, and the sum is used as the value of the current position data.

[0069] The inter-frame prediction decoding process may include: within each frame group, for other items of data that have not undergone intra-frame prediction encoding processing, the value of the current position data is added to the value of the data at the same position in the previous frame, and the sum is used as the value of the current position data.

[0070] The present invention provides a data transmission method and system that is more in line with the actual measurement while drilling engineering, wherein an improved compression and decompression method is used to achieve the effect of improving the data transmission rate of drilling measurement. The data transmission method according to the embodiment of the present invention is simple and effective to implement, and the data compression and decompression method can be embedded in FPGA, single-chip microcomputer and other various already formed equipment and devices in a soft embedding manner.

[0071] In another exemplary embodiment of the present invention, a method for transmitting measurement while drilling data comprises the following steps:

[0072] S100, predicting the frequency of frame values ​​by byte statistics and making a Huffman code table. Specifically including:

[0073] S110, grouping by frame. Specifically, a measurement while drilling data set previously acquired in the same survey area, that is, a historical measurement while drilling data set, is grouped by a certain number of frames (e.g., 4 frames, 5 frames, or 6 frames). The first frame in a frame group (GOF, Group of Frame) is used as a reference frame, and data frames other than the reference frame are used as prediction frames.

[0074] S120. Perform intra-frame prediction coding on data with multiple identical items in the prediction frame, that is, except for the first data of the item in the frame, for subsequent identical item data, subtract the original value of the adjacent previous data with the same item from the value of the current data, and use the difference as the value of the current position data.

[0075] S130, perform inter-frame prediction coding on other data items in the predicted frame data that have not been processed by intra-frame prediction, that is, subtract the original value of the data at the same position in the previous frame from the value of the current position data, and use the obtained difference as the value of the current position data.

[0076] S140 , repeating the above steps S120 and S130 for subsequent predicted frame data in the current frame group until all predicted frame data in one frame group are processed.

[0077] S150 , repeating the above steps S120 , S130 and S140 for the predicted frame data in the subsequent frame group until all the predicted frame data in the current data set are processed.

[0078] S160. For all prediction frame data that have undergone intra-frame prediction processing and inter-frame prediction processing, the frequency of the value of each data (the number of times the value of each byte data appears) is counted in bytes, and a Huffman code table is created.

[0079] S170, modify and create a Huffman code table file. Specifically, this can be achieved by:

[0080] S171. Extract the value of each byte data in the Huffman code table in step S160 and its corresponding codeword length, codeword and statistical frequency.

[0081] S172. Assuming that the codeword information is composed of codeword length, codeword and statistical frequency, the codeword information of all data is arranged in order from small to large according to the value of the data.

[0082] S173, write the arranged codeword information into the code table file in sequence to generate a Huffman code table file. That is, the codeword information is continuously written into the code table file to generate a complete code table file. If it is found that the minimum value of the arranged data is not 0, or there is a missing integer between the minimum and maximum values, the missing value can be added manually, and the frequency is set to 1, and then the Huffman code table is created, and the codeword information is stored in the file in order of the value.

[0083] S200, lossless data compression for real-time while-drilling data. Specifically including:

[0084] S210: Group the real-time received drilling data according to a certain number of frames (4 frames, 5 frames or 6 frames). The first frame received in a frame group is called a reference frame, and the subsequent received data frames are used as prediction frames.

[0085] S220, encode the reference frame data according to the number of effective bits.

[0086] Specifically, first, a copy of the data in the reference frame is saved for use in subsequent steps. Here, the reference frame data needs to extract the effective bit data for encoding on the one hand, and on the other hand, it needs to be predictively encoded with the prediction frame data, so saving a copy is equivalent to copying a copy, and then the prediction frame data and this copy are predictively encoded. Because the original data has been encoded according to the effective bit number. Therefore, the subsequent steps here refer to facilitating inter-frame prediction of the next frame data, that is, it can be used for step S130 / S230. Then, according to the effective data bit number given by the accuracy of the measuring instrument (for example, the acquisition device of the measurement while drilling instrument, the caliper measuring instrument, etc.), the effective data in each data in the reference frame is extracted, and finally the effective data is encoded in turn.

[0087] S230, perform intra-frame prediction coding on the predicted frame data. Perform intra-frame prediction coding on the data with multiple identical items in the predicted frame, and the specific operation is the same as step S120.

[0088] S240 , inter-frame prediction coding is performed on the predicted frame data. Other items of data in the predicted frame data that have not been processed with intra-frame prediction are subjected to inter-frame prediction coding, and the specific operation is the same as step 130 .

[0089] S250, perform Huffman encoding on the predicted frame data in bytes.

[0090] S251. First, open the Huffman code table file generated in step 1, and add 255 to the value of the predicted frame data after the predictive coding process, which becomes the addressing value of the data value in the code table file.

[0091] S252: Then, according to the addressing value, find the code word information of the corresponding position number in the code table file, and extract the Huffman code corresponding to the data value according to the code word length and code word in the code word information.

[0092] S253. Finally, the code is encoded bit by bit in sequence, that is, Huffman encoding of the data is completed.

[0093] S260. Repeat the above steps S220, S230, S240, and S250 to compress and encode the subsequent real-time collected measurement data, and upload the encoded data to the ground system until the current engineering measurement task is completed.

[0094] S300: Decoding and reconstructing compressed coded data . Specifically include:

[0095] S310, decode the reference frame data according to the known number of valid bits of the data. For the received compressed coded data, the ground decoding end software reads the corresponding valid bit data bit by bit according to the known number of valid bits of the measuring instrument, and puts it into the memory. For the data less than 8 bits, fill the high bit with 0 to fill it to 8 bits. Once a frame of data is decoded, the decoding of the reference frame data in the current frame group is completed.

[0096] S320, perform Huffman decoding on the predicted frame data. Specifically including:

[0097] S321. First, open the Huffman code table file generated in step S1, read the frequency values ​​in the code word information in sequence according to the order of the code word information storage addresses, and put them into the array in the memory.

[0098] S322. Then, a Huffman tree is constructed with the subscript of the array as the numerical value and the frequency value corresponding to the subscript as the frequency of the numerical value.

[0099] S323. Finally, the subsequent compressed coded data are sequentially Huffman decoded in units of bits until a frame of predicted frame data is obtained through decoding.

[0100] S330 , performing intra-frame prediction decoding on the predicted frame data.

[0101] For the predicted frame data obtained through step S320, intra-frame prediction decoding is performed on the adjacent identical item data therein, that is, except for the first data of the item in the frame, the value of the current data is added to the value of the adjacent previous data of the same item, and the sum is used as the value of the current position data.

[0102] S340: Perform inter-frame prediction decoding on the predicted frame data.

[0103] For the predicted frame data obtained in step S330, inter-frame prediction coding is performed on other data items that have not been processed for intra-frame prediction, that is, the value of the current position data is added to the value of the data at the same position in the previous frame, and the sum is used as the value of the current position data.

[0104] S350. For subsequent compressed coded data, the above steps S320, S330, and S340 may be repeated until all predicted frame data in a frame group are decoded.

[0105] S360. For subsequent compressed encoded data, the above steps S310, S320, S330, S340, and S350 may be repeated until the current engineering measurement task is completed.

[0106] According to an exemplary embodiment of the present invention, the correlation between the intra-frame data and the inter-frame data in the measurement data is fully utilized, and combined with the Huffman compression algorithm suitable for hardware such as a single-chip microcomputer, compared with the solution of predictive coding combined with dynamic Huffman coding, the method of the present invention does not cause error propagation and has better error resistance. At the same time, since the measurement data of the same measurement area in the past is used and the Huffman code table is prepared in advance, the technical solution still has a good compression effect, and it is easier to implement on underground hardware equipment such as a single-chip microcomputer without affecting the real-time operation of the underground equipment.

[0107] In order to more clearly describe the method for lossless compression and decompression of measurement while drilling data involved in the present invention, the key steps are shown below by way of example to further describe the present invention in detail. It should be understood that the specific implementation method described below is only used to explain the present invention and is not used to limit the present invention.

[0108] Table 1 shows the data frame structure of the measurement while drilling data. Table 1 contains 7 different physical quantities, namely, gamma 1, near-bit well deviation, near-bit azimuth, near-bit weight height, pressure 1, pressure 2, and pressure 3, and the effective data bit number of each physical quantity is 6 to 12 bits.

[0109] Table 1

[0110]

[0111]

[0112] In Table 1, RIN indicates the well deviation near the drill bit, RAZ indicates the azimuth near the drill bit, RTF indicates the height near the drill bit, PRS1, 2, 3 indicates pressure 1, 2, 3, and GMA indicates gamma.

[0113] Step 1: Create a Huffman code table.

[0114] Use the previous data set of the same survey area to create a Huffman code table. Specifically include:

[0115] (1) Intra-frame prediction and inter-frame prediction processing.

[0116] First, the data is grouped by frames, taking 6 frames as a frame group (GOF, Group of Frame) as an example, where the data frame where the first frame (the first frame) is located is called the reference frame, and the data frames where the other frames (the second, third, fourth, fifth, and sixth frames) are located are called prediction frames.

[0117] Let D[m][n] (m=1, 2, 3...6, n=1, 2, 3, ...14) be the data in a frame group of the data frame shown in Table 1 before encoding, the subscript m corresponds to the frame number in the frame group [the mth frame], and the subscript n corresponds to the position of the data in Table 1 in the frame [the nth data in the mth frame]. Let R[m][n] (m is 1, 2, 3...6, n=1, 2, 3, ...14) be the data at the corresponding position after encoding.

[0118] Then, intra-frame prediction and inter-frame prediction are performed on the predicted frame data. Taking the second frame as an example, the process of performing intra-frame prediction on the predicted frame is as follows:

[0119] R[2][1]=D[2][1];

[0120] R[2][4] = D[2][4] - D[2][1];

[0121] R[2][7] = D[2][7] - D[2][4];

[0122] R[2][9] = D[2][9] - D[2][7];

[0123] R[2]

[11] =D[2]

[11] -D[2][9];

[0124] R[2]

[13] =D[2]

[13] -D[2]

[11] ;

[0125] Taking the second frame as an example, the process of inter-frame prediction processing for the predicted frame data is as follows:

[0126] R[2][2] = D[2][2] - D[1][2];

[0127] R[2][5] = D[2][5] - D[1][5];

[0128] R[2][8] = D[2][8] - D[1][8];

[0129] R[2]

[10] =D[2]

[10] -D[1]

[10] ;

[0130] R[2]

[12] =D[2]

[12] -D[1]

[12] ;

[0131] R[2]

[14] =D[2]

[14] -D[1]

[14] ;

[0132] The predicted frame data of the 3rd, 4th, 5th and 6th frames are also processed by intra-frame prediction and inter-frame prediction using the above method.

[0133] (2) Create a Huffman code table file

[0134] After intra-frame prediction and inter-frame prediction processing are performed on the predicted frame data in all frame groups, the frequency of the values ​​is counted and a Huffman code table is generated. In order to facilitate the implementation of Huffman coding on a single-chip microcomputer, the data format in the Huffman code table needs to be further processed and then written into the code table file.

[0135] Suppose the codeword length, codeword and statistical frequency corresponding to the data value are regarded as a codeword information. Sort all the codeword information from small to large according to the value of the corresponding data to form a string of continuous codeword information arranged from small to large according to the value (if it is not continuous, it means that there is data in the middle that has not been counted. In order to prevent coding errors, the minimum frequency (frequency is 1) can be added to the missing value, and then the Huffman code table is made to generate the codeword information corresponding to the value). Write this string of codeword information into the file in sequence to form the final Huffman code table file. Since each codeword information is arranged from small to large according to the value, the value size and the corresponding codeword information in the code table file correspond to each other, which is equivalent to establishing an index of the codeword information. Therefore, in the Huffman coding part, according to the value size, directly find the codeword length and codeword information of the corresponding position to obtain the codeword information corresponding to the value.

[0136] Step 2: Data compression

[0137] For the collected downhole data in a frame group, the underground equipment first encodes the reference frame according to the effective number of bits given in Table 1. For example, for the first data R[1][1] of the reference frame, 8 bits of data are extracted and stored in the memory; for R[1][2] and R[1][3], 11 bits of effective data are extracted and stored in the memory. By extracting all the effective bit data in the reference frame, the compression encoding of the reference frame data is completed.

[0138] Then, the data of the predicted frame is processed by intra-frame prediction and inter-frame prediction, and the processed value is added with 255. The obtained value is the index value of the codeword information corresponding to the value in the code table file (range is 0 to 510). According to the index value, the codeword in the corresponding codeword information is extracted and written into the memory bit by bit, thus completing the compression encoding of the predicted data.

[0139] Step 3: Data decoding and reconstruction

[0140] (1) Decoding of reference frame data. The ground system decoding software first decodes the compressed coded data received in accordance with the method corresponding to the reference frame data compression method. That is, according to the known valid data bit information shown in Table 1, the corresponding valid data bits are read in sequence and put into the memory. For data with less than 8 bits, the high bits are filled with 0 to fill to 8 bits.

[0141] (2) Decoding of predicted frame data. After decoding to obtain one frame of reference frame data, the subsequent compressed coded data is first subjected to Huffman decoding. The predicted frame data obtained after Huffman decoding is reconstructed in the following manner:

[0142] Suppose the predicted frame data obtained after Huffman decoding is R′[m][n] (m=2, 3...6, n=1, 2, 3, ...14), and the data after reconstructing R′[m][n] is D′[m][n]=R′[m][n] (m=1, n=1, 2, 3, ...14).

[0143] Taking the second frame as an example, the predicted frame data after Huffman decoding is reconstructed. First, intra-frame prediction decoding is performed:

[0144] D′[2][1]=R′[2][1];

[0145] D′[2][4]=R′[2][4]+R′[2][1];

[0146] D′[2][7]=R′[2][7]+R′[2][4];

[0147] D′[2][9]=R′[2][9]+R′[2][7];

[0148] D′[2]

[11] =R′[2]

[11] +R′[2][9];

[0149] D′[2]

[13] =R′[2]

[13] +R′[2]

[11] ;

[0150] Then perform inter-frame prediction decoding: D′[2][2]=R′[2][2]+R′[1][2];

[0151] D′[2][5]=R′[2][5]+R′[1][5];

[0152] D′[2][8]=R′[2][8]+R′[1][8];

[0153] D′[2]

[10] =R′[2]

[10] +R′[1]

[10] ;

[0154] D′[2]

[12] =R′[2]

[12] +R′[1]

[12] ;

[0155] D′[2]

[14] =R′[2]

[14] +R′[1]

[14] ;

[0156] The 3rd, 4th, 5th and 6th frames are processed similarly. After the above processing, the reconstructed data D′[m][n] (m=1, 2, 3, ... 6, n=1, 2, 3 ... 14) of the original measurement data of a GOF is obtained, which corresponds one to one with the original measurement data D[m][n] (m=1, 2, 3, ... 6, n=1, 2, 3 ... 14).

[0157] For the data that is less than one GOF (for example, 6 frames of data) at the end, a data decoding method similar to the above can also be used.

[0158] The compression method, decompression method and transmission method according to the present invention can be programmed as a computer program and the corresponding program code or instructions can be stored in a computer-readable storage medium. When the program code or instructions are executed by a processor, the processor executes at least one of the above-mentioned compression method, decompression method and transmission method. The above-mentioned processor and memory can be included in a computer device.

[0159] According to another exemplary embodiment of the present invention, there is also provided a computer-readable storage medium storing a computer program. The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform at least one of the compression method, decompression method, and transmission method according to the present invention. The computer-readable recording medium is any data storage device that can store data read out by a computer system. Examples of computer-readable recording media include: read-only memory, random access memory, read-only optical disk, magnetic tape, floppy disk, optical data storage device, and carrier wave (such as data transmission over the Internet via a wired or wireless transmission path).

[0160] According to another exemplary embodiment of the present invention, a computer device is also provided. The computer device includes a processor and a memory. The memory is used to store a computer program. The computer program is executed by the processor so that the processor executes the computer program according to at least one of the compression method, decompression method and transmission method of the present invention.

[0161] The compression and decompression method according to the present invention can reduce the space occupied by file storage, and can be applied to the processing of downhole data such as rotary steering and near-bit geological parameters in oil and gas drilling or exploration, and has better error resistance and compression effect, and is easier to implement on downhole hardware equipment such as single-chip microcomputers, without affecting the real-time operation of downhole equipment. However, the present invention is not limited to this. In addition to downhole data, the compression, decompression method and transmission method according to the present invention can also be applied to other data processing. For example, in a speech signal, the values ​​of two adjacent data are very close within a short period of time. With this characteristic, by performing probability statistics and generating a code table for such data, the method according to the present invention can be used to compress, decompress and transmit, so as to achieve the effect of fast and efficient data transmission.

[0162] Although the present invention has been described above by combining with exemplary embodiments, it will be apparent to those skilled in the art that various modifications and changes may be made to the exemplary embodiments of the present invention without departing from the spirit and scope defined in the claims.

Claims

1. A method for compressing downhole drilling data. It is characterized in that The compression method comprises: S1. Based on the historical downhole drilling data obtained in the same survey area, a Huffman code table is prepared, including: Dividing the historical drilling data into multiple frame groups by frame, taking the data frame at the location of the first frame in each frame group as the historical reference frame, and taking the data frames at the locations of other frames except the reference frame as the historical prediction frames; Performing intra-frame prediction coding processing on data having multiple identical items in a historical prediction frame; Performing inter-frame prediction coding processing on other items of data in the historical prediction intra-frame data that have not been subjected to intra-frame prediction coding processing; and All historical prediction frame data processed by intra-frame prediction coding and inter-frame prediction coding are counted in bytes, and the frequency of the value of each byte data is counted, and a Huffman code table is prepared; S2. Lossless data compression of real-time while drilling data, including: The real-time received downhole data is divided into multiple frame groups, and the first frame received in each frame group is used as a real-time reference frame, and the subsequently received data frames are used as real-time prediction frames; Compress and encode the data in the real-time reference frame according to the number of valid data bits; Performing intra-frame prediction coding processing on data having multiple identical items in a real-time prediction frame; Performing inter-frame prediction coding processing on other items of data in the real-time prediction intra-frame data that have not been subjected to intra-frame prediction coding processing; and In units of bytes, the predicted frame data is Huffman encoded in sequence; The step of compressing and encoding the real-time reference frame data according to the number of effective bits comprises: For the data in the real-time reference frame, a copy is saved for inter-frame prediction coding processing; Extracting valid data from each data in the real-time reference frame according to the number of valid data bits given by the accuracy of the measuring instrument; and All valid data in the real-time reference frame are encoded sequentially.

2. The method for compressing downhole drilling data according to claim 1, It is characterized in that The intra-frame prediction coding process includes: except for the first data of the same item in the frame, for the subsequent data of the same item, subtract the value of the previous data adjacent to the same item from the value of the current data, and use the difference value as the value of the current position data; The inter-frame prediction coding process includes: in each frame group, for other items of data that have not been processed by intra-frame prediction coding, the value of the current position data is subtracted from the original value of the data at the same position in the previous frame, and the obtained difference is used as the value of the current position data.

3. The method for compressing downhole drilling data according to claim 2, It is characterized in that The method further includes transforming the produced Huffman code table file, specifically including: Extracting the value of each byte data in the Huffman code table and its corresponding codeword length, codeword and statistical frequency; Assume that the codeword information consists of codeword length, codeword and statistical frequency, and arrange the codeword information of all data in order from small to large according to the value of the data; Write the arranged codeword information into the file in sequence to generate a Huffman code table file; Among them, if it is found that the minimum value of the arranged data is not 0 or there is a missing integer between the minimum and maximum values, the missing value is manually added and the frequency is set to 1. Then a Huffman code table is created and the codeword information is saved in a file in order of value size.

4. The method for compressing downhole drilling data according to claim 1, It is characterized in that The steps of performing Huffman encoding on the real-time prediction frame data in bytes include: Using the numerical value of the real-time prediction frame data after the prediction coding process, determining the addressing value in the Huffman code table file generated in step S1, wherein the addressing value is a natural number; According to the addressing value, find the codeword information of the corresponding position number in the Huffman code table file generated in step S1; According to the codeword length and the codeword in the codeword information, the Huffman code corresponding to the real-time prediction frame data value is extracted; The Huffman codes are encoded bit by bit in sequence to complete the Huffman encoding of the real-time prediction frame data.

5. A downhole data compression device, It is characterized in that The compression device is arranged underground, and comprises a Huffman code table making module and a compression module, wherein the Huffman code table making module is used to make a Huffman code table based on the underground drilling data acquired in the same measurement area, and the Huffman code table making module comprises: The first grouping unit is configured to divide the historical downhole drilling data into a plurality of frame groups by frame, and use the data frame at the position of the first frame in each frame group as the historical reference frame, and the data frames at the positions of other frames except the reference frame as the historical prediction frames; A first intra-frame prediction encoding unit is configured to perform intra-frame prediction encoding processing on data having a plurality of identical items in a historical prediction frame; A first inter-frame prediction encoding unit is configured to perform inter-frame prediction encoding processing on other items of data that have not been subjected to intra-frame prediction encoding processing in the historical prediction intra-frame data; and A Huffman code table making unit is configured to count the frequency of the value of each byte data in units of bytes for all historical prediction frame data that have been processed by intra-frame prediction coding and inter-frame prediction coding, and make a Huffman code table; The compression module is used to perform lossless data compression on real-time while-drilling data, and includes: The second grouping unit is configured to divide the real-time received drilling data into a plurality of frame groups by frame, and use the first frame received in each frame group as a real-time reference frame and the subsequently received data frames as real-time prediction frames; A reference frame compression encoding unit, configured to compress and encode the data in the real-time reference frame according to the number of effective data bits given by the accuracy of the measuring instrument; A second intra-frame prediction encoding unit is configured to perform intra-frame prediction encoding processing on data having a plurality of identical items in a real-time prediction frame; A second inter-frame prediction encoding unit is configured to perform inter-frame prediction encoding processing on other items of data in the real-time prediction intra-frame data that have not been subjected to the intra-frame prediction encoding processing; and The Huffman encoding unit is configured to perform Huffman encoding on the prediction frame data in sequence in bytes.

6. A method for decompressing downhole drilling data. It is characterized in that The decompression method decodes the data transmitted from the downhole at the surface end, reconstructs the decoded data, and obtains the reconstructed data while drilling, wherein the data transmitted from the downhole is compressed coded data obtained by compression using the compression method according to any one of claims 1 to 4, and the decompression method includes: Decoding the received real-time reference frame data according to the number of valid data bits; Performing Huffman decoding on the received real-time prediction frame data; and Reconstructing the real-time prediction frame data obtained after Huffman decoding, wherein the reconstruction step includes: performing intra-frame prediction decoding processing on data with multiple identical items in the real-time prediction frame data obtained after Huffman decoding; performing inter-frame prediction decoding processing on other items of data in the real-time prediction frame data obtained after Huffman decoding that have not been subjected to intra-frame prediction decoding processing; The step of decoding the received real-time reference frame data according to the number of valid data bits comprises: For the received compressed coded data, according to the number of valid data bits, the corresponding valid data bits are read bit by bit in sequence and stored in the first array. If the received compressed coded data is less than the number of valid data bits, zeros are added to the high bits to fill up to the number of valid data bits, thereby completing the decoding of the real-time reference frame data in each frame group.

7. The method for decompressing downhole drilling data according to claim 6, It is characterized in that The intra-frame prediction decoding process includes: except for the first data of the same item in the frame, for the subsequent data of the same item, the value of the current data is added to the value of the previous data adjacent to the same item, and the sum is used as the value of the current position data; The inter-frame prediction decoding process includes: in each frame group, for other items of data that have not been subjected to intra-frame prediction coding, the value of the current position data is added to the value of the data at the same position of the previous frame, and the sum is used as the value of the current position data.

8. A decompression device for downhole drilling data, It is characterized in that The decompression device is arranged at the surface end, and is used to communicate with the downhole drilling data compression device according to claim 5, so as to decode the compressed coded data transmitted from the downhole, reconstruct the decoded data, and obtain the drilling reconstructed data, and the decompression device comprises: A reference frame decoding unit, configured to decode the received real-time reference frame data according to the number of effective data bits given according to the accuracy of the measuring instrument; A prediction frame Huffman decoding unit, configured to perform Huffman decoding on the received real-time prediction frame data; and The prediction frame reconstruction unit is configured to reconstruct the real-time prediction frame data obtained after Huffman decoding, and the prediction frame reconstruction unit includes: An intra-frame prediction decoding submodule is configured to perform intra-frame prediction decoding processing on data having multiple identical items in the real-time prediction frame data obtained after Huffman decoding; and The inter-frame prediction decoding submodule is configured to perform inter-frame prediction decoding processing on other items of data in the real-time prediction frame data obtained after Huffman decoding that have not been subjected to intra-frame prediction decoding processing.

9. A method for transmitting downhole drilling data. It is characterized in that The transmission method comprises: Using the compression method as described in any one of claims 1 to 4 to compress and encode the drilling data collected in real time; and The compressed coded data is decompressed using the decompression method as described in any one of claims 6-7.

10. A downhole data transmission system while drilling, It is characterized in that The transmission system comprises: The downhole data compression device as claimed in claim 5; and The downhole drilling data decompression device as claimed in claim 8.

11. A device, It is characterized in that The device comprises: processor; A memory storing a computer program, which, when executed by a processor, implements at least one of the compression method described in any one of claims 1 to 4, the decompression method described in any one of claims 6 to 7, and the transmission method described in claim 9.

12. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, at least one of the compression method according to any one of claims 1 to 4, the decompression method according to any one of claims 6 to 7, and the transmission method according to claim 9 is implemented.