Underground measurement-while-drilling instrument communication method, server, device and system

By using communication strings in preset string format, stable and secure two-way communication between the downhole drilling measurement instrument and the ground server is achieved, solving the problem of instability of communication in the existing technology and ensuring the normal configuration and data transmission of downhole equipment.

CN120263879APending Publication Date: 2025-07-04CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410009245.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-02
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the prior art, the communication stability, safety and reliability of downhole drilling measurement instruments and ground systems are insufficient, resulting in failure of command downstream and complex interaction, affecting measurement data transmission and analysis.

Method used

Communication strings in preset string format include configuration command strings, real-time data monitoring command strings and data playback command strings. The underground equipment parses and executes them to generate a reply information string. The ground server ensures bidirectional communication by receiving and resending the communication strings.

Benefits of technology

It improves the communication stability, security and reliability between the downhole drilling measurement instrument and the ground server, ensuring the smooth progress of downhole equipment configuration, real-time data monitoring and data playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263879A_ABST
    Figure CN120263879A_ABST
Patent Text Reader

Abstract

The invention provides an underground measurement-while-drilling instrument communication method, server, equipment and system, and the method comprises the steps that a ground server sends a communication character string to underground equipment, and the communication character string comprises a command character string; the command character string comprises at least one of a configuration command character string, a real-time data monitoring command character string and a data playback command character string, the command character string has a preset character string format, and the preset character string format can be analyzed and recognized by the underground equipment; and receiving a reply information character string of the underground equipment, or sending the communication character string to the underground equipment again in response to the fact that the reply information character string of the underground equipment is not received. The stability, safety and reliability of communication between the underground measurement-while-drilling instrument and the ground server can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of drilling engineering in oil and gas exploration and development, and particularly to a communication method, server, device and system for downhole measurement-while-drilling instruments. Background Art

[0002] With the continuous development of horizontal well, directional well and cluster well technologies, the application of measurement-while-drilling technology has become more and more common. Mud pulse transmission is currently the most widely used measurement-while-drilling method. Its basic principle is to change the mud pressure in the drill pipe through a downhole pulse generator to form a pressure wave and transmit the measurement data in the form of pulses to the ground. This transmission method has the characteristics of low requirements for equipment and operation and strong adaptability to wellbores and formations.

[0003] Before the downhole instrument enters the well, it is generally necessary to configure and monitor the downhole instrument through the ground system, complete the setting of the working parameters of the downhole instrument, and observe whether the downhole instrument can work properly. After the downhole instrument enters the well, it is generally also necessary to replay the measurement data stored in the downhole instrument through the ground system for subsequent analysis of engineering and geological parameters. However, in the prior art, after the instrument enters the well, when the ground system configures and modifies the downhole instrument, monitors the downhole instrument, monitors sensor data, and replays data, the communication stability, security and reliability between the ground system and the downhole instrument cannot be guaranteed, resulting in problems such as failure of command transmission and complex interactive operations, affecting downhole measurement data transmission and interaction. Summary of the Invention

[0004] Embodiments of the present disclosure provide a communication method, server, device and system for downhole measurement-while-drilling instruments, which can improve the communication stability, security and reliability between downhole measurement-while-drilling instruments and ground servers.

[0005] According to one aspect of the present disclosure, there is provided a communication method for downhole measurement-while-drilling instruments, which is applied to a ground server and includes:

[0006] The ground server sends a communication string to the downhole device, the communication string includes a command string, the command string includes at least one of a configuration command string, a real-time data monitoring command string and a data replay command string, and the command string has a preset string format that can be parsed and recognized by the downhole device;

[0007] Receives a reply information string from the downhole device, or in response to not receiving a reply information string from the downhole device, resends the communication string to the downhole device, and the reply information string is generated by the downhole device after parsing and executing the communication string.

[0008] In one embodiment, the communication string further includes a parameter string, the parameter string having a first string format, the first string format including a parameter start character, a parameter information string, a first delimiter character, a second delimiter character, and a parameter end character, the parameter information string including a parameter name, the number of digits of a parameter value, and a check bit, the first delimiter character being used to separate different attributes of the same type of parameter, and the second delimiter character being used to separate different parameter types.

[0009] In one embodiment, the command string has a second string format, the second string format including a command start character, a command information string, and a command end character.

