A pumping unit well fault determination method based on trend rule mining
By using a trend rule mining method, an abnormal sample feature set of pumping wells was obtained and a fault determination model was constructed. This solved the problem of unmeasurable state parameters in pumping well fault detection and improved the accuracy and stability of fault determination.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA PETROLEUM & CHEMICAL CORP
- Filing Date
- 2022-08-22
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies for detecting faults in pumping wells have limitations due to the unmeasurable state parameters in the equations of motion, which affects the accuracy of fault diagnosis.
A trend rule-based mining method is adopted. By acquiring the feature set of abnormal samples from pumping wells, the data is discretized using a dynamic sliding window and a differential strategy. A trend rule-based fault determination model is constructed to extract fault-related attributes and rules.
It improves the accuracy of pumping well fault diagnosis, reduces the influence of noise in historical data, and enhances the stability and accuracy of the fault diagnosis model.
Smart Images

Figure CN117667555B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of dynamic monitoring technology for oil well production, and particularly relates to a method for determining the faults of pumping wells based on trend rule mining. Background Technology
[0002] Mechanical oil recovery is currently the most commonly used extraction method in oilfields. Among the key pieces of equipment in this process, the reliability of pumping units plays a crucial role in oilfield production. In practice, as the operating time of pumping units increases, mechanical wear, corrosion, or other factors can cause malfunctions, affecting the pumping process and hindering oilfield production efficiency. Therefore, it is essential for technicians to promptly diagnose pumping unit malfunctions to provide technical support for production recovery and ensuring output.
[0003] To effectively address the problems of fault detection in traditional pumping unit wells, technicians have made numerous attempts. For example, in the article "Exploring Fault Judgment and Handling Measures for Pumping Unit Wells (Author: Zeng Qingguo, Source: China Petroleum & Petrochemical, 2017, No. 02)," technicians attempted to analyze common faults in pumping unit wells using dynamometer diagrams and pressure quenching diagnostics, and proposed solutions based on specific fault types, thereby helping to ensure the safe and stable operation of pumping unit wells.
[0004] However, the inventors discovered that existing technologies, including the aforementioned solutions, typically employ pumping unit well motion equations and analyze their operational status based on these equations. However, these motion equations often contain unmeasurable state parameters, thus limiting the effectiveness of these techniques. Summary of the Invention
[0005] This invention provides a method for determining pumping unit well faults based on trend rule mining. This method, by mining trend rules in pumping unit well data, offers a new approach to fault diagnosis. It aims to start with large amounts of complex pumping unit well data, expressing the data associations of highly correlated real-time data in a simple and direct trend rule manner; and by integrating dynamic sliding window and data differencing techniques, it extracts trend rules for pumping unit well faults, ultimately improving the accuracy of fault determination.
[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0007] A method for determining pumping unit well faults based on trend rule mining includes the following steps:
[0008] Step A: Obtain the feature set of abnormal samples from pumping unit wells;
[0009] Step B: Discretize the feature set of abnormal samples from pumping wells using a dynamic sliding window and a differential strategy;
[0010] Step C: Construct a fault determination model for pumping wells based on trend rule mining.
[0011] Preferably, step A can be specifically described as follows:
[0012] Basic data and alarm data of pumping wells are extracted from the basic database and alarm database of pumping wells, respectively. The alarm data and the basic data of faulty wells are mapped to the same data source to extract the faulty well number and alarm time data. Based on the faulty well number and alarm time, the real-time data of faulty wells are extracted from the real-time database of oil wells and positive and negative samples are marked to form the pumping well abnormal sample feature set F.
[0013] Preferably, step B specifically includes:
[0014] Step b(1): For the anomaly sample feature set of pumping wells Single feature , to obtain features Continuous and unchanging time Add it to the features Continuous invariant time set middle;
[0015] Step b(2): For features Continuous invariant time set The time in Features are obtained by averaging. Mean constant time Add it to the average continuous invariant time set middle.
[0016] More preferably, step B further includes:
[0017] Step b(3): Repeat steps b(1)-b(2) to traverse the anomaly sample feature set of the pumping well. Obtain feature set Average constant time set Take time set The minimum value in the range is used as the minimum average constant time t for the abnormal sample of the pumping well.
[0018] More preferably, step B further includes:
[0019] Step b(4): Using the minimum interval length t as the sliding window length, the continuous anomaly sample set of pumping wells is discretized using a difference operation to obtain the data change trend and form an anomaly discrete trend sample set of pumping wells. .
[0020] Preferably, step C specifically includes:
[0021] Step c(1): Scan the sample set of abnormal discrete trends in pumping wells Obtain the trend item of each feature in the sample set. The support S is used to filter out those with support less than the minimum support. The characteristic trend terms yield frequent one-item sets. and will frequently 1 item set All feature trend items are sorted in descending order of support and placed into the pumping well fault diagnosis feature table H. Each row in the table represents a frequent item of a pumping well fault diagnosis feature and has a pointer to its corresponding node in the FP tree.
[0022] Step c(2): Scan the sample set of abnormal discrete trends of pumping wells again. For each data item, remove the non-frequent 1-itemset. The characteristic trend terms in the data are extracted and sorted in descending order of support to obtain a descending-ordered set of discrete trend samples of abnormal trends in pumping wells. ;
[0023] Step c(3): Scan the sample set of abnormal discrete trends of descending pumping wells. Using "Null" as the root node, nodes are inserted into the tree in descending order of support to construct an FP-tree. The abnormal operating condition feature trend item nodes at the top of the sort are ancestor nodes, and those at the bottom are descendant nodes. At the same time, each abnormal operating condition feature trend item node is updated. If there is a shared ancestor, the support of the corresponding shared ancestor node is incremented by 1. If a new node appears after insertion, the corresponding node in the pumping unit well fault diagnosis feature table H will be linked to the new node through the node linked list. The abnormal discrete sample set of pumping unit wells is traversed according to the above principles. Then we obtain the FP-tree;
[0024] Step c(4): Select the bottommost abnormal operating condition characteristic trend item in the pumping unit well fault diagnosis characteristic table H. Data mining was performed to identify trend items characteristic of this abnormal operating condition. As the FP subtree of leaf node m, the path is divided according to the leaf node. The count of all nodes on a single path is set as the count of leaf node m. If different paths pass through a common ancestor node, the ancestor node count is recorded as the sum of the counts of leaf nodes on different paths. The characteristic trend item count table J of leaf node m is extracted.
[0025] Step c(5): Delete the support in the feature trend count table J of leaf node m. At minimum support For each data item, associate the characteristic trend item corresponding to leaf node m with each item in the characteristic trend item count table J to construct a frequent 2-itemset. Associate the frequent 2-itemset with the characteristic trend items in the characteristic trend item count table J to construct a frequent 3-itemset. Recursively associate these items to construct the maximum frequent K-itemset of the characteristic trend item corresponding to leaf node m. Delete the abnormal operating condition characteristic trend item from the pumping unit well fault diagnosis characteristic table H. In order to perform data mining on the next data item.
[0026] More preferably, step C further includes:
[0027] Step c(6): Repeat steps c(4)-c(5) to obtain the maximum frequent itemset for each feature trend item.
[0028] More preferably, step C further includes:
[0029] Step c (7): Combine the maximum frequent itemset and its count of each abnormal working condition feature trend item, select the optimal oil well fault judgment frequent itemset according to the preset number of feature trend items W, use the count as the time interval, use the feature trend items in the optimal oil well fault judgment frequent itemset as the judgment rule, build a pumping well fault judgment model based on trend rule mining, and realize pumping well fault prediction.
[0030] This invention provides a method for determining pumping unit well faults based on trend rule mining. This method includes at least the following steps: Step A: Obtaining anomaly sample feature sets from the pumping unit well; Step B: Discretizing the anomaly sample feature sets from the pumping unit well using a dynamic sliding window and a differential strategy; Step C: Constructing a pumping unit well fault determination model based on trend rule mining. The effective effects of this invention with the above-mentioned steps are as follows: By calculating the minimum continuous invariant time of the samples, the length of the sliding time window is dynamically determined. Combined with data differential technology, anomaly discrete sample sets from the pumping unit well are obtained, reducing the influence of noise data in the historical data of the pumping unit well and improving the stability of the trend rule mining algorithm; Using an association rule extraction method, attributes and rules related to the fault are extracted, overcoming the drawback of unmeasurable state parameters in the motion equation of the pumping unit well, and constructing a pumping unit well fault determination model based on trend rule mining, thereby improving the accuracy of the pumping unit well fault determination model. Attached Figure Description
[0031] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0032] Figure 1 This is a flowchart illustrating the method for determining pumping well faults based on trend rule mining provided by the present invention. Detailed Implementation
[0033] This invention provides a method for determining pumping unit well faults based on trend rule mining. This method, by mining trend rules in pumping unit well data, offers a new approach to fault diagnosis. It aims to start with large amounts of complex pumping unit well data, expressing the data associations of highly correlated real-time data in a simple and direct trend rule manner; and by integrating dynamic sliding window and data differencing techniques, it extracts trend rules for pumping unit well faults, ultimately improving the accuracy of fault determination.
[0034] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Example 1
[0035] This invention provides a method for determining pumping unit well faults based on trend rule mining, such as... Figure 1 As shown, the method for determining pumping well faults based on trend rule mining includes the following steps:
[0036] Step A: Obtain the feature set of abnormal samples from pumping unit wells;
[0037] Step B: Discretize the feature set of abnormal samples from pumping wells using a dynamic sliding window and a differential strategy;
[0038] Step C: Construct a fault determination model for pumping wells based on trend rule mining.
[0039] The following examples, namely, Embodiments 2, 3, and 4, will be used to further explain the specific features of steps A, B, and C in detail. Example 2
[0040] Specifically, Embodiment 2 includes all the technical features of Embodiment 1. That is, the method for determining pumping well faults based on trend rule mining includes the following steps:
[0041] Step A: Obtain the feature set of abnormal samples from pumping unit wells;
[0042] Step B: Discretize the feature set of abnormal samples from pumping wells using a dynamic sliding window and a differential strategy;
[0043] Step C: Construct a fault determination model for pumping wells based on trend rule mining.
[0044] As a preferred embodiment of the present invention, the features of step A in this embodiment two are further explained as follows.
[0045] Specifically, step A can be described as follows:
[0046] Basic data and alarm data of pumping wells are extracted from the basic database and alarm database of pumping wells, respectively. The alarm data and the basic data of faulty wells are mapped to the same data source to extract the faulty well number and alarm time data. Based on the faulty well number and alarm time, the real-time data of faulty wells are extracted from the real-time database of oil wells and positive and negative samples are marked to form the pumping well abnormal sample feature set F.
[0047] The resulting anomaly sample feature set F of the pumping well can be specifically recorded as follows: , where n is the number of features. Example 3
[0048] Specifically, Embodiment 3 includes all the technical features of Embodiment 1. That is, the method for determining pumping unit well faults based on trend rule mining includes the following steps:
[0049] Step A: Obtain the feature set of abnormal samples from pumping unit wells;
[0050] Step B: Discretize the feature set of abnormal samples from pumping wells using a dynamic sliding window and a differential strategy;
[0051] Step C: Construct a fault determination model for pumping wells based on trend rule mining.
[0052] As a preferred embodiment of the present invention, the features of step B in this embodiment three are further explained as follows.
[0053] Specifically, step B includes the following features:
[0054] Step b(1): For the anomaly sample feature set of pumping wells Single feature , to obtain features Continuous and unchanging time Add it to the features Continuous invariant time set middle.
[0055] Step b(2): For features Continuous invariant time set The time in Features are obtained by averaging. Mean constant time Add it to the average continuous invariant time set middle.
[0056] Among them, features Continuous invariant time set It can be specifically described as: .
[0057] And the average constant time Add to the average continuous invariant time set The specific formulas used in the process can be found below: .
[0058] Step b(3): Repeat steps b(1)-b(2) to traverse the anomaly sample feature set of the pumping well. Obtain feature set Average continuous invariant time set Take time set The minimum value in the range is taken as the minimum mean constant time t for the abnormal samples of the pumping unit well. This minimum mean constant time t satisfies: .
[0059] Step b(4): Using the minimum average constant time t as the sliding window length, the continuous anomaly sample set of pumping wells is discretized using a difference operation to obtain the data change trend and form an anomaly discrete trend sample set of pumping wells. .
[0060] It is worth noting that the sample set of abnormal discrete trends of pumping wells mentioned in step b(4) can be specifically described as follows: ;in, .and Anomaly sample set for oil pumping wells The number of data, Anomaly sample set for oil pumping wells The number of characteristic trend terms in an abnormal sample data, i.e., the number of features. Example 4
[0061] Specifically, Embodiment 4 includes all the technical features of Embodiment 1. That is, the method for determining pumping well faults based on trend rule mining includes the following steps:
[0062] Step A: Obtain the feature set of abnormal samples from pumping unit wells;
[0063] Step B: Discretize the feature set of abnormal samples from pumping wells using a dynamic sliding window and a differential strategy;
[0064] Step C: Construct a fault determination model for pumping wells based on trend rule mining.
[0065] As a preferred embodiment of the present invention, the features of step C are further explained in this embodiment four as follows.
[0066] Step c(1): Scan the sample set of abnormal discrete trends in pumping wells Obtain the trend item of each feature in the sample set. The support S is used to filter out those with support less than the minimum support. The characteristic trend terms yield frequent one-item sets. and will frequently 1 item set All feature trend items are sorted in descending order of support and placed into the pumping well fault diagnosis feature table H. Each row in the table represents a frequent item of a pumping well fault diagnosis feature and has a pointer to its corresponding node in the FP tree.
[0067] Among them, the sample set of abnormal discrete trends in pumping wells It can be specifically described as: ; Feature trend item It can be specifically described as: Frequent 1-itemset It can be specifically described as: , where x is the number of feature trend terms after support filtering. The pumping well fault diagnosis feature table H can be specifically described as: .
[0068] Finally, it's worth noting that the formula for calculating support S can be found below: Where C is the characteristic trend term. The number of times it appears in all the data. Anomaly sample set for oil pumping wells The number of data points.
[0069] Step c(2): Scan the sample set of abnormal discrete trends of pumping wells again. For each data item, remove the non-frequent 1-itemset. The characteristic trend terms in the data are extracted and sorted in descending order of support to obtain a descending-ordered set of discrete trend samples of abnormal trends in pumping wells. .
[0070] It is worth noting that the sample set of abnormal dispersion trends of pumping wells arranged in descending order can be specifically described as follows: ,in, .and Sample set of abnormal discrete trends in oil pumping wells The number of data, Sample set of abnormal discrete trends in oil pumping wells The number of characteristic trend terms in a single outlier sample data point. The value is not constant because of the abnormally discrete trend of the sample set of pumping wells. The number of characteristic trend terms differs for each abnormal sample data.
[0071] Step c(3): Scan the sample set of abnormal discrete trends of descending pumping wells. Using "Null" as the root node, nodes are inserted into the tree in descending order of support to construct an FP-tree. The abnormal operating condition feature trend item nodes at the top of the sort are ancestor nodes, and those at the bottom are descendant nodes. At the same time, each abnormal operating condition feature trend item node is updated. If there is a shared ancestor, the support of the corresponding shared ancestor node is incremented by 1. If a new node appears after insertion, the corresponding node in the pumping unit well fault diagnosis feature table H will be linked to the new node through the node linked list. The abnormal discrete sample set of pumping unit wells is traversed according to the above principles. Then we obtain the FP-tree;
[0072] The abnormal operating condition characteristic trend item node can be specifically described as follows: .
[0073] Step c(4): Select the bottommost abnormal operating condition characteristic trend item in the pumping unit well fault diagnosis characteristic table H. Data mining was performed to identify trend items characteristic of this abnormal operating condition. As the FP subtree of leaf node m, the path is divided according to the leaf node. The count of all nodes on a single path is set as the count of leaf node m. If different paths pass through a common ancestor node, the ancestor node count is recorded as the sum of the counts of leaf nodes on different paths. The characteristic trend item count table J of leaf node m is extracted.
[0074] The characteristic trend item count table can be specifically described as follows: .
[0075] Step c(5): Delete the support in the feature trend count table J of leaf node m. At minimum support For each data item, associate the characteristic trend item corresponding to leaf node m with each item in the characteristic trend item count table J to construct a frequent 2-itemset. Associate the frequent 2-itemset with the characteristic trend items in the characteristic trend item count table J to construct a frequent 3-itemset. Recursively associate these items to construct the maximum frequent K-itemset of the characteristic trend item corresponding to leaf node m. Delete the abnormal operating condition characteristic trend item from the pumping unit well fault diagnosis characteristic table H. In order to perform data mining on the next data item.
[0076] Step c(6): Repeat steps c(4)-c(5) to obtain the maximum frequent itemset for each feature trend item.
[0077] Step c (7): Combine the maximum frequent itemset and count of each abnormal working condition feature trend item, select the optimal frequent itemset for pumping well fault determination according to the preset number of feature trend items W, use the count as the time interval, and use the feature trend items in the optimal frequent itemset for pumping well fault determination as the determination rule, build a pumping well fault determination model based on trend rule mining, and realize pumping well fault prediction.
[0078] Thus, the method for determining pumping well faults based on trend rule mining provided by this invention has completed the entire process of determining pumping well faults.
[0079] This invention provides a method for determining pumping unit well faults based on trend rule mining. This method includes at least the following steps: Step A: Obtaining anomaly sample feature sets from the pumping unit well; Step B: Discretizing the anomaly sample feature sets from the pumping unit well using a dynamic sliding window and a differential strategy; Step C: Constructing a pumping unit well fault determination model based on trend rule mining. The effective effects of this invention with the above-mentioned steps are as follows: By calculating the minimum continuous invariant time of the samples, the length of the sliding time window is dynamically determined. Combined with data differential technology, anomaly discrete sample sets from the pumping unit well are obtained, reducing the influence of noise data in the historical data of the pumping unit well and improving the stability of the trend rule mining algorithm; Using an association rule extraction method, attributes and rules related to the fault are extracted, overcoming the drawback of unmeasurable state parameters in the motion equation of the pumping unit well, and constructing a pumping unit well fault determination model based on trend rule mining, thereby improving the accuracy of the pumping unit well fault determination model.
[0080] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for determining pumping unit well faults based on trend rule mining, characterized in that, The steps include the following: Step A: Obtain the feature set of abnormal samples from pumping unit wells; Step B: Discretize the feature set of abnormal samples from pumping wells using a dynamic sliding window and a differential strategy; Step C specifically includes: Step c(1): Scan the sample set of abnormal discrete trends in pumping wells Obtain the trend item of each feature in the sample set. The support S is used to filter out those with support less than the minimum support. The characteristic trend terms yield frequent one-item sets. and will frequently 1 item set All feature trend items are sorted in descending order of support and placed into the pumping well fault diagnosis feature table H. Each row in the table represents a frequent item of a pumping well fault diagnosis feature and has a pointer to its corresponding node in the FP tree. Step c(2): Scan the sample set of abnormal discrete trends of pumping wells again. For each data item, remove the non-frequent 1-itemset. The characteristic trend terms in the data are extracted and sorted in descending order of support to obtain a descending-ordered set of discrete trend samples of abnormal trends in pumping wells. ; Step c(3): Scan the sample set of abnormal discrete trends of descending pumping wells. Using "Null" as the root node, insert nodes into the tree in descending order of support to construct an FP-tree. The abnormal operating condition feature trend item nodes at the top of the sorted list are ancestor nodes, and those at the bottom are descendant nodes. At the same time, update each abnormal operating condition feature trend item node. If there is a shared ancestor, the support of the corresponding shared ancestor node is incremented by 1. If a new node appears after insertion, the corresponding node in the pumping well fault diagnosis feature table H will be linked to the new node through the node linked list. This process is repeated for the pumping well abnormal discrete sample set. Then we obtain the FP-tree; Step c(4): Select the bottommost abnormal operating condition characteristic trend item in the pumping unit well fault diagnosis characteristic table H. Data mining was performed to identify trend items characteristic of this abnormal operating condition. As the FP subtree of leaf node m, the path is divided according to the leaf node. The count of all nodes on a single path is set as the count of leaf node m. If different paths pass through a common ancestor node, the ancestor node count is recorded as the sum of the counts of leaf nodes on different paths. The characteristic trend item count table J of leaf node m is extracted. Step c(5): Delete the support in the feature trend count table J of leaf node m. At minimum support For each data item, associate the characteristic trend item corresponding to leaf node m with each item in the characteristic trend item count table J to construct a frequent 2-itemset. Associate the frequent 2-itemset with the characteristic trend items in the characteristic trend item count table J to construct a frequent 3-itemset. Recursively associate these items to construct the maximum frequent K-itemset of the characteristic trend item corresponding to leaf node m. Delete the abnormal operating condition characteristic trend item from the pumping unit well fault diagnosis characteristic table H. In order to perform data mining on the next data item; Step c(6): Repeat steps c(4)-c(5) to obtain the maximum frequent itemset for each feature trend item; Step c (7): Combine the maximum frequent itemset and count of each abnormal working condition feature trend item, select the optimal frequent itemset for pumping well fault determination according to the preset number of feature trend items W, use the count as the time interval, and use the feature trend items in the optimal frequent itemset for pumping well fault determination as the determination rule, build a pumping well fault determination model based on trend rule mining, and realize pumping well fault prediction.
2. The method for determining pumping well faults based on trend rule mining according to claim 1, characterized in that, Step A can be specifically described as follows: Basic data and alarm data of pumping wells are extracted from the basic database and alarm database of pumping wells, respectively. The alarm data and the basic data of faulty wells are mapped to the same data source to extract the faulty well number and alarm time data. Real-time data of faulty wells are extracted from the real-time database of oil wells based on the faulty well number and alarm time, and positive and negative samples are marked to form the pumping well abnormal sample feature set F.
3. The method for determining pumping well faults based on trend rule mining according to claim 1, characterized in that, Step B specifically includes: Step b(1): For the anomaly sample feature set of pumping wells Single feature , to obtain features Continuous and unchanging time Add it to the features Continuous invariant time set middle; Step b(2): For features Continuous invariant time set The time in Features are obtained by averaging. Mean constant time Add it to the average continuous invariant time set middle.
4. The method for determining pumping well faults based on trend rule mining according to claim 3, characterized in that, Step B specifically also includes: Step b(3): Repeat steps b(1)-b(2) to traverse the anomaly sample feature set of the pumping well. Obtain feature set Average continuous invariant time set Take time set The minimum value in the range is used as the minimum average constant time t for the abnormal sample of the pumping well.
5. The method for determining pumping well faults based on trend rule mining according to claim 4, characterized in that, Step B specifically also includes: Step b(4): Using the minimum average constant time t as the sliding window length, the continuous anomaly sample set of pumping wells is discretized using a difference operation to obtain the data change trend and form an anomaly discrete trend sample set of pumping wells. .