Well logging curve completion method and system

By fine-tuning the large language model and building the RAG model, and combining the XGBoost model to optimize the feature engineering configuration file, the problem of low feature engineering efficiency in well logging curve completion is solved, and more efficient and accurate feature engineering processing is achieved to adapt to the rapidly changing geology Conditions and data characteristics.

CN119475979APending Publication Date: 2025-02-18NINGBO DIGITAL TWIN (EASTERN UNIV OF TECH) RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411510403.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The prior art ignores feature engineering in well logging curve completion, resulting in poor model performance, especially under complex geological conditions, and feature engineering is time-consuming and labor-intensive, making it difficult to adapt to rapidly changing geological conditions and data characteristics.

Method used

By fine-tuning the large language model, a feature engineering configuration file for well logging curve-related data is generated, and a RAG model is built for continuous optimization. Use the XGBoost model to predict configuration file scores and feature importance, and deposit RAG models to optimize large language models and improve feature engineering efficiency.

Benefits of technology

It improves the efficiency and accuracy of feature engineering during the completion of the logging curve, can quickly adapt to changes in geological conditions and data characteristics, and improves the prediction performance and generalization capabilities of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475979A_ABST
    Figure CN119475979A_ABST
Patent Text Reader

Abstract

The invention provides a logging curve completion method and system, and the method comprises the steps: carrying out the initial fine tuning of a large language model, generating a configuration file through the large language model, generating a corresponding feature engineering realization function for the configuration file, and introducing the related data of a logging curve through an external path. According to the method, function execution is realized to perform feature engineering processing on related data of a logging curve, at the moment, residual distribution and feature correlation of each sample feature in feature engineering can be analyzed, and an XGBoost model can predict configuration files with different scores and feature importance of each sample feature; in this way, configuration files with different scores, residual distribution, feature correlation and feature importance can be stored in the RAG model, so that the RAG model can continuously optimize a large language model, the accuracy and efficiency of generating the configuration files by the large language model are continuously improved, the efficiency of feature engineering during well logging curve completion is continuously improved, and the well logging curve completion efficiency is improved. Therefore, the method adapts to rapidly changing geological conditions and data characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of geological engineering technology, and in particular to a well logging curve completion method and system. Background Art

[0002] In geological engineering, the quality and accuracy of logging interpretation work depends largely on rich and comprehensive logging raw data, which provide geological engineers and petroleum engineers with the basis for analyzing underground geological structures and reservoir characteristics. However, in actual logging operations, due to various factors such as equipment failure, environmental conditions, time and cost constraints, some measurement data are often missing. This incomplete data seriously affects the subsequent analysis of underground geological structures and reservoir characteristics.

[0003] To solve this problem, the industry generally uses machine learning methods to complete missing measurement data. This method uses known measurement data as input and trains models to predict and reconstruct missing data points. However, the direct correlation between the original variables of well logging is usually low, which poses a challenge to the direct application of machine learning models. In this case, feature engineering becomes a key preprocessing step. The purpose of feature engineering is to construct a large number of new and highly correlated features from known original features. These features can better capture the potential relationship between data, thereby improving the predictive performance of machine learning models. For example, different original data can be combined through ratios, products or other mathematical transformations to generate more relevant data.

[0004] However, in current technical solutions, many studies and applications often ignore this important feature engineering step. They tend to use raw data directly for machine learning modeling, which may lead to poor model performance, especially when dealing with complex geological conditions. The lack of feature engineering not only limits the prediction accuracy of the model, but also may reduce the generalization ability of the model, making it difficult to adapt to data completion tasks under different oil fields or geological conditions. However, feature engineering often requires a lot of expertise and trial and error. Traditional methods rely on experienced geological engineers and data scientists to manually design and select features, which is not only time-consuming and labor-intensive, but also difficult to adapt to rapidly changing geological conditions and data characteristics. Summary of the invention

[0005] The technical problem to be solved by the present invention is that, in order to overcome the defects of the above-mentioned prior art, the present invention provides a method and system for well logging curve completion, which improves the efficiency of feature engineering when completing well logging curves to adapt to rapidly changing geological conditions and data characteristics.

[0006] The present invention provides a well logging curve completion method, comprising the following steps:

[0007] S1. Fine-tune the large language model, generate a configuration file for feature engineering of well logging curve related data through the fine-tuned large language model, and build a RAG model at the same time. The RAG model is used to continuously optimize the large language model;

[0008] S2. Constructing a feature engineering implementation function according to the configuration file, and performing feature engineering processing on the logging curve related data through the implementation function, analyzing the residual distribution and feature correlation of each sample feature in the feature engineering, and randomly dividing the logging curve related data processed by feature engineering into a training set and a test set;

[0009] S3, build the XGBoost model, and train the XGBoost model using the training set;

[0010] S4. Evaluate the performance of the XGBoost model using the test set.

[0011] S5. The evaluated XGBoost model is used to predict the score of the profile and the feature importance of each sample feature, and the profile, residual distribution, feature correlation, and feature importance are stored in the RAG model to continuously optimize the large language model.

[0012] Compared with the prior art, the present application has the following advantages: after the initial fine-tuning of the large language model, the large language model can generate a configuration file, and a corresponding feature engineering implementation function can be generated for the configuration file, and then the logging curve related data is introduced through an external path, so that the implementation function is executed to perform feature engineering processing on the logging curve related data. At this time, the residual distribution and feature correlation of each sample feature in the feature engineering can be analyzed, and the XGBoost model can predict the configuration files with different scores and the feature importance of each sample feature. In this way, the configuration files with different scores, the residual distribution, feature correlation and feature importance can be stored in the RAG model, so that the RAG model can continuously optimize the large language model, and the accuracy and efficiency of the configuration file generated by the large language model are continuously improved, thereby continuously improving the efficiency of feature engineering when completing the logging curve to adapt to rapidly changing geological conditions and data characteristics.

[0013] In a possible implementation, fine-tuning the large language model in step S1 includes the following steps:

[0014] S11. Select a pre-trained large language model and build a large language model training set, where the large language model training set includes a well logging curve completion problem database;

[0015] S12, initializing the parameters of the large language model through the LoRA method;

[0016] S13. Train a large language model using a large language model training set and fine-tune using the LoRA method

[0017] Large language model parameters enable the large language model to generate configuration files.

[0018] Compared with the existing technology, the above-mentioned LoRA method is used to adjust the parameters of the large language model to improve efficiency. The traditional full-parameter fine-tuning method needs to adjust all parameters of the large language model, which usually requires a lot of computing resources and time. The LoRA method greatly improves the efficiency of fine-tuning by adjusting only a small part of the model parameters, that is, the low-rank matrix, which means that the fine-tuning of the large language model can be completed in a shorter time and with less computing resources. The LoRA method simulates the effect of full-parameter fine-tuning by introducing a low-rank matrix to achieve rapid adaptation without sacrificing performance. Due to the saving of computing resources, the LoRA method can significantly reduce costs in practical applications, which is especially important for application scenarios with limited resources or frequent model updates. In addition, the LoRA method allows the model to quickly adapt to new tasks and can more easily fine-tune the model according to new data or needs to meet the ever-changing and rapidly changing geological conditions and data characteristics.

[0019] In a possible implementation, the configuration file in step S1 is a JSON file, and the configuration file includes the following keys: a ratio feature of the specified data, a statistical feature of the specified data within a sliding window, a feature of normalizing the value of the specified data by dividing it by the well depth, a feature of applying a logarithmic transformation to the specified data, a feature of applying an exponential transformation to the specified data, a feature of applying a trigonometric function transformation to the specified data, a feature of discretizing a continuous variable into a specified number of boxes, a cumulative sum feature of the specified data, a differential feature of the specified data, a gradient feature of the specified data relative to the depth, and a global statistical feature of the specified data.

[0020] Compared with the prior art, the above-mentioned JSON file as a configuration file can have higher readability. The JSON file stores data in the form of key-value pairs, with a clear structure and is easy to read and understand. This is very helpful for developers or system administrators when manually editing or reviewing configuration files; and the JSON file format is simple and clear, and it is easy to write a large language model. At the same time, it is also a lightweight data exchange format. Almost all programming languages ​​provide support for parsing and generating JSON, which makes JSON files very convenient in cross-platform and cross-language applications; and JSON files support nested objects and arrays, and can represent complex data structures, which enables JSON files to store and organize complex configuration information, such as hierarchical settings or objects with multiple attributes; because the structure of the JSON file is flexible, it is easy to add new configuration items or modify existing configuration items. This flexibility enables JSON files to adapt to changing needs; in addition, JSON files use plain text format and do not contain any binary data or complex format tags, so the file size is relatively small. This helps to reduce network transmission time and increase file loading speed.