[0010] In one embodiment, a first reply information string generated by the downhole device in response to the data playback command string is received, the first reply information string is parsed, and the first reply information string is converted according to a third string format to obtain a first data table, the third string format including a frame start string, measurement data strings at different times, and a frame end string.

[0011] In one embodiment, the measurement data strings are arranged according to a preset measurement parameter type; and the measurement data strings have different representation forms according to different measurement data types, specifically including:

[0012] When the type of the measurement data is a floating-point numerical value, the measurement data string is represented by two hexadecimal numbers;

[0013] When the type of the measurement data is an integer numerical value, the measurement data string is represented by one hexadecimal number;

[0014] When the type of the measurement data is a logical numerical value of 0 or 1, the representation form of the measurement data string is to first combine multiple logical numerical values and then represent them by one hexadecimal number.

[0015] In one embodiment, the configuration command string and the real-time data monitoring command string can be sent sequentially at a preset time interval; the data playback command string is sent in a separate sending manner.

[0016] According to another aspect of the present disclosure, there is provided a communication method for a downhole measurement-while-drilling instrument, which is applied to a downhole device and includes:

[0017] The downhole device receives a communication string sent by a ground server, the communication string including a command string, the command string including at least one of a configuration command string, a real-time data monitoring command string, and a data playback command string, the command string having a preset string format;

[0018] Parse the communication string, execute the string command, and send a reply information string to the ground server.

[0019] In one embodiment, the communication string further includes a parameter string; the parameter string has a first string format, the first string format includes a parameter start character, a parameter information string, a first delimiter, a second delimiter, and a parameter end character, the parameter information string includes a parameter name, the number of digits of a parameter value, and a check bit, the first delimiter is used to separate different attributes of the same type of parameter, and the second delimiter is used to separate different parameter types;

[0020] The command string has a second string format, the second string format includes a command start character, a command information string, and a command end character;

[0021] The parsing of the communication string and the execution of the string command include:

[0022] Determine the type to which the start character of the communication string belongs. If it is a command start character, execute the command information carried in the command string and clear the command string; if it is a parameter start character, split the parameter string into multiple substrings according to the second delimiter. In each substring, execute the instruction information corresponding to the parameter information string according to the first delimiter, and clear the parameter string.

[0023] In one embodiment, when receiving the data playback command string, the sending of the reply information string to the ground server includes:

[0024] Obtain measurement data from the memory, process the measurement data according to a third string format to obtain a first reply information string, and send the first reply information string to the ground server;

[0025] Wherein, the third string format includes a frame start string, measurement data strings at different times, and a frame end string.

[0026] In one embodiment, the measurement data strings are arranged according to a preset measurement parameter type; and the measurement data strings have different representation forms according to different measurement data types, specifically including:

[0027] When the type of the measurement data is a floating-point numerical value, the measurement data string is represented by two hexadecimal numbers;

[0028] When the type of the measurement data is an integer numerical value, the measurement data string is represented by one hexadecimal number;

[0029] When the type of the measurement data is a logical numerical value of 0 or 1, the representation form of the measurement data string is to first combine multiple logical numerical values and then represent them using a hexadecimal number.

[0030] According to another aspect of the present disclosure, there is provided a ground server, including a first processor, and the first processor is configured to execute the downhole measurement-while-drilling instrument communication method applied to the ground server according to one aspect of the present disclosure as described above.

[0031] According to another aspect of the present disclosure, there is provided a downhole device, including a second processor, and the second processor is configured to execute the downhole measurement-while-drilling instrument communication method applied to the downhole device according to another aspect of the present disclosure as described above.

[0032] According to another aspect of the present disclosure, there is provided a downhole measurement-while-drilling instrument communication system, including the aforementioned ground server and downhole device, and the ground server and the downhole device communicate through a cable.

[0033] The above technical features can be combined in various suitable ways or replaced by equivalent technical features as long as the object of the present invention can be achieved.

