Instruction coding method, device and equipment

By encoding the instruction time series and data time series in the rotary guide drilling system, each pulse occupies a time slot greater than or equal to 2, solving the problems of low signal transmission reliability and high decoding difficulty in the prior art, and achieving more efficient and reliable instruction coding and decoding.

CN119766247APending Publication Date: 2025-04-04CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411724220.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the existing rotary guide command download method, signal transmission reliability is low, susceptible to interference, and instruction decoding is difficult, which affects the safety and efficiency of drilling operations.

Method used

By obtaining the downlink instruction data to be encoded, the number of pulses and time slots are determined, and the encoding forms the instruction time series and data time series. Each pulse occupies a preset time slot greater than or equal to 2, and a timing control sequence is generated to control the speed of the downhole mud generator.

Benefits of technology

It improves the consistency of signal pulse widths of instruction coded, enhances the reliability and processing efficiency of coding sequences, reduces the difficulty of decoding, and improves the safety and efficiency of drilling operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766247A_ABST
    Figure CN119766247A_ABST
Patent Text Reader

Abstract

The invention relates to the field of petroleum engineering, in particular to an instruction coding method, device and equipment, and the method comprises the steps: obtaining to-be-coded downlink instruction data which comprises instruction codes and instruction parameters; determining a first pulse number N1 and a first time slot number M1 according to the instruction code; the N1 pulses are coded to M1 time slots, an instruction time sequence corresponding to the instruction codes is obtained, in the instruction time sequence, each pulse occupies preset K time slots, and K is a positive integer larger than or equal to 2; determining a second pulse number N2 and a second time slot number M2 according to the instruction parameters; the N2 pulses are coded to M2 time slots, a data time sequence corresponding to the instruction parameters is obtained, and in the data time sequence, each pulse occupies preset K time slots; and sending a time sequence control sequence corresponding to the downlink instruction data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of petroleum engineering, and specifically to an instruction encoding method, device and equipment. Background Art

[0002] The rotary steerable drilling instrument is a new generation of intelligent closed-loop drilling system currently widely used in long horizontal section construction. Through the 360° rotation mode of the entire downhole drill string, it can not only accurately control the wellbore trajectory, but also avoid the problems of high friction and low drilling efficiency caused by sliding drilling of traditional downhole screw motors and other power drills. It has the advantages of low cost, high drilling speed, smooth wellbore trajectory, and extended horizontal section. The use of a rotary steerable system can effectively reduce the drilling cycle and improve the quality of the wellbore trajectory. As part of the closed-loop control of the rotary steerable system, command transmission is one of the key technologies for accurately controlling the drilling trajectory of the downhole steerable tool. The success rate of command transmission directly affects the efficiency and quality of drilling.

[0003] The existing rotary steering command transmission mainly adopts the encoding method based on mud pressure pulse or downhole generator speed. Both methods control the switch of mud pump or displacement change to generate mud pressure negative pulse or generator speed change at the bottom of the well, thereby realizing the encoding and transmission of the command. In addition, there is also an encoding method based on the top drive speed change, which encodes the command by adjusting the top drive speed.

[0004] Regardless of the above methods, the encoding method generally adopts a binary encoding method. The signal pulse width generated by this encoding method is not a fixed width, which leads to low signal transmission reliability, susceptibility to interference, and difficulty in command decoding, which increases the difficulty of downhole instrument signal processing and identification and greatly affects the safety and efficiency of drilling operations. Therefore, how to overcome the problems of low signal transmission reliability, susceptibility to interference, and difficulty in command decoding in the existing methods, and propose an efficient and reliable command encoding method is a key issue that needs to be solved urgently. Summary of the invention

[0005] The purpose of the embodiments of this specification is to provide an instruction encoding method, device and equipment to overcome the problems of low signal transmission reliability, susceptibility to interference and difficulty in instruction decoding in existing instruction encoding methods, and to propose an efficient and reliable instruction encoding method.

[0006] On the one hand, an embodiment of the present specification provides an instruction encoding method, the method comprising: obtaining downlink instruction data to be encoded, the downlink instruction data comprising an instruction code and an instruction parameter; determining a first pulse number N1 and a first time slot number M1 according to the instruction code; encoding N1 pulses into M1 time slots to obtain an instruction time sequence corresponding to the instruction code, in which each pulse occupies a preset K time slots, and K is a positive integer greater than or equal to 2; determining a second pulse number N2 and a second time slot number M2 according to the instruction parameters; encoding N2 pulses into M2 time slots to obtain a data time sequence corresponding to the instruction parameters, in which each pulse occupies a preset K time slots; sending a timing control sequence corresponding to the downlink instruction data; the timing control sequence comprises the instruction time sequence and the data time sequence, and the timing control sequence is used to control the speed of an underground mud generator.

[0007] On the other hand, an embodiment of the present specification provides an instruction encoding device, which includes: an acquisition module, used to acquire downlink instruction data to be encoded, and the downlink instruction data includes instruction code and instruction parameters; a first determination module, used to determine a first pulse number N1 and a first time slot number M1 according to the instruction code; a first encoding module, used to encode N1 pulses into M1 time slots, and obtain an instruction time sequence corresponding to the instruction code, in which each pulse occupies a preset K time slots, and K is a positive integer greater than or equal to 2; a second determination module, used to determine a second pulse number N2 and a second time slot number M2 according to the instruction parameters; a second encoding module, used to encode N2 pulses into M2 time slots, and obtain a data time sequence corresponding to the instruction parameters, in which each pulse occupies a preset K time slots; a sending module, used to send a timing control sequence corresponding to the downlink instruction data; the timing control sequence includes the instruction time sequence and the data time sequence, and the timing control sequence is used to control the speed of the downhole mud generator.

