Real-time classification method and system of working condition data, storage medium and computer

By employing a fixed sampling period and a neural network model in wireless dynamometers and RTU devices, the problem of low-power devices being unable to monitor well conditions in real time was solved, enabling real-time analysis and accurate identification of well conditions and improving the equipment's status monitoring capabilities.

CN121412840APending Publication Date: 2026-01-27XINJIANG G C ENERGY TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511549829.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-28
Publication Date
2026-01-27

AI Technical Summary

Technical Problem

Existing wireless dynamometer devices are limited by low power consumption and cannot achieve real-time measurement and well condition analysis. They also have low coverage and lag behind actual well conditions. The computing power of RTU devices is insufficient to perform complex real-time signal analysis and identification.

Method used

A fixed sampling period is used for continuous sampling and preprocessing, the sampling frequency is adjusted for secondary sampling, and a neural network model is used for data compression and classification. A four-layer neural network model is constructed for real-time classification of operating condition data.

Benefits of technology

It enables real-time monitoring of wireless dynamometers and intelligent status judgment of RTU equipment, improving the accuracy and coverage of well condition analysis and reducing equipment resource requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121412840A_ABST
    Figure CN121412840A_ABST
Patent Text Reader

Abstract

The invention provides a real-time classification method and system for working condition data, a storage medium and a computer. The method comprises the following steps: preprocessing sampling data obtained by continuously sampling an oil well to obtain an operation cycle of the oil well; the sampling frequency is adjusted according to the operation cycle of the oil well, secondary sampling is conducted on the oil well through the adjusted sampling frequency, and obtained secondary sampling data is compressed; performing indicator diagram classification coding based on the past indicator diagram classification data to obtain a coding table, and training and simulating a neural network by using the past indicator diagram classification data to obtain a neural network model; and carrying out data processing on the secondary sampling data by utilizing a neural network model so as to realize real-time classification of the working condition data of the oil well. The machine learning based on the neural network algorithm can be used for analyzing and identifying the wellhead working condition, data acquisition is quantized, a simplified neural network is constructed, and a foundation is laid for improvement of an oil extraction working condition identification technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, system, storage medium, and computer for real-time classification of working condition data. Background Technology

[0002] Digital oilfield construction has become an important part of the oil extraction process. Measurement instruments such as RTUs (Remote Well Controllers) and wireless dynamometers are used to monitor the condition of oil wells. Typically, the following equipment is installed on an oil well: 1. Remote well controller (RTU): Used for remote detection and control of oil well start-up, speed regulation, etc., and acts as a wireless gateway to receive and process data from surrounding wireless sensors; 2. Wireless power transmitter: used to monitor the power consumption status of oil wells; 3. Wireless pressure transmitter: Battery powered, wireless communication, used to monitor oil pressure in oil well pipelines; 4. Wireless temperature transmitter: Battery powered, wireless communication, used to monitor the oil temperature in the oil well pipeline; 5. Wireless dynamometer: Battery powered, wireless communication, used to monitor the load and movement status of the oil well; Currently, in the construction of digital oilfields, wireless dynamometers, which are widely used, have replaced the earlier wired dynamometers, providing a technical foundation for improving the coverage of oil well condition monitoring. However, due to the limitation of low power consumption, the technical bottlenecks of the equipment itself are also quite prominent. 1. Low-power wireless communication technology has very low communication bandwidth, such as ZigBee (250kbps) and LoRa (1~62.5kbps). Wireless sensor networks often have one receiver receiving data from multiple sensors at the same time, and the data bandwidth allocated to each sensor is even lower. It cannot carry the real-time measurement data of wireless dynamometers and can only select one set of data for transmission at regular intervals (0.5~1 hour).