[0034] In one or more technical solutions provided in the embodiments of the present disclosure, the ground server can send various communication strings to the downhole device, including command strings. The command strings include at least one of a configuration command string, a real-time data monitoring command string, and a data playback command string, and the command strings have a preset string format and can be parsed and recognized by the downhole device. After performing relevant actions based on the communication strings, a reply information string is sent back to the ground server, ensuring two-way communication and meeting the requirements for configuring the measurement-while-drilling instrument of the downhole device, real-time data monitoring, and data playback, and can improve the stability, security, and reliability of the communication between the measurement-while-drilling instrument of the downhole device and the ground server. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In the following description of exemplary embodiments with reference to the drawings, more details, features, and advantages of the present disclosure are disclosed. In the drawings:

[0036] Figure 1 A flowchart showing a downhole measurement-while-drilling instrument communication method applied to a ground server according to an exemplary embodiment of the present disclosure is shown;

[0037] Figure 2 A schematic diagram showing the string format of command strings in a downhole measurement-while-drilling instrument communication method according to an exemplary embodiment of the present disclosure is shown;

[0038] Figure 3Shows a schematic diagram of the first string format of the parameter string in a downhole measurement-while-drilling instrument communication method according to an exemplary embodiment of the present disclosure;

[0039] Figure 4 Shows a schematic diagram of the string format of the first reply information string in a downhole measurement-while-drilling instrument communication method according to an exemplary embodiment of the present disclosure;

[0040] Figure 5 Shows a schematic flowchart of a downhole measurement-while-drilling instrument communication method applied to downhole equipment according to an exemplary embodiment of the present disclosure;

[0041] Figure 6 Shows a structural block diagram of a downhole measurement-while-drilling instrument communication system according to an exemplary embodiment of the present disclosure. Detailed implementation manners

[0042] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0043] It should be understood that the various steps recorded in the method embodiments of the present disclosure can be executed in different orders and / or executed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.

[0044] As used herein, the term "including" and its variations are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence relationship of the functions performed by these devices, modules or units.

[0045] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".

[0046] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of these messages or information.

[0047] The solutions of the embodiments of the present disclosure will be described below with reference to the accompanying drawings.

[0048] The embodiments of the present disclosure provide a communication method for downhole measurement-while-drilling instruments, which is applied to a ground server. Refer to Figure 1 , Figure 1 FIG. shows a schematic flowchart of a communication method for downhole measurement-while-drilling instruments according to an exemplary embodiment of the present disclosure. The method includes:

[0049] S101, the ground server sends a communication string to the downhole device. The communication string includes a command string, and the command string includes at least one of a configuration command string, a real-time data monitoring command string, and a data playback command string. The command string has a preset string format that can be parsed and recognized by the downhole device;

[0050] S102, receive the reply information string of the downhole device, or in response to not receiving the reply information string of the downhole device, re-send the communication string to the downhole device. The reply information string is generated by the downhole device after parsing and executing the communication string.

[0051] In the embodiments of the present disclosure, the ground server can send various communication strings to the downhole device, including a command string. The command string includes at least one of a configuration command string, a real-time data monitoring command string, and a data playback command string, and the command string has a preset string format that can be parsed, recognized, and based on which the downhole device executes relevant actions and then generates a reply information string and sends it back to the ground server, ensuring two-way communication and meeting the requirements for the configuration, real-time data monitoring, and data playback of the measurement-while-drilling instruments of the downhole device, and can improve the stability, security, and reliability of the communication between the downhole measurement-while-drilling instruments and the ground server.

[0052] The configuration command string can be mainly used to query and configure the working mode, working state, etc. of the measurement-while-drilling instruments of the downhole device. For example, during the ground test stage, by sending the configuration command string, the measurement-while-drilling instruments of the downhole device are made to enter the configuration state.

[0053] In some embodiments of the present disclosure, the command string has a second string format. Specifically, the second string format includes a command start character, a command information string, and a command end character. Refer to Figure 2 , Figure 2The figure shows a schematic diagram of the string format of the command string in an exemplary embodiment of the present disclosure. For example, a configuration command string is "&readworkmode*", where '&' is the command start character, 'read workmode' is the command information string, and its command information means reading the system working mode, and '*' is the command end character. Another example, a data playback command string is "&read external flash data*", where '&' is the command start character, 'read external flash data' is the command information string, and its command information means reading the data stored in the external Flash, and '*' is the command end character. By presetting the second string format, the downhole equipment can quickly parse and identify it, simplifying the communication between the ground server and the downhole equipment.