[0008] On the other hand, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above instruction encoding method.

[0009] It can be seen from the technical solutions provided in the above embodiments of this specification that the embodiments of this specification can obtain downlink instruction data to be encoded, and the downlink instruction data includes instruction code and instruction parameters; according to the instruction code, determine the first pulse number N1 and the first time slot number M1; encode N1 pulses to M1 time slots to obtain an instruction time sequence corresponding to the instruction code, in which each pulse occupies a preset K time slots, and K is a positive integer greater than or equal to 2; according to the instruction parameters, determine the second pulse number N2 and the second time slot number M2; encode N2 pulses to M2 time slots to obtain a data time sequence corresponding to the instruction parameters, in which each pulse occupies a preset K time slots; send a timing control sequence corresponding to the downlink instruction data; the timing control sequence includes the instruction time sequence and the data time sequence, and the timing control sequence is used to control the speed of the downhole mud generator. Compared with the existing methods, each pulse in the instruction encoding process occupies a preset integer number of time slots greater than or equal to 2, which can ensure that the signal pulse width of the subsequently generated coding sequence remains consistent, which is more efficient and reliable, and can greatly reduce the difficulty of processing the coding sequence, which is conducive to more accurate decoding of the coding sequence. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art description are briefly introduced below.

[0011] Figure 1 is a flow chart of an instruction encoding method provided by an embodiment of this specification;

[0012] Figure 2 It is an overall logic flow chart of an instruction encoding method provided by an embodiment of this specification;

[0013] Figure 3 It is a schematic diagram of an instruction time sequence generated by encoding an instruction code of 10 bits and a value of 4 based on a preset combination code encoding table provided in an embodiment of this specification;

[0014] Figure 4 It is a schematic diagram of a data time series generated after encoding a 10-bit instruction parameter with a value of 50 based on a preset combination code encoding table provided in an embodiment of this specification;

[0015] Figure 5 is a schematic diagram of a fixed wake-up time sequence provided in an embodiment of this specification;

[0016] Figure 6It is a schematic diagram of a timing control sequence obtained by splicing a processed wake-up time sequence, a command time sequence and a data time sequence provided in an embodiment of this specification;

[0017] Figure 7 is a flow chart of an instruction decoding method provided by an embodiment of this specification;

[0018] Figure 8 It is an overall logic flow chart of an instruction decoding method provided by an embodiment of this specification;

[0019] Fig. 9 It is a time domain image of the corresponding triangular filter when the number of time slots occupied by the pulse in the encoding stage provided in the embodiment of this specification is 2;

[0020] Fig.10 It is a frequency domain image of the corresponding triangular filter when the number of time slots occupied by the pulse in the encoding stage provided in the embodiment of this specification is 2;

[0021] Fig.11 It is the rotation speed data generated by the underground drilling system when the number of time slots occupied by the pulse in the encoding stage provided in the embodiment of this specification is 2;

[0022] Fig.12 It is the rotation speed data after FIR filter bandpass filtering when the number of time slots occupied by pulses in the encoding stage provided in the embodiment of this specification is 2;

[0023] Fig.13 It is the rotation speed data after being filtered by a triangular filter when the number of time slots occupied by the pulse in the encoding stage provided in the embodiment of this specification is 2;

[0024] Fig.14 It is a schematic diagram of the structure of an instruction encoding device provided in an embodiment of this specification;

[0025] Fig.15 It is a schematic diagram of the structural composition of a computer device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0027] Figure 1 A flowchart of an instruction encoding method provided in an embodiment of this specification. Figure 2The overall logic flow chart of an instruction encoding method provided in the embodiment of this specification. When implemented specifically, the method includes the following steps:

[0028] S101: Acquire downlink instruction data to be encoded, where the downlink instruction data includes an instruction code and instruction parameters.

[0029] In some embodiments, downlink instruction data to be encoded may be obtained, where the downlink instruction data includes an instruction code and instruction parameters.

[0030] By acquiring the downlink instruction data to be encoded, a data foundation is laid for forming a corresponding timing control sequence based on the instruction encoding and instruction parameter encoding in the downlink instruction data.

[0031] The underground drilling system is also equipped with various monitoring instruments to collect data in the drilling process in real time, such as drilling pressure, torque, speed, mud flow, temperature, etc. These data are used to evaluate the drilling effect, detect potential problems in time and feedback to the ground control system. The ground control system can produce corresponding downlink instructions for complex working conditions that occur during the drilling process. The ground control system can send downlink instructions to the underground drilling system. The underground drilling system can perform corresponding operations according to the received downlink instructions to deal with complex working conditions that occur during the drilling process. And provide a basis for the adjustment of subsequent instructions. Through real-time monitoring and timely adjustment, the underground drilling system can avoid safety hazards such as excessive wear of the drill bit, formation collapse, and mud leakage. At the same time, the underground drilling system can also automatically initiate protective measures in an emergency, such as shutting down the drilling rig and cutting off the mud supply, to ensure the safety of personnel and equipment.