[0003] 2. The low-power technology of wireless dynamometers relies on a "short-time operation, long-time sleep" strategy. Data is collected at the agreed-upon sampling time, transmitted wirelessly after collection, and then the circuit system immediately enters sleep mode. In sleep mode, the standby current is typically <30uA (3.6V battery powered, the same applies below). Although the operating current is relatively high (10-100mA (3.6V), the operating time is very short, ranging from tens to hundreds of milliseconds, achieving a low average power consumption. This makes wireless dynamometers unsuitable as real-time well condition monitoring devices.

[0004] 3. Due to the requirement of low power consumption, the electronic chips used in wireless low-power sensors often have specific low-power designs: lower operating frequency (commonly 8~32MHz) and smaller running memory (commonly 2~32KB). Currently, most commonly used are low-power processors with Cortex-M0 cores. Because of their small running memory, these processors cannot implement complex signal processing and analysis algorithms. The well condition data they collect can often only monitor some specific boundary conditions, such as values ​​that are too large or too small, or periodic changes. They cannot accurately analyze measurement signals containing a lot of noise interference to obtain accurate wellhead conditions. They can only send the data to the next-level device, the RTU. However, many RTU devices are also ARM embedded microcontroller solutions, which do not have strong computing power. The RTU can only package the data and send it to the data center for status identification and analysis.

[0005] In summary, low-power wireless dynamometer devices cannot perform real-time measurement and well condition analysis. Well condition identification and analysis rely on the upper-level equipment of the system, resulting in low coverage (only one cycle of measurement data is available after tens to hundreds of motion cycles) and lagging behind the actual well conditions. On the other hand, many RTU devices are designed using ARM processors, which have limited RAM, typically a few hundred KB to a few MB. Furthermore, they are limited by the data acquisition and upload cycle of the dynamometer itself, making it impossible to perform complex real-time signal analysis and identification. Summary of the Invention

[0006] Based on this, the purpose of the present invention is to provide a real-time classification method, system, storage medium, and computer for working condition data, so as to at least solve the shortcomings of the above-mentioned technologies.

[0007] This invention proposes a real-time classification method for operating condition data, comprising: The oil well is continuously sampled at a fixed sampling period, and the obtained sampling data is preprocessed to obtain the operating cycle of the oil well. The sampling frequency is adjusted according to the operating cycle of the oil well, and the oil well is sampled a second time using the adjusted sampling frequency. The obtained secondary sampling data is compressed to retain the waveform characteristics of the secondary sampling data. Based on past work map classification data, work map classification and encoding are performed to obtain the corresponding encoding table. A neural network is then constructed, and the neural network is trained and simulated using the past work map classification data to obtain the corresponding neural network model. The neural network model is used to process the secondary sampled data to achieve real-time classification of the oil well's operating data.

[0008] Furthermore, the steps of continuously sampling the oil well at a fixed sampling period and preprocessing the obtained sampling data to obtain the operating cycle of the oil well include: The oil well is continuously sampled at a fixed sampling period, and the obtained sampled data is filtered and denoised to obtain the corresponding denoised data. The denoised data is low-pass filtered using a moving average algorithm, and the period is calculated using an autocorrelation function to obtain the operating cycle of the oil well.

[0009] Furthermore, the step of compressing the obtained secondary sampled data to preserve its waveform characteristics includes: Find the maximum and minimum values ​​of the secondary sampled data, and subtract the minimum value from all data in the secondary sampled data to reduce the data amplitude; Based on the number of high-order bits of the maximum value being zero, calculate and retain eight bits of data from the first non-zero data bit in the secondary sampled data to extract the corresponding low-order data. The data in the secondary sampling data is uniformly truncated according to the maximum number of bits to complete the compression process of the secondary sampling data.

[0010] Furthermore, the expression for the encoding table is:

[0011] In the formula, Indicates category label, This represents the vector after one-hot encoding. Indicates the number of categories.

[0012] Furthermore, the neural network model adopts a four-layer structure, including an input layer, three hidden layers, and an output layer. The step of training and simulating the neural network using the past power graph classification data to obtain the corresponding neural network model includes: The past work map classification data is divided into a training set and a validation set, and the neural network is trained using the training set until the cross-entropy loss of the neural network meets the preset range. The trained neural network is validated using the validation set until it meets the preset requirements. Then, a neural network model is constructed using the validated neural network.

[0013] Furthermore, the formula for calculating the neural network cross-entropy loss in the neural network model is as follows: ; In the formula, For the first The true label of each sample It is the first The predicted probability of a sample. This represents the number of samples.

[0014] This invention also proposes a real-time classification system for operating condition data, comprising: The data sampling module is used to continuously sample the oil well at a fixed sampling period and preprocess the obtained sampling data to obtain the operating cycle of the oil well. The data compression module is used to adjust the corresponding sampling frequency according to the operating cycle of the oil well, and to perform secondary sampling on the oil well using the adjusted sampling frequency, and to compress the obtained secondary sampling data to retain the waveform characteristics of the secondary sampling data. The model building module is used to perform power map classification and encoding based on past power map classification data to obtain the corresponding encoding table, and to build a neural network. The neural network is trained and simulated using the past power map classification data to obtain the corresponding neural network model. The real-time classification module is used to process the secondary sampled data using the neural network model to achieve real-time classification of the oil well's operating data.

[0015] Furthermore, the data sampling module includes: The noise reduction processing unit is used to continuously sample the oil well at a fixed sampling period and filter and denoise the obtained sampled data to obtain the corresponding denoised data. The filtering unit is used to perform low-pass filtering on the denoised data using a moving average algorithm and to perform period calculation using an autocorrelation function to obtain the operating cycle of the oil well.

[0016] Furthermore, the data compression module includes: The data lookup unit is used to find the maximum and minimum values ​​of the secondary sampled data, and subtract the minimum value from all data in the secondary sampled data to reduce the data amplitude. The data calculation unit is used to calculate and retain eight bits of data from the first non-zero data bit in the secondary sampled data based on the number of high-order bits of the maximum value, so as to extract the corresponding low-order data. The data compression unit is used to uniformly truncate all data in the secondary sampled data according to the maximum number of bits, so as to complete the compression process of the secondary sampled data.

[0017] Furthermore, the neural network model adopts a four-layer structure, including an input layer, three hidden layers, and an output layer. The model building module includes: The data splitting unit is used to divide the past power map classification data into a training set and a validation set, and use the training set to train the neural network until the cross-entropy loss of the neural network meets the preset range. The model building unit is used to validate the trained neural network using the validation set until the trained neural network meets the preset requirements, and then uses the validated neural network to build a neural network model.

[0018] The present invention also proposes a storage medium on which a computer program is stored, which, when executed by a processor, implements the above-mentioned real-time classification method for operating condition data.

[0019] The present invention also proposes a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned real-time classification method for working condition data.

[0020] The real-time classification method, system, storage medium, and computer for working condition data in this invention utilize machine learning based on neural network algorithms to analyze and identify wellhead working conditions. It quantifies and processes collected data, constructs a simplified neural network, and lays the foundation for improving oil production condition identification technology. This addresses the real-time monitoring and identification of the status of pumping wells operating under limited CPU resources with wireless dynamometers and RTU devices. By directly applying neural network algorithms to wireless dynamometers and RTUs, the low-power wireless dynamometers can perform real-time monitoring, operational status statistics, and real-time alarms, making the RTU device's comprehensive judgment of the pumping well's status more accurate and intelligent. Attached Figure Description

[0021] Figure 1 This is a flowchart of the real-time classification method for working condition data in the first embodiment of the present invention; Figure 2 This is a diagram illustrating the process of dataset classification and neural network training in the first embodiment of the present invention. Figure 3 This is a structural block diagram of the real-time classification system for working condition data in the second embodiment of the present invention; Figure 4 This is a structural block diagram of the computer in the third embodiment of the present invention.

[0022] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation

[0023] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0025] Example 1 Please see Figure 1 The figure shows a real-time classification method for working condition data in the first embodiment of the present invention, the method specifically including steps S101 to S104: S101, continuously sample the oil well at a fixed sampling period, and preprocess the obtained sampling data to obtain the operating cycle of the oil well; Furthermore, step S101 specifically includes steps S1011 to S1012: S1011, continuously sample the oil well at a fixed sampling period, and filter and denoise the obtained sampled data to obtain the corresponding denoised data; S1012, the denoised data is low-pass filtered using a moving average algorithm, and the period is calculated using an autocorrelation function to obtain the operating cycle of the oil well.