[0054] The real-time data monitoring command string has the same structure as the configuration command string, both consisting of a command start character, a command information string, and a command end character. For example, "&detect pressure real time*". Sending this real-time data monitoring command string to the downhole equipment, the downhole equipment will feedback the pressure data detected in real time to the ground server through the reply information string.

[0055] The reply information string also has a preset format. When the reply information string is the second reply information string, the reply information string format can have the second reply information string format, which is of the ordinary type, that is, directly reply the string related to the execution result. A feasible way is that the execution result string and the reply end character are combined. For example, an ordinary reply information string is "power up!", and another example is "entered parameter setting mode!". The reply information string can also be of the complex type, specifically, it can be the first reply information string. At this time, the reply information string format can have the first reply information string format, which is used for the reply when receiving the communication string sent by the ground server as the data playback command string.

[0056] In some embodiments of the present disclosure, the communication string further includes a parameter string. The parameter string has the first string format, and the first string format includes a parameter start character, a parameter information string, a first delimiter, a second delimiter, and a parameter end character. The parameter information string includes multiple attribute characters of the parameter, such as the parameter first attribute character, the parameter second attribute character, the parameter third attribute character, etc. Exemplarily, the parameter information string can include the parameter name, the number of digits of the parameter value, and the check bit. The first delimiter is used to separate different attributes of the same type of parameter, and the second delimiter is used to separate different parameter types, such as separating parameter types according to the parameter name. For exampleFigure 3 As shown Figure 3 Figure 3 shows a schematic diagram of the first string format of the parameter string in an exemplary embodiment of the present disclosure. The parameter start character and the parameter end character are at the beginning and end of the parameter string. The second delimiter separates different types of parameters 1, 2, ..., M, such as temperature, pressure, etc. The first delimiter separates different attributes of each type of parameter, such as separating the parameter name, the number of digits of the parameter value, and the check bit. By setting the parameter string in the first string format, the rapid communication between the downhole device and the ground server is ensured. And by setting the check bit, the string has a certain error detection ability during the encoding and transmission process, ensuring the accuracy and reliability of the communication.

[0057] Exemplarily, if the parameter string is "!PA,12,M;PB,6,N*", where '!' is the parameter start character, ',' is the first delimiter, ';' is the second delimiter, 'PA' is the first attribute string of the first parameter (such as the parameter name), '12' is the second attribute string of the first parameter (such as the number of digits of the parameter value), 'M' is the third attribute string of the first parameter (such as the check bit), 'PB' is the first attribute string of the second parameter, '6' is the second attribute string of the second parameter, 'N' is the third attribute string of the second parameter, and '*' is the parameter end character.

[0058] After receiving the communication string sent by the ground server, the downhole device will parse the communication string and execute the instructions or information carried in the communication string, and then send a reply information string to the ground server. Such as when the parameter setting is completed, etc.

[0059] In some embodiments of the present disclosure, after receiving the reply information string sent by the downhole device, the ground server parses the information in the reply information string and then performs further operations. For example, a configuration command string can be sent first to make the downhole device enter the parameter setting state. When the downhole device feeds back a reply information string in response to the configuration command string, indicating that it has entered the parameter configuration state, at this time, the ground server can further send a parameter string to the downhole device to make the downhole device configure the working parameters according to the parameter string. After the configuration is completed, a reply information string is fed back to the ground server to inform that the parameter configuration is completed.

[0060] In some embodiments of the present disclosure, the surface server sends a data playback command string, such as "&read external flash data*", to the downhole device to read the data stored in the external Flash. The downhole device generates a first reply information string in response to the data playback command string and sends it to the surface server. At this time, the surface server parses the received first reply information string and converts the first reply information string according to the third string format to obtain a first data table, where the third string format includes a frame start string, measurement data strings at different times, and a frame end string.

[0061] In some embodiments of the present disclosure, the measurement data strings are arranged according to preset measurement parameter types and have different representation forms according to different measurement data types. Specifically: when the type of measurement data is a floating-point numerical value, the measurement data string is represented by two hexadecimal numbers; when the type of measurement data is an integer numerical value, the measurement data string is represented by one hexadecimal number; when the type of measurement data is a logical numerical value of 0 or 1, the representation form of the measurement data string is to first combine multiple logical numerical values and then represent them with one hexadecimal number. Using hexadecimal numbers facilitates storage, transmission, and operation.

