Data bit width dynamic compression and decompression method of measurement while drilling system

Through the dynamic compression method of the data bit width of the downhole data acquisition system, differential coding and Huffman coding are used to optimize downhole data compression, solving the problem of inefficient compression efficiency when local stability of downhole data coexist with local sudden changes, and achieving efficient and lossless data storage and transmission.

CN120567200APending Publication Date: 2025-08-29ZHEJIANG TENSING SCIENCE & TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510716290.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

When the existing downhole data acquisition system coexists with local data stationary and local mutations, the compression efficiency is low or key information is lost. The traditional method has high computing resources and memory requirements, so it is not suitable for downhole low-power embedded systems.

Method used

The dynamic compression method of data bit width while drilling is used. By traversing the data set to be compressed, any value smaller than the maximum value is used as the reference value, the difference value is calculated and the target storage bit width is determined, differential encoding is performed, and the encoded data is arranged into a data stream in the output order, combining sliding windows and Huffman coding to optimize the compression process.

Benefits of technology

Significantly reduce storage space usage, improve compression efficiency, and ensure lossless storage of key information. It is suitable for low-power embedded systems in the underground hole, taking into account the sampling characteristics of different channels, and is suitable for oil and gas underground operations and other IoT scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120567200A_ABST
    Figure CN120567200A_ABST
Patent Text Reader

Abstract

The invention relates to a data bit width dynamic compression and decompression method for an edge computing system while drilling, and belongs to the technical field of data compression and storage. The method comprises the following steps: traversing a data set to be compressed, and taking any value smaller than the maximum value in the data set to be compressed as a reference value; calculating a difference value between each piece of data in the to-be-compressed data set and the reference value to obtain a plurality of pieces of differential data, and determining a target storage bit width according to a storage bit width corresponding to a maximum value in the differential data; and by taking the target storage bit width as a reference, encoding each piece of differential data to obtain a plurality of pieces of encoded data, and arranging the plurality of pieces of encoded data into a data stream according to an output sequence. According to the invention, the technical problem of low compression efficiency or key information loss easily caused by a compression method based on fixed reference differential coding in the prior art under the condition of coexistence of data local stability and local abrupt change is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data compression and storage, and in particular to a method for dynamically compressing and decompressing data bit width of a measurement while drilling system. Background Art

[0002] With the continuous advancement of oil drilling and oil and gas exploration technologies, downhole operations are increasingly demanding real-time, accurate, and high-resolution measurements of engineering parameters. Downhole data typically includes key parameters such as temperature, weight on bit, rotational speed, pump pressure, vibration, triaxial acceleration, and triaxial angular velocity. These data, with their high real-time and continuous nature, are crucial for guiding drilling operations, controlling wellbore stability, and evaluating reservoir performance.

[0003] Currently, most downhole data acquisition systems use a "full storage + partial upload" model, but this model has the following drawbacks: First, downhole operation cycles often last for dozens of days, and high-frequency sampling (e.g., above 100 Hz) generates terabytes of data, most of which changes steadily, with only a small portion exhibiting sudden changes, resulting in a significant amount of redundant data. Second, downhole environments are subject to limited storage space and power consumption. Traditional full data storage not only consumes a significant amount of storage resources, but also, due to limited transmission bandwidth, makes it difficult to transmit data to the surface for processing in real time.

[0004] Limitations of existing compression methods: Existing compression methods based on fixed-base differential coding (such as DPCM) or wavelet transforms are prone to low compression efficiency or loss of key information when faced with data that exhibits both local stationarity and local mutations. Furthermore, these algorithms require high computing resources and memory for hardware implementation, making them difficult to apply to low-power embedded systems underground. Summary of the Invention

[0005] In view of this, it is necessary to provide a dynamic compression and decompression method for the data bit width of a measurement while drilling system to solve the technical problems of low compression efficiency or loss of key information in the existing compression method based on fixed reference differential coding when faced with the coexistence of local stability and local mutation of data.

