A geothermal well intelligent fault monitoring system and method based on machine learning

Through the intelligent fault monitoring system of geothermal wells based on machine learning, multi-level analysis and timing modeling are used to perform multi-level analysis and timing modeling, the problem of low monitoring and early warning efficiency and accuracy of geothermal wells in the existing technology is solved, real-time prediction and fault warning of the operating status of geothermal wells is realized, and the accuracy and early warning efficiency of monitoring are improved.

CN119782982APending Publication Date: 2025-04-08CHINA COMM GUANGHANG BUREAU FIFTH ENG CO LTD +1
View PDF 0 Cites 4 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing geothermal well monitoring system has low early warning efficiency and accuracy, making it difficult to achieve efficient early warning and timely fault diagnosis.

Method used

The intelligent fault monitoring system of geothermal wells based on machine learning is adopted, and through modules such as data acquisition, preprocessing, algorithm model construction and real-time monitoring, multi-level analysis and timing modeling are used to achieve real-time prediction and fault warning of the operating status of geothermal wells.

Benefits of technology

It improves the accuracy and early warning efficiency of geothermal well monitoring, can identify potential faults in the early stage, and reduces economic losses and safety risks caused by faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782982A_ABST
    Figure CN119782982A_ABST
Patent Text Reader

Abstract

The present invention discloses a geothermal well intelligent fault monitoring system and method based on machine learning, which obtains a preprocessed geothermal well operation history data set through sensors and data preprocessing; uses a K-means algorithm model and a Transformer algorithm model to build a geothermal well fault monitoring model, and uses the preprocessed geothermal well operation history data set to train the model to obtain a trained geothermal well fault monitoring model; uses the real-time operation data of the geothermal well collected by the sensor as the input of the model, obtains the operation state mode described in the real-time operation data of the geothermal well, and the future time-varying curve of the geothermal well operation data under the corresponding operation state mode as a prediction result; matches the prediction result with a time-varying curve based on an abnormal fault control data set, and performs a fault warning when there is a matching time-varying curve. The present invention solves the problem of low efficiency and accuracy of existing geothermal well monitoring and warning through a geothermal well intelligent fault monitoring system and method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of geothermal well monitoring, and in particular to a geothermal well intelligent fault monitoring system and method based on machine learning. Background Art

[0002] As the global demand for renewable energy continues to grow, geothermal energy, as a clean and sustainable energy source, is being used more and more widely. It can be used in a variety of ways. Low-temperature geothermal resources are suitable for winter heating, while high-temperature geothermal resources can be used for power generation. Accelerating the development and utilization of geothermal energy is of great significance for adjusting the energy structure, saving energy and reducing emissions.

[0003] The utilization of geothermal energy mainly depends on geothermal wells, which extract underground heat energy for power generation and heating. However, the long-term stable operation and safety of geothermal wells have always been one of the important challenges in the development and utilization of geothermal energy. The operation status of geothermal wells is not only affected by underground heat sources, rock formation characteristics and fluid flow in the well, but also by multiple factors such as well equipment, construction quality and external environmental changes. Therefore, real-time monitoring, fault diagnosis and safety management of geothermal wells are particularly important.

[0004] Traditional geothermal well monitoring methods usually rely on manual inspections and regular checks, which have problems such as data collection delays, poor accuracy, and strong dependence on personnel. This manually dependent monitoring mode not only has a slow response speed, but also makes it difficult to achieve efficient early warning and timely fault diagnosis. Even if some basic monitoring sensors are installed, they are usually limited to monitoring single parameters such as temperature and pressure, lacking comprehensive analysis and real-time early warning of the overall operating status of the geothermal well. This makes it impossible for many potential faults and abnormal phenomena to be effectively detected in the early stages, resulting in unstable operation of geothermal wells, equipment failures, and even serious accidents, causing huge economic losses and safety hazards.

[0005] With the rapid development of artificial intelligence and machine learning technologies, traditional geothermal well monitoring systems are gradually moving towards intelligence. Through machine learning algorithms, geothermal well monitoring can not only be analyzed in a data-driven way, but also extract patterns from historical data, predict the operating status in real time, and discover potential fault hazards in advance. Summary of the invention

[0006] In view of the above-mentioned deficiencies in the prior art, the present invention provides a geothermal well intelligent fault monitoring system and method based on machine learning, which solves the problems of low efficiency and accuracy in existing geothermal well monitoring and early warning.

[0007] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0008] On the one hand, the present invention provides a geothermal well intelligent fault monitoring system based on machine learning, including a data acquisition module, a data preprocessing module, an algorithm model module, a real-time monitoring module and a fault warning module;

[0009] The data acquisition module is used to collect geothermal well operation history data through sensors, and mark the operation status labels corresponding to the geothermal well operation history data to obtain the geothermal well operation history data set; the data acquisition module is also used to collect geothermal well operation real-time data through sensors;

[0010] The data preprocessing module is used to clean the geothermal well operation history data set through a data cleaning unit, and normalize the cleaned geothermal well operation history data through a data normalization unit to obtain the preprocessed geothermal well operation history data;