[0062] The measurement data strings are arranged according to preset measurement parameter types. Exemplarily, they are arranged according to preset measurement parameter types such as well inclination, azimuth, tool face, natural gamma, rotation speed, pump status, downhole working mode, setting status, downhole temperature, working voltage, sum of gravity, sum of magnetic fields, year, month, day, hour, minute, and second.

[0063] The measurement data strings have different representation forms according to different measurement data types. For example, among the above measurement parameter types, the measurement data corresponding to well inclination, azimuth, tool face, downhole temperature, sum of gravity, and sum of magnetic fields is a floating-point numerical value; the measurement data corresponding to natural gamma, rotation speed, working voltage, year, month, day, hour, minute, and second is an integer numerical value; pump status, working mode, and setting status are logical numerical values. For pump status, for example, pump on is 1 and pump off is 0. In the working mode, on is 1 and off is 0, or downhole work is 1 and surface work is 0. For the setting status, for example, entering the setting status is 1 and not entering the setting status is 0, etc.

[0064] Exemplarily, there are multiple types of measurement data for a certain frame of data. The first measurement data is a floating-point numerical value of 89.99, the second measurement data is an integer numerical value of 200, the third measurement data is a logical numerical value of 1, the fourth measurement data is a logical numerical value of 0, the fifth measurement data is a logical numerical value of 1, the sixth measurement data is a logical numerical value of 0, the frame start string is 'EB90', and the frame end string is 'AA55'. Then the first reply information string is "EB9042B3FAE100C8000AAA55", where 'EB90' is the frame start string, '42B3' and 'FAE1' are the hexadecimal representations of the floating-point numerical value 89.99, '00C8' is the hexadecimal representation of the integer numerical value 200, '000A' is the hexadecimal representation of the combination of logical numerical values 1, 0, 1, 0, and 'AA55' is the frame end character.

[0065] The first reply information string can also simultaneously include multiple types of parameter values at multiple moments. Each moment starts with the frame start string and ends with the frame end string. The frame start string of the next moment is immediately after the frame end character of the previous moment, and so on until all the parameter values at all moments are included. For example, if there are K types of parameter values at T moments, where T > 0 and K > 1, then, as Figure 4 shown, the first reply information string includes: the frame start string, the first parameter value at the first moment, the second parameter value at the first moment, the third parameter value at the first moment,..., the Kth parameter value at the first moment, the frame end string, the frame start string, the first parameter value at the second moment, the second parameter value at the second moment, the third parameter value at the second moment,..., the Kth parameter value at the second moment, the frame end string,..., the frame start string, the first parameter value at the Tth moment, the second parameter value at the Tth moment,..., the Kth parameter value at the Tth moment, the frame end string. The first parameter value, the second parameter value, and the Kth parameter value can be similar to the foregoing and have different representation forms according to different numerical types.

[0066] After the ground server converts the first reply information string according to the third string format, the obtained first data table is the measurement data table, that is, the measurement data saved by the downhole measurement-while-drilling instrument.

[0067] In some embodiments of the present disclosure, in order to improve communication efficiency, the ground server can set an interval time and send multiple configuration command strings, real-time data monitoring command strings, and parameter strings at one time in sequence; considering that after the data playback command string is sent, the time consumed varies greatly according to the amount of data playback required, the data playback command string can be sent in a separate sending manner.

[0068] Exemplarily, first send the first command string. After the sending is completed, then prohibit sending, enable the reception of the reply information string, and receive the reply information string of the first command string; then send the second command string or parameter string, and then prohibit sending again, enable the reception of the reply information string, and receive the reply information string of the second command string; and so on. A certain time interval is set between the command strings or parameter strings sent multiple times to ensure that the reply information string can be received completely.

[0069] The embodiments of the present disclosure also provide a communication method for downhole measurement-while-drilling instruments, which is applied to downhole equipment, such as Figure 5 shown Figure 5 FIG. shows a flowchart of a communication method for a downhole measurement-while-drilling instrument according to an exemplary embodiment of the present disclosure, including:

[0070] S501, the downhole equipment receives the communication string sent by the ground server. The communication string includes a command string, and the command string includes at least one of a configuration command string, a real-time data monitoring command string, and a data playback command string. The command string has a preset string format;