[0032] The downlink instruction includes the instruction code and the corresponding instruction parameters. The drilling process involves multiple complex working conditions and multiple instructions. Each instruction code corresponds to multiple instruction parameters. The instruction code is a unique identifier used to distinguish different downlink instructions. This code can be numbers, letters, or a combination of them. The instruction parameter is the detailed information associated with the instruction code, which is used to specify the specific operation of the instruction. The parameter can be a number, a string, or a more complex data structure.

[0033] S102: Determine the first pulse number N1 and the first time slot number M1 according to the instruction code.

[0034] In some embodiments, the corresponding first pulse number N1 and first time slot number M1 may be determined in a preset combination code format table using even parity according to the number of bits encoded in the instruction.

[0035] By using even parity to determine the corresponding first pulse number N1 and first time slot number M1 in the preset combination code format table, the correctness of the finally generated timing control sequence can be ensured before encoding, without adding additional check bits to the finally generated timing control sequence for verification, which can shorten the time for subsequent timing control sequence download and improve the efficiency of information transmission.

[0036] For the preset combination code format table, the first pulse number N1 and the first time slot number M1 corresponding to the instruction code can be determined according to the number of bits of the instruction code. N1 and M1 are both positive integers greater than or equal to 1. The combination code can realize the encoding and transmission of parameters by mapping the number of bits and values ​​of the data to a specific coding sequence. The combination code encoding rules usually include the key elements of the number of time slots, the number of pulses, and the pulse position. The number of time slots represents the total number of bits or slots in the coding sequence. The number of pulses represents the number of bits or pulses actually set to "1" (or other specific values) in the coding sequence. The pulse position represents the specific position of these "1" bits (or pulses) in the coding sequence. These elements together constitute the basic structure of the combination code, which is used to represent and transmit parameters. Using even parity to determine the corresponding first pulse number N1 and the first time slot number M1 in the preset combination code format table indicates that the obtained first pulse number N1 is an even number, that is, an even number of pulses are used when the corresponding instruction time sequence is subsequently constructed, so there is no need to add additional parity bits in the final generated timing control sequence for data verification. The ground control system can determine the corresponding first pulse number N1 and first time slot number M1 in the preset combination code format table according to the instruction code in the downlink instruction data to be encoded, using even parity. For example, the instruction code is represented by 10-bit data, and it can be concluded that the instruction code number range is 0 to 1023, and there are at most 1024 downlink instructions. The ground control system can determine that the 10-bit instruction code occupies 29 time slots and 4 pulses according to the preset combination code format table in Table 1.

[0037] Table 1

[0038]

[0039] S103: Encode N1 pulses into M1 time slots to obtain an instruction time sequence corresponding to the instruction encoding, in which each pulse occupies preset K time slots, where K is a positive integer greater than or equal to 2.

[0040] In some embodiments, the ground control system determines the positions of N1 pulses in M1 time slots in a preset combination code table based on the numerical value of the instruction code; and encodes the N1 pulses into the M1 time slot based on the positions of the N1 pulses in the M1 time slot to obtain an instruction time sequence corresponding to the instruction code.

[0041] Each pulse in the instruction time sequence occupies the preset K time slots, which can ensure the subsequent generation of a stable instruction time sequence and the consistency of the signal pulse width of the finally generated timing control sequence, thereby greatly reducing the difficulty of the underground drilling system in processing the timing control sequence and facilitating more accurate decoding of the timing control sequence.

[0042] The ground control system determines the positions of N1 pulses in M1 time slots in the preset combination code encoding table according to the value of the instruction code, and then encodes N1 pulses to M1 time slots according to the positions of N1 pulses in M1 time slots to obtain an instruction time sequence corresponding to the instruction code. Each pulse in the instruction time sequence occupies a preset K time slots, where K is a positive integer greater than or equal to 2. For example, when the instruction code occupies 10 bits and the value of the instruction code is 4, the ground control system can set K to 2, and the ground control system can determine the positions of N1 pulses in M1 time slots based on the number of bits and the value of the instruction code. The ground control system determines that the number of pulses corresponding to the 10-bit instruction code is 4 and the corresponding number of time slots is 29 according to the combination code format table in Table 1. The ground control system can then obtain the positions of the 4 pulses of the instruction number with a value of 4 in 29 time slots according to the 10-bit combination code encoding table in Table 2. According to the positions of the four pulses with a pulse width of 2 time slots in the 29 time slots, the four pulses with a pulse width of 2 time slots can be encoded into the 29 time slots. Figure 3 The schematic diagram of the instruction time sequence generated after encoding the instruction code of 10 bits and the value of 4 according to the preset combination code encoding table in Table 2 is shown.

[0043] Table 2

[0044]

[0045] S104: Determine the second pulse number N2 and the second time slot number M2 according to the instruction parameters.

[0046] In some embodiments, the second pulse number N2 and the second time slot number M2 may be determined in a preset combination code format table using even parity according to the number of bits of the instruction parameter.