[0006] In order to solve the above problems, the present invention provides a method for dynamically compressing data bit width of a measurement while drilling system, comprising: Traversing the data set to be compressed, and taking any value in the data set to be compressed that is smaller than the maximum value as a reference value; Calculating the difference between each data in the to-be-compressed data set and the reference value to obtain a plurality of differential data, and determining a target storage bit width according to the storage bit width corresponding to the maximum value in the differential data; Based on the target storage bit width, each differential data is encoded to obtain a plurality of encoded data, and the plurality of encoded data are arranged into a data stream in an output order.

[0007] In a possible implementation, the reference value is the minimum value in the data set to be compressed; and the maximum value in the differential data is the difference between the maximum value in the data set to be compressed and the reference value.

[0008] In a possible implementation, after obtaining the data stream, the following steps are further included: The data bit stream, the frame header, the reference value and the target storage bit width are encapsulated to obtain compressed data.

[0009] In a possible implementation, when obtaining the data set to be compressed, the method further includes: According to the fluctuation characteristics of the data to be compressed, the data to be compressed is divided into multiple data sets to be compressed according to the preset window; After the data sets are divided into multiple data sets to be compressed, a reference value and a target storage bit width of each data set to be compressed are determined; And based on the target bit width corresponding to each data set to be compressed, the corresponding data set to be compressed is encoded.

[0010] In a possible implementation, after obtaining the plurality of differential data, the method further includes: In the process of dividing the data set to be compressed according to the preset window, comparing the size relationship between the real-time differential data and the differential threshold; If the real-time differential data is greater than the differential threshold, the data point corresponding to the real-time differential data is used as the window cutoff point to obtain the data set to be compressed in the previous stage; and the data point corresponding to the real-time differential data is used as the starting point of the new window, and the data set to be compressed is divided according to the preset window.

[0011] In a possible implementation, determining the target storage bit width according to the storage bit width corresponding to the maximum value in the differential data includes: Calculating a target storage bit width corresponding to the maximum value in the differential data using a binary search method; Based on the target storage bit width, each differential data is encoded to obtain a plurality of encoded data, and the plurality of encoded data are arranged into a binary bit stream in the order of outputting the bit stream.

[0012] In a possible implementation, the data set to be compressed is multi-channel mixed data; before traversing the data set to be compressed, the method includes: The multi-channel mixed data is grouped and blocked according to channel characteristics, and each grouped and blocked data set is independently encoded.

[0013] In a possible implementation, after obtaining a plurality of differential data, the method further includes: Counting the frequency of occurrence of differential values ​​in the differential data, and determining the differential values ​​that are greater than a frequency threshold; Huffman coding is used to encode the difference values ​​that are greater than the frequency threshold.

[0014] In a second aspect, the present invention further provides a method for dynamically decompressing the bit width of measurement while drilling system data, which is used to decode the compressed data in any of the above-mentioned methods for dynamically compressing the bit width of measurement while drilling system data, comprising: Parse the base value and target storage bit width from the compressed data; Parse the target storage bit width bit by bit to obtain each differential data; According to the reference value, the original data corresponding to each differential data is determined.

[0015] In a third aspect, the present invention further provides a device for dynamically compressing data bit width of a measurement while drilling system, comprising: A reference value determination module, configured to traverse the data set to be compressed and use any value in the data set to be compressed that is smaller than the maximum value as a reference value; a storage bit width determination module, configured to calculate the difference between each data in the to-be-compressed data set and the reference value to obtain a plurality of differential data, and determine a target storage bit width according to the storage bit width corresponding to the maximum value in the differential data; The encoding module is used to encode each differential data based on the target storage bit width to obtain multiple encoded data, and arrange the multiple encoded data into a data stream in an output order.

[0016] In a fourth aspect, the present invention further provides an electronic device, comprising: a processor and a memory; The memory stores a computer-readable program executable by the processor; When the processor executes the computer-readable program, the steps of the method for dynamic compression of data bit width of a measurement while drilling system as described above are implemented.