[0071] S502, parse the communication string, execute the string command, and send a reply information string to the ground server.

[0072] By receiving the configuration command string, the real-time data monitoring command string, and the data playback command string of the ground server, the downhole equipment realizes the configuration, real-time data monitoring, and data playback of the downhole measurement-while-drilling instrument, ensuring two-way communication and improving the stability, security, and reliability of the communication between the downhole measurement-while-drilling instrument and the ground server.

[0073] In some embodiments of the present disclosure, the communication string further includes a parameter string; the parameter string has a first string format, and the first string format includes a parameter start character, a parameter information string, a first delimiter, a second delimiter, and a parameter end character. The parameter information string includes multiple attribute characters of the parameter, such as a parameter first attribute character, a parameter second attribute character, a parameter third attribute character, etc. Exemplarily, the parameter information string includes a parameter name, the number of digits of the parameter value, and a check bit. The first delimiter is used to separate different attributes of the same type of parameter, and the second delimiter is used to separate different parameter types.

[0074] In some embodiments of the present disclosure, the command string has a second string format, and the second string format includes a command start character, a command information string, and a command end character.

[0075] For the formats of the command string and the parameter string, reference may be made to the relevant descriptions of the downhole measurement communication method for downhole drilling instruments applied to the ground server in the foregoing exemplary embodiments, which will not be elaborated herein.

[0076] After receiving the communication string, the downhole device parses the communication string and executes the string command. Specifically, it determines the type to which the starting character of the communication string belongs. If it is a command starting character, it executes the command information carried in the command string and clears the command string; if it is a parameter starting character, it splits the parameter string into multiple substrings according to the second delimiter. In each substring, according to the first delimiter, it executes the instruction information corresponding to the parameter information string and clears the parameter string.

[0077] The downhole device will receive the command string or the parameter string one by one, store them in the memory RAM, trigger the SCI receive interrupt, and enter the interrupt task. In the interrupt task, the second processor of the downhole device determines the type of the character of the currently received string. When the received character is not the command end character or the parameter end character, the second processor continues to receive characters. When the received character is the command end character or the parameter end character, the second processor stops receiving characters and starts to analyze the entire received string.

[0078] First, it determines whether the type to which the starting character of the communication string belongs is a command starting character or a parameter starting character. If it is a command starting character, it executes the command information carried in the command string and clears the command string. If it is a parameter starting character, it sequentially locates the position of the second delimiter and splits the string into several substrings. In each substring, it sequentially locates the position of the first delimiter, executes different parameter attribute value acquisition instructions according to the set parameter attribute arrangement rule, and clears the string. If it is other characters, no instruction is executed and the string is cleared.

[0079] After the second processor executes the instruction corresponding to the command string or the parameter string, it will send a reply information string to the ground server. The reply information string can be a second reply information string of a common type or a first reply information string in response to the data playback command string. The second reply information string of a common type can be composed of an execution result string and a reply end character, or it can directly be the execution result string without a reply end character. The first reply information string includes a frame start character, measurement data strings at different times, and a frame end character.

[0080] Specifically, when receiving the data playback command string, it sends a reply information string to the ground server, including:

[0081] Obtain measurement data from the memory, process the measurement data according to the third string format to obtain the first reply information string, and send the first reply information string to the ground server. Among them, the third string format includes a frame start string, measurement data strings at different times, and a frame end string.

[0082] The measurement data obtained from the memory may not be exactly the same as the third string format. At this time, it is necessary to process the measurement data obtained from the memory according to the third string format to obtain the first reply information string that is consistent with the third string format.

[0083] The measurement data strings are arranged according to the preset measurement parameter types and have different representation forms according to different measurement data types. Specifically: when the type of measurement data is a floating-point numerical value, the measurement data string is represented by two hexadecimal numbers; when the type of measurement data is an integer numerical value, the measurement data string is represented by one hexadecimal number; when the type of measurement data is a logical numerical value of 0 or 1, the representation form of the measurement data string is to first combine multiple logical numerical values and then represent them by one hexadecimal number.

[0084] The measurement data strings are arranged according to the preset measurement parameter types. Exemplarily, they are arranged according to the preset measurement parameter types such as well inclination, azimuth, tool face, natural gamma ray, rotation speed, pump status, downhole working mode, setting status, downhole temperature, working voltage, sum of gravity, sum of magnetic fields, year-month-day, hour-minute-second, etc.