[0011] The algorithm model module is used to construct a geothermal well fault monitoring model by using a K-means algorithm model and a Transformer algorithm model, and the pre-processed geothermal well operation history data is used as the input of the geothermal well fault monitoring model for training to obtain a trained geothermal well fault monitoring model; in the trained geothermal well fault monitoring model, the K-means algorithm model is used to cluster the geothermal well operation data to analyze the operation status mode to which it belongs, and the Transformer algorithm model is used to predict the future time-varying curve of the geothermal well operation data under the corresponding operation status mode;

[0012] The real-time monitoring module is used to perform normalization processing on the real-time geothermal well operation data collected by the data collection module using the data normalization processing unit, and then perform prediction using the trained geothermal well fault monitoring model in the algorithm model module to obtain the operation state mode described in the real-time geothermal well operation data and the future time-varying curve of the geothermal well operation data under the corresponding operation state mode as the prediction result;

[0013] The fault warning module stores an abnormal fault control data set, which contains the time-varying curves of geothermal well operation data corresponding to different abnormal fault operation state modes; the fault warning module is used to compare and match the future time-varying curves of geothermal well operation data under the operation state mode of the predicted result with the abnormal fault control data set, and to issue a fault warning when it is determined that the predicted result is that there is a risk of abnormal failure.

[0014] The geothermal well intelligent fault monitoring system based on machine learning, as a preferred solution, the sensors include temperature sensors, pressure sensors, flow sensors and vibration sensors; the temperature sensor is used to collect the dynamic conditions of the heat source under the geothermal well, thereby obtaining temperature data, the pressure sensor is used to monitor the pressure state of the fluid in the geothermal well, thereby obtaining pressure data, the flow sensor is used to monitor the flow rate of the fluid in the geothermal well, thereby obtaining flow data, and the vibration sensor is used to monitor the vibration conditions of the equipment in the geothermal well and the vibration conditions of the equipment caused by earthquakes, thereby obtaining vibration data; the temperature data, pressure data, flow data and vibration data are respectively stored as different data dimensions in the geothermal well operation history data set.

[0015] The geothermal well intelligent fault monitoring system based on machine learning, as a preferred solution, the data preprocessing module includes a data cleaning unit and a data normalization processing unit;

[0016] The data cleaning unit is used to perform outlier detection on the geothermal well operation history data set using the Z-score method, calculate the degree of deviation between each data point of the temperature data, pressure data, flow data and vibration data in the geothermal well operation history data set and the mean of the corresponding data dimension, and when the mean of the data point and the corresponding data dimension exceeds a preset deviation threshold, the data point is determined to be an outlier, otherwise the data point is determined to be a normal value, thereby dividing the outlier data set and the normal value data set, and eliminating the outlier data set; the processing process of the Z-score method is:

[0017]

[0018] In the formula, Z i is the degree of deviation between the i-th data point of the corresponding data dimension in the geothermal well operation history data set and the mean of the corresponding data dimension; x i is the value of the i-th data point; μ is the mean of the corresponding data dimension in the geothermal well operation history data set; σ is the standard deviation of the corresponding data dimension in the geothermal well operation history data set;

[0019] The data normalization processing unit is used to map the normal value data set to a fixed range; the data normalization processing process is:

[0020]

[0021] Where x is the data point in the normal value data set, x' is the normalized data point, min(x) is the minimum value of the data dimension where the data point x in the normal value data set is located, and max(x) is the maximum value of the data dimension where the data point x in the normal value data set is located.

[0022] The geothermal well intelligent fault monitoring system based on machine learning, as a preferred solution, the algorithm model module includes a K-means algorithm model unit and a Transformer algorithm model unit;

[0023] The K-means algorithm model unit clusters the normalized geothermal well operation data and divides them into different clusters according to different operation states of the geothermal wells, so that the geothermal well monitoring model can identify various operation state modes of the geothermal wells;

[0024] The Transformer algorithm model unit is used to analyze the changing trend of each cluster over time through the self-attention mechanism, and capture the long-term dependencies between clusters, so as to enable the real-time monitoring module to predict the geothermal well status according to the output results of the Transformer algorithm model unit.

[0025] The geothermal well intelligent fault monitoring system based on machine learning, as a preferred solution, the processing process of the K-means algorithm model is:

[0026]

[0027] Where J is the iterative optimization objective function in the K-means algorithm, C i is the i-th cluster, x j For C i The data point, ||x j -μ i || 2 For data point x j With cluster center μ i The Euclidean distance between the centers, μ i Cluster C i The mean of the corresponding data dimension for all data points in .

[0028] The geothermal well intelligent fault monitoring system based on machine learning, as a preferred solution, the processing process of the Transformer algorithm model specifically includes the following steps:

[0029] The geothermal well operation history data set after data normalization is processed by the embedding layer as each element in the input sequence. For the elements in the sequence, the corresponding query, key, and value vectors are generated through linear transformation; then, the attention function is used to calculate the similarity between each query and all keys to obtain the attention weight, and the Softmax function is used to normalize the attention weight; finally, each value is multiplied by the corresponding attention weight, and the weighted values ​​are summed to obtain the final output.

[0030] The geothermal well intelligent fault monitoring system based on machine learning, as a preferred solution, the Transformer algorithm model processing process is:

[0031] Q i =W q ·y i ;

[0032] K i =W k ·y i ;

[0033] V i =W v ·y i ;

[0034]