[0017] In a fifth aspect, the present invention also provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the method for dynamic compression of data bit width of a measurement while drilling system as described above.

[0018] The beneficial effects of the present invention are as follows: first, the data set to be compressed is traversed, and any value in the data set to be compressed that is less than the maximum value is used as a reference value; the difference between each data in the data set to be compressed and the reference value is calculated to obtain multiple differential data, and the target storage bit width is determined according to the storage bit width corresponding to the maximum value in the differential data; based on the target storage bit width, each differential data is encoded to obtain multiple encoded data, which solves the problem of overflow or low efficiency of fixed reference differential when vibration / pressure changes suddenly, and finally arranges the multiple encoded data into a data stream in output order, breaking the traditional byte boundary, significantly reducing the padding bit occupancy, and giving full play to the potential of differential encoding. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A method flow chart of an embodiment of a method for dynamic compression of data bit width in a measurement while drilling system provided by the present invention; Figure 2 for Figure 1 A method flow chart of an embodiment of step S102; Figure 3 A method flow chart of an embodiment of a process for processing a data set to be compressed in the method for dynamic compression of data bit width in a measurement while drilling system provided by the present invention; Figure 4 A flowchart of an embodiment of a differential data processing process in the method for dynamic compression of data bit width in a measurement while drilling system provided by the present invention; Figure 5 A method flow chart of an embodiment of a method for dynamic decompression of data bit width in a measurement while drilling system provided by the present invention; Figure 6 1 is a schematic diagram of an embodiment of a data bit width dynamic compression device for a measurement while drilling system based on dynamic bit width allocation provided by the present invention; Figure 7 It is a schematic diagram of the operating environment of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, and are not used to limit the scope of the present invention.

[0021] A specific embodiment of the present invention discloses a method for dynamically compressing the data bit width of a measurement while drilling system. Figure 1 ,include: S101, traversing the data set to be compressed, and taking any value in the data set to be compressed that is smaller than the maximum value as a reference value; It should be noted that the data set to be compressed is downhole engineering parameter data, including but not limited to temperature, drilling pressure, rotation speed, pump pressure, three-axis acceleration, three-axis angular velocity, geothermal temperature, downhole vibration, exhaust volume, subsea wellhead pressure, flow data and other parameters.

[0022] It should be noted that the establishment of the benchmark value is to convert the original data to be compressed from any distribution range [D min , D max ] is normalized to the non-negative value range [0, Dmax − reference value] to reduce the storage bit width.

[0023] If the maximum value is used as the reference value, the purpose of narrowing the data distribution range and reducing the storage bit width cannot be achieved. Therefore, the reference value is selected to be a value less than the maximum value, which can be the mean, mode, minimum value, or other value of the data. In this embodiment, the minimum value of the data to be compressed is used as the reference value.

[0024] In a specific embodiment, suppose the original data sequence is , where each D i Fixed-point numbers or 16-bit integers are usually used for storage.

[0025] Scan the sequence and get the minimum value Dmin=min{D1,D2,…,D N} Then calculate the difference sequence D diff,i =D i −D min,i =1,2,…,N Find the maximum value D in the difference sequence max diff } This processing method can effectively reduce the distribution range of the difference values, so that most of the difference values ​​are distributed in a relatively small interval, which is conducive to reducing the required bit width.

[0026] S102, calculating the difference between each data in the to-be-compressed data set and the reference value to obtain a plurality of differential data, and determining a target storage bit width according to the storage bit width corresponding to the maximum value among the differential data; It should be noted that the difference sequence is obtained by subtracting the minimum reference value from all the data to be compressed, and the original data is normalized from any distribution range to the non-negative range [0, D max −D min ], the actual dynamic range is much smaller than the theoretical range of the data type, and the distribution range of the difference sequence will be significantly reduced, thereby significantly saving storage space.

[0027] It should be noted that the maximum value in the differential data is the difference between the maximum value in the data set to be compressed and the reference value. Using the maximum value in the differential data as the target storage bit width can ensure that all differential values ​​can be stored losslessly while minimizing the number of occupied bits.