[0047] By using even parity to determine the corresponding second pulse number N2 and second time slot number M2 in the preset combination code format table, the correctness of the finally generated timing control sequence can be ensured before encoding, and there is no need to add additional check bits to the finally generated timing control sequence for verification, which can shorten the time for subsequent transmission of the timing control sequence and improve the efficiency of information transmission. For the preset combination code format table, the corresponding second pulse number N2 and second time slot number M2 of the instruction parameter can be determined according to the number of bits of the instruction parameter. N2 and M2 are both positive integers greater than or equal to 1. Using even parity to determine the corresponding second pulse number N2 and second time slot number M2 in the preset combination code format table indicates that the acquired second pulse number N2 is an even number, that is, an even number of pulses is used when constructing the corresponding data time series later, so there is no need to add additional check bits to the finally generated timing control sequence for data verification. The ground control system can use even parity to determine the corresponding second pulse number N2 and second time slot number M2 in the preset combination code format table according to the instruction parameters in the downlink instruction data to be encoded. For example, the command parameter is represented by 10-bit data, and it can be concluded that the number range of the command parameter is 0 to 1023, and there are at most 1024 downlink parameters. The ground control system can determine that the number of time slots occupied by the 10-bit command parameter is 29 and the number of pulses is 4 according to the preset combination code format table in Table 1.

[0048] S105: Encode N2 pulses into M2 time slots to obtain a data time sequence corresponding to the instruction parameters, in which each pulse occupies preset K time slots.

[0049] In some embodiments, the ground control system can determine the positions of N2 pulses in M2 time slots in a preset combination code encoding table based on the values ​​of the command parameters; and encode the N2 pulses into M2 time slots based on the positions of the N2 pulses in the M2 time slots to obtain a data time series corresponding to the command parameters.

[0050] Each pulse in the data time series occupies the preset K time slots, which can ensure the subsequent generation of a stable data time series and the consistency of the signal pulse width of the finally generated timing control sequence, thereby greatly reducing the difficulty of the underground drilling system in processing the timing control sequence and facilitating more accurate decoding of the timing control sequence.

[0051] The ground control system determines the positions of N2 pulses in M2 time slots in the preset combination code encoding table according to the value of the instruction parameter, and then encodes the N2 pulses into M2 time slots according to the positions of the N2 pulses in the M2 time slots to obtain a data time sequence corresponding to the instruction parameter. Each pulse in the data time sequence occupies a preset K time slots, where K is a positive integer greater than or equal to 2. For example, when the instruction parameter occupies 10 bits and the value of the instruction parameter is 50, the ground control system can set K to 2, and the ground control system can determine the positions of N2 pulses in M2 time slots based on the number of bits and the value of the instruction parameter. The ground control system determines that the number of pulses corresponding to the 10-bit instruction parameter is 4 and the corresponding number of time slots is 29 according to the combination code format table in Table 1. The ground control system can then obtain the positions of the 4 pulses of the instruction number with a value of 50 in 29 time slots according to the 10-bit combination code encoding table in Table 2. According to the positions of the four pulses with a pulse width of 2 time slots in the 29 time slots, the four pulses with a pulse width of 2 time slots can be encoded into the 29 time slots. Figure 4 The diagram shows a data time series diagram generated after encoding a 10-bit instruction parameter with a value of 50 according to the preset combination code encoding table in Table 2.

[0052] S106: Sending a timing control sequence corresponding to the downlink instruction data; the timing control sequence includes the instruction time sequence and the data time sequence, and the time control sequence is used to control the rotation speed of the downhole mud generator.

[0053] In some embodiments, the timing control sequence also includes a wake-up time sequence. N3 pulses can be encoded into M3 time slots to obtain a wake-up time sequence corresponding to the downlink instruction data, in which each pulse occupies a preset K time slots; N3 is a preset third number of pulses; and M3 is a preset third number of time slots.

[0054] By encoding N3 pulses into M3 time slots, a wake-up time sequence corresponding to the downlink instruction data is obtained, which lays a data foundation for the underground drilling system to obtain the downlink instruction data based on the detection of the wake-up time sequence.

[0055] The ground control system can also generate a wake-up time sequence based on the generated downlink command data. The main function of the wake-up time sequence is to notify the underground drilling system to start preparing to receive data. The content of the wake-up time sequence can be a specific wake-up signal or sequence (such as a specific byte sequence or bit pattern). The length of the wake-up time sequence can be determined according to the communication protocol, usually several bytes or bits. For example, the wake-up time sequence can use a fixed-length sequence, and the length of the time sequence is calculated according to the time slot. The total time length of the wake-up segment is designed to be 64 seconds, occupying 32 time slots; 4 fixed negative pulses, each pulse occupies 2 time slots, and the pulse width is 4 seconds; the intervals between pulses are 6 seconds (3 time slots), 10 seconds (5 time slots), 14 seconds (7 time slots), and 18 seconds (9 time slots). The final wake-up time sequence is (binary): 1100 01100000 1100 0000 0110 0000 0000, occupying 32 bits, each bit occupies 1 time slot, refer to Figure 5 .

[0056] In some embodiments, a timing control sequence may be generated based on the wake-up time sequence, the instruction time sequence, and the data time sequence.

[0057] By generating a timing control sequence based on the wake-up time sequence, instruction time sequence and data time sequence, a data foundation is laid for the underground drilling system to take timely response operations to complex working conditions based on the timing control sequence.

[0058] The ground control system can process the byte occupancy of the wake-up time sequence, and then concatenate the wake-up time sequence and the command time sequence to obtain the timing control sequence. For example, the number of bits in the wake-up time sequence can be divided by 8 and rounded up, and the idle low bits are filled with 0. That is, if the number of bits in the wake-up time sequence is not a multiple of 8, the low bits of the wake-up time sequence need to be filled with 0 until the next complete byte is reached. Figure 6 , the processed wake-up time sequence, instruction time sequence and data time sequence can be spliced ​​to obtain the timing control sequence.