[0026] In practice, the dynamometer continuously samples the oil well at a fixed sampling period, filters and removes noise from the signal, performs low-pass filtering using a moving average method, and then calculates the period using the autocorrelation function to analyze the operating cycle of the oil well. .

[0027] The wireless dynamometer currently in use has an internal accelerometer and a pressure sensor for collecting load force. Since the operating cycle of an oil well is between 5 and 60 seconds, corresponding to an operating frequency of 0.017 to 0.2 Hz, a fixed-frequency sampling method, such as a sampling period of 0.2 seconds, is generally sufficient to collect the operating status of the oil well.

[0028] The collected acceleration data is used to calculate displacement data. Combined with load data, a well condition dynamometer diagram of the oil well can be drawn. The wireless dynamometer wirelessly reports the dynamometer diagram data (usually each set consists of 200 load data points and 200 displacement data points) to the RTU and data center. The displacement data is used as the x-axis and the load data as the y-axis to plot the diagram. Operators identify the operating conditions of the oil well based on the characteristics of the dynamometer diagram. Whether operators identify well condition characteristics by observing the well condition diagram displayed in the data center or by using the currently popular CNN convolutional neural network algorithm to classify the well condition diagram in the data center, the following basic steps are generally followed: 1. Accumulate well condition data, summarize well condition characteristics, and form personnel experience. For computers, this is a training dataset for neural networks. 2. Technicians use the summarized well condition characteristics to form classification standards for well condition classification. Machine learning trains neural networks through datasets, and the machine can recognize the network of data characteristics. 3. Technicians analyze and identify the status of data based on their experience in data application, while the computer performs data analysis and identification through a trained neural network; In this embodiment, applying the dynamometer analysis method to the wireless dynamometer and remote well controller (RTU) device can greatly improve the device performance of the wireless dynamometer and RTU, changing the working mode of periodic sampling and reporting to real-time acquisition, analysis, and real-time alarm in case of problems.