[0021] In one possible implementation, the RAG model and the well logging curve completion problem database include the following data: explanation of the meaning of well logging data, description of the feature engineering toolkit calling method, explanation of the meaning of feature engineering tool functions, feature engineering toolkit source code, problem optimization target description, configuration file, residual distribution, feature correlation and feature importance.

[0022] Compared with the existing technology, the above technical solution can effectively fine-tune the large language model, improve the efficiency and accuracy of the feature engineering configuration file of the large language model to generate well logging curve related data, and enable the large language model to quickly adapt to changes in geological conditions and data characteristics. At the same time, it can help the large language model to better generalize to unseen data.

[0023] In a possible implementation, constructing a feature engineering implementation function according to the configuration file in step S2 includes the following steps:

[0024] S21, construct corresponding functions according to the key, including calculating the ratio characteristic function of the specified data, calculating the specified number

[0025] The functions include calculating the statistical characteristic function of the specified data within the sliding window, calculating the normalized characteristic function by dividing the value of the specified data by the well depth, calculating the characteristic function of applying logarithmic transformation to the specified data, calculating the characteristic function of applying exponential transformation to the specified data, calculating the characteristic function of applying trigonometric function transformation to the specified data, calculating the characteristic function of discretizing continuous variables into a specified number of boxes, calculating the cumulative sum characteristic function of the specified data, calculating the differential characteristic function of the specified data, calculating the gradient characteristic function of the specified data relative to the depth, and calculating the global statistical characteristic function of the specified data.

[0026] Compared with the prior art, the above technical solution can effectively perform feature engineering on the logging curve related data, and facilitate the analysis of the residual distribution and feature correlation of each sample feature in each feature engineering.

[0027] In a possible implementation, step S4 includes the following steps:

[0028] S41. Input the test set to the XGBoost model so that XGBoost can

[0029] Output the score of the profile and the feature importance of each sample feature;

[0030] S42. Evaluate the performance of the XGBoost model by calculating the root mean square difference, mean square error, mean absolute error, and coefficient of determination between the score and the feature importance and the true value.

[0031] Compared with the existing technology, the above-mentioned evaluation indicators are derived based on mathematical statistics, have clear mathematical meanings and calculation formulas, are easy to understand and calculate, and are dimensionless, which facilitates direct comparison. Compared with other complex evaluation methods, these four indicators are not sensitive. They can capture the subtle differences in the prediction process, thereby reflecting the pros and cons of the model. In addition, these four indicators are well applicable to different types of data, such as continuous data, discrete data, etc. By analyzing the changing trends of these evaluation indicators, we can understand the performance of the XGBoost model in different situations and effectively evaluate the performance of the XGBoost model.

[0032] In a possible implementation, step S5 further includes the following steps:

[0033] S51. Visualize the residual distribution, feature correlation, and performance of the XGBoost model.

[0034] Compared with the existing technology, the above technical solution can be more readable and is very helpful in manual analysis.

[0035] In a possible implementation, in step S51, residual distribution, feature correlation, and performance of the XGBoost model are visualized by drawing a residual distribution graph, a feature correlation ranking graph, and a predicted value and true value comparison graph.