[0035] In the formula, Q i , K i and V i are the i-th query vector, key vector and value vector respectively, W q ,W k ,W v are the query weight matrix, key weight matrix and value weight matrix respectively, y i is the i-th element of the input sequence, Attention(Q i ,K j ) is the attention weight between the i-th query and the j-th key, K j is the jth key vector, d k is the dimension of the key, A ij is the attention score of row i and column j, Output i For all value vectors V j The weighted sum of .

[0036] On the other hand, the present invention also provides a geothermal well intelligent fault monitoring method based on machine learning, characterized in that it includes the following steps:

[0037] S1. Collecting geothermal well operation history data through sensors, and marking operation status labels corresponding to the geothermal well operation history data to obtain geothermal well operation history data set;

[0038] S2. Cleaning the geothermal well operation history data set, and normalizing the cleaned geothermal well operation history data to obtain pre-processed geothermal well operation history data;

[0039] S3. Input the preprocessed geothermal well operation history data into the geothermal well fault monitoring model constructed by using the K-means algorithm model and the Transformer algorithm model for training, and obtain the trained geothermal well fault monitoring model; in the trained geothermal well fault monitoring model, the K-means algorithm model is used to cluster the geothermal well operation data to analyze the operation status mode to which it belongs, and the Transformer algorithm model is used to predict the future time-varying curve of the geothermal well operation data under the corresponding operation status mode;

[0040] S4, collecting real-time data of geothermal well operation through sensors, normalizing the real-time data of geothermal well operation, and predicting through the trained geothermal well fault monitoring model to obtain the operation state mode described in the real-time data of geothermal well operation and the future time-varying curve of geothermal well operation data under the corresponding operation state mode as the prediction result;

[0041] S5. Compare and match the future time-varying curve of the geothermal well operation data under the operation status mode of the predicted result with the abnormal fault control data set, and issue a fault warning when it is determined that the predicted result is that there is a risk of abnormal fault; the abnormal fault control data set contains the corresponding time-varying curves of the geothermal well operation data under different abnormal fault operation status modes.

[0042] The geothermal well intelligent fault monitoring method based on machine learning is a preferred solution. In step S3, the processing process of the K-means algorithm model is as follows:

[0043]

[0044] Where J is the iterative optimization objective function in the K-means algorithm, C i is the i-th cluster, x j For C i The data point, ||x j -μ i || 2 For data point x j With cluster center μ i The Euclidean distance between the centers, μ i Cluster C i The mean of the corresponding data dimension of all data points in ;

[0045] The Transformer algorithm model processing process is:

[0046] Q i =W q ·y i ;

[0047] K i=W k ·y i ;

[0048] V i =W v ·y i ;

[0049]

[0050] In the formula, Q i , K i and V i are the i-th query vector, key vector and value vector respectively, W q ,W k ,W v are the query weight matrix, key weight matrix and value weight matrix respectively, y i is the i-th element of the input sequence, Attention(Q i ,K j ) is the attention weight between the i-th query and the j-th key, K j is the jth key vector, d k is the dimension of the key, A ij is the attention score of row i and column j, Output i For all value vectors V j The weighted sum of .

[0051] The geothermal well intelligent fault monitoring method based on machine learning, as a preferred solution, specifically includes in step S5:

[0052] S501, using the operation state mode in the prediction result as the search object, searching for various geothermal well operation data time-varying curves corresponding to the same operation state mode in the abnormal fault comparison data set as the time-varying curve to be compared;

[0053] S502, performing similarity matching between the future time-varying curve of the geothermal well operation data under the operation state mode in the prediction result and each time-varying curve to be compared; if there is a matching time-varying curve to be compared, executing step S503; if there is no matching time-varying curve to be compared, executing step S504;

[0054] S503, determining that the prediction result is that there is an abnormal fault risk, and performing a fault warning;

[0055] S504: Determine that the prediction result does not have any abnormal failure risk and the geothermal well is in a safe operating state.

[0056] Compared with the prior art, the present invention has the following technical effects:

[0057] (1) The present invention uses the Z-score outlier detection algorithm to preprocess the collected geothermal well operation history data set to identify outliers in the geothermal well operation history data set. These outliers may cause the model to overfit or the machine to learn an erroneous pattern. The Z-score algorithm can automatically identify outliers without manual intervention, ensuring that the data used for training and real-time monitoring are accurate and reliable, thereby improving the accuracy of monitoring; at the same time, the data is mapped to a fixed range through data normalization processing, so that the data from different sensors can be comparable, avoiding the impact of dimensional differences on subsequent analysis.

[0058] (2) In data preprocessing, the present invention performs data fusion processing, fuses different types of sensor data, and forms a multi-dimensional comprehensive data set, thereby providing richer information for training the machine learning model.

[0059] (3) The present invention combines the K-means clustering algorithm with the Transformer algorithm model to perform multi-level analysis. The K-means clustering algorithm first performs cluster analysis on the geothermal well operation data to identify different operation status modes such as normal state, slightly abnormal state, and seriously abnormal state. The Transformer algorithm further mines the complex time series relationships and dependencies in these data by performing time series modeling, and predicts the future state changes of the geothermal well based on this. Indicators such as temperature, pressure, flow, and vibration may show different time series relationships under different operation status modes. The Transformer model provides more accurate predictions by deeply learning these time series changes.