[0029] S102, adjust the corresponding sampling frequency according to the operating cycle of the oil well, and use the adjusted sampling frequency to perform secondary sampling on the oil well, and compress the obtained secondary sampling data to retain the waveform characteristics of the secondary sampling data; Furthermore, step S102 specifically includes steps S1021 to S1023: S1021, Find the maximum and minimum values ​​of the secondary sampled data, and subtract the minimum value from all data in the secondary sampled data to reduce the data amplitude; S1022, based on the number of high-order bits of the maximum value being zero, calculate and retain eight bits of data from the first non-zero data bit in the secondary sampled data to extract the corresponding low-order data; S1023, all data in the secondary sampling data are uniformly truncated according to the maximum number of bits to complete the compression processing of the secondary sampling data.

[0030] In practice, based on the analyzed oil well operating cycle By adjusting the sampling frequency through measurement, a fixed number of sampling points are ensured to be collected within each cycle. According to the Nyquist sampling theorem: during analog-to-digital signal conversion, when the sampling frequency... Greater than or equal to the highest frequency in the signal When twice ( The sampled digital signal completely retains the information in the original signal. By controlling the ADC sampling frequency of the dynamometer to ≥2 times the actual operating frequency of the oil well, the characteristics in the signal can be preserved. This allows for the use of fewer sampling points to perform classification calculations of operating conditions, and the weight parameters of the neural network can also be significantly reduced, lowering the RAM capacity requirements.

[0031] Furthermore, current wireless dynamometers mostly use fixed-frequency sampling, and the collected well condition data often cannot meet the data center software requirements of 200 points per data set (200 load data points, 200 displacement data points, and sometimes 400 or 800 points). For example, for a pumping well operating in a 10-second cycle, data acquisition is performed every 0.2 seconds in each cycle, which only yields 50 sampling points. Interpolation is required to supplement the data to 200 points before data reporting. Moreover, different oil wells have different operating cycles, and the actual number of samples obtained by using fixed-frequency sampling in each oil well's operating cycle is different. It is also necessary to supplement the data to the same number of points for input into the neural network calculation. In this state, an unnecessary amount of computation is artificially added.

[0032] Analysis of oil well operating cycle Afterwards, according to The purpose of adjusting the sampling frequency is to ensure that the same number of data points are collected within one cycle for different oil wells and different operating cycles. Simultaneously, while preserving sufficient signal characteristics, it reduces the amount of data involved in neural network calculations, thereby lowering the size of the neural network and achieving the goal of using a neural network with only 10KB of operating memory. For data points of only 50 or 100, the weight parameters of the neural network will also be reduced proportionally.

[0033] For wells with a cycle of 5-60 seconds (the actual range of the well's operating cycle), a uniform sampling requirement of 100 points per operating cycle is adopted for analysis. For a well with a 5-second cycle, the actual operating frequency is 0.2 Hz, the sampling period for 100 points is 0.05 ms, and the actual sampling frequency is 20 Hz, 10 times the actual operating frequency, which can completely capture waveform features. For a well with a 60-second cycle, the actual frequency is 0.0167 Hz, the sampling number of 100 points is equivalent to a 0.6-second sampling period, and the actual sampling frequency is 1.67 Hz, 100 times the actual operating frequency, which can also completely capture waveform features. Even 50 points can be used for classification calculations, and 100 points can be used for neural network design and RAM usage calculations.

[0034] Specifically, for 16-bit ADC sampling signals, since the classification of oil well operating conditions is only related to the waveform characteristics of the load sampling signal period, a compression method is used to convert it into 8-bit data, preserving the waveform characteristics for neural network operations, further reducing the requirements for computing power and memory. The specific compression method is as follows: 1. For the acquired signal, find the maximum and minimum values; 2. Subtract the minimum value from all data to reduce the overall data amplitude, which is equivalent to retaining only the signal difference; At this point, the load data has been converted into the change relative to the minimum value. The maximum value of the entire data set has become the difference between the maximum and minimum values, which is the maximum change in load within the cycle. For a common 150KN range dynamometer, 10mV-1.5V corresponds to a load of 0-150KN. In actual operating wells, the load change amplitude (maximum value - minimum value) is mostly within 30KN, often around 10KN, meaning the actual voltage change amplitude is 0.1-0.3V. For 16-bit ADC data, 12-13 bits are typically used. 3. Based on the number of high-order zeros in the maximum value, calculate how many low-order bits need to be truncated to retain 8 bits of data, starting from the first non-zero data bit; generally, 2-5 low-order bits are truncated, and the maximum quantization amplitude of the voltage corresponding to the low-order 5 bits is approximately 1.2mV; 4. All data are truncated to the same maximum value for the same number of digits; After data processing, some voltage amplitude details are lost (maximum 1.2mV), but waveform features are preserved (wave rise, fall, waveform inflection point position, etc.), and will not affect the calculation results of the classification neural network. Furthermore, since the sampled signal has been compressed to 8 bits, the weight parameters of the neural network also use 8 bits, and a 16-bit computation cache can ensure that no multiplication overflow will occur. Compared with a 32-bit computation cache, this saves 50% of RAM capacity requirements. If the data is not compressed, the sampled data is 16 bits, the weight data is 16 bits, and to prevent overflow during multiplication, a 32-bit data variable is needed for storage. The RAM space requirements for a single operation on one data point are compared below:

[0035] S103, perform work map classification encoding based on past work map classification data to obtain the corresponding encoding table, and construct a neural network. Use the past work map classification data to train and simulate the neural network to obtain the corresponding neural network model. Furthermore, step S103 specifically includes steps S1031 to S1032: S1031, the past work map classification data is divided into a training set and a validation set, and the neural network is trained using the training set until the cross-entropy loss of the neural network meets the preset range. S1032, the trained neural network is validated using the validation set until the trained neural network meets the preset requirements, and then a neural network model is constructed using the validated neural network.

[0036] In practical implementation, the existing dynamometer card classification standard is adopted for dynamometer card classification and coding. A code is assigned to each working condition, and a neural network is trained and simulated using a computer. Unique thermal coding is performed for 10 common oil well working conditions. The mathematical expression of the coding table is as follows:

[0037] In the formula, Indicates category label, This represents the vector after one-hot encoding. Indicates the number of categories.

[0038] Furthermore, a unique heat coding table was constructed by selecting 10 common oil well operating conditions:

[0039] Furthermore, the neural network in this embodiment adopts a 4-layer structure, and there are 10 types of working condition classification codes corresponding to the dynamometer diagram. That is, when the data collected by the dynamometer is input into the neural network, the output of the calculation is the probability of this set of data corresponding to the 10 types of dynamometer diagrams (the one with the highest probability is the corresponding classification):

[0040] After training and validation using a previous work map classification database, the weight parameters (operation coefficients) of the neural network are saved as a data table.

[0041] S104, The neural network model is used to process the secondary sampling data to achieve real-time classification of the oil well's operating data.

[0042] In practical implementation, the classification operation of the dataset and the training process of the neural network are as follows: Figure 2 As shown, the vector expression for matrix operations is: ; ; In the formula, Represents a data matrix. Represents the network weight matrix. Represents the network bias matrix. This represents the computational output of each layer of the network. This represents the classification prediction output matrix. This represents the activation function of the output layer.

[0043]

[0044] Furthermore, after training and validation using a previous work map classification database, using The activation function is used for calculation, and the calculation principle and process are as follows: 1. Use a manually classified dataset (50,000 samples), with 70% as the training set and 30% as the validation set, to train and validate the neural network. 2. Use when classifying An activation function can transform a one-dimensional vector *k* composed of the predicted values ​​for each category into probabilities ranging from 0 to 1, with the sum of all predicted probabilities being 1. The classification prediction output is then defined. It is a one-dimensional vector; 3. Confidence level (predicted probability) for each category. The activation function is calculated using the following formula:

[0045] In the formula, Number of categories; 4. Multi-class classification problems The regression output is a one-dimensional vector. After passing through the Softmax activation function, each value in the vector represents the confidence level (predicted probability) for each category. The highest confidence level in the vector is represented by the highest value. The corresponding category is the prediction result (corresponding to one-hot encoding).

[0046]

[0047] 5. The function gives a vector This can be viewed as "the conditional probability of each class given any input x". For example, After properly encoding the actual and predicted values, 𝑦 and Both are one-dimensional vectors representing class probabilities, allowing us to measure prediction loss by comparing the differences between these probabilities. The difference is used as the loss, and 𝑦 is the encoded true value. The prediction loss expression is as follows, given the encoded predicted value label:

[0048] Furthermore, since the true value vector 𝑦 contains only one 1 and the rest are all 0s, the loss function can be simplified as follows:

[0049] in, It is a number, not a vector. Here, we are calculating the loss for a single sample, not the loss for a batch (a subset of data that is computed in a single run, such as training with 256 data points, each with 100 points).

[0050] At this point, the loss function is the true class of the current sample. On the predicted probability Invert the logarithm of the product. That is, for classification problems, we only care about the model's predicted probability for the correct class. (and does not care about the model's predicted probability for the wrong category).

[0051] The expression for the constructed neural network cross-entropy loss is as follows:

[0052] In the formula, For the first The true label of each sample It is the first The predicted probability of a sample. This represents the number of samples.

[0053] The neural network is trained using the training set in the dataset. When the network's cross-entropy loss decreases to an acceptable range, such as <0.001, training is stopped for validation. The neural network is considered successfully trained when both training and validation losses reach the expected levels. The weight parameters... and bias parameters This can be used to create a calculation table, which can be written into the wireless dynamometer and RTU program, and the real-time data can be classified using program function calls; In summary, the RAM required for the oil well condition classification algorithm is shown in the table below:

[0054] Among them, the classification algorithm with data compression for 100 sampling points within a period only requires a minimum of 3.4KB of RAM, which is sufficient for most embedded processors (most low-power M0 core ARM processors currently have 16-32KB of RAM). For RTU devices, depending on the processor resources, either a 16-bit uncompressed data algorithm or a 200-point data algorithm (with higher accuracy) can be used.

[0055] In summary, the real-time classification method for working condition data in the above embodiments of the present invention, based on machine learning using neural network algorithms, can be used to analyze and identify wellhead working conditions. It quantifies and processes collected data, constructs a simplified neural network, and lays the foundation for improving oil production condition identification technology. This addresses the real-time monitoring and identification of the status of pumping wells operating under limited CPU resources with wireless dynamometers and RTU devices. By directly applying neural network algorithms to wireless dynamometers and RTUs, the low-power wireless dynamometers can perform real-time monitoring, operational status statistics, and real-time alarms, making the RTU device's comprehensive judgment of the pumping well's status more accurate and intelligent.

[0056] Example 2 In another aspect, this invention also proposes a real-time classification system for operating condition data; please refer to [link / reference needed]. Figure 3 The figure shows a real-time classification system for working condition data in a second embodiment of the present invention. The system includes: The data sampling module 11 is used to continuously sample the oil well at a fixed sampling period and preprocess the obtained sampling data to obtain the operating cycle of the oil well. Furthermore, the data sampling module 11 includes: The noise reduction processing unit is used to continuously sample the oil well at a fixed sampling period and filter and denoise the obtained sampled data to obtain the corresponding denoised data. The filtering unit is used to perform low-pass filtering on the denoised data using a moving average algorithm and to perform period calculation using an autocorrelation function to obtain the operating cycle of the oil well.

[0057] The data compression module 12 is used to adjust the corresponding sampling frequency according to the operating cycle of the oil well, and to perform secondary sampling on the oil well using the adjusted sampling frequency, and to compress the obtained secondary sampling data to retain the waveform characteristics of the secondary sampling data. Furthermore, the data compression module 12 includes: The data lookup unit is used to find the maximum and minimum values ​​of the secondary sampled data, and subtract the minimum value from all data in the secondary sampled data to reduce the data amplitude. The data calculation unit is used to calculate and retain eight bits of data from the first non-zero data bit in the secondary sampled data based on the number of high-order bits of the maximum value, so as to extract the corresponding low-order data. The data compression unit is used to uniformly truncate all data in the secondary sampled data according to the maximum number of bits, so as to complete the compression process of the secondary sampled data.

[0058] The model building module 13 is used to perform power map classification encoding based on past power map classification data to obtain the corresponding encoding table, and to build a neural network. The neural network is trained and simulated using the past power map classification data to obtain the corresponding neural network model. Furthermore, the neural network model adopts a four-layer structure, including an input layer, three hidden layers, and an output layer. The model building module 13 includes: The data splitting unit is used to divide the past power map classification data into a training set and a validation set, and use the training set to train the neural network until the cross-entropy loss of the neural network meets the preset range. The model building unit is used to validate the trained neural network using the validation set until the trained neural network meets the preset requirements, and then uses the validated neural network to build a neural network model.

[0059] The real-time classification module 14 is used to process the secondary sampling data using the neural network model to achieve real-time classification of the oil well's operating data.

[0060] The functions or operation steps implemented by the above modules and units are largely the same as those in the above method embodiments, and will not be repeated here.

[0061] The real-time classification system for working condition data provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the system embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0062] Example 3 This invention also proposes a computer, please refer to [link / reference]. Figure 4 The computer shown in the third embodiment of the present invention includes a memory 10, a processor 20, and a computer program 30 stored in the memory 10 and executable on the processor 20. When the processor 20 executes the computer program 30, it implements the above-mentioned real-time classification method for working condition data.