[0036] Compared with the existing technology, among the above three visualization methods, the residual distribution diagram can intuitively show the distribution of the difference between the model prediction value and the actual value, thereby helping to evaluate the fitting quality of the model; by observing whether the residuals are distributed around the zero line and whether the distribution is uniform, it can be judged whether the model has systematic deviations or heteroscedasticity problems; if there are recognizable patterns in the residual distribution diagram, such as curves or periodic distributions, it may mean that the model fails to capture certain nonlinear relationships in the data, which is helpful for further improvement; the residual distribution diagram can help identify outliers and influence points in the data, which may have a greater impact on the model parameter estimation. The feature correlation sorting diagram can intuitively show which features have the greatest impact on the model prediction results by sorting and visualizing the correlation between features, which helps to understand the key factors and provide effective guidance for feature engineering; by analyzing the feature correlation sorting diagram, features with less contribution can be identified, so that features can be deleted or replaced, which helps to simplify the structure and improve performance and prediction speed; and the feature correlation sorting diagram can be used as an explanatory tool to help users understand how the model predicts based on the input features. The comparison chart of predicted values ​​and true values ​​can intuitively show the degree of agreement between the model prediction results and the actual observation results. By observing whether the points in the comparison chart are closely clustered on a straight line, the prediction accuracy of the model can be judged. If there is an obvious deviation or inconsistent trend between the predicted value and the true value, the comparison chart can intuitively reveal these problems, which helps to timely discover and correct the deviation of the model in the prediction process and improve the prediction accuracy of the model. By analyzing the comparison chart of predicted values ​​and true values, the performance differences of the model when predicting different data points can be found, which helps to guide the direction of model improvement.

[0037] The present invention also provides a well logging curve completion system, which is applied to the above-mentioned well logging curve completion method, including: a large language model module, which is used to generate a configuration file of feature engineering related to well logging curve data; a RAG model module, which is used to continuously optimize the large language model; a feature engineering construction module, which is used to construct an implementation function of feature engineering according to the configuration file, and execute the implementation function to perform feature engineering processing on the data related to the well logging curve; an XGBoost model module, which is used to predict the score of the configuration file and the feature importance of the data related to the well logging curve; an evaluation module, which is used to evaluate the feature importance, residual distribution, feature correlation and score of the configuration file of the data related to the well logging curve; the large language model module is connected to the RAG model module and the feature engineering construction module, the feature engineering construction module is also connected to the XGBoost model module, the RAG model module is also connected to the evaluation module, and the evaluation module is also connected to the XGBoost model module and the feature engineering construction module. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a schematic diagram of the process of the present invention;

[0039] Figure 2 It is a schematic diagram of the system of the present invention;

[0040] Figure 3 A schematic diagram of a logging curve completion effect in an embodiment;

[0041] Figure 4 Another schematic diagram of the well logging curve completion effect in the embodiment;

[0042] Figure 5 Schematic diagram of the evaluation of the coefficients during the continuous optimization of the large language model. DETAILED DESCRIPTION

[0043] First, those skilled in the art should understand that these implementations are only used to explain the technical principles of the embodiments of the present application, and are not intended to limit the protection scope of the embodiments of the present application. Those skilled in the art can make adjustments to them as needed to adapt to specific application scenarios.

[0044] In the description of the embodiments of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific circumstances.

[0045] The present application is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0046] As attached Figure 1 As shown, the embodiment of the present application discloses a method for completing a well logging curve, comprising the following steps:

[0047] S1. Fine-tune the large language model, generate a configuration file for feature engineering of well logging curve related data through the fine-tuned large language model, and build a RAG model at the same time. The RAG model is used to continuously optimize the large language model;

[0048] S2. Constructing a feature engineering implementation function according to the configuration file, and performing feature engineering processing on the logging curve related data through the implementation function, analyzing the residual distribution and feature correlation of each sample feature in the feature engineering, and randomly dividing the logging curve related data processed by feature engineering into a training set and a test set;

[0049] S3, build the XGBoost model, and train the XGBoost model using the training set;

[0050] S4. Evaluate the performance of the XGBoost model using the test set.

[0051] S5. The evaluated XGBoost model is used to predict the score of the profile and the feature importance of each sample feature, and the profile, residual distribution, feature correlation, and feature importance are stored in the RAG model to continuously optimize the large language model.