[0028] In one embodiment of the present invention, see Figure 2 , step S102 includes: S201, using a binary search method to calculate a target storage bit width corresponding to the maximum value in the differential data; S202 . Encode each differential data based on the target storage bit width to obtain a plurality of encoded data, and arrange the plurality of encoded data into a binary bit stream in the order of outputting the bit stream.

[0029] In this embodiment, the target storage bit width is determined The method uses the dichotomy method to calculate so that < < To ensure compact storage of differential data. maxdiff = 255, D maxdiff +1=255+1=256, 2 8 =256, then within this window, each differential value occupies 8 bits to be expressed losslessly. maxdiff If the value is smaller, the corresponding bit width will be smaller, which will lead to a higher compression ratio; if a short-term mutation occurs and D maxdiff If the value increases, the bit width in the window will increase accordingly to ensure that the data does not overflow or distort.

[0030] S103 . Encode each differential data based on the target storage bit width to obtain a plurality of encoded data, and arrange the plurality of encoded data into a data stream in an output order.

[0031] It should be noted that the output order of the encoded data is the order in which the original data was encoded. By closely arranging multiple encoded data into a data stream in the output order, without padding to a fixed byte length, and eliminating wasted padding bits, the space required for storage or transmission is significantly reduced.

[0032] In a specific embodiment, after determining the bit width B, each differential value D diff,iIt is represented by a binary number of B bits. For example, if B=5, all differential values ​​are stored within a 5-bit width. Traditional practices often pad each differential value to 8 bits (or 16 bits), resulting in a waste of extra padding bits. The present invention uses a bit stream reorganization method to tightly arrange each differential value using only B bits, thereby eliminating the redundant spaces generated by byte boundaries. Specifically, assuming B=3, there are three differential values, namely (101)_2, (011)_2, and (110)_2, then they should be spliced ​​in sequence as 101011110 in the bit stream. If byte alignment is used, each differential value may need to be padded to 8 bits, which will waste a lot of storage space. The advantage of bit field compression is that it can achieve compact arrangement at the bit level.

[0033] Furthermore, when concatenating multiple differential values, writing across bytes is inevitable. For example, if there are only two available bits in the current byte but a 5-bit differential value needs to be written, the first two bits are first filled into the current byte, and the remaining three bits are then written to the next byte. During encoding, a "write pointer" or "bit pointer" can be maintained to record the currently written bit position. The pointer position is updated each time a new differential value is encoded. When the pointer exceeds 7 (or 15), the next byte position is switched.

[0034] In this embodiment, the data set to be compressed is first traversed, and any value in the data set to be compressed that is less than the maximum value is used as a reference value; the difference between each data in the data set to be compressed and the reference value is calculated to obtain multiple differential data, and the target storage bit width is determined according to the storage bit width corresponding to the maximum value in the differential data; with the target storage bit width as a reference, each differential data is encoded to obtain multiple encoded data, which solves the problem of overflow or low efficiency of fixed reference differential when vibration / pressure changes suddenly, and finally arranges the multiple encoded data into a data stream in output order, breaking the traditional byte boundary, significantly reducing the padding bit occupancy, and giving full play to the potential of differential encoding.

[0035] At the same time, the encoding process is to calculate the difference of each data point one by one and write it into the bit stream. It only has simple addition, subtraction and shift operations, and does not require large cache or complex transformation algorithms (such as DCT, wavelet, etc.). It can run efficiently on embedded platforms such as ARM / DSP.