[0085] The measurement data strings have different representation forms according to different measurement data types. For example, among the above measurement parameter types, the measurement data corresponding to well inclination, azimuth, tool face, downhole temperature, sum of gravity, and sum of magnetic fields is a floating-point numerical value; the measurement data corresponding to natural gamma ray, rotation speed, working voltage, year-month-day, and hour-minute-second is an integer numerical value; pump status, working mode, and setting status are logical numerical values. For pump status, such as pump on is 1 and pump off is 0, in the working mode, on is 1 and off is 0, or downhole working is 1 and surface working is 0, and for the setting status, such as entering the setting status is 1 and not entering the setting status is 0, etc.

[0086] The first reply information string can also contain multiple parameter values at multiple times at the same time. Each time starts with a frame start string and ends with a frame end string. The frame start string of the next time is immediately after the frame end character of the previous time, and so on until all parameter values at all times are included. For example, if it contains K parameter values at T times, where T > 0 and K > 1, then Figure 4As shown, the first reply information string includes: a frame start string, the first parameter value at the first moment, the second parameter value at the first moment, the third parameter value at the first moment, ……, the Kth parameter value at the first moment, a frame end string, a frame start string, the first parameter value at the second moment, the second parameter value at the second moment, the third parameter value at the second moment, ……, the Kth parameter value at the second moment, a frame end string, ……, a frame start string, the first parameter value at the Tth moment, the second parameter value at the Tth moment, ……, the Kth parameter value at the Tth moment, a frame end string. The first parameter value, the second parameter value, and the Kth parameter value can be similar to the foregoing and have different representation forms according to different numerical types.

[0087] An embodiment of the present disclosure further provides a ground server, including a first processor, and the first processor is configured to execute the downhole measurement-while-drilling instrument communication method applied to the ground server in the foregoing exemplary embodiment.

[0088] An embodiment of the present disclosure further provides a downhole device, including a second processor, and the second processor is configured to execute the downhole measurement-while-drilling instrument communication method applied to the downhole device in the foregoing exemplary embodiment.

[0089] An embodiment of the present disclosure further provides a downhole measurement-while-drilling instrument communication system, as Figure 6 shown, including a ground server 1 and a downhole device 2, and the ground server 1 and the downhole device 2 communicate through a cable.

[0090] The ground server 1 includes a PC 12 installed with upper computer software. The PC 12 includes a first processor 11 and a USB-to-RS485 module 13. The upper computer software can also be installed in the first processor. The downhole device 2 includes a second processor 21 and a TTL-to-RS485 module.

[0091] The PC 12 installed with the upper computer software is responsible for sending, receiving, and processing communication data related to the ground server.

[0092] The USB-to-RS485 module 13 is responsible for the conversion from the USB bus to the RS485 bus. The USB interface of the USB-to-RS485 module is connected to the PC, and the RS485 interface is connected to the downhole device 2 through a cable.

[0093] The cable is responsible for connecting the USB-to-RS485 module 13 of the ground server 1 and the TTL-to-RS485 module of the downhole device 2.

[0094] In the TTL-to-RS485 module 22, the RS485 interface is connected to the ground server 1 through a cable, and the TTL interface is connected to the second processor 21. The second processor 21 is responsible for sending, receiving, and processing communication data of the downhole device.

[0095] When the ground server 1 establishes communication with the downhole device 2, it will first configure the serial port of the host computer software in the ground server 1, such as the serial port number, baud rate, data bits, parity bit, stop bit, etc., to make it consistent with the serial port configuration in the second processor.

[0096] Although the present invention has been described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present invention. Therefore, it should be understood that many modifications can be made to the exemplary embodiments, and other arrangements can be designed, as long as they do not depart from the spirit and scope of the present invention as defined by the appended claims. It should be understood that the different dependent claims and the features described herein can be combined in a manner different from that described in the original claims. It should also be understood that the features described in connection with a single embodiment can be used in other described embodiments.

Claims