[0052] Among them, the large language model uses Meta's Llama3.1. Since various large language models are in use in countries around the world, such as Meta's Llama, OpenAI's GPT, Google's BERT, Baidu's ERNIE, Tencent's HUBERT, and Alibaba's Qwen, each large language model has its own strengths and weaknesses, and is constantly being updated and iterated over time, so the choice of large language models can be flexibly adjusted according to actual conditions. After building the XGBoost model, it needs to be initialized, including initializing the learning rate, the maximum tree depth, and the subsampling ratio. The output of the XGBoost model is the score of the configuration file and the feature importance of each sample feature. The performance of the XGBoost model can be evaluated through five-fold cross validation. Among them, the XGBoost model predicts that the configuration file with the best score is the configuration file that needs to be used, and the best configuration file can be saved through an additional storage mechanism; the above-mentioned logging curve-related data can be introduced through config.json. In step S5, the XGBoost model is used to predict the profiles of different scores and the feature importance of each sample feature, and the profiles of different scores, residual distribution, feature correlation and feature importance are stored in the RAG model to continuously optimize the large language model; since different profiles will construct different implementation functions and thus form different feature engineering, the residual distribution and feature correlation of each sample feature in each feature engineering are also different, and these need to be stored in the RAG model again to continuously optimize the large language model.

[0053] Fine-tuning the large language model in step S1 includes the following steps:

[0054] S11. Select a pre-trained large language model and build a large language model training set, where the large language model training set includes a well logging curve completion problem database;

[0055] S12, initializing the parameters of the large language model through the LoRA method;

[0056] S13. Train the large language model using the large language model training set, and fine-tune the large language model parameters using the LoRA method, so that the large language model can generate a configuration file.

[0057] Specifically, for the above training of the large language model, first of all, it is necessary to clarify the specific scope and requirements of the well logging curve completion problem, the level of detail of the information in the required configuration file and the format of the answer. These need to be prepared in the well logging curve completion problem database, including input examples and output examples. In the above fine-tuning process, you can pay attention to the performance indicators of the model, such as accuracy, recall rate, etc., to ensure that the model performs well in generating configuration files. After the large language model generates an answer, post-processing and verification can be performed, including checking whether the grammar, spelling and punctuation of the answer are correct, and verifying whether the content of the answer is closely related to the question and accurate. Through post-processing and verification, the quality and credibility of the answer can be further improved. In this embodiment, the LoRA method is used to adjust the parameters of the large language model to improve efficiency. The traditional full-parameter fine-tuning method needs to adjust all parameters of the large language model, which usually requires a lot of computing resources and time. The LoRA method greatly improves the efficiency of fine-tuning by adjusting only a small part of the model parameters, that is, the low-rank matrix, which means that the fine-tuning of the large language model can be completed in a shorter time and with fewer computing resources; and the LoRA method simulates the effect of full-parameter fine-tuning by introducing a low-rank matrix to achieve rapid adaptation without sacrificing performance. Due to the saving of computing resources, the LoRA method can significantly reduce costs in practical applications, which is particularly important for application scenarios with limited resources or that require frequent model updates; in addition, the LoRA method allows the model to quickly adapt to new tasks, and can more easily fine-tune the model according to new data or needs to meet the ever-changing and rapidly changing geological conditions and data characteristics.

[0058] The configuration file in step S1 is a JSON file, and the configuration file includes the following keys: a ratio feature of the specified data, a statistical feature of the specified data within a sliding window, a feature of normalizing the value of the specified data by dividing it by the well depth, a feature of applying a logarithmic transformation to the specified data, a feature of applying an exponential transformation to the specified data, a feature of applying a trigonometric function transformation to the specified data, a feature of discretizing continuous variables into a specified number of boxes, a cumulative sum feature of the specified data, a differential feature of the specified data, a gradient feature of the specified data relative to the depth, and a global statistical feature of the specified data.

[0059] Specifically, in this embodiment, the key names corresponding to the above keys can be: ratio_features, rolling_statistics, depth_normalized_features, log_transform, exponential_features, trigonometric_features, binning_features, cumulative_features, difference_features, depth_gradient_features and global statics. Each key represents a feature engineering method, and each method is a nested JSON object that can include the following fields: "enabled": Boolean value, indicating whether the method is enabled; "columns": string array, specifying the column name to which the method is to be applied. Some of these methods may have additional configuration options, such as:

[0060] "rolling_statistics" contains "windows" and "functions" arrays; "binning_features" has "n_bins" to specify the number of bins. JSON files can be highly readable as configuration files. JSON files store data in the form of key-value pairs, with a clear structure, easy to read and understand. This is very helpful for developers or system administrators when manually editing or reviewing configuration files; and the JSON file format is simple and clear, easy to write large language models, and it is also a lightweight data exchange format. Almost all programming languages ​​provide support for parsing and generating JSON, which makes JSON files very convenient in cross-platform and cross-language applications; and JSON files support nested objects and arrays, and can represent complex data structures, which enables JSON files to store and organize complex configuration information, such as hierarchical settings or objects with multiple properties; because the structure of JSON files is flexible, it is easy to add new configuration items or modify existing configuration items. This flexibility allows JSON files to adapt to changing needs; in addition, JSON files are in plain text format and do not contain any binary data or complex format tags, so the file size is relatively small. This helps reduce network transfer time and increases file loading speed.

[0061] The RAG model and the database of well logging curve completion problems include the following data: explanation of the meaning of well logging data, description of the calling method of feature engineering toolkit, explanation of the meaning of feature engineering tool functions, source code of feature engineering toolkit, description of problem optimization goals, configuration files, residual distribution, feature correlation and feature importance. This can effectively fine-tune the large language model, improve the efficiency and accuracy of the configuration files of feature engineering for generating well logging curve related data by the large language model, and enable the large language model to quickly adapt to changes in geological conditions and data characteristics, while helping the large language model to better generalize to unseen data.

[0062] In step S2, the implementation function of constructing feature engineering according to the configuration file includes the following steps:

[0063] S21. Construct corresponding functions according to the key, including calculating the ratio characteristic function of the specified data, calculating the statistical characteristic function of the specified data in the sliding window, calculating the normalized characteristic function of the value of the specified data divided by the well depth, calculating the characteristic function of applying logarithmic transformation to the specified data, calculating the characteristic function of applying exponential transformation to the specified data, calculating the characteristic function of applying trigonometric function transformation to the specified data, calculating the characteristic function of discretizing continuous variables into a specified number of boxes, calculating the cumulative sum characteristic function of the specified data, calculating the differential characteristic function of the specified data, calculating the gradient characteristic function of the specified data relative to the depth, and calculating the global statistical characteristic function of the specified data.

[0064] Since each key in the configuration file represents a feature engineering method, the corresponding function is constructed according to the key, which effectively performs feature engineering on the logging curve related data, and facilitates the analysis of the residual distribution and feature correlation of each sample feature in each feature engineering. The above functions can be implemented in various programming languages, and those skilled in the art can flexibly adjust them according to actual conditions.

[0065] Step S4 specifically includes the following steps:

[0066] S41, inputting a test set into the XGBoost model, so that XGBoost outputs the score of the configuration file and the feature importance of each sample feature according to the test set;

[0067] S42. Evaluate the performance of the XGBoost model by calculating the root mean square difference, mean square error, mean absolute error, and coefficient of determination between the score and the feature importance and the true value.

[0068] The above test set can be manually scored and feature importance analyzed. The above root mean square error, mean square error, mean absolute error and coefficient of determination, namely RMSE, MSE, MAE and R 2These evaluation indicators are derived based on mathematical statistics, with clear mathematical meanings and calculation formulas, easy to understand and calculate, and dimensionless, making them easy to compare directly. Compared with other complex evaluation methods, these four indicators are not sensitive, and they can capture subtle differences in the prediction process, thereby reflecting the pros and cons of the model. In addition, these four indicators are well applicable to different types of data, such as continuous data and discrete data. By analyzing the changing trends of these evaluation indicators, we can understand the performance of the XGBoost model in different situations and effectively evaluate the performance of the XGBoost model.

[0069] In this example, a well logging test was performed using CNL (Compensated Neutron Log), AC (Acoustic Log), RT (True Resistivity) of the formation not affected by drilling mud invasion, GR (Gamma Ray) gamma ray logging, TVD (True Vertical Depth), and the predicted logging density curve in units of (g / cm3). The same XGBoost training and prediction were used, and the comparison results are as follows:

[0070] R2 RMSE MSE MAE Use original features 0.765 0.054 0.003 0.053 This application method 0.834 0.044 0.002 0.045

[0071] Table 1 Prediction accuracy comparison Accuracy comparison

[0072] It can be seen that the accuracy of the method of this application is significantly improved.

[0073] In some embodiments, step S5 further includes the following steps:

[0074] S51. Visualize the residual distribution, feature correlation, and performance of the XGBoost model. This makes the data more readable and very helpful for human analysis.

[0075] In this embodiment, in step S51, residual distribution, feature correlation and performance of XGBoost model are visualized by drawing residual distribution diagram, feature correlation ranking diagram and predicted value and true value comparison diagram. Among the above three visualization methods, the residual distribution diagram can intuitively show the distribution of differences between model predicted values ​​and actual values, thereby helping to evaluate the fitting quality of the model; by observing whether the residuals are distributed around the zero line and whether the distribution is uniform, it can be judged whether the model has systematic deviations or heteroscedasticity problems; if recognizable patterns appear in the residual distribution diagram, such as curves or periodic distributions, it may mean that the model fails to capture certain nonlinear relationships in the data, which helps to further improve; the residual distribution diagram can help identify outliers and influence points in the data, which may have a greater impact on the model parameter estimation. The feature correlation sorting chart can intuitively show which features have the greatest impact on the model prediction results by sorting and visualizing the correlation between features, which helps to understand the key factors and provide effective guidance for feature engineering; by analyzing the feature correlation sorting chart, you can identify features with less contribution, so as to delete or replace features, which helps to simplify the structure and improve performance and prediction speed; and the feature correlation sorting chart can be used as an explanatory tool to help users understand how the model predicts based on the input features. The predicted value and true value comparison chart can intuitively show the degree of fit between the model prediction results and the actual observation results. By observing whether the points in the comparison chart are closely clustered on a straight line, the prediction accuracy of the model can be judged. If there is a significant deviation or inconsistent trend between the predicted value and the true value, the comparison chart can intuitively reveal these problems, which helps to timely discover and correct the deviation of the model in the prediction process and improve the prediction accuracy of the model. By analyzing the predicted value and true value comparison chart, you can find the performance difference of the model when predicting different data points, which helps to guide the improvement direction of the model.

[0076] As attached Figure 3 and attached Figure 4 As shown in the figure, by completing the logging curves of two different test wells using the above method, it can be found that the fluctuations of the predicted line and the actual line are consistent with each other and will not deviate too much. Figure 5 As shown, as the large language model is continuously optimized, the coefficient of determination R 2 The evaluation results are getting better and better, and are fluctuating stably around 0.833.

[0077] As attached Figure 2 As shown, in some embodiments, the present application further provides a well logging curve completion system, which is applied to the well logging curve completion method of the above embodiment, including:

[0078] Large language model module, used to generate configuration files for feature engineering related to well logging data;

[0079] RAG model module, used for continuous optimization of large language models;

[0080] A feature engineering construction module is used to construct an implementation function of feature engineering according to a configuration file, and execute the implementation function to perform feature engineering processing on data related to well logging curves;

[0081] XGBoost model module, used to predict the scores of profiles and the feature importance of well log related data;

[0082] An evaluation module to evaluate the feature importance, residual distribution, feature correlation and profile scores of well log related data;

[0083] The large language model module is connected to the RAG model module and the feature engineering construction module, and the feature engineering construction module is also connected to the XGBoost model module. The RAG model module is also connected to the evaluation module, and the evaluation module is also connected to the XGBoost model module and the feature engineering construction module.

[0084] In the description of the embodiments of the present application, it should be noted that in the description of the present application, terms such as "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is only for the convenience of description, and does not indicate or imply that the device or component must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present application.

[0085] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "in the present embodiment", "specific example", or "some examples" etc. means that the specific features, mechanisms, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, mechanisms, materials or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0086] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for completing a well logging curve, characterized in that: The following steps are involved: S1. Fine-tune the large language model, generate a configuration file for feature engineering of well logging curve related data through the fine-tuned large language model, and construct a RAG model at the same time, wherein the RAG model is used to continuously optimize the large language model; S2, constructing an implementation function of the feature engineering according to the configuration file, and performing feature engineering processing on the well logging curve related data through the implementation function, analyzing the residual distribution and feature correlation of each sample feature in the feature engineering, and randomly dividing the well logging curve related data processed by the feature engineering into a training set and a test set; S3, constructing an XGBoost model, and training the XGBoost model using the training set; S4. Evaluate the performance of the XGBoost model through a test set; S5. Predict the score of the configuration file and the feature importance of each sample feature through the evaluated XGBoost model, and store the configuration file, residual distribution, feature correlation and feature importance into the RAG model to continuously optimize the large language model.