[0060] (4) The fault warning module of the present invention uses the different operating state modes of the geothermal well learned by the Transformer algorithm model unit in the training phase, so that in the prediction phase, the model can predict the current state and possible future state of the geothermal well according to the real-time input data sequence, and by comparing the model predicted state with the abnormal fault control data set, it can detect the presence of anomalies in the geothermal well, thereby triggering the early warning mechanism. The fault warning module can realize the early identification and early warning of potential faults in the geothermal well, thereby improving the operating safety and reliability of the geothermal well and reducing the economic losses and safety risks caused by faults. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to make the purpose, technical solution and advantages of the invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:

[0062] Figure 1 This is a structural diagram of the geothermal well intelligent fault monitoring system based on machine learning disclosed in the present invention;

[0063] Figure 2 This is a simple core architecture diagram of the transformer of the present invention;

[0064] Figure 3 This is a flow chart of the geothermal well intelligent fault monitoring method based on machine learning disclosed in the present invention. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but only represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0066] The present invention will be further described in detail below in conjunction with the accompanying drawings.

[0067] Traditional geothermal well monitoring methods usually rely on manual inspections and regular checks, which have problems such as data collection delays, poor accuracy, and strong dependence on personnel. This manually dependent monitoring mode not only has a slow response speed, but also makes it difficult to achieve efficient early warning and timely fault diagnosis. Even if some basic monitoring sensors are installed, they are usually limited to monitoring single parameters such as temperature and pressure, lacking comprehensive analysis and real-time early warning of the overall operating status of the geothermal well. This makes it impossible for many potential faults and abnormal phenomena to be effectively detected in the early stages, resulting in unstable operation of geothermal wells, equipment failures, and even serious accidents, causing huge economic losses and safety hazards.

[0068] In response to the above problems and shortcomings, the present invention proposes a geothermal well intelligent fault monitoring system and method based on machine learning. Through the machine learning algorithm, the monitoring of geothermal wells can not only be analyzed in a data-driven manner, but also rules can be extracted from historical data, and the operating status can be predicted in real time, thereby discovering potential fault hazards.

[0069] Specifically, if Figure 1 As shown, the geothermal well intelligent fault monitoring system based on machine learning proposed in the present invention includes a data acquisition module, a data preprocessing module, an algorithm model module, a real-time monitoring module and a fault warning module;

[0070] The data acquisition module is used to collect geothermal well operation history data through sensors, and mark the operation status labels corresponding to the geothermal well operation history data to obtain the geothermal well operation history data set; the data acquisition module is also used to collect geothermal well operation real-time data through sensors;

[0071] The data preprocessing module is used to clean the geothermal well operation history data set through a data cleaning unit, and normalize the cleaned geothermal well operation history data through a data normalization unit to obtain the preprocessed geothermal well operation history data;

[0072] The algorithm model module is used to construct a geothermal well fault monitoring model by using a K-means algorithm model and a Transformer algorithm model, and the pre-processed geothermal well operation history data is used as the input of the geothermal well fault monitoring model for training to obtain a trained geothermal well fault monitoring model; in the trained geothermal well fault monitoring model, the K-means algorithm model is used to cluster the geothermal well operation data to analyze the operation status mode to which it belongs, and the Transformer algorithm model is used to predict the future time-varying curve of the geothermal well operation data under the corresponding operation status mode;

[0073] The real-time monitoring module is used to perform normalization processing on the real-time geothermal well operation data collected by the data collection module using the data normalization processing unit, and then perform prediction using the trained geothermal well fault monitoring model in the algorithm model module to obtain the operation state mode described in the real-time geothermal well operation data and the future time-varying curve of the geothermal well operation data under the corresponding operation state mode as the prediction result;

[0074] The fault warning module stores an abnormal fault control data set, which contains the time-varying curves of geothermal well operation data corresponding to different abnormal fault operation state modes; the fault warning module is used to compare and match the future time-varying curves of geothermal well operation data under the operation state mode of the predicted result with the abnormal fault control data set, and to issue a fault warning when it is determined that the predicted result is that there is a risk of abnormal failure.

[0075] The present invention realizes the monitoring of geothermal well faults through data collection and construction of a geothermal well fault monitoring model, and realizes geothermal well fault prediction using a Transformer algorithm model, thereby enabling early identification and early warning when potential faults exist in geothermal wells, thereby improving the efficiency and accuracy of the system's early warning of geothermal wells.

[0076] In the geothermal well intelligent fault monitoring system of the present invention, in a specific implementation, the sensor includes a temperature sensor, a pressure sensor, a flow sensor and a vibration sensor, which are used to obtain temperature data, pressure data, flow data and vibration data. The temperature data, pressure data, flow data and vibration data are respectively stored as different data dimensions in the geothermal well operation history data set; wherein the temperature sensor is used to collect the dynamic status of the heat source under the geothermal well, the pressure sensor is used to monitor the pressure state of the fluid in the geothermal well, the flow sensor is used to monitor the flow rate of the fluid in the geothermal well, ensure the normal transportation of the hot fluid, and judge whether there is insufficient flow or abnormal fluid circulation, and the vibration sensor is used to monitor the vibration of the equipment in the geothermal well and the vibration of the equipment caused by the earthquake, to help judge whether there is a mechanical failure or abnormality in the equipment in the well.

[0077] In the geothermal well intelligent fault monitoring system of the present invention, in a specific implementation, the data preprocessing module includes a data cleaning unit and a data normalization processing unit;