[0036] In a specific embodiment, the hardware components of the present invention primarily consist of sensors (such as temperature, pressure, triaxial acceleration, and triaxial angular velocity), an analog front-end (e.g., an A / D converter), a digital processing unit (ARM / DSP / FPGA), and a power management unit. The data acquisition frequency can be configured as needed; for example, temperature or pressure data may require only 0.3-1 Hz, while triaxial acceleration and angular velocity data may reach 100-200 Hz or higher. The system must support long-term stable operation and maintain reliability in harsh environments such as high temperatures (e.g., 125°C or higher) and high vibration. An embedded processor acquires raw digital data from the sensor or A / D module. Based on preconfigured time intervals or buffer full triggers, it performs differential encoding and bit-field compression, packages the processed data into frames, and stores them in downhole storage media (e.g., Flash or EEPROM). Depending on bandwidth availability, partial or full upload to the surface is possible.

[0037] In some embodiments, after obtaining the data stream, the method further includes: The data bit stream, the frame header, the reference value and the target storage bit width are encapsulated to obtain compressed data.

[0038] In this embodiment, in order to correctly restore the data at the decoding end, necessary metadata needs to be added to the front of the compressed data. The typical data frame structure is as follows: [Frame Header (1 byte)] [Reference Value (2 bytes)] [Bit Width B (1 byte)] [Differential Bit Stream (variable length)]; Frame header: fixed 1 byte (for example, 0xA5), identifying the compression format of the frame; Reference value: 16 bits (2 bytes), storing Dmin; Bit width B: 1 byte can represent 0 to 255. If only 5 bits are needed, they can be placed in the lower 5 bits of the byte. Differential bit stream: The length depends on N and B. Ideally, the total number of bits is If the frame header is still insufficient, some verification information can be added.

[0039] In long-cycle operations, the sensor output does not necessarily always remain within a range of amplitudes. For example, the temperature gradually increases with the depth downhole; or the wellbore wall becomes unstable during a certain period of time, and the vibration parameters fluctuate violently; if a single global minimum and maximum difference is used, it may cause the bit width to be too large (reducing the compression rate), or cause overflow in the event of a sudden change. In addition, downhole instruments often collect signals from multiple channels at the same time, such as temperature (low frequency), three-axis acceleration (high frequency), drilling pressure (medium frequency), etc. If all channels are merged into the same data window for unified encoding, the situation of "strongly fluctuating channels raising the maximum difference, resulting in a larger overall bit width" may occur, thereby reducing the compression efficiency of stable channels. In some embodiments, when obtaining the data set to be compressed, please refer to Figure 3 , also includes: S301, dividing the data to be compressed into multiple data sets to be compressed according to preset windows based on the fluctuation characteristics of the data to be compressed; S302: After the data sets are divided into multiple data sets to be compressed, a reference value and a target storage bit width of each data set to be compressed are determined; S303 : Based on the target bit width corresponding to each data set to be compressed, perform encoding processing on the corresponding data set to be compressed.

[0040] In this embodiment, a sliding window analysis is performed on the input data, and the and , and dynamically adjust the target storage bit width according to the data fluctuations in the window , taking into account both the efficient compression of slowly changing data and the lossless capture of sudden change data.

[0041] Furthermore, it also includes dividing the multi-channel data into blocks according to the channel characteristics. For example, slow-changing signals such as temperature and pressure are divided into one block; fast-changing signals such as acceleration and angular velocity are divided into another block; and within each block, the calculation is performed according to the principle of "single channel, single window" or "multi-channel but with similar fluctuations". 、 And encode; if some channels (such as three-axis acceleration) are highly correlated, you can also try to jointly process the three channels first: organize the data in vector form, and possibly reduce the differential range by subtracting the common amount of the three channels.

[0042] Example process: 1. Signal grouping: Group A: temperature and pressure (slowly changing); Group B: triaxial acceleration; Group C: three-axis angular velocity.

[0043] 2. Sliding window: Define appropriate window sizes for groups A, B, and C and perform differential encoding.

[0044] 3. Frame encapsulation: Generate frame headers and parameters for each set of data, and then splice or save them in different storage areas.

[0045] 4. Decoding: Decode each frame separately and align the decoding results to a unified timeline to obtain complete multi-parameter data.

[0046] This embodiment can ensure efficient compression while better taking into account the sampling characteristics of different channels, and avoid the fluctuation range of a single parameter "polluting" the compression effects of other channels.