2. The method for completing the well logging curve according to claim 1, characterized in that: Fine-tuning the large language model in step S1 includes the following steps: S11, selecting a pre-trained large language model and constructing a large language model training set, wherein the large language model training set includes a well logging curve completion problem database; S12, initializing the parameters of the large language model by the LoRA method; S13. Train the large language model using the large language model training set, and fine-tune the large language model parameters using the LoRA method, so that the large language model can generate the configuration file.

3. The logging curve completion method according to claim 2, characterized in that: The configuration file in step S1 is a JSON file, and the configuration file includes the following keys: a ratio feature of the specified data, a statistical feature of the specified data within a sliding window, a feature of normalizing the value of the specified data by dividing it by the well depth, a feature of applying a logarithmic transformation to the specified data, a feature of applying an exponential transformation to the specified data, a feature of applying a trigonometric function transformation to the specified data, a feature of discretizing a continuous variable into a specified number of boxes, a cumulative sum feature of the specified data, a differential feature of the specified data, a gradient feature of the specified data relative to the depth, and a global statistical feature of the specified data.

4. The method for completing the well logging curve according to claim 3, characterized in that: The RAG model and the logging curve completion problem database include the following data: explanation of the meaning of logging data, description of the feature engineering toolkit calling method, explanation of the meaning of feature engineering tool functions, feature engineering toolkit source code, problem optimization target description, configuration file, residual distribution, feature correlation and feature importance.

5. The method for completing the well logging curve according to claim 4, characterized in that: In step S2, constructing an implementation function of feature engineering according to the configuration file includes the following steps: S21. Construct corresponding functions according to the key, including calculating the ratio characteristic function of the specified data, calculating the statistical characteristic function of the specified data within the sliding window, calculating the normalized characteristic function of the value of the specified data divided by the well depth, calculating the characteristic function of applying logarithmic transformation to the specified data, calculating the characteristic function of applying exponential transformation to the specified data, calculating the characteristic function of applying trigonometric function transformation to the specified data, calculating the characteristic function of discretizing continuous variables into a specified number of boxes, calculating the cumulative sum characteristic function of the specified data, calculating the differential characteristic function of the specified data, calculating the gradient characteristic function of the specified data relative to the depth, and calculating the global statistical characteristic function of the specified data.

6. The method for completing the well logging curve according to claim 5, characterized in that: Step S4 includes the following steps: S41, inputting the test set into the XGBoost model, so that XGBoost outputs the score of the configuration file and the feature importance of each sample feature according to the test set; S42. Evaluate the performance of the XGBoost model by calculating the root mean square difference, mean square error, mean absolute error, and coefficient of determination between the score and the feature importance and the true value.

7. The method for completing the well logging curve according to claim 6, characterized in that: Step S5 also includes the following steps: S51, visually displaying the residual distribution, feature correlation, and performance of the XGBoost model.

8. The method for completing the well logging curve according to claim 7, characterized in that: In step S51, the residual distribution, feature correlation and performance of the XGBoost model are visualized by drawing a residual distribution diagram, a feature correlation ranking diagram and a predicted value and true value comparison diagram.

9. A logging curve completion system, characterized in that: The well logging curve completion method applied to any one of claims 1 to 8 comprises: A large language model module, used to generate a configuration file for feature engineering related to the well logging curve data; A RAG model module, used for continuously optimizing the large language model; A feature engineering construction module, used to construct an implementation function of feature engineering according to the configuration file, and execute the implementation function to perform feature engineering processing on the well logging curve related data; An XGBoost model module for predicting the score of the profile and the feature importance of the well log related data; An evaluation module to evaluate the feature importance, residual distribution, feature correlation and profile scores of well log related data; The large language model module is connected to the RAG model module and the feature engineering construction module, and the feature engineering construction module is also connected to the XGBoost model module, and the RAG model module is also connected to the evaluation module, and the evaluation module is also connected to the XGBoost model module and the feature engineering construction module.