[0059] In some embodiments, the speed of the downhole mud generator may be controlled according to a timing control sequence.

[0060] By controlling the rotation speed of the downhole mud generator according to the timing control sequence, the conversion between the timing control sequence and the rotation speed of the downhole generator is realized, laying the foundation for the transmission of the timing control sequence.

[0061] A downhole mud generator is a device that uses mud flow to drive the generator rotor. The downhole mud generator is installed inside or near the drilling string and can sense changes in mud flow rate or pressure in real time. When the mud displacement or pressure changes, the speed of the mud generator will change accordingly. After generating the timing control sequence, the ground control system can control the switch of the mud discharger or adjust the mud displacement according to the predetermined coding method. This control will cause the flow state of the mud in the riser to change, which in turn affects the speed of the downhole mud generator.

[0062] Corresponding to the above instruction encoding method, the embodiment of this specification also provides an instruction decoding method. Figure 7 A flowchart of an instruction decoding method provided in an embodiment of this specification. Figure 8 The overall logic flow chart of an instruction decoding method provided in the embodiment of this specification. When implemented specifically, the method includes the following steps:

[0063] S701: Collect the rotation speed of the downhole mud generator to obtain rotation speed data.

[0064] In some embodiments, the rotation speed of the downhole mud generator is analyzed to obtain rotation speed data.

[0065] By collecting the rotation speed of the downhole mud generator and obtaining the rotation speed data, the transmission of the timing control sequence is realized, laying a data foundation for the underground drilling system to take timely response operations to complex working conditions based on the timing control sequence.

[0066] Under the condition of presetting the sampling frequency and sampling accuracy, the underground drilling system can sample the speed data of the mud generator in real time through the speed sensor in the downhole mud generator. The underground drilling system can process and analyze the speed data of the mud generator sampled in real time to extract the changing law of the speed.

[0067] S702: Analyze the speed data to obtain a command time series and a data time series.

[0068] In some embodiments, the speed data is sliced ​​to obtain multiple speed data slices; based on similarity analysis, the similarity between the multiple speed data slices and the wake-up time sequence template is calculated; based on the similarity between the multiple speed data slices and the wake-up time sequence template, the wake-up time sequence is determined; based on the wake-up time sequence, an instruction time sequence and a data time sequence are obtained.

[0069] By calculating the similarity between multiple speed data slices and the wake-up time series template through similarity analysis, the instruction time series and data time series can be determined, laying a data foundation for the underground drilling system to take timely response operations to complex working conditions based on the timing control sequence.

[0070] The underground drilling system can slice the speed data according to a fixed time interval or sample number to form multiple speed data slices. Each speed data slice contains the speed information within a certain period of time. The wake-up time sequence template is pre-designed according to the wake-up time sequence in the ground control system encoding process. The underground drilling system performs a correlation operation on each speed data slice and the wake-up sequence template to calculate the similarity between them. The correlation operation can be performed in a variety of ways, such as cross-correlation, convolution, etc., which will not be repeated here. The calculation result of the similarity indicates the degree of matching between the speed data slice and the wake-up time sequence template. A similarity threshold can be set in advance. After all speed data slices are correlated with the wake-up time sequence template, a speed data slice with a similarity greater than or equal to the pre-set similarity threshold is found, and it is considered that the wake-up time sequence is detected at this time. Based on the detected wake-up time sequence, the instruction time sequence and the data time sequence can be determined.

[0071] S703: Decode the instruction time sequence to obtain instruction code.

[0072] In some embodiments, the instruction time series is sliced ​​to obtain multiple instruction time series slices; based on similarity analysis, the similarity between the multiple instruction time series slices and the pulse template is calculated; according to the similarity between the multiple instruction time series slices and the pulse template, the positions of multiple pulses in the instruction time series are determined; according to the positions of the multiple pulses in the instruction time series, the instruction code is determined in a preset combination code coding table.

[0073] By calculating the similarity between multiple instruction time series slices and pulse templates through similarity analysis, the positions of multiple pulses in the instruction time series can be determined, laying a data foundation for the underground drilling system to take timely response operations to complex working conditions based on the timing control sequence.

[0074] The underground drilling system can determine the instruction time sequence according to the format of the timing control sequence transmitted by the ground control system. The underground drilling system can slice the instruction time sequence according to a fixed time interval or sample number to form multiple instruction time sequence slices. The pulse template can be pre-designed according to the pulse in the instruction encoding process of the ground control system. The underground drilling system performs correlation operation on each instruction time sequence slice and the pulse template to calculate the similarity between them. A similarity threshold can be set in advance. After all instruction time sequence slices are correlated with the pulse template, the instruction time sequence slice with a similarity greater than or equal to the preset similarity threshold is found, and it is considered that the pulse in the instruction time sequence slice is detected at this time. Based on the detected pulse, the underground drilling system can determine the instruction encoding based on the combination code encoding method based on the even check used by the ground control system. The underground drilling system can determine the instruction encoding based on the position of the detected pulse in the instruction time sequence and the number of time slots of the instruction time sequence using the combination code encoding method based on the even check used by the ground control system. For example, the positions of the pulses detected by the underground drilling system in the instruction time sequence are 1, 5, 9 and 21, and the number of time slots of the instruction time sequence is 29. The underground drilling system can determine that the instruction code is 4 represented by 10 bits according to the combination code format table in Table 1 and the combination code encoding table in Table 2.