[0047] In some downhole working conditions, the sensor outputs stable data most of the time, but at certain moments, strong vibration or temperature mutation may occur, causing the differential value distribution to increase suddenly. The existing practice is to pre-set a fixed window length, such as 1024 or 2048 sampling points, and then perform a minimum and maximum difference calculation for each window. However, this may result in both small fluctuations and large mutations within the window, forcing the bit width of the entire window to increase. In some embodiments of the present invention, after obtaining multiple differential data, refer to Figure 4 , also includes: S401, in the process of dividing the to-be-compressed data set according to the preset window, comparing the magnitude relationship between the real-time differential data and the differential threshold; S402. If the real-time differential data is greater than the differential threshold, the data point corresponding to the real-time differential data is used as the window cutoff point to obtain the data set to be compressed in the previous stage; and the data point corresponding to the real-time differential data is used as the starting point of a new window to divide the data set to be compressed according to the preset window.

[0048] In this embodiment, the current differential value is monitored in real time during encoding to see if it exceeds the set threshold. When the value of the sampling point fluctuates to 80% or exceeds the upper limit of the absolute value, the current window is forced to end, the frame is immediately encapsulated and a new window is opened. In this way, the sampling points with large fluctuations can be processed separately in a shorter window, reducing the "crowding out" of data in other stable periods.

[0049] In a specific embodiment, the upper limit of the window is set to 1024 points. However, if the difference is found to be much greater than the previous average level when scanning the 600th sampling point, the window A (600 points) is immediately terminated and the point is used as the starting point B1 of the new window. The new window B is recalculated from B1. and , significantly improving the compression efficiency in scenarios with severe fluctuations.

[0050] When some data distribution is highly skewed or presents a specific probability distribution, the differential values ​​can be further statistically encoded to obtain a higher compression ratio. In some embodiments of the present invention, after obtaining a plurality of differential data, the following is further included: Counting the frequency of occurrence of differential values ​​in the differential data, and determining the differential values ​​that are greater than a frequency threshold; Huffman coding is used to encode the difference values ​​that are greater than the frequency threshold.

[0051] In this embodiment, the difference and bit width determination method of the present invention is first used to obtain the range of each differential value; then the frequency of occurrence of the differential values ​​is counted, and a Huffman tree is used to assign shorter codewords to frequently occurring differential values; this can significantly improve the compression rate.

[0052] It's important to note that Huffman coding is particularly well-suited for extremely stable data scenarios, such as when temperature fluctuates within a small range, where most differential values ​​are close to zero or small. Huffman coding reduces the number of bits used for these high-frequency differential values, ultimately improving compression even with the same hardware.

[0053] In downhole high-frequency logging and long-cycle drilling operations, compared to traditional DPCM, which uses fixed reference values ​​or predicted values ​​and typically stores differential values ​​in a byte-aligned manner, this method is more flexible in terms of reference values ​​and can adaptively select the minimum value as a benchmark based on the data set. It also uses a cross-byte bit stream approach to reduce redundant spaces, fully utilizing the stationarity of downhole data within a local time window and the correlation between adjacent samples. It balances hardware resources and lossless compression requirements, enabling efficient lossless compression of multi-source sensor data. Specifically, 1. High compression rate and high fidelity: It can greatly compress data with small fluctuations and ensure complete storage of data with local mutations, with strong applicability; 2. Low computational power consumption: Requires only addition, subtraction, and shift operations, allowing for fast execution on small embedded chips. 3. Flexible expansion: Can be combined with technologies such as multi-channel hybrid processing, threshold-triggered segmentation, and Huffman statistical coding to further improve performance; 4. Applicable to a wide range of scenarios: It can be used not only in oil and gas underground operations, but also in geothermal, mining and other IoT scenarios.