[0063] The memory 10 includes at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 10 can be an internal storage unit of a computer, such as the computer's hard disk. In other embodiments, the memory 10 can be an external storage device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Furthermore, the memory 10 can include both internal and external storage units of the computer. The memory 10 can be used not only to store application software and various types of data installed on the computer, but also to temporarily store data that has been output or will be output.

[0064] In some embodiments, the processor 20 may be an electronic control unit (ECU), a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, used to run program code stored in the memory 10 or process data, such as executing access restriction programs.

[0065] It should be pointed out that, Figure 4 The structure shown does not constitute a limitation on the computer. In other embodiments, the computer may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0066] This invention also proposes a storage medium storing a computer program that, when executed by a processor, implements the real-time classification method for operating condition data as described above.

[0067] Those skilled in the art will understand that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0068] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0069] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0070] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0071] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A real-time classification method for operating condition data, characterized in that, include: The oil well is continuously sampled at a fixed sampling period, and the obtained sampling data is preprocessed to obtain the operating cycle of the oil well. The sampling frequency is adjusted according to the operating cycle of the oil well, and the oil well is sampled a second time using the adjusted sampling frequency. The obtained secondary sampling data is compressed to retain the waveform characteristics of the secondary sampling data. Based on past work map classification data, work map classification and encoding are performed to obtain the corresponding encoding table. A neural network is then constructed, and the neural network is trained and simulated using the past work map classification data to obtain the corresponding neural network model. The neural network model is used to process the secondary sampled data to achieve real-time classification of the oil well's operating data.