[0075] S704: Decode the data time series to obtain instruction parameters corresponding to the instruction code.

[0076] In some embodiments, the data time series is sliced ​​to obtain multiple data time series slices; based on similarity analysis, the similarity between the multiple data time series slices and the pulse template is calculated; based on the similarity between the multiple data time series slices and the pulse template, the positions of multiple pulses in the data time series are determined; based on the positions of the multiple pulses in the data time series, the instruction code corresponding to the instruction code is determined in a preset combination code encoding table.

[0077] By calculating the similarity between multiple instruction time series slices and pulse templates through similarity analysis, the positions of multiple pulses in the instruction time series can be determined, and then corresponding countermeasures for complex working conditions can be taken based on the instruction parameters.

[0078] The underground drilling system can query the number of bits used by the corresponding instruction parameter according to the calculated instruction code, and then query the corresponding number of time slots and pulses according to the combination code encoding method based on even parity check used by the ground control system. The underground drilling system can slice the data time series according to a fixed time interval or sample number to form multiple data time series slices. The pulse template is pre-designed according to the pulse in the process of encoding the instruction parameters of the ground control system. The underground drilling system performs a correlation operation on each data time series slice and the pulse template to calculate the similarity between them. A similarity threshold can be set in advance. After all data time series slices are correlated with the pulse template, a data time series slice with a similarity greater than or equal to the pre-set similarity threshold is found, and it is considered that the pulse in the data time series slice is detected at this time. Based on the detected pulse, the underground drilling system can determine the instruction parameter based on the combination code encoding method based on even parity check used by the ground control system. The underground drilling system can determine the instruction parameter based on the position of the detected pulse in the data time series and the number of time slots of the data time series using the combination code encoding method based on even parity check used by the ground control system. For example, the pulses detected by the underground drilling system are at positions 1, 5, 19 and 23 in the data time sequence, and the time slot number of the instruction time sequence is 29. The underground drilling system can determine that the instruction parameter is 50 of 10 bits according to the combination code format table in Table 1 and the combination code encoding table in Table 2.

[0079] In some embodiments, a triangular filter is designed according to the number of time slots K occupied by pulses when encoding instruction codes and instruction parameters; and based on the triangular filter, correlation equalization processing is performed on the rotation speed data.

[0080] A triangular filter is designed based on the number of time slots K occupied by pulses when encoding instruction codes and instruction parameters, which can perform correlation equalization processing on the speed data, thereby effectively improving the signal-to-noise ratio of the speed data, enhancing the characteristics of the speed data, and helping to better decode the speed data.

[0081] The frequency response characteristics of the triangular filter are triangular in shape, with a smooth transition band and a wide passband. The triangular filter can smooth the spectrum and eliminate the effect of harmonics, thereby highlighting the resonance peak of the original signal. In addition, the triangular filter can reduce the complexity of the operation and improve the processing efficiency. The underground drilling system can first use the FIR filter to bandpass filter the speed data. Based on the pulse with a pulse width of K time slots used in the encoding stage of the ground control system, the underground drilling system can design a corresponding triangular filter. Specifically, the underground drilling system can determine the bandwidth of the triangular filter according to the number of time slots K occupied by the pulse in the encoding stage of the ground control system. The underground drilling system can use the designed triangular filter to smooth the spectrum of the speed data to eliminate the effect of harmonics in the speed data. Fig. 9 The time domain image of the corresponding triangular filter is shown when the number of time slots occupied by pulses in the encoding stage of the ground control system is 2. Fig.10 The frequency domain image of the corresponding triangular filter is shown when the number of time slots occupied by the pulses in the encoding stage of the ground control system is 2. Fig.11 The rotation speed data generated by the underground drilling system when the number of time slots occupied by the pulses in the encoding stage of the surface control system is 2 is shown. Fig.12 The figure shows the rotation speed data after FIR filter bandpass filtering when the number of time slots occupied by pulses in the encoding stage of the ground control system is 2. Fig.13 It shows the rotation speed data after triangular filter filtering when the number of time slots occupied by pulses in the encoding stage of the ground control system is 2.

[0082] In some embodiments, based on the command parameters, the subterranean drilling system may adjust drilling operations.

[0083] By using command parameters to adjust the underground drilling system, the occurrence of dangers under complex working conditions can be avoided in time, ensuring the safety of the underground drilling system.

[0084] The underground drilling system can adjust the operation of different drilling instruments according to the command parameters obtained, so as to better cope with the complex working conditions in the underground drilling process and ensure the safety of the drilling operation process. The underground drilling system will encounter various complex working conditions during the drilling process, such as formation changes, rock hardness differences, groundwater level changes, etc. If these complex factors are not handled properly, they will not only affect the drilling progress, but also may cause safety accidents. The command parameters contain key information about drilling targets, drilling speed, drilling direction, mud flow, drilling pressure, etc. After obtaining the command parameters, the ground drilling system can start the corresponding adjustment mechanism to change the operation of different drilling instruments. For example, if the command parameters require adjusting the drilling direction, the underground drilling system can control the guide tool to change the travel path of the drill bit; if the command parameters require increasing the drilling pressure, the underground drilling system can adjust the power output of the drilling rig.

[0085] Based on the above instruction encoding method, this specification also proposes an embodiment of an instruction encoding device. Fig.14 As shown, the instruction encoding device may specifically include the following modules:

[0086] The acquisition module 1401 may be used to acquire downlink instruction data to be encoded, wherein the downlink instruction data includes an instruction code and instruction parameters;