[0054] Based on the above-mentioned method for dynamic compression of data bit width of a measurement while drilling system, an embodiment of the present invention further provides a method for dynamic decompression of data bit width of a measurement while drilling system, which is used to decode the compressed data in the above-mentioned method for dynamic compression of data bit width of a measurement while drilling system. Figure 5 ,include: S501, parsing the reference value and target storage bit width from the compressed data; S502, parsing the target storage bit width bit by bit to obtain each differential data; S503: Determine the original data corresponding to each differential data according to the reference value.

[0055] In this embodiment, the decoding and encoding processes are mirror-symmetrical and include the following steps: 1. Parse the frame header: If the frame header does not match the expected value, the data frame may be damaged or in a different format, and error handling is required. 2. Read the reference value D min : Analyze the differential reference by 2 bytes or fixed word length; 3. Read bit width : Note the differential bit width; 4. Read the differential value bit by bit: Starting from the current byte or bit offset position, parse each D bit in turn according to the length of B bits. diff,i ; 5. Restore the original data: Perform D on each difference value i = D min + D diff,i On the ground side, the decompression program can run in a PC or host computer software. After receiving the frame data, the frame header is parsed, the reference value and bit width are read, the differential value is extracted bit by bit, and the complete original data is reconstructed. It can be further combined with geological models, well history databases, etc. to achieve real-time analysis of downhole status and backtracking of historical data.

[0056] Based on the above-mentioned method for dynamic compression of data bit width in a measurement while drilling system, the embodiment of the present invention further provides a data compression device based on dynamic bit width allocation, see Figure 6 ,include: A reference value determination module 610 is configured to traverse the data set to be compressed and use any value in the data set to be compressed that is smaller than the maximum value as a reference value; a storage bit width determination module 620 configured to calculate the difference between each data in the to-be-compressed data set and the reference value to obtain a plurality of differential data, and determine a target storage bit width based on the storage bit width corresponding to the maximum value among the differential data; The encoding module 630 is configured to encode each differential data based on the target storage bit width to obtain a plurality of encoded data, and arrange the plurality of encoded data into a data stream in an output order.

[0057] like Figure 7As shown, based on the above-mentioned method for dynamic data bit width compression in a measurement while drilling system, the present invention also provides an electronic device. The electronic device can be a computing electronic device such as a mobile terminal, desktop computer, notebook, PDA, or server. The electronic device includes a processor 710, a memory 720, and a display 730. Figure 7 Only some of the components of the electronic device are shown, but it should be understood that it is not required to implement all of the shown components, and more or fewer components may be implemented instead.

[0058] In some embodiments, the memory 720 may be an internal storage unit of the electronic device, such as a hard drive or memory. In other embodiments, the memory 720 may also be an external storage device of the electronic device, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Furthermore, the memory 720 may include both an internal storage unit and an external storage device. The memory 720 is used to store application software installed in the electronic device and various data, such as program code installed in the electronic device. The memory 720 may also be used to temporarily store data that has been output or is about to be output. In one embodiment, the memory 720 stores a data compression program 740 based on dynamic bit width allocation. This data compression program 740 based on dynamic bit width allocation can be executed by the processor 710, thereby implementing the data bit width dynamic compression method for a measurement while drilling system according to various embodiments of the present application.

[0059] In some embodiments, the processor 710 may be a central processing unit (CPU), a microprocessor, or other data processing chip, configured to execute program code stored in the memory 720 or process data, such as executing a method for dynamically compressing data bit width in a measurement while drilling system.

[0060] In some embodiments, display 730 can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 730 is used to display information on the electronic device for data compression based on dynamic bit width allocation and to display a visual user interface. Components 710-730 of the electronic device communicate with each other via a system bus.

[0061] Those skilled in the art will appreciate that all or part of the process steps of the above-described embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a magnetic disk, an optical disk, a read-only memory, or a random access memory.

[0062] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention.

Claims

1. A method for dynamic compression of data bit width of a measurement while drilling system, characterized in that: include: Traversing the data set to be compressed, and taking any value in the data set to be compressed that is smaller than the maximum value as a reference value; Calculating the difference between each data in the to-be-compressed data set and the reference value to obtain a plurality of differential data, and determining a target storage bit width according to the storage bit width corresponding to the maximum value in the differential data; Based on the target storage bit width, each differential data is encoded to obtain a plurality of encoded data, and the plurality of encoded data are arranged into a data stream in an output order.