[0078] The data cleaning unit is used to perform outlier detection on the geothermal well operation history data set using the Z-score method, calculate the degree of deviation between each data point of the temperature data, pressure data, flow data and vibration data in the geothermal well operation history data set and the mean of the corresponding data dimension, and when the mean of the data point and the corresponding data dimension exceeds the deviation threshold preset as 3 standard deviations, the data point is determined to be an outlier, otherwise the data point is determined to be a normal value, thereby dividing the outlier data set and the normal value data set, and eliminating the outlier data set; the processing process of the Z-score method is:

[0079]

[0080] In the formula, Z i is the degree of deviation between the i-th data point of the corresponding data dimension in the geothermal well operation history data set and the mean of the corresponding data dimension; x i is the value of the i-th data point; μ is the mean of the corresponding data dimension in the geothermal well operation history data set; σ is the standard deviation of the corresponding data dimension in the geothermal well operation history data set;

[0081] The data normalization processing unit is used to map the normal value data set to a fixed range; the data normalization processing process is:

[0082]

[0083] Where x is the data point in the normal value data set, x' is the normalized data point, min(x) is the minimum value of the data dimension where the data point x in the normal value data set is located, and max(x) is the maximum value of the data dimension where the data point x in the normal value data set is located.

[0084] Specifically, in the data preprocessing module, the temperature T, pressure P, flow rate Q and vibration V are respectively subjected to Z-score outlier detection and data normalization processing, and the data are mapped between [0, 1] or [-1, 1], which enables data of different scales and units to be compared at the same scale; wherein, the Z-score outlier detection algorithm is used to preprocess the collected geothermal well operation history data set to identify outliers in the geothermal well operation history data set, which may cause the model to overfit or the machine to learn the wrong mode. The Z-score algorithm can automatically identify outliers without manual intervention, ensuring that the data used for training and real-time monitoring are accurate and reliable, thereby improving the accuracy of monitoring; at the same time, the data is mapped to a fixed range through data normalization processing, so that the data of different sensors can be comparable, avoiding the impact of dimensional differences on subsequent analysis.

[0085] At the same time, the present invention performs data fusion processing in data preprocessing, fuses different types of sensor data, and forms a multi-dimensional comprehensive data set, thereby providing richer information for machine learning model training. In addition, the preprocessed geothermal well operation history data set is divided into a training set and a test set in a ratio of 8:2, so that the training set is used as the input of the geothermal well fault monitoring model for model training.

[0086] In the geothermal well intelligent fault monitoring system of the present invention, in a specific implementation, the algorithm model module includes a K-means algorithm model unit and a Transformer algorithm model unit;

[0087] The K-means algorithm model unit clusters the normalized geothermal well operation data and divides them into different clusters according to different operation states of the geothermal wells, so that the geothermal well monitoring model can automatically identify various operation state modes of the geothermal wells;

[0088] The Transformer algorithm model unit is used to analyze the changing trend of each cluster over time through the self-attention mechanism, and capture the long-term dependencies between clusters, so as to enable the real-time monitoring module to predict the geothermal well status according to the output results of the Transformer algorithm model unit.

[0089] Specifically, the processing process of the K-means algorithm model is:

[0090]

[0091] Where J is the iterative optimization objective function in the K-means algorithm, C i is the i-th cluster, x j For C i The data point, ||x j -μ i || 2 For data point x j With cluster center μ i The Euclidean distance between the centers, μ i Cluster C i The mean of the corresponding data dimension for all data points in .

[0092] In this embodiment, the K-means algorithm model is first used to divide the complex data set into several clusters, each cluster representing an operating state of the geothermal well. The algorithm can automatically identify and classify the operating state patterns of the geothermal well, which is helpful for data dimensionality reduction and anomaly monitoring, thereby improving the accuracy of monitoring. At the same time, the data features learned by the K-means algorithm model can be further used in the Transformer algorithm model to enhance the accuracy of fault monitoring.

[0093] Specifically, Figure 2 As shown in the figure, the processing of the Transformer algorithm model specifically includes the following steps:

[0094] The geothermal well operation history data set after data normalization is processed by the embedding layer as each element in the input sequence. For the elements in the sequence, the corresponding query, key, and value vectors are generated through linear transformation; then, the attention function is used to calculate the similarity between each query and all keys to obtain the attention weight, and the Softmax function is used to normalize the attention weight; finally, each value is multiplied by the corresponding attention weight, and the weighted values ​​are summed to obtain the final output;

[0095] Among them, the Transformer algorithm model processing process is:

[0096] Q i =W q ·y i ;

[0097] K i =W k ·y i ;

[0098] V i =W v ·y i ;

[0099]

[0100] In the formula, Q i , K i and V i are the i-th query vector, key vector and value vector respectively, W q ,W k ,W v are the query weight matrix, key weight matrix and value weight matrix respectively, y i is the i-th element of the input sequence, Attention(Q i ,K j ) is the attention weight between the i-th query and the j-th key, K j is the jth key vector, d k is the dimension of the key, A ij is the attention score of row i and column j, Output i For all value vectors V j The weighted sum of .

[0101] In this embodiment, the Transformer algorithm further explores the complex time series relationships and dependencies in the data by performing time series modeling, and predicts the future state changes of the geothermal well based on this; indicators such as temperature, pressure, flow, and vibration may show different time series relationships under different operating state modes. The Transformer model provides more accurate predictions by deeply learning these time series changes.