[0087] The first determination module 1402 may be used to determine the first pulse number N1 and the first time slot number M1 according to the instruction code;

[0088] The first encoding module 1403 may be used to encode N1 pulses into M1 time slots to obtain an instruction time sequence corresponding to the instruction encoding, in which each pulse occupies a preset K time slots, where K is a positive integer greater than or equal to 2;

[0089] The second determination module 1404 may be used to determine the second pulse number N2 and the second time slot number M2 according to the instruction parameters;

[0090] The second encoding module 1405 may be used to encode N2 pulses into M2 time slots to obtain a data time sequence corresponding to the instruction parameter, in which each pulse occupies a preset K time slots;

[0091] The sending module 1406 can be used to send a timing control sequence corresponding to the downlink instruction data; the timing control sequence includes the instruction time sequence and the data time sequence, and the time control sequence is used to control the rotation speed of the downhole mud generator.

[0092] In some embodiments, the first determination module 1402 may be specifically configured to determine the corresponding first pulse number N1 and first time slot number M1 in a preset combination code format table according to the number of bits encoded in the instruction using even parity.

[0093] In some embodiments, the above-mentioned first encoding module 1403 can also be specifically used to determine the positions of N1 pulses in M1 time slots in a preset combination code encoding table according to the numerical value of the instruction code; according to the positions of the N1 pulses in the M1 time slots, the N1 pulses are encoded into the M1 time slots to obtain an instruction time sequence corresponding to the instruction code.

[0094] In some embodiments, the second determination module 1404 may be specifically configured to determine the second pulse number N2 and the second time slot number M2 in a preset combination code format table according to the number of bits of the instruction parameter using even parity.

[0095] In some embodiments, the above-mentioned second encoding module 1405 can be specifically used to determine the positions of N2 pulses in M2 time slots in a preset combination code encoding table according to the numerical value of the instruction parameter; according to the positions of the N2 pulses in the M2 time slots, the N2 pulses are encoded to the M2 time slots to obtain a data time series corresponding to the instruction parameter.

[0096] In some embodiments, the above-mentioned sending module 1406 can be specifically used to encode N3 pulses into M3 time slots to obtain a wake-up time sequence corresponding to the downlink instruction data, in which each pulse occupies a preset K time slots; the N3 is a preset third number of pulses; and the M3 is a preset third number of time slots.

[0097] It should be noted that the units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions divided into various modules. Of course, when implementing this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0098] As can be seen from the above, based on the instruction encoding device provided in the embodiment of this specification, the downlink instruction data to be encoded can be obtained, and the downlink instruction data includes instruction code and instruction parameters; according to the instruction code, the first pulse number N1 and the first time slot number M1 are determined; N1 pulses are encoded to M1 time slots to obtain an instruction time sequence corresponding to the instruction code, in which each pulse occupies a preset K time slots, and K is a positive integer greater than or equal to 2; according to the instruction parameters, the second pulse number N2 and the second time slot number M2 are determined; N2 pulses are encoded to M2 time slots to obtain a data time sequence corresponding to the instruction parameters, in which each pulse occupies a preset K time slots; a timing control sequence corresponding to the downlink instruction data is sent; the timing control sequence includes the instruction time sequence and the data time sequence, and the timing control sequence is used to control the speed of the downhole mud generator. Compared with the existing methods, each pulse in the instruction encoding process occupies a preset integer number of time slots greater than or equal to 2, which can ensure that the signal pulse width of the subsequently generated coding sequence remains consistent, which is more efficient and reliable, and can greatly reduce the difficulty of processing the coding sequence, which is conducive to more accurate decoding of the coding sequence.

[0099] The embodiment of the present specification also provides a computer device of a method, including a processor and a memory for storing instructions executable by the processor. When the processor is implemented specifically, the following steps can be performed according to the instructions:

[0100] In order to complete the above instructions more accurately, refer to Fig.15 As shown, the embodiment of this specification also provides another specific electronic device, wherein the electronic device includes a network communication port 1501, a processor 1502 and a memory 1503, and the above structures are connected through internal cables so that each structure can perform specific data interaction.

[0101] The processor 1502 can be specifically used to obtain downlink instruction data to be encoded, and the downlink instruction data includes instruction code and instruction parameters; according to the instruction code, determine the first pulse number N1 and the first time slot number M1; encode N1 pulses into M1 time slots to obtain an instruction time sequence corresponding to the instruction code, in which each pulse occupies a preset K time slots, and K is a positive integer greater than or equal to 2; according to the instruction parameters, determine the second pulse number N2 and the second time slot number M2; encode N2 pulses into M2 time slots to obtain a data time sequence corresponding to the instruction parameters, in which each pulse occupies a preset K time slots; send a timing control sequence corresponding to the downlink instruction data; the timing control sequence includes the instruction time sequence and the data time sequence, and the timing control sequence is used to control the speed of the downhole mud generator.

[0102] The memory 1503 may be specifically used to store corresponding instruction programs.

[0103] In this embodiment, the network communication port 1501 can be a virtual port that is bound to different communication protocols so that different data can be sent or received. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. In addition, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.

[0104] In this embodiment, the processor 1502 may be implemented in any appropriate manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. This specification does not limit this.

[0105] In this embodiment, the memory 1503 includes a volatile memory and a non-volatile memory. The memory 1503 may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function without a physical form is also called a memory, such as RAM, FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.