2. The method for dynamic compression of data bit width of a measurement while drilling system according to claim 1, characterized in that: The reference value is the minimum value in the data set to be compressed; the maximum value in the differential data is the difference between the maximum value in the data set to be compressed and the reference value.

3. The method for dynamic compression of data bit width of a measurement while drilling system according to claim 1, characterized in that: After getting the data stream, it also includes: The data bit stream, the frame header, the reference value and the target storage bit width are encapsulated to obtain compressed data.

4. The method for dynamic compression of data bit width of a measurement while drilling system according to claim 1, characterized in that: When obtaining the data set to be compressed, the method further includes: According to the fluctuation characteristics of the data to be compressed, the data to be compressed is divided into multiple data sets to be compressed according to the preset window; After the data sets are divided into multiple data sets to be compressed, a reference value and a target storage bit width of each data set to be compressed are determined; And based on the target bit width corresponding to each data set to be compressed, the corresponding data set to be compressed is encoded.

5. The method for dynamic compression of data bit width of a measurement while drilling system according to claim 4, characterized in that: After obtaining multiple differential data, it also includes: In the process of dividing the data set to be compressed according to the preset window, comparing the size relationship between the real-time differential data and the differential threshold; If the real-time differential data is greater than the differential threshold, the data point corresponding to the real-time differential data is used as the window cutoff point to obtain the data set to be compressed in the previous stage; and the data point corresponding to the real-time differential data is used as the starting point of the new window, and the data set to be compressed is divided according to the preset window.

6. The method for dynamic compression of data bit width of a measurement while drilling system according to claim 1, characterized in that: The determining the target storage bit width according to the storage bit width corresponding to the maximum value in the differential data includes: Calculating a target storage bit width corresponding to the maximum value in the differential data using a binary search method; Based on the target storage bit width, each differential data is encoded to obtain a plurality of encoded data, and the plurality of encoded data are arranged into a binary bit stream in the order of outputting the bit stream.

7. The method for dynamic compression of data bit width of a measurement while drilling system according to claim 1, characterized in that: The data set to be compressed is multi-channel mixed data; Before traversing the data set to be compressed, include: The multi-channel mixed data is grouped and blocked according to channel characteristics, and each grouped and blocked data set is independently encoded.

8. The method for dynamic compression of data bit width of a measurement while drilling system according to claim 1, characterized in that: After obtaining multiple differential data, it also includes: Counting the frequency of occurrence of differential values ​​in the differential data, and determining the differential values ​​that are greater than a frequency threshold; Huffman coding is used to encode the difference values ​​that are greater than the frequency threshold.

9. A method for dynamically decompressing the bit width of measurement while drilling system data, used for decoding the compressed data in the method for dynamically compressing the bit width of measurement while drilling system data according to any one of claims 1 to 8, characterized in that: include: Parse the base value and target storage bit width from the compressed data; Parse the target storage bit width bit by bit to obtain each differential data; According to the reference value, the original data corresponding to each differential data is determined.

10. A data bit width dynamic compression device for a measurement while drilling system, characterized in that: include: A reference value determination module, configured to traverse the data set to be compressed and use any value in the data set to be compressed that is smaller than the maximum value as a reference value; a storage bit width determination module, configured to calculate the difference between each data in the to-be-compressed data set and the reference value to obtain a plurality of differential data, and determine a target storage bit width according to the storage bit width corresponding to the maximum value in the differential data; The encoding module is used to encode each differential data based on the target storage bit width to obtain multiple encoded data, and arrange the multiple encoded data into a data stream in an output order.

Citation Information

Cited By

  • Downhole large-capacity high-reliability data storage method

    CN121070891A

  • A downhole mass high-reliability data storage method

    CN121070891B