1. A communication method for downhole measurement-while-drilling instruments, characterized in that, Including: The ground server sends a communication string to the downhole device. The communication string includes a command string. The command string includes at least one of a configuration command string, a real-time data monitoring command string, and a data playback command string. The command string has a preset string format, and the preset string format can be parsed and recognized by the downhole device; Receive the reply information string of the downhole device, or in response to not receiving the reply information string of the downhole device, re-send the communication string to the downhole device. The reply information string is generated by the downhole device after parsing and executing the communication string.

2. The method according to claim 1, wherein The communication string further includes a parameter string. The parameter string has a first string format. The first string format includes a parameter start character, a parameter information string, a first delimiter character, a second delimiter character, and a parameter end character. The parameter information string includes a parameter name, the number of digits of a parameter value, and a check bit. The first delimiter character is used to separate different attributes of the same type of parameter, and the second delimiter character is used to separate different parameter types.

3. The method according to claim 1, wherein The command string has a second string format. The second string format includes a command start character, a command information string, and a command end character.

4. The method according to claim 1, characterized in that, Receive the first reply information string generated by the downhole device for the data playback command string, parse the first reply information string, and convert the first reply information string according to a third string format to obtain a first data table. The third string format includes a frame start string, measurement data strings at different times, and a frame end string.

5. The method according to claim 4, characterized in that The measurement data strings are arranged according to a preset measurement parameter type; and the measurement data strings have different representation forms according to different measurement data types, specifically including: When the type of the measurement data is a floating-point numerical value, the measurement data string is represented by two hexadecimal numbers; When the type of the measurement data is an integer numerical value, the measurement data string is represented by one hexadecimal number; When the type of the measurement data is a logical numerical value of 0 or 1, the representation form of the measurement data string is to first combine multiple logical numerical values and then represent them by one hexadecimal number.

6. The method according to claim 1, wherein The configuration command string and the real-time data monitoring command string are sent sequentially at preset time intervals; the data playback command string is sent in a separate sending manner.

7. A communication method for downhole measurement-while-drilling instruments, characterized in that, Including: The downhole device receives the communication string sent by the ground server. The communication string includes a command string. The command string includes at least one of a configuration command string, a real-time data monitoring command string, and a data playback command string. The command string has a preset string format; Parse the communication string and execute the string command, and send a reply information string to the ground server.

8. The method according to claim 7, wherein The communication string further includes a parameter string; the parameter string has a first string format, the first string format includes a parameter start character, a parameter information string, a first delimiter character, a second delimiter character, and a parameter end character, the parameter information string includes a parameter name, the number of digits of a parameter value, and a check bit, the first delimiter character is used to separate different attributes of the same type of parameter, and the second delimiter character is used to separate different parameter types; The command string has a second string format, the second string format includes a command start character, a command information string, and a command end character; Parsing the communication string and executing the string command includes: Judging the type to which the start character of the communication string belongs. If it is a command start character, execute the command information carried in the command string and clear the command string; If it is a parameter start character, split the parameter string into multiple substrings according to the second delimiter character. In each substring, execute the instruction information corresponding to the parameter information string according to the first delimiter character, and clear the parameter string.

9. The method according to claim 7, wherein When receiving the data playback command string, sending a reply information string to the ground server includes: Obtaining measurement data from a memory, processing the measurement data according to a third string format to obtain a first reply information string, and sending the first reply information string to the ground server; Wherein, the third string format includes a frame start string, measurement data strings at different times, and a frame end string.

10. The method according to claim 9, characterized in that, The measurement data strings are arranged according to a preset measurement parameter type; and the measurement data strings have different representation forms according to different measurement data types, specifically including: When the type of the measurement data is a floating-point numerical value, the measurement data string is represented by two hexadecimal numbers; When the type of the measurement data is an integer numerical value, the measurement data string is represented by one hexadecimal number; When the type of the measurement data is a logical numerical value of 0 or 1, the representation form of the measurement data string is to first combine multiple logical numerical values and then represent them by one hexadecimal number.

11. A ground server, characterized in that, It includes a first processor, and the first processor is used to execute the method according to any one of claims 1-6.

12. An underground device, characterized in that, It includes a second processor, and the second processor is used to execute the method according to any one of claims 7-10.

13. A communication system for downhole measurement-while-drilling instrument, characterized in that, It includes a ground server according to claim 11 and an underground device according to claim 12, and the ground server and the underground device communicate through a cable.