2. The real-time classification method for operating condition data according to claim 1, characterized in that, The steps of continuously sampling the oil well at a fixed sampling period and preprocessing the obtained sampling data to obtain the operating cycle of the oil well include: The oil well is continuously sampled at a fixed sampling period, and the obtained sampled data is filtered and denoised to obtain the corresponding denoised data. The denoised data is low-pass filtered using a moving average algorithm, and the period is calculated using an autocorrelation function to obtain the operating cycle of the oil well.

3. The real-time classification method for operating condition data according to claim 1, characterized in that, The step of compressing the obtained secondary sampled data to preserve its waveform characteristics includes: Find the maximum and minimum values ​​of the secondary sampled data, and subtract the minimum value from all data in the secondary sampled data to reduce the data amplitude; Based on the number of high-order bits of the maximum value being zero, calculate and retain eight bits of data from the first non-zero data bit in the secondary sampled data to extract the corresponding low-order data. The data in the secondary sampling data is uniformly truncated according to the maximum number of bits to complete the compression process of the secondary sampling data.

4. The real-time classification method for operating condition data according to claim 1, characterized in that, The expression for the encoding table is: In the formula, Indicates category label, This represents the vector after one-hot encoding. Indicates the number of categories.

5. The real-time classification method for operating condition data according to claim 1, characterized in that, The neural network model adopts a four-layer structure, including an input layer, three hidden layers, and an output layer. The steps of training and simulating the neural network using the past power graph classification data to obtain the corresponding neural network model include: The past work map classification data is divided into a training set and a validation set, and the neural network is trained using the training set until the cross-entropy loss of the neural network meets the preset range. The trained neural network is validated using the validation set until it meets the preset requirements. Then, a neural network model is constructed using the validated neural network.

