Oil field well site data transmission method based on wireless communication
By adding frame header and CRC verification codes to the wireless communication protocol, and using parallel issuance and sorting methods, the problem of low communication efficiency in wells in oil fields is solved, the generation of blank work maps and error work maps is reduced, and the generation of blank work maps and error work maps is improved. The reliability and efficiency of data transmission.
Patent Information
- Application Number
- CN202310954691.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-02-14
AI Technical Summary
The existing wireless communication protocols lead to low communication efficiency in oilfield wells, resulting in blank work charts and erroneous work charts, affecting data quality.
By adding the frame header part and the CRC verification code part to the data request message and the reply message, and using the method of issuing multiple request messages simultaneously in parallel, sorting and re-transmission according to the response message group number to ensure the data Transmission accuracy and efficiency.
The communication efficiency between the wellhead RTU and the well site main RTU is improved, the generation of blank work diagrams and error work diagrams is reduced, and the reliability and integrity of data transmission is ensured.
Smart Images

Figure CN119450386A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of oil well site data transmission methods, and in particular relates to an oil well site data transmission method based on wireless communication. Background Art
[0002] The oil well performance diagram is a graph that reflects the variation of the load at the pumping unit suspension point with its displacement value. It is used to calculate the oil well production and monitor the production and operation status of the oil well. It is an important data in the oil well production process.
[0003] The oil well power diagram is collected in real time by the wellhead RTU and transmitted to the well site master RTU every 10 minutes. The well site master RTU then transmits it to the host computer processing software for analysis and calculation. At present, the well site master RTU and the wellhead RTU communicate through wireless communication using the Modbus RTU in API wireless communication protocol. The communication efficiency is low, resulting in blank power diagrams and erroneous power diagrams, affecting the overall quality of the power diagram data.
[0004] Under the existing protocol, the well site master RTU uses a request-response method to communicate with the wellhead RTU, and both parties strictly exchange data in a synchronous communication mode, that is, they communicate in a "question-one-answer" manner. When the communication is smooth, the data transmission time for a well is 30 seconds; when the communication quality of the well site is poor, the well site master RTU needs to read the data repeatedly, and the data transmission time for a well will be much longer than 30 seconds. If there are a large number of oil wells in the same well site, the time it takes for the well site master RTU to complete a round of data collection for all the oil wells in the well site will exceed the 10-minute patrol cycle, resulting in the inability to obtain the wellhead RTU power diagram of some oil wells in this cycle, resulting in blank power diagrams for these wells.
[0005] In addition, the well site wireless network is a self-organizing network. There are multiple routing options between nodes during communication. By supporting message hopping, the problems of communication obstruction and poor link are solved. However, due to the self-optimization characteristics of the wireless communication path, the communication delay between the two parties is uncertain, which may cause data message errors. Summary of the invention
[0006] The purpose of the present invention is to provide an oilfield well site data transmission method based on wireless communication, which has the characteristics of improving communication efficiency through dynamic collection of data messages and reducing the generation of blank work diagrams and erroneous work diagrams.
[0007] The technical solution of the present invention is a method for transmitting data in an oil field well site based on wireless communication, which is specifically implemented according to the following steps:
[0008] Step 1: The well site master RTU sends a data request message to the wellhead RTU to request data communication;
[0009] Step 2: The wellhead RTU receives the request message and sends the first response message to the well site master RTU;
[0010] Step 3: After receiving the first response message, the master RTU at the well site identifies, reads and stores it;
[0011] Step 4: The master RTU of the well site sends multiple request messages in parallel and stores each received response message in sequence according to the group sequence number;
[0012] Step 5: The wellsite master RTU determines the unreceived response message according to the response message group number and transmits it separately to the wellhead RTU, completing the transmission of the power diagram data from the wellhead RTU to the wellsite master RTU in this cycle.
[0013] The present invention is also characterized in that: the data request message and the first packet response message both include a frame header part and a CRC check code part.
[0014] The frame header includes the protocol code, communication gain, RTU status and timestamp.
[0015] The data request message also includes a request data part, which includes the station number, length, frame ID, function code and group number.
[0016] The first response message also includes a response data portion, which includes a station number, length, frame ID, function code, group number, group quantity, register address, register length, data, function diagram ID and fault code.
[0017] Step 3 is implemented as follows:
[0018] Step 3.1, after receiving the first response message, the master RTU of the well site identifies and determines the fault code field;
[0019] If it is 0×01, the wellhead RTU is faulty, skip the wellhead, and communicate with the subsequent wells from step 1. If it is 0×00, it indicates that the wellhead RTU is not faulty, and continue with step 3.2;
[0020] Step 3.2, the master RTU of the well site continues to identify the work map ID field. If it is the same as the work map ID collected in the previous cycle, it indicates that the wellhead RTU has not completed the work map collection and update, and the well is skipped, and communication with subsequent wells starts from step 1; if it is different from the work map ID collected in the previous cycle, it indicates that the wellhead RTU has completed the work map collection and update, and continues to step 3.3;
[0021] Step 3.3, the well site master RTU continues to identify the group quantity field, and determines the number of power diagram data packets collected by the wellhead RTU in this period;
[0022] Step 3.4: The master RTU at the well site continues to identify the register address and data length field, determines the storage location of the message data, and completes the reading and storage of the first packet of message information in the cycle.
[0023] Step 4 is implemented according to the following steps:
[0024] Step 4.1, the well site master RTU sends multiple request messages for the subsequent 2nd to nth package power diagram data simultaneously and in parallel, where n is greater than or equal to 3;
[0025] Step 4.2, the wellhead RTU sends n-1 response messages to the well site master RTU;
[0026] Step 4.3: The master RTU of the well site judges each received response message according to the group sequence number, determines the storage order of multiple response messages, and stores them.
[0027] The beneficial effects of the present invention are:
[0028] 1. The present invention adds a work map ID field. When the work map data collection of the wellhead RTU in this cycle is not completed, the well site master RTU and the wellhead RTU only send a request and response message once, and then the oil well can be skipped according to the work map ID being the same as the work map ID of the previous cycle, thereby improving the data transmission efficiency, so that the well site master RTU can communicate with more wellhead RTUs that have completed the work map collection and update within a 10-minute polling cycle, thereby reducing the generation of blank work maps;
[0029] 2. The present invention can sort multiple response messages according to the group sequence number, so as to avoid the misalignment problem caused by the response messages passing through different paths during transmission and the inconsistent time sequence of the response messages when they are returned to the main RTU of the well site, thereby avoiding the generation of erroneous work diagrams;
[0030] 3. The present invention adopts a mechanism of sending requests in parallel for multiple response messages after the first packet, increases the transmission of separate messages, improves the efficiency of power diagram collection, avoids the problem of a longer collection process caused by the loss of certain packet data and re-reading messages in sequence, and reduces the generation of blank power diagrams. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flow chart of the oil field well site data transmission method based on wireless communication of the present invention;
[0032] Figure 2 It is a schematic diagram of the power diagram data transmission process between the well site master RTU and the wellhead RTU in the transmission method of the present invention. DETAILED DESCRIPTION
[0033] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0034] The present invention provides an oilfield well site data transmission method based on wireless communication, such as Figure 1 As shown, the specific implementation steps are as follows:
[0035] like Figure 2 As shown, step 1, the well site master RTU sends a data request message to the wellhead RTU to request data communication;
[0036] Step 2: The wellhead RTU receives the request message and sends the first response message to the well site master RTU;
[0037] The data request message is shown in Table 1, including a frame header part, a CRC check code part and a request data part;
[0038] Table 1
[0039]
[0040]
[0041] The response message is shown in Table 2, including a frame header part, a CRC check code part and a response data part;
[0042] Table 2
[0043]
[0044] The frame header includes the protocol code, communication gain, RTU status and timestamp;
[0045] Among them, (1) the protocol code occupies 1 byte, the upper 4 bits of the byte encode the protocol major version, and the lower 4 bits encode the protocol sub-version number;
[0046] (2) Communication gain occupies 1 byte, indicating the gain of the RTU receiving wireless signals, which is used by the host computer to monitor the quality of wireless communication. When the well site master RTU sends data, it represents the wireless communication gain of the master RTU; when the wellhead RTU sends data, it represents the wireless communication gain of the wellhead RTU;
[0047] (3) RTU status occupies 1 byte, indicating the current operating status of the RTU. The status code mainly includes information such as "RTU operating normally", "RTU restart", and "RTU parameter update". The communication receiver determines whether to restart the parameter update, data restart and other functions based on the status code;
[0048] (4) The timestamp occupies 1 byte, a 32-bit integer time, representing the number of seconds that have passed since the current time of the RTU. When the wellhead RTU receives the timestamp from the wellsite master RTU, it decides whether to perform clock correction based on the comparison between the time and its own time; when the wellsite master RTU receives the timestamp from the wellhead RTU, it determines whether the wellhead RTU clock is abnormal, and then issues a fault information prompt. By adding a timestamp to the data frame, the whole process of timing between the wellhead RTU and the wellsite RTU can be realized, the timing accuracy can be improved, and a time reference can be provided for intermittent operation.
[0049] Among them, the CRC check code part occupies 2 bytes, which is the check information code for all data from the "protocol code" to the last byte of the data message, using the CRC check code method.
[0050] Among them, the response data part structure is shown in Table 3.
[0051] Table 3
[0052]
[0053] Among them, (1) the station number occupies 1 byte. When the well site master RTU communicates with the wellhead RTU, the address is bound through the station number information, thereby realizing point-to-point communication between the well site master RTU and the corresponding wellhead RTU;
[0054] (2) The length occupies 1 byte, which is the data length information from the station number to the check code in the current data, to realize the integrity judgment of the data;
[0055] (3) The frame ID occupies 1 byte. In order to ensure synchronous transmission between both parties during the current communication process and avoid data message confusion caused by wireless communication blockage, frame ID information is added to each message, and the master RTU at the well site performs control and identification.
[0056] (4) The function code occupies 1 byte, indicating the type of data currently being transmitted. 0×01 indicates basic information data, 0×02 indicates three-phase electrical parameter data of the pumping unit, 0×03 indicates intermittent operation status data, 0×04 indicates work diagram data, and 0×05 indicates power diagram data.
[0057] (5) The group number occupies 1 byte, indicating the serial number of the currently transmitted data. After the master RTU reads it, it is stored in the register in sequence according to the group number to avoid data errors caused by the message data packets not being returned to the well site master RTU in sequence;
[0058] (6) The group number only exists in the data message that the wellhead RTU responds to the well site master RTU, and occupies one byte, indicating the number of data packets currently being transmitted.
[0059] (7) The register address only exists in the data message that the wellhead RTU responds to the wellsite master RTU. It occupies one byte and indicates the starting register address of the real-time data currently being uploaded. The wellsite master RTU places the collected data into the corresponding register area of the main RTU according to the address description.
[0060] (8) The register length only exists in the data message that the wellhead RTU responds to the well site master RTU. It occupies one byte and indicates the number of registers in the current data upload message.
[0061] (9) The data only exists in the data message that the wellhead RTU responds to the well site master RTU. The number of bytes occupied is related to the current amount of data transmitted, indicating the data content corresponding to the starting address of the above register.
[0062] (10) The work map ID only exists in the data message that the wellhead RTU responds to the wellsite master RTU. It occupies one byte and indicates the work map ID sequence number formed by the current wellhead RTU collection. After the wellhead RTU completes the work map collection according to the requirements of the work map collection cycle, it updates the work map ID. If the wellsite master RTU finds that the work map ID this time is different from the previous work map ID, it will read the work map data. When there is fault information in the wellhead RTU, the work map ID will display a fault sign, and the wellsite master RTU will read the fault information.
[0063] (11) The fault code only exists in the data message that the wellhead RTU responds to the wellsite master RTU, and occupies one byte. When there is fault information in the wellhead RTU, this field will display the fault flag, and the wellsite master RTU will read the fault information.
[0064] Step 3: After receiving the first response message, the master RTU at the well site identifies, reads and stores it;
[0065] Step 3.1, after receiving the first response message, the master RTU of the well site identifies and determines the fault code field;
[0066] If it is 0×01, the wellhead RTU is faulty, skip the wellhead, and communicate with the subsequent wells from step 1. If it is 0×00, it indicates that the wellhead RTU is not faulty, and continue with step 3.2;
[0067] Step 3.2, the master RTU of the well site continues to identify the work map ID field. If it is the same as the work map ID collected in the previous cycle, it indicates that the wellhead RTU has not completed the work map collection and update, and the well is skipped, and communication with subsequent wells starts from step 1; if it is different from the work map ID collected in the previous cycle, it indicates that the wellhead RTU has completed the work map collection and update, and continues to step 3.3;
[0068] Step 3.3, the well site master RTU continues to identify the group quantity field, and determines the number of power diagram data packets collected by the wellhead RTU in this period;
[0069] Step 3.4: The master RTU at the well site continues to identify the register address and data length field, determines the storage location of the message data, and completes the reading and storage of the first packet of message information in the cycle.
[0070] Step 4: The master RTU of the well site sends multiple request messages in parallel and stores each received response message in sequence according to the group sequence number;
[0071] Step 4.1, the well site master RTU sends multiple request messages for the subsequent 2nd to nth package power diagram data simultaneously and in parallel, where n is greater than or equal to 3;
[0072] Step 4.2, the wellhead RTU sends n-1 response messages to the well site master RTU;
[0073] Step 4.3: The master RTU of the well site judges each received response message according to the group sequence number, determines the storage order of multiple response messages, and stores them.
[0074] Step 5: The wellsite master RTU determines the unreceived response message according to the response message group number and transmits it separately to the wellhead RTU, completing the transmission of the power diagram data from the wellhead RTU to the wellsite master RTU in this cycle.
[0075] Example 1
[0076] This embodiment provides an oilfield well site data transmission method based on wireless communication, which is specifically implemented according to the following steps:
[0077] Step 1: The well site master RTU sends a data request message to the wellhead RTU to request data communication;
[0078] Step 2, the wellhead RTU receives the request message and sends the first packet response message to the wellsite master RTU; the message group number is 0×01, as shown in Table 4, which is the first packet of power diagram data response from the wellhead RTU of a certain well to the wellsite master RTU at a certain time.
[0079] Table 4
[0080]
[0081] Step 3: After receiving the first response message, the master RTU at the well site identifies, reads and stores it;
[0082] Step 3.1, after receiving the first response message, the master RTU of the well site identifies and determines the fault code field;
[0083] If it is 0×01, the wellhead RTU is faulty, skip the wellhead, and communicate with the subsequent wells from step 1. If it is 0×00, it indicates that the wellhead RTU is not faulty, and continue with step 3.2. In this embodiment, it is 0×00, so continue with step 3.2.
[0084] Step 3.2, the master RTU of the well site continues to identify the work map ID field. If it is the same as the work map ID collected in the previous cycle, it indicates that the wellhead RTU has not completed the work map collection and update, and the well is skipped, and communication with subsequent wells starts from step 1; if it is different from the work map ID collected in the previous cycle, it indicates that the wellhead RTU has completed the work map collection and update, and continues to step 3.3;
[0085] Step 3.3, the well site master RTU continues to identify the group number field to determine the number of power diagram data packets collected by the wellhead RTU in this period; in this embodiment, the group number is 0x0E, indicating that the number of power diagram data packets collected in this period is 14 packets.
[0086] Step 3.4, the well site master RTU continues to identify the register address and data length fields to determine the storage location of the message data. In this embodiment, the register address is 0x9CA5 and the data length is 0x1E, indicating that the packet message is stored in the 30 registers 40101-40130 to complete the reading and storage of the first packet message information of the cycle.
[0087] Step 4: The master RTU of the well site sends multiple request messages in parallel and stores each received response message in sequence according to the group sequence number;
[0088] Step 4.1, the well site master RTU sends multiple request messages for the subsequent 2nd to 14th packets of power diagram data simultaneously and in parallel;
[0089] Step 4.2, the wellhead RTU sends 13 response messages to the well site master RTU;
[0090] Step 4.3: The master RTU of the well site judges each received response message according to the group sequence number, determines the storage order of multiple response messages, and stores them.
[0091] Step 5: The wellsite master RTU determines the unreceived response message according to the response message group number and transmits it separately to the wellhead RTU, completing the transmission of the power diagram data from the wellhead RTU to the wellsite master RTU in this cycle.
[0092] Example 2
[0093] This embodiment provides an oilfield well site data transmission method based on wireless communication, which is specifically implemented according to the following steps:
[0094] Step 1: The well site master RTU sends a data request message to the wellhead RTU to request data communication;
[0095] Step 2: The wellhead RTU receives the request message and sends the first response message to the well site master RTU;
[0096] Step 3: After receiving the first response message, the master RTU at the well site identifies, reads and stores it;
[0097] Step 4: The master RTU of the well site sends multiple request messages in parallel and stores each received response message in sequence according to the group sequence number;
[0098] Step 5: The wellsite master RTU determines the unreceived response message according to the response message group number and transmits it separately to the wellhead RTU, completing the transmission of the power diagram data from the wellhead RTU to the wellsite master RTU in this cycle.
[0099] Example 3
[0100] This embodiment provides an oilfield well site data transmission method based on wireless communication, which is specifically implemented according to the following steps:
[0101] Step 1: The well site master RTU sends a data request message to the wellhead RTU to request data communication;
[0102] Step 2: The wellhead RTU receives the request message and sends the first response message to the well site master RTU;
[0103] Step 3: After receiving the first response message, the master RTU at the well site identifies, reads and stores it;
[0104] Step 3.1, after receiving the first response message, the master RTU of the well site identifies and determines the fault code field;
[0105] If it is 0×01, the wellhead RTU is faulty, skip the wellhead, and communicate with the subsequent wells from step 1. If it is 0×00, it indicates that the wellhead RTU is not faulty, and continue with step 3.2;
[0106] Step 3.2, the master RTU of the well site continues to identify the work map ID field. If it is the same as the work map ID collected in the previous cycle, it indicates that the wellhead RTU has not completed the work map collection and update, and the well is skipped, and communication with subsequent wells starts from step 1; if it is different from the work map ID collected in the previous cycle, it indicates that the wellhead RTU has completed the work map collection and update, and continues to step 3.3;
[0107] Step 3.3, the well site master RTU continues to identify the group quantity field, and determines the number of power diagram data packets collected by the wellhead RTU in this period;
[0108] Step 3.4: The master RTU at the well site continues to identify the register address and data length field, determines the storage location of the message data, and completes the reading and storage of the first packet of message information in the cycle.
[0109] Step 4: The master RTU of the well site sends multiple request messages in parallel and stores each received response message in sequence according to the group sequence number;
[0110] Step 5: The wellsite master RTU determines the unreceived response message according to the response message group number and transmits it separately to the wellhead RTU, completing the transmission of the power diagram data from the wellhead RTU to the wellsite master RTU in this cycle.
[0111] Example 4
[0112] This embodiment provides an oilfield well site data transmission method based on wireless communication, which is specifically implemented according to the following steps:
[0113] Step 1: The well site master RTU sends a data request message to the wellhead RTU to request data communication;
[0114] Step 2: The wellhead RTU receives the request message and sends the first response message to the well site master RTU;
[0115] Step 3: After receiving the first response message, the master RTU at the well site identifies, reads and stores it;
[0116] Step 4: The master RTU of the well site sends multiple request messages in parallel and stores each received response message in sequence according to the group sequence number;
[0117] Step 4.1, the well site master RTU sends multiple request messages for the subsequent 2nd to nth package power diagram data simultaneously and in parallel, where n is greater than or equal to 3;
[0118] Step 4.2, the wellhead RTU sends n-1 response messages to the well site master RTU;
[0119] Step 4.3: The master RTU of the well site judges each received response message according to the group sequence number, determines the storage order of multiple response messages, and stores them.
[0120] Step 5: The wellsite master RTU determines the unreceived response message according to the response message group number and transmits it separately to the wellhead RTU, completing the transmission of the power diagram data from the wellhead RTU to the wellsite master RTU in this cycle.
[0121] The advantage of the present invention is that the transmission method adds a timestamp and a beacon code field to the data frame structure in the protocol, can optimize and adjust the data type, realize the dynamic collection of data messages, greatly improve the communication efficiency between the wellhead RTU and the main RTU of the well site, and thus reduce the generation of blank power diagrams and erroneous power diagrams.
Claims
1. A method for transmitting data at an oil field well site based on wireless communication, characterized in that: Follow the steps below to implement it: Step 1: The well site master RTU sends a data request message to the wellhead RTU to request data communication; Step 2: The wellhead RTU receives the request message and sends the first response message to the well site master RTU; Step 3: After receiving the first response message, the master RTU of the well site identifies, reads and stores it; Step 4: The master RTU of the well site sends multiple request messages in parallel and stores each received response message in sequence according to the group sequence number; Step 5: The wellsite master RTU determines the unreceived response message according to the response message group number and transmits it separately to the wellhead RTU, completing the transmission of the power diagram data from the wellhead RTU to the wellsite master RTU in this cycle.
2. The oilfield well site data transmission method based on wireless communication according to claim 1, characterized in that: The data request message and the first packet response message both include a frame header part and a CRC check code part.
3. The oilfield well site data transmission method based on wireless communication according to claim 2, characterized in that: The frame header part includes a protocol code, a communication gain, an RTU state and a timestamp.
4. The oilfield well site data transmission method based on wireless communication according to claim 2, characterized in that: The data request message also includes a request data part, and the request data part includes a station number, a length, a frame ID, a function code and a group sequence number.
5. The oilfield well site data transmission method based on wireless communication according to claim 2, characterized in that: The first packet response message also includes a response data part, which includes a station number, length, frame ID, function code, group sequence number, group quantity, register address, register length, data, function diagram ID and fault code.
6. The oilfield well site data transmission method based on wireless communication according to claim 1, characterized in that: The step 3 is specifically implemented according to the following steps: Step 3.1: After receiving the first response message, the master RTU of the well site identifies and determines the fault code field; If it is 0×01, the wellhead RTU is faulty, skip the wellhead, and communicate with the subsequent wells from step 1. If it is 0×00, it indicates that the wellhead RTU is not faulty, and continue with step 3.2; Step 3.2, the master RTU of the well site continues to identify the work map ID field. If it is the same as the work map ID collected in the previous cycle, it indicates that the wellhead RTU has not completed the work map collection and update, and the well is skipped, and communication with subsequent wells starts from step 1; if it is different from the work map ID collected in the previous cycle, it indicates that the wellhead RTU has completed the work map collection and update, and continues to step 3.3; Step 3.3, the well site master RTU continues to identify the group quantity field, and determines the number of power diagram data packets collected by the wellhead RTU in this period; Step 3.4: The master RTU at the well site continues to identify the register address and data length field, determines the storage location of the message data, and completes the reading and storage of the first packet of message information in the cycle.
7. The oilfield well site data transmission method based on wireless communication according to claim 1, characterized in that: The step 4 is specifically implemented according to the following steps: Step 4.1, the well site master RTU sends multiple request messages for the subsequent 2nd to nth package power diagram data simultaneously and in parallel, where n is greater than or equal to 3; Step 4.2, the wellhead RTU sends n-1 response messages to the well site master RTU; Step 4.3: The master RTU of the well site judges each received response message according to the group sequence number, determines the storage order of multiple response messages, and stores them.