[0102] In the geothermal well intelligent fault monitoring system of the present invention, the fault warning module uses multiple channels for warning notification, including text messages, emails, APP push, etc., to ensure that the fault information can be transmitted to the on-site operators in a timely manner.

[0103] The present invention also provides a geothermal well intelligent fault monitoring method based on machine learning, such as Figure 3 As shown, including:

[0104] S1. Collecting geothermal well operation history data through sensors, and marking operation status labels corresponding to the geothermal well operation history data to obtain geothermal well operation history data set;

[0105] S2. Cleaning the geothermal well operation history data set, and normalizing the cleaned geothermal well operation history data to obtain pre-processed geothermal well operation history data;

[0106] S3. Input the preprocessed geothermal well operation history data into the geothermal well fault monitoring model constructed by using the K-means algorithm model and the Transformer algorithm model for training, and obtain the trained geothermal well fault monitoring model; in the trained geothermal well fault monitoring model, the K-means algorithm model is used to cluster the geothermal well operation data to analyze the operation status mode to which it belongs, and the Transformer algorithm model is used to predict the future time-varying curve of the geothermal well operation data under the corresponding operation status mode;

[0107] S4, collecting real-time data of geothermal well operation through sensors, normalizing the real-time data of geothermal well operation, and predicting through the trained geothermal well fault monitoring model to obtain the operation state mode described in the real-time data of geothermal well operation and the future time-varying curve of geothermal well operation data under the corresponding operation state mode as the prediction result;

[0108] S5. Compare and match the future time-varying curve of the geothermal well operation data under the operation status mode of the predicted result with the abnormal fault control data set, and issue a fault warning when it is determined that the predicted result is that there is a risk of abnormal fault; the abnormal fault control data set contains the corresponding time-varying curves of the geothermal well operation data under different abnormal fault operation status modes.

[0109] Accordingly, in the geothermal well intelligent fault monitoring method of the present invention, in specific implementation, in step S3, the processing process of the K-means algorithm model is:

[0110]

[0111]

[0112] Where J is the iterative optimization objective function in the K-means algorithm, C i is the i-th cluster, x j For C i The data point, ||x j -μ i || 2 For data point x j With cluster center μ i The Euclidean distance between the centers, μ i Cluster C i The mean of the corresponding data dimension of all data points in ;

[0113] The Transformer algorithm model processing process is:

[0114] Q i =W q ·y i ;

[0115] K i =W k ·y i ;

[0116] V i =W v ·y i ;

[0117]

[0118] In the formula, Q i , K i and V i are the i-th query vector, key vector and value vector respectively, W q ,W k ,W v are the query weight matrix, key weight matrix and value weight matrix respectively, y i is the i-th element of the input sequence, Attention(Q i ,K j ) is the attention weight between the i-th query and the j-th key, K j is the jth key vector, d k is the dimension of the key, A ij is the attention score of row i and column j, Output i For all value vectors V j The weighted sum of .

[0119] In the specific implementation, step S5 specifically includes:

[0120] S501, using the operation state mode in the prediction result as the search object, searching for various geothermal well operation data time-varying curves corresponding to the same operation state mode in the abnormal fault comparison data set as the time-varying curve to be compared;

[0121] S502, performing similarity matching between the future time-varying curve of the geothermal well operation data under the operation state mode in the prediction result and each time-varying curve to be compared; if there is a matching time-varying curve to be compared, executing step S503; if there is no matching time-varying curve to be compared, executing step S504;

[0122] S503, determining that the prediction result is that there is an abnormal fault risk, and performing a fault warning;

[0123] S504: Determine that the prediction result does not have any abnormal failure risk and the geothermal well is in a safe operating state.

[0124] The similarity curve matching is a commonly used technology in the field, which is used to determine whether two curves are similar enough to indicate that the similar curves have the same operating state mode. In specific application implementation, a variety of algorithms can be used to achieve similarity curve matching, such as dynamic time warping (DTW) algorithm, Euclidean distance, cosine similarity, etc.

[0125] In summary, the present invention solves the problem of low efficiency and accuracy of existing geothermal well monitoring and early warning. The Z-score outlier detection algorithm is used to pre-process the collected geothermal well operation history data set to identify outliers in the geothermal well operation history data set. These outliers can cause the model to overfit or the machine to learn the wrong mode. The Z-score algorithm can automatically identify outliers without manual intervention, ensuring that the data used for training and real-time monitoring are accurate and reliable, thereby improving the accuracy of monitoring; at the same time, the data is mapped to a fixed range through data normalization processing, so that the data of different sensors can be comparable, avoiding the impact of dimensional differences on subsequent analysis.

[0126] In the data preprocessing, the present invention performs data fusion processing, fuses different types of sensor data to form a multi-dimensional comprehensive data set, thereby providing richer information for machine learning model training.

[0127] The present invention combines the K-means clustering algorithm with the Transformer algorithm model for multi-level analysis. The K-means clustering algorithm first performs cluster analysis on the geothermal well operation data to identify different operation status modes such as normal state, slightly abnormal state, and seriously abnormal state. The Transformer algorithm further mines the complex time series relationships and dependencies in these data by performing time series modeling, and predicts the future state changes of the geothermal well based on this. Indicators such as temperature, pressure, flow, and vibration may show different time series relationships under different operation status modes. The Transformer model provides more accurate predictions by deeply learning these time series changes.