6. The real-time classification method for operating condition data according to claim 1, characterized in that, The formula for calculating the cross-entropy loss of the neural network in the neural network model is as follows: ; In the formula, For the first The true label of each sample It is the first The predicted probability of a sample. This represents the number of samples.

7. A real-time classification system for operating condition data, characterized in that, include: The data sampling module is used to continuously sample the oil well at a fixed sampling period and preprocess the obtained sampling data to obtain the operating cycle of the oil well. The data compression module is used to adjust the corresponding sampling frequency according to the operating cycle of the oil well, and to perform secondary sampling on the oil well using the adjusted sampling frequency, and to compress the obtained secondary sampling data to retain the waveform characteristics of the secondary sampling data. The model building module is used to perform power map classification and encoding based on past power map classification data to obtain the corresponding encoding table, and to build a neural network. The neural network is trained and simulated using the past power map classification data to obtain the corresponding neural network model. The real-time classification module is used to process the secondary sampled data using the neural network model to achieve real-time classification of the oil well's operating data.

8. The real-time classification system for operating condition data according to claim 7, characterized in that, The data sampling module includes: The noise reduction processing unit is used to continuously sample the oil well at a fixed sampling period and filter and denoise the obtained sampled data to obtain the corresponding denoised data. The filtering unit is used to perform low-pass filtering on the denoised data using a moving average algorithm and to perform period calculation using an autocorrelation function to obtain the operating cycle of the oil well.

9. A storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the real-time classification method for operating condition data as described in any one of claims 1 to 6.

10. A computer 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, it implements the real-time classification method for operating condition data as described in any one of claims 1 to 6.