[0106] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0107] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0108] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0110] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for encoding an instruction, characterized in that: include: Acquire downlink instruction data to be encoded, wherein the downlink instruction data includes an instruction code and instruction parameters; According to the instruction code, determine the first pulse number N1 and the first time slot number M1; Encode N1 pulses into M1 time slots to obtain an instruction time sequence corresponding to the instruction encoding, in which each pulse occupies a preset K time slots, where K is a positive integer greater than or equal to 2; Determine the second pulse number N2 and the second time slot number M2 according to the instruction parameters; Encoding N2 pulses into M2 time slots to obtain a data time sequence corresponding to the instruction parameter, in which each pulse occupies a preset K time slots; Sending a timing control sequence corresponding to the downlink instruction data; the timing control sequence includes the instruction time sequence and the data time sequence, and the time control sequence is used to control the rotation speed of the downhole mud generator.

2. The method according to claim 1, characterized in that: The step of determining the first pulse number N1 and the first time slot number M1 according to the instruction code includes: According to the number of bits of the instruction code, the corresponding first pulse number N1 and first time slot number M1 are determined in a preset combination code format table using even parity; Determining the second pulse number N2 and the second time slot number M2 according to the instruction parameters includes: According to the number of bits of the instruction parameter, the second pulse number N2 and the second time slot number M2 are determined in the preset combination code format table using even parity.

3. The method according to claim 2, characterized in that: The encoding of N1 pulses into M1 time slots to obtain an instruction time sequence corresponding to the instruction encoding includes: According to the value of the instruction code, the positions of N1 pulses in M1 time slots are determined in a preset combination code table; According to the positions of the N1 pulses in the M1 time slots, the N1 pulses are encoded into the M1 time slots to obtain an instruction time sequence corresponding to the instruction encoding; The encoding of N2 pulses into M2 time slots to obtain a data time sequence corresponding to the instruction parameters includes: According to the value of the instruction parameter, the positions of the N2 pulses in the M2 time slots are determined in the preset combination code encoding table; According to the positions of the N2 pulses in the M2 time slots, the N2 pulses are encoded into the M2 time slots to obtain a data time sequence corresponding to the instruction parameters.

4. The method according to claim 1, characterized in that: The timing control sequence also includes a wake-up time sequence; The method further comprises: Encode N3 pulses into M3 time slots to obtain a wake-up time sequence corresponding to the downlink instruction data, in which each pulse occupies a preset K time slots; N3 is a preset third number of pulses; and M3 is a preset third number of time slots.

5. A method for decoding an instruction, characterized in that: include: Collect the rotation speed of the downhole mud generator to obtain the rotation speed data; Analyzing the speed data to obtain a command time series and a data time series; Decoding the instruction time sequence to obtain instruction code; The data time series is decoded to obtain instruction parameters corresponding to the instruction code.

6. The method according to claim 5, characterized in that: The analyzing the speed data to obtain a command time series and a data time series includes: Slicing the rotation speed data to obtain a plurality of rotation speed data slices; Based on similarity analysis, the similarity between multiple speed data slices and the wake-up time series template is calculated; Determining a wake-up time sequence according to similarities between the plurality of speed data slices and a wake-up time sequence template; According to the wake-up time sequence, a command time sequence and a data time sequence are obtained.

7. The method according to claim 5, characterized in that: The step of decoding the instruction time sequence to obtain instruction code comprises: Slicing the instruction time series to obtain multiple instruction time series slices; Based on similarity analysis, the similarity between multiple instruction time series slices and pulse templates is calculated; Determining positions of a plurality of pulses in the instruction time sequence according to similarities between the plurality of instruction time sequence slices and the pulse template; Determining the instruction code in a preset combination code table according to the positions of the plurality of pulses in the instruction time sequence; The decoding of the data time series to obtain instruction parameters corresponding to the instruction code includes: Slicing the data time series to obtain multiple data time series slices; Based on similarity analysis, the similarity between multiple data time series slices and the pulse template is calculated; Determining positions of a plurality of pulses in the data time series according to similarities between the plurality of data time series slices and the pulse template; According to the positions of a plurality of pulses in the data time series, the instruction code corresponding to the instruction code is determined in a preset combination code encoding table.

8. The method according to claim 5, characterized in that: The method further comprises: Design a triangular filter based on the number of time slots K occupied by pulses when encoding the instruction code and instruction parameters; Based on the triangular filter, correlation equalization processing is performed on the rotation speed data.

9. An instruction encoding device, characterized in that: The device comprises: An acquisition module, used for acquiring downlink instruction data to be encoded, wherein the downlink instruction data includes an instruction code and instruction parameters; A first determination module, used for determining a first pulse number N1 and a first time slot number M1 according to the instruction code; A first encoding module, used for encoding N1 pulses into M1 time slots to obtain an instruction time sequence corresponding to the instruction encoding, in which each pulse occupies a preset K time slots, where K is a positive integer greater than or equal to 2; A second determination module, used to determine a second pulse number N2 and a second time slot number M2 according to the instruction parameters; A second encoding module is used to encode N2 pulses into M2 time slots to obtain a data time sequence corresponding to the instruction parameter, in which each pulse occupies a preset K time slots; The sending module is used to send a timing control sequence corresponding to the downlink instruction data; the timing control sequence includes the instruction time sequence and the data time sequence, and the time control sequence is used to control the rotation speed of the downhole mud generator.

10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.