[0128] The fault warning module of the present invention utilizes the characteristics of the normal state and abnormal state of the geothermal well learned by the Transformer algorithm model unit in the training phase, so that in the prediction phase, the current state and possible future state of the geothermal well can be predicted by the model according to the real-time input data sequence, and by comparing the model predicted state with the abnormal fault control data set, the geothermal well can be detected to have an abnormality, thereby triggering the early warning mechanism. The fault warning module can realize the early identification and early warning of potential faults in the geothermal well, thereby improving the operational safety and reliability of the geothermal well and reducing the economic losses and safety risks caused by faults.

[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described with reference to the preferred embodiments of the present invention, it should be understood by those skilled in the art that various changes may be made in form and details without departing from the spirit and scope of the present invention as defined in the appended claims.

Claims

1. A geothermal well intelligent fault monitoring system based on machine learning, characterized in that: It includes data acquisition module, data preprocessing module, algorithm model module, real-time monitoring module and fault warning module; The data acquisition module is used to collect geothermal well operation history data through sensors, and mark the operation status labels corresponding to the geothermal well operation history data to obtain the geothermal well operation history data set; the data acquisition module is also used to collect geothermal well operation real-time data through sensors; The data preprocessing module is used to clean the geothermal well operation history data set through a data cleaning unit, and normalize the cleaned geothermal well operation history data through a data normalization unit to obtain the preprocessed geothermal well operation history data; The algorithm model module is used to construct a geothermal well fault monitoring model by using a K-means algorithm model and a Transformer algorithm model, and the pre-processed geothermal well operation history data is used as the input of the geothermal well fault monitoring model for training to obtain a trained geothermal well fault monitoring model; in the trained geothermal well fault monitoring model, the K-means algorithm model is used to cluster the geothermal well operation data to analyze the operation status mode to which it belongs, and the Transformer algorithm model is used to predict the future time-varying curve of the geothermal well operation data under the corresponding operation status mode; The real-time monitoring module is used to perform normalization processing on the real-time geothermal well operation data collected by the data collection module using the data normalization processing unit, and then perform prediction using the trained geothermal well fault monitoring model in the algorithm model module to obtain the operation state mode described in the real-time geothermal well operation data and the future time-varying curve of the geothermal well operation data under the corresponding operation state mode as the prediction result; The fault warning module stores an abnormal fault comparison data set, which includes a time-varying curve of geothermal well operation data corresponding to different abnormal fault operation state modes; The fault warning module is used to compare and match the future time-varying curve of the geothermal well operation data under the operation status mode of the predicted result with the abnormal fault control data set, and to issue a fault warning when it is determined that the predicted result has an abnormal fault risk.

2. The machine learning-based geothermal well intelligent fault monitoring system according to claim 1, characterized in that: The sensors include a temperature sensor, a pressure sensor, a flow sensor and a vibration sensor; the temperature sensor is used to collect the dynamic conditions of the heat source in the geothermal well, thereby obtaining temperature data, the pressure sensor is used to monitor the pressure state of the fluid in the geothermal well, thereby obtaining pressure data, the flow sensor is used to monitor the flow rate of the fluid in the geothermal well, thereby obtaining flow data, and the vibration sensor is used to monitor the vibration conditions of the equipment in the geothermal well and the vibration conditions of the equipment caused by earthquakes, thereby obtaining vibration data; the temperature data, pressure data, flow data and vibration data are respectively stored as different data dimensions in the geothermal well operation history data set.

3. The geothermal well intelligent fault monitoring system based on machine learning according to claim 2 is characterized in that: The data preprocessing module includes a data cleaning unit and a data normalization processing unit; The data cleaning unit is used to perform outlier detection on the geothermal well operation history data set using the Z-score method, calculate the degree of deviation between each data point of the temperature data, pressure data, flow data and vibration data in the geothermal well operation history data set and the mean of the corresponding data dimension, and when the mean of the data point and the corresponding data dimension exceeds a preset deviation threshold, the data point is determined to be an outlier, otherwise the data point is determined to be a normal value, thereby dividing the outlier data set and the normal value data set, and eliminating the outlier data set; the processing process of the Z-score method is: In the formula, Z i is the degree of deviation between the i-th data point of the corresponding data dimension in the geothermal well operation history data set and the mean of the corresponding data dimension; x i is the value of the i-th data point; μ is the mean of the corresponding data dimension in the geothermal well operation history data set; σ is the standard deviation of the corresponding data dimension in the geothermal well operation history data set; The data normalization processing unit is used to map the normal value data set to a fixed range; the data normalization processing process is: Where x is the data point in the normal value data set, x' is the normalized data point, min(x) is the minimum value of the data dimension where the data point x in the normal value data set is located, and max(x) is the maximum value of the data dimension where the data point x in the normal value data set is located.

4. The machine learning-based geothermal well intelligent fault monitoring system according to claim 3 is characterized in that: The algorithm model module includes a K-means algorithm model unit and a Transformer algorithm model unit; The K-means algorithm model unit clusters the normalized geothermal well operation data and divides them into different clusters according to different operation states of the geothermal wells, so that the geothermal well monitoring model can identify various operation state modes of the geothermal wells; The Transformer algorithm model unit is used to analyze the changing trend of each cluster over time through the self-attention mechanism, and capture the long-term dependencies between clusters, so as to enable the real-time monitoring module to predict the state of the geothermal well according to the output results of the Transformer algorithm model unit.

5. The machine learning-based geothermal well intelligent fault monitoring system according to claim 4 is characterized in that: The processing process of the K-means algorithm model is: Where J is the iterative optimization objective function in the K-means algorithm, C i is the i-th cluster, x j For C i The data point, ||x j -μ i || 2 For data point x j With cluster center μ i The Euclidean distance between the centers, μ i Cluster C i The mean of the corresponding data dimension for all data points in .

6. The machine learning-based geothermal well intelligent fault monitoring system according to claim 4, characterized in that: The processing process of the Transformer algorithm model specifically includes the following steps: The geothermal well operation history data set after data normalization is processed by the embedding layer as each element in the input sequence. For each element in the sequence, the corresponding query, key, and value vectors are generated through linear transformation; Then, the attention function is used to calculate the similarity between each query and all keys to obtain the attention weight, and the Softmax function is used to normalize the attention weight; finally, each value is multiplied by the corresponding attention weight, and the weighted values ​​are summed to obtain the final output.

7. The machine learning-based geothermal well intelligent fault monitoring system according to claim 6, characterized in that: The Transformer algorithm model processing process is: Q i =W q ·y i ; K i =W k ·y i ; V i =W v ·y i ; In the formula, Q i , K i and V i are the i-th query vector, key vector and value vector respectively, W q ,W k ,W v are the query weight matrix, key weight matrix and value weight matrix respectively, y i is the i-th element of the input sequence, Attention(Q i ,K j ) is the attention weight between the i-th query and the j-th key, K j is the jth key vector, d k is the dimension of the key, A ij is the attention score of row i and column j, Output i For all value vectors V j The weighted sum of .

8. A geothermal well intelligent fault monitoring method based on machine learning, characterized in that: The steps include: S1. Collecting geothermal well operation history data through sensors, and marking operation status labels corresponding to the geothermal well operation history data to obtain geothermal well operation history data set; S2. Cleaning the geothermal well operation history data set, and normalizing the cleaned geothermal well operation history data to obtain pre-processed geothermal well operation history data; S3. Input the preprocessed geothermal well operation history data into the geothermal well fault monitoring model constructed by using the K-means algorithm model and the Transformer algorithm model for training, and obtain the trained geothermal well fault monitoring model; in the trained geothermal well fault monitoring model, the K-means algorithm model is used to cluster the geothermal well operation data to analyze the operation status mode to which it belongs, and the Transformer algorithm model is used to predict the future time-varying curve of the geothermal well operation data under the corresponding operation status mode; S4, collecting real-time data of geothermal well operation through sensors, normalizing the real-time data of geothermal well operation, and predicting through the trained geothermal well fault monitoring model to obtain the operation state mode described in the real-time data of geothermal well operation and the future time-varying curve of geothermal well operation data under the corresponding operation state mode as the prediction result; S5, comparing and matching the future time-varying curve of the geothermal well operation data under the operation status mode of the prediction result with the abnormal fault control data set, and performing a fault warning when it is determined that the prediction result has an abnormal fault risk; The abnormal fault comparison data set includes time-varying curves of geothermal well operation data corresponding to different abnormal fault operation state modes.

9. The method for intelligent fault monitoring of geothermal wells based on machine learning according to claim 8, characterized in that: In step S3, the processing process of the K-means algorithm model is: Where J is the iterative optimization objective function in the K-means algorithm, C i is the i-th cluster, x j For C i The data point, ||x j -μ i || 2 For data point x j With cluster center μ i The Euclidean distance between the centers, μ i Cluster C i The mean of the corresponding data dimension of all data points in ; The Transformer algorithm model processing process is: Q i =W q ·y i ; K i =W k ·y i ; V i =W v ·y i ; In the formula, Q i , K i and V i are the i-th query vector, key vector and value vector respectively, W q ,W k ,W v are the query weight matrix, key weight matrix and value weight matrix respectively, y i is the i-th element of the input sequence, Attention(Q i ,K j ) is the attention weight between the i-th query and the j-th key, K j is the jth key vector, d k is the dimension of the key, A ij is the attention score of row i and column j, Output i For all value vectors V j The weighted sum of .

10. The method for intelligent fault monitoring of geothermal wells based on machine learning according to claim 8, characterized in that: Step S5 specifically includes: S501, using the operation state mode in the prediction result as the search object, searching for various geothermal well operation data time-varying curves corresponding to the same operation state mode in the abnormal fault comparison data set as the time-varying curve to be compared; S502, performing similarity matching between the future time-varying curve of the geothermal well operation data under the operation state mode in the prediction result and each time-varying curve to be compared; if there is a matching time-varying curve to be compared, executing step S503; if there is no matching time-varying curve to be compared, executing step S504; S503, determining that the prediction result is that there is an abnormal fault risk, and performing a fault warning; S504: Determine that the prediction result does not have any abnormal failure risk and the geothermal well is in a safe operating state.

Citation Information

Cited By

  • Geothermal well operation state intelligent monitoring and fault diagnosis system and method

    CN120429796A

  • A geothermal well operating status intelligent monitoring and fault diagnosis system and method

    CN120429796B

  • Geothermal well temperature sequence prediction method

    CN120561891A

  • Deep learning based long-term performance prediction and health diagnosis method for energy shaft

    CN122508384A