A well leakage accident real-time prediction method and device, electronic equipment and storage medium
By iteratively upgrading the support vector machine through simulated annealing strategy, the well leakage accident prediction model was optimized, solving the problems of delayed early warning response and high data analysis complexity in the existing technology. This enabled efficient and accurate prediction of well leakage accidents, improving the safety and efficiency of drilling operations.
Patent Information
- Application Number
- CN202411819924.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2044-12-11
AI Technical Summary
Existing technologies suffer from delayed early warning responses to well leakage accidents during drilling operations, high data analysis complexity, and lagging iterative upgrades of classification models, resulting in low prediction efficiency and insufficient accuracy.
The support vector machine is iteratively upgraded using a simulated annealing strategy. The model is optimized by randomly generating key parameters (regularization coefficient and kernel parameter), and prediction is performed by combining real-time feature data. The prediction results are corrected through a closed-loop feedback mechanism to achieve dynamic learning and updating.
It improves the accuracy and response speed of well leakage incident prediction, reduces the probability of false alarms and missed alarms, enhances the safety and efficiency of drilling operations, and has flexibility and adaptability.
Smart Images

Figure CN119807872B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a well leakage accident real-time prediction method and device, electronic equipment and storage medium. BACKGROUND
[0002] In the field of drilling operations, the traditional technical solution mainly relies on experts to make intuitive assessments based on real-time data transmitted by sensors. Such assessments not only incorporate rich drilling site experience, but also aim to identify drilling conditions and warn of potential accidents. However, despite the depth of practical wisdom embodied in this approach, its scope of application and effectiveness are subject to many limitations.
[0003] Specifically, the shortcomings of existing technical solutions mainly manifest in the following aspects:
[0004] Early warning response delay: Current early warning systems rely heavily on manual analysis and judgment, resulting in low processing efficiency and inadequate emergency response, making it difficult to achieve rapid reaction to potential risks. This delay can have serious consequences in emergency situations, even endangering personnel and equipment safety.
[0005] Increased difficulty in data analysis: As drilling operations deepen and sensor technology continues to develop, data volume grows exponentially, and data dimensions expand rapidly. This significantly increases the complexity and difficulty of manually processing and understanding data, severely affecting the accuracy and efficiency of data analysis.
[0006] Slow iteration and upgrade of classification models: Existing classification models have a significant lag in iteration and upgrade. Due to the lack of immediate integration and updating of field operation data, the overall data set cannot timely reflect the latest drilling conditions, thereby affecting the timeliness and accuracy of model iteration and updating. This results in the model performing poorly in addressing newly emerging drilling problems and potential risks. SUMMARY
[0007] The present application aims to at least partially address the limitations of related technologies. To this end, the present application proposes a well leakage accident real-time prediction method, device, electronic equipment and storage medium, which can efficiently and accurately predict well leakage accidents in real time.
[0008] In one aspect, the present application provides a well leakage accident real-time prediction method, comprising:
[0009] Obtaining a data set of drilling; the data set includes multiple sets of feature data and labeled information of whether a well leakage accident occurs under the condition of the data set;
[0010] Randomly generating key parameters in a preset interval; the key parameters include regularization coefficients and kernel parameters;
[0011] The preset support vector machine is set by the key parameters, and then the support vector machine is iteratively upgraded based on the data set by the simulated annealing strategy to obtain the target support vector machine;
[0012] Real-time characteristic data of the drilling site is acquired, and the real-time characteristic data is input into the target support vector machine to obtain a lost circulation prediction result;
[0013] In response to a checking instruction of the target object, the accuracy of the lost circulation prediction result is obtained;
[0014] The accuracy includes correctness and error, and when the accuracy is error, the lost circulation prediction result is corrected according to the checking instruction;
[0015] The real-time characteristic data and the lost circulation prediction result are associated and added to the data set, and the preset update threshold is updated based on the accuracy;
[0016] When the next prediction node is reached, the step of acquiring the real-time characteristic data of the drilling site is returned to be executed until the update threshold is less than or equal to 0, the target parameter is reset, the step of randomly generating the key parameters in the preset interval is returned to be executed, and the target support vector machine is continuously updated; the target parameter includes the update threshold.
[0017] Optionally, the preset support vector machine is set by the key parameters, and then the support vector machine is iteratively upgraded based on the data set by the simulated annealing strategy to obtain the target support vector machine, including the following steps:
[0018] The preset support vector machine is set by the key parameters, and then the support vector machine is trained by using the data set to obtain a vector machine model; the prediction accuracy of the vector machine model is obtained based on the training result of the data set;
[0019] When the prediction accuracy is greater than a target threshold, the target threshold is updated by the prediction accuracy, the prediction accuracy is taken as the historical accuracy of the next round, and the key parameters are taken as the optimal parameters and the historical parameters; otherwise, the acceptance probability of the key parameters is determined based on the prediction accuracy and the historical accuracy of the last round and the current temperature; when the acceptance probability meets a preset condition, the prediction accuracy is taken as the historical accuracy of the next round, and the key parameters are taken as the historical parameters;
[0020] The iteration number is increased by 1, the historical parameters are updated based on a preset rule, the updated result is taken as the key parameters, the step of setting the preset support vector machine by the key parameters is returned to be executed, and the iteration number reaches a number threshold;
[0021] The current temperature is attenuated based on a preset attenuation rate, the iteration number is set to 0, the step of setting the preset support vector machine by the key parameters is returned to be executed, and the current temperature reaches a temperature threshold, and the optimal parameters are output;
[0022] obtaining a target support vector machine through the optimal parameter setting support vector machine;
[0023] The target parameters include the number of iterations and the current temperature, and the initial value and the reset value of the number of iterations are both 0, and the initial value and the reset value of the current temperature are both preset maximum temperature.
[0024] Optionally, the training result includes an accident prediction result of each set of feature data in the data set; the fitness evaluation is performed based on the training result of the data set, and a prediction accuracy of the vector machine model is obtained, including the following steps:
[0025] The accident prediction result corresponding to each set of feature data in the data set is compared with the labeled information;
[0026] The number of correctly predicted samples is obtained according to the comparison result, and the prediction accuracy of the vector machine model is obtained based on the ratio of the number of samples to the total number of samples in the data set.
[0027] Optionally, based on the prediction accuracy and the historical accuracy of the last round, the acceptance probability of the key parameter is determined in combination with the current temperature, including the following steps:
[0028] An exponential value is obtained according to the ratio of the difference between the historical accuracy of the last round and the prediction accuracy to the current temperature;
[0029] The natural constant is taken as the base, the exponential value is taken as the index, and the acceptance probability of the key parameter is obtained through exponential operation based on the base and the index;
[0030] The preset condition represents whether the acceptance probability is greater than the random probability; the random probability is randomly generated in a preset range.
[0031] Optionally, the historical parameter is updated based on a preset rule, including the following steps:
[0032] The regularization coefficient is first updated according to the ratio of the product of the first random number and the number of iterations to the number threshold;
[0033] The first update represents that the regularization coefficient is the sum of the regularization coefficient and the ratio;
[0034] The kernel parameter is secondly updated according to the second random number;
[0035] The second update represents that the kernel parameter is the sum of the kernel parameter and the second random number.
[0036] Optionally, the well kick prediction result includes occurrence of well kick and non-occurrence of well kick; when the accuracy is incorrect, the well kick prediction result is corrected according to the collation instruction, including the following steps:
[0037] When the well loss prediction result is wrongly predicted as sending well loss, the well loss prediction result is corrected as no well loss occurring;
[0038] When the well loss prediction result is wrongly predicted as sending well loss, the well loss prediction result is corrected as no well loss occurring.
[0039] Optionally, the preset update threshold is attenuated based on the accuracy, including the following steps:
[0040] When the accuracy is correct, the difference between the update threshold and the first attenuation parameter is taken as the update threshold, otherwise, the difference between the update threshold and the second attenuation parameter is taken as the update threshold;
[0041] The first attenuation parameter is determined based on the inverse of the preset maximum number of failures, and the second attenuation parameter is determined based on the inverse of the preset maximum number of successes.
[0042] In another aspect, the embodiments of the present application provide a well loss accident real-time prediction device, comprising:
[0043] The first module is configured to obtain a data set of drilling; the data set comprises a plurality of feature data sets and label information indicating whether a well loss accident occurs under the condition of the data set;
[0044] The second module is configured to randomly generate key parameters in a preset interval; the key parameters include a regularization coefficient and a kernel parameter;
[0045] The third module is configured to set a preset support vector machine through the key parameters, and then iteratively upgrade the support vector machine based on the data set through a simulated annealing strategy to obtain a target support vector machine;
[0046] The fourth module is configured to obtain real-time feature data of a drilling site, and input the real-time feature data into the target support vector machine to obtain a well loss prediction result;
[0047] The fifth module is configured to obtain the accuracy of the well loss prediction result in response to a check instruction of the target object;
[0048] The accuracy includes correct and wrong; when the accuracy is wrong, the well loss prediction result is corrected according to the check instruction;
[0049] The sixth module is configured to associate and add the real-time feature data and the well loss prediction result to the data set; and attenuate the preset update threshold based on the accuracy;
[0050] The seventh module is configured to return to the step of obtaining the real-time feature data of the drilling site when reaching the next prediction node, until the update threshold is less than or equal to 0, reset the target parameter, and return to the step of randomly generating the key parameters in the preset interval to continuously update the target support vector machine; the target parameter includes the update threshold.
[0051] In another aspect, an electronic device is provided, comprising a processor and a memory; the memory is configured to store a program; the processor executes the program to implement the well kick real-time prediction method.
[0052] In another aspect, a computer storage medium is provided, wherein the computer storage medium stores a program executable by a processor, and the program executable by the processor is configured to implement the well kick real-time prediction method when executed by the processor.
[0053] The embodiment of the present application obtains a data set of drilling; the data set includes multiple sets of feature data and labeled information of whether a well kick accident occurs under the condition of the set of data; a key parameter is randomly generated in a preset interval; the key parameter includes a regularization coefficient and a kernel parameter; a preset support vector machine is set through the key parameter, and then the support vector machine is iteratively upgraded based on the data set through a simulated annealing strategy to obtain a target support vector machine; real-time feature data of a drilling site is obtained, and the real-time feature data is input into the target support vector machine to obtain a well kick prediction result; in response to a checking instruction of a target object, the accuracy of the well kick prediction result is obtained; the accuracy includes correct and error; when the accuracy is error, the well kick prediction result is corrected according to the checking instruction; the real-time feature data and the well kick prediction result are associated and added to the data set; the preset update threshold is attenuated and updated based on the accuracy; when the next prediction node is reached, the step of obtaining the real-time feature data of the drilling site is returned to be executed, until the update threshold is less than or equal to 0, the target parameter is reset, the step of randomly generating the key parameter in the preset interval is returned to be executed, and the target support vector machine is continuously updated; the target parameter includes the update threshold. The present application has the following beneficial effects:
[0054] Improve prediction accuracy: through the simulated annealing strategy to iteratively upgrade the support vector machine, and combined with real-time feature data for prediction, the well kick accident can be more accurately predicted, the probability of false positives and false negatives is reduced, and the safety and efficiency of drilling operations are improved.
[0055] Automation and intelligence: the scheme realizes the automation and intelligence of the drilling well kick prediction, reduces the manual intervention, improves the response speed, so that in the emergency, the response measures can be taken faster, and the accident risk is reduced.
[0056] Dynamic learning and updating: by continuously associating and adding the real-time feature data and the prediction result to the data set, and dynamically updating the model parameters and the update threshold based on the prediction accuracy, the support vector machine can continuously learn and adapt to the changes of the drilling site, and the timeliness of the prediction ability is maintained.
[0057] Flexibility and adaptability: The key parameters in the scheme, such as the regularization coefficient and the kernel parameter, are randomly generated within a preset interval, which increases the flexibility of the model and enables it to adapt to different drilling environments and conditions, improving the generalization ability of the prediction.
[0058] Closed-loop feedback mechanism: The prediction results are verified and corrected by the collation instructions of the target object, forming a closed-loop feedback mechanism, which helps to discover and correct prediction errors in a timely manner, further improving the prediction accuracy and reliability of the model.
[0059] In summary, the technical scheme realizes efficient and accurate prediction of drilling leakage accidents through intelligent and automated means, and has the ability of dynamic learning and adaptation, which is of great significance for improving the safety and efficiency of drilling operations. BRIEF DESCRIPTION OF DRAWINGS
[0060] The accompanying drawings are used to provide a further understanding of the technical scheme of the present application, and constitute a part of the specification, together with the embodiments of the present application, for explaining the technical scheme of the present application, and do not constitute a limitation on the technical scheme of the present application.
[0061] Figure 1 An implementation environment diagram for real-time prediction of well leakage accidents is provided for the embodiments of the present application;
[0062] Figure 2 A flowchart of a well leakage accident real-time prediction method is provided for the embodiments of the present application;
[0063] Figure 3 A schematic diagram of a support vector machine type example is provided for the embodiments of the present application;
[0064] Figure 4 An expanded flowchart of the simulated annealing strategy iterative upgrade support vector machine is provided for the embodiments of the present application;
[0065] Figure 5 An expanded flowchart of fitness evaluation is provided for the embodiments of the present application;
[0066] Figure 6 An expanded flowchart of updating historical parameters is provided for the embodiments of the present application;
[0067] Figure 7 An expanded flowchart of correcting the well leakage prediction results is provided for the embodiments of the present application;
[0068] Figure 8 An overall flowchart of the well leakage accident real-time prediction method is provided for the embodiments of the present application;
[0069] Figure 9A structural schematic diagram of a well leakage accident real-time prediction device provided by an embodiment of the present application is shown in the figure.
[0070] Figure 10 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0071] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0072] It should be noted that although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a manner different from the module division in the system or the order in the flowchart. The terms "first / S100", "second / S200", etc. in the specification and claims and the above drawings are used to distinguish similar objects and do not necessarily describe a specific order or sequence.
[0073] In the present application, the term "embodiment" means that the specific features, structures or characteristics described in combination with the embodiment can be included in at least one embodiment of the present application. The appearance of this phrase at various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment to other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in the present application can be combined with other embodiments.
[0074] It can be understood that the well leakage accident real-time prediction method provided by the embodiments of the present application can be applied to any computer device with data processing and calculation capability, and the computer device can be various terminals or servers. When the computer device in the embodiments is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms. Alternatively, the terminal is a smart phone, a tablet computer, a notebook computer, and a desktop computer, but is not limited thereto.
[0075] In order to facilitate the understanding of the technical solutions of the present application, the technical features of the present application will be explained first:
[0076] Simulated annealing algorithm is derived from solid annealing, which is a probability-based algorithm. The solid is heated to a sufficiently high temperature and then slowly cooled. When heated, the particles in the solid become disordered as the temperature rises, and the internal energy increases. When slowly cooled, the particles gradually become ordered, and at each temperature, the system reaches an equilibrium state. Simulated annealing algorithm is a general optimization algorithm. Theoretically, the algorithm has global optimization performance with probability. At present, it has been widely used in engineering, such as production scheduling, control engineering, etc.
[0077] Support Vector Machines (SVM) is a classic machine learning method, as shown in Figure 3 , including linear separable, hard interval, soft interval and linear inseparable, etc. With its excellent generalization ability and effective processing of nonlinear problems, it shows strong potential in pattern recognition, classification and regression analysis. The core idea is to build an optimal decision boundary that can clearly separate different classes of samples and has the maximum interval to enhance the prediction performance of the model on unknown data. For nonlinear problems, SVM uses kernel trick to map to high-dimensional space for effective separation. It is suitable for small to medium-sized data sets and high-dimensional feature space.
[0078] Lost circulation refers to the phenomenon that drilling fluid (commonly known as mud) accidentally flows into the formation during drilling due to geological reasons or improper technical operation. Lost circulation not only poses a pollution risk to the ecological environment, but also can cause serious consequences such as equipment damage, endangering the safety of workers, and even lead to blowout, triggering a chain reaction, and ultimately causing the drilling hole to lose function. In the early years, lost circulation prediction highly depended on the subjective judgment of technical personnel based on real-time sensor data, which required technical personnel to have deep practical experience. However, artificial judgment is inevitably influenced by subjective bias and has limitations.
[0079] As shown in Figure 1 , it is an implementation environment diagram provided by the application embodiment. Referring to Figure 1 , the implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected by wireless or wired means for network connection to complete data transmission and exchange.
[0080] The server 101 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms.
[0081] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.
[0082] Terminal 102 can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment of the invention does not impose any limitations.
[0083] Exemplary based on Figure 1 The implementation environment shown in this embodiment of the invention provides a real-time prediction method for well leakage accidents. The following description uses the application of this real-time prediction method for well leakage accidents in server 101 as an example. It can be understood that this real-time prediction method for well leakage accidents can also be applied to terminal 102.
[0084] Reference Figure 2 , Figure 2 This is a flowchart illustrating a real-time well leakage accident prediction method applied to a server, provided in an embodiment of the present invention. The executing entity of this real-time well leakage accident prediction method can be any of the aforementioned computer devices (including servers or terminals). (Refer to...) Figure 2 The method includes the following steps:
[0085] S100, Obtain the drilling data set;
[0086] The dataset includes multiple sets of feature data and annotation information indicating whether a well leakage accident has occurred under the given data conditions.
[0087] For example, in some specific embodiments, the drilling data used in this invention mainly comes from two sources: historical data and field operation data, which together constitute the data set. The initial acquisition is typically historical data.
[0088] Historical data mainly comes from publicly available data from both domestic and international sources, including multiple sets of data records collected from daily drilling reports, daily mud reports, and completion reports. Some data indicate well leakage during the drilling process, while others indicate that the drilling process was normal.
[0089] Field operation data is the first-line operation data. First, the SVM lost circulation prediction model is used to predict whether well leakage occurs in drilling. Then, it is determined whether the result is correct manually. Whether the prediction is correct or incorrect, the data will be added to the drilling data set. When the data prediction is continuously correct, the SVM lost circulation prediction model will be updated regularly according to the configuration. When the data prediction fails, if certain conditions are met, the SVM lost circulation prediction model will be updated. That is, in the subsequent prediction application process, the data set can be updated through real-time data each time.
[0090] Each group of data includes multiple characteristics such as lithology, aperture, porosity, pore pressure, fracture pressure, shear stress, gel strength, pump pressure, bit rotation speed, and primary fracture direction, and whether well leakage occurs in the case of the group of data.
[0091] S200, randomly generating key parameters in a preset interval; the key parameters include a regularization coefficient and a kernel parameter;
[0092] Exemplarily, in some specific embodiments, the key parameters of the SVM support vector machine include two parameters of a regularization coefficient C and a kernel parameter g.
[0093] The regularization coefficient C is an important hyperparameter in SVM, which determines the tolerance of the model to errors. A larger C value will result in a greater penalty for the model to misclassify, which may overfit the data. A smaller C value will result in a smaller penalty for the model to misclassify, which may underfit the data. The value of C has no fixed range, and depends on the complexity of the data set problem. In practical applications, the value of C is in the range of (0, 10 8 ].
[0094] The kernel parameter g determines the width of the Gaussian kernel function, thereby affecting the performance of the SVM model. A larger g value will result in a higher degree of fitting of the model to the data, which may overfit the data. A smaller g value will result in a lower degree of fitting of the model to the data, which may underfit the data. The value of g has no fixed range, and depends on the complexity of the data set problem. In practical applications, the value of g is in the range of (0, 10 2 ].
[0095] Through in-depth data query, in the present application, the value range of the regularization coefficient C can be (0, 100], and the value range of the kernel parameter g can be (0, 1].
[0096] The first generation of key parameters NewPara is initialized by the following formula, wherein R(0, 100) represents a random floating point number in the range of (0, 100], and R(0, 1) represents a random floating point number in the range of (0, 1).
[0097] C = R(0, 100)
[0098] g = R(0, 1)
[0099] NewPara = {C, g}
[0100] S300, set the preset support vector machine by the key parameters, and then iteratively upgrade the support vector machine based on the data set by the simulated annealing strategy to obtain a target support vector machine;
[0101] It should be noted that, in some embodiments, as shown in Figure 4 S301, set the preset support vector machine by the key parameters, and then train the support vector machine using the data set to obtain a vector machine model; perform fitness evaluation based on the training result of the data set to obtain the prediction accuracy of the vector machine model; S302, when the prediction accuracy is greater than a target threshold, update the target threshold by the prediction accuracy, take the prediction accuracy as the historical accuracy of the next round, and take the key parameters as the optimal parameters and historical parameters; otherwise, determine the acceptance probability of the key parameters based on the prediction accuracy and the historical accuracy of the last round, in combination with the current temperature; when the acceptance probability meets a preset condition, take the prediction accuracy as the historical accuracy of the next round, and take the key parameters as the historical parameters; S303, increase the iteration number by 1, update the historical parameters based on a preset rule, take the updated result as the key parameters, return to execute the step of setting the preset support vector machine by the key parameters, until the iteration number reaches a number threshold; S304, perform decay processing on the current temperature based on a preset decay rate, set the iteration number to 0, return to execute the step of setting the preset support vector machine by the key parameters, until the current temperature reaches a temperature threshold, and output the optimal parameters; S305, set the support vector machine by the optimal parameters to obtain the target support vector machine; wherein, the target parameters include the iteration number and the current temperature; the initialization and reset of the iteration number are both 0, and the initialization and reset of the current temperature are both a preset maximum temperature.
[0102] In some embodiments, the training result includes the accident prediction result of each group of feature data in the data set; as Figure 5 shown, performing fitness evaluation based on the training result of the data set to obtain the prediction accuracy of the vector machine model can include the following steps: S3011, compare the accident prediction result corresponding to each group of feature data in the data set with the labeled information; S3012, obtain the number of correctly predicted samples according to the comparison result, and obtain the prediction accuracy of the vector machine model based on the ratio of the sample number to the total number of samples in the data set.
[0103] In some embodiments, the determining the acceptance probability of the key parameter based on the prediction accuracy and the historical accuracy of the last round in combination with the current temperature can include the following steps: obtaining an exponential value according to a ratio of a difference between the prediction accuracy and the historical accuracy of the last round and the current temperature; performing an exponential operation based on a base number and the exponential value to obtain the acceptance probability of the key parameter, wherein the base number is a natural constant and the exponential value is the exponential; and wherein the preset condition represents whether the acceptance probability is greater than the random probability; and the random probability is randomly generated in the preset range.
[0104] In some embodiments, as shown in FIG. 3B, the updating the historical parameter based on the preset rule can include the following steps: S3031, performing a first update on the regularization coefficient according to a ratio of a product of the first random number and the iteration number and the number threshold; wherein the first update represents that a sum of the regularization coefficient and the ratio is taken as the regularization coefficient; and S3032, performing a second update on the kernel parameter according to the second random number; wherein the second update represents that a sum of the kernel parameter and the second random number is taken as the kernel parameter. Figure 6
[0105] In some embodiments, in order to avoid the update deviation of the parameter being too large, the first update result and the second update result can be subjected to an extreme value processing with respect to a preset extreme value point (i.e., an update range), for example, a maximum extreme value point is taken when the update result is greater than the update range, and a minimum extreme value point is taken when the update result is less than the update range.
[0106] Exemplarily, in some specific embodiments, the overall flow principle of step S300 can be implemented as follows:
[0107] Updating the SVM prediction model. According to the obtained latest data set and the key parameter NewPara of the SVM support vector machine, a well-defined SVM support vector machine model (i.e., a vector machine model) is obtained by training for the latest data set.
[0108] Calculating the prediction accuracy based on the SVM prediction model. Each array group of the latest data set is input into the SVM support vector machine model to obtain a prediction result, which is then compared with the true result. The prediction accuracy P is used as an evaluation fitness function in the present application, and the value is between [0, 1], wherein a larger score means a better model performance. The calculation formula is as follows. TrueSize represents the number of correct predictions. DataSetSize represents the number of data in the latest data set.
[0109]
[0110] In general, based on the current data set, the current NewPara is input, and the prediction accuracy P of the output result is calculated NewPara , that is, the fitness function value.
[0111] Determine whether the new parameter is better than the current parameter. If P NewPara >P BestPara , it means that the network model of NewPara performs better, and the new parameter is accepted, otherwise, it is determined whether the acceptance probability is met. Note that BestPara here represents the parameter with the best performance of the BP network model so far. Among them, P BestPara (i.e. target threshold) can be directly set to the prediction accuracy obtained by the first process, or directly set to a negative value to ensure that the iterative process can be implemented iteratively.
[0112] The new parameter is accepted. At this time, it means that a better performing parameter is found, and BestPara (i.e. the optimal parameter), P BestPara , CurrPara (i.e. historical parameter) and P CurrPara (i.e. the next round of historical accuracy) are selected. Refer to the following formula:
[0113] BestPara = NewPara
[0114] P BestPara = P NewPara
[0115] CurrPara = NewPara
[0116] P CurrPara = P NewPara
[0117] Determine whether the acceptance probability is met. That is, the parameter variable NewPara found this time does not perform as expected, and at this time, NewPara is selected according to a certain probability, and the probability formula is as follows, wherein NowTemp represents the current temperature, and gradually decreases.
[0118]
[0119] Then calculate a [0, 1] random probability r, if prob is greater than r, NewPara is received according to the probability, otherwise it is determined whether the upper limit of iteration is met.
[0120] NewPara is received according to the probability. At this time, CurrPara and P CurrPara are selected for updating, and the following formula is referred to:
[0121] CurrPara = NewPara
[0122] P CurrPara = PNewPara
[0123] It is determined whether the iteration upper limit is met. The process of updating the SVM prediction model to receive new parameters according to the probability is the innermost loop, and the iteration number is increased by one each time it is executed. If the iteration number exceeds the maximum value MaxIterCnt (i.e., the number threshold, which can be configured by default, and the default value is 100), the temperature is reduced, otherwise it is determined whether the temperature lower limit is reached.
[0124] The temperature is reduced. After the innermost loop is executed, the temperature decay is performed. NowTemp represents the current temperature, which is initialized as MaxTemp (i.e., the preset maximum temperature, which can be configured by default, and the default value is 100), and the minimum value is MinTemp (i.e., the temperature threshold, which can be configured by default, and MinTemp < MaxTemp, and the default value is 1). The decay formula is as follows:
[0125] NowTemp = DecayRate * NowTemp
[0126] Where DecayRate represents the decay rate, which is in the range of [0, 1), and can be configured by default, and the default value is 0.99.
[0127] It is determined whether the temperature lower limit is reached. The updating of the SVM prediction model to reduce the temperature is the intermediate loop, and the temperature is decayed once each time it is executed. When NowTemp ≤ MinTemp, i.e., the current temperature has reached the temperature lower limit, it means that the optimal parameter value has been found, at this time the whole simulated annealing search process is ended, and the optimal parameter of the SVM prediction model is found, otherwise, based on CurrPara, a new NewPara is generated, each parameter is executed as follows formula, to complete the new variable generation, and then return to execute the first updating of the SVM prediction model, to realize the process loop.
[0128]
[0129] NewPara C = min(100, max(0, NewPara C ))
[0130] NewPara g = CurrPara g + normal(0, 1)
[0131] NewPara g = min(1, max(0, NewPara g )).
[0132] wherein normal(0,1) represents a normal distribution with a mean of 0 and a standard deviation of 1, MaxInterCnt is the maximum number of iterations of the simulated annealing, and i represents the current ith iteration.
[0133] The optimal parameters of the SVM prediction model are found. When this step is reached, the entire simulated annealing process is completed, indicating that the optimal parameters BestPara have been obtained.
[0134] BestPara = {C, g}
[0135] Finally, the SVM prediction model is updated. In the foregoing steps, the latest data set is obtained, and the key parameters BestPara of the SVM support vector machine are determined. Facing the latest data set, the wellbore leakage prediction SVM support vector machine model (i.e., the target support vector machine) is obtained through training.
[0136] S400, obtaining real-time feature data of a drilling site, inputting the real-time feature data into the target support vector machine to predict a wellbore leakage prediction result;
[0137] Exemplarily, in some specific embodiments, first, real-time data is obtained: here, the real-time data is obtained from drilling reports, mud reports, completion reports and other materials on site, or from real-time operation data on site, and each group of data includes lithology, aperture, porosity, pore pressure, fracture pressure, shear stress, gel strength, pump pressure, bit rotation speed, and original fracture direction.
[0138] These data can be manually transcribed according to requirements, or automatically generated by a monitoring system, and based on these data, the wellbore leakage prediction SVM support vector machine model is inputted to make a real-time wellbore leakage prediction.
[0139] S500, obtaining the accuracy of the wellbore leakage prediction result in response to a checking instruction of the target object;
[0140] wherein the accuracy includes correctness and error; when the accuracy is error, the wellbore leakage prediction result is corrected according to the checking instruction;
[0141] It should be noted that the wellbore leakage prediction result includes occurrence of wellbore leakage and non-occurrence of wellbore leakage; in some embodiments, as shown in Figure 7 when the accuracy is error, the wellbore leakage prediction result is corrected according to the checking instruction, which can include the following steps: S501, when the wellbore leakage prediction result is an error prediction of sending wellbore leakage, the wellbore leakage prediction result is corrected to non-occurrence of wellbore leakage; S502, when the wellbore leakage prediction result is an error prediction of non-sending wellbore leakage, the wellbore leakage prediction result is corrected to occurrence of wellbore leakage.
[0142] Exemplarily, in some specific embodiments, based on real-time data, input to the well loss prediction SVM support vector machine model, the on-site well loss prediction is made. Then, whether the prediction result is correct can be determined in combination with artificial experience. If the prediction result is correct, the real-time data is directly added to the data set, i.e., the data set is updated. If the prediction result is incorrect, the result is modified to be correct, and then the real-time data is added to the data set, i.e., the data set is updated.
[0143] S600, the real-time feature data is associated with the well loss prediction result and added to the data set; and the preset update threshold is decayed and updated based on the accuracy;
[0144] It should be noted that, in some embodiments, the decayed and updated preset update threshold based on the accuracy can include the following steps: when the accuracy is correct, the difference between the update threshold and a first decay parameter is taken as the update threshold, otherwise, the difference between the update threshold and a second decay parameter is taken as the update threshold; wherein the first decay parameter is determined based on the inverse of the preset maximum failure number, and the second decay parameter is determined based on the inverse of the preset maximum success number.
[0145] Exemplarily, in some specific embodiments, the update threshold Delt is a default value (which can be customized and configured, and the default value is 1). The SVM model update threshold Delt indicates whether it needs to be updated. If Delt>0, it means that it does not need to be updated temporarily, otherwise it needs to be updated immediately.
[0146] Based on real-time data prediction, if the prediction fails, the Delt update formula is as follows:
[0147]
[0148] Based on real-time data prediction, if the prediction succeeds, the Delt update formula is as follows:
[0149]
[0150] Wherein, MaxFailCnt represents the maximum number of failed predictions (which can be customized and configured, and the default value is 50), and MaxSuccCnt represents the maximum number of successful predictions (which can be customized and configured, and the default value is 200, usually MaxFailCnt<MaxSuccCnt).
[0151] In general, assuming that the number of failures of the current model is FailCnt, and the number of successes is SuccCnt, if it means that the model needs to be updated.
[0152] S700, when reaching the next prediction node, return to perform the step of obtaining real-time feature data of the drilling site until the update threshold is less than or equal to 0, reset the target parameter, return to perform the step of randomly generating the key parameter in the preset interval, and continuously update the target support vector machine; the target parameter includes the update threshold.
[0153] To explain the principle of the technical scheme of the present application in detail, the overall process of the present application will be described below in conjunction with some specific embodiments. It should be easily understood that the following is an explanation of the technical principle of the present application and cannot be regarded as a limitation of the present application.
[0154] In view of the shortcomings of the prior art, the present application proposes a real-time prediction method for well leakage accidents, which improves the simulated annealing to find the optimal parameters of the SVM support vector machine, and simultaneously supports the rapid update of the classification model, so that the well leakage prediction model is more accurate and real-time, as shown in Figure 8 The method comprises the following steps:
[0155] Step 1: Obtain the latest data set. The drilling data used in this paper is mainly divided into two parts: historical data and field operation data, which together constitute the data set.
[0156] The historical data mainly comes from the public data at home and abroad, and is collected from multiple data records in daily drilling reports, daily mud reports and completion reports. Some data show that well leakage occurs during drilling, and some data show that the drilling process is normal.
[0157] The field operation data is the first-line operation data. First, the SVM well leakage prediction model is used to predict whether well leakage occurs during drilling, and then the result is determined manually. Whether the prediction is correct or incorrect, the data will be added to the drilling data set. When the data prediction is correct, the SVM well leakage prediction model will be updated regularly according to the configuration; when the data prediction fails, if certain conditions are met, the SVM well leakage prediction model will be updated.
[0158] Each set of data includes lithology, aperture, porosity, pore pressure, fracture pressure, shear stress, gel strength, pump pressure, bit rotation speed, primary fracture direction and other characteristics, and whether well leakage occurs under the condition of the data set.
[0159] It is explained here that the iterative update of the SVM well leakage prediction model and the prediction result based on the SVM well leakage prediction model are independent of each other, that is, they do not affect each other. When the iterative update of the SVM well leakage prediction model is not completed, the prediction model uses the last version of the model; when the iterative update is completed, the version update of the prediction model is triggered, and the well leakage prediction is temporarily stopped during the version update. After the update, the latest version of the model is used.
[0160] Step 2: Randomly generate new parameters. The key parameters of SVM include two parameters: the regularization coefficient C and the kernel parameter g.
[0161] Regularization coefficient C: It is an important hyperparameter in SVM, which determines the tolerance of the model to errors. A larger C value will result in a greater penalty for misclassification by the model, which may overfit the data. A smaller C value will result in a smaller penalty for misclassification by the model, which may underfit the data. The value of C has no fixed range, depending on the complexity of the data set problem. In practical applications, the value of C is in the range of (0, 10 8 ].
[0162] Kernel parameter g: It determines the width of the Gaussian kernel function, thus affecting the performance of the SVM model. A larger g value will result in a higher degree of fitting of the model to the data, which may overfit the data. A smaller g value will result in a lower degree of fitting of the model to the data, which may underfit the data. The value of g has no fixed range, depending on the complexity of the data set problem. In practical applications, the value of g is in the range of (0, 10 2 ].
[0163] Through in-depth data query, in this paper, the value range of the regularization coefficient C is (0, 100], and the value range of the kernel parameter g is (0, 1].
[0164] If Step 2 is executed for the first time (at this time CurrPara has not completed initialization), initialization is completed through the following formula, where R(0, 100) represents a random floating point number in the range of (0, 100], and R(0, 1) represents a random floating point number in the range of (0, 1).
[0165] C = R(0, 100)
[0166] g = R(0, 1)
[0167] NewPara = {C, g}
[0168] If Step 2 is executed for the second time and after, NewPara is generated based on CurrPara, and each parameter is executed through the following formula to complete the generation of a new variable. Where normal(0, 1) represents a normal distribution with a mean of 0 and a standard deviation of 1, MaxInterCnt is the maximum number of iterations of simulated annealing, and i represents the current i-th iteration.
[0169]
[0170] NewPara C = min(100, max(0, NewPara C ))
[0171] NewPara g = CurrPara g + normal(0,1)
[0172] NewPara g = min(1,max(0,NewPara g ))
[0173] The initialization of the parameter NewPara is finally completed, and step 4 is turned to.
[0174] Step 3: Update the SVM prediction model. In step 1, the latest data set is obtained; in step 2, the key parameter NewPara of the SVM support vector machine is determined. Facing the latest data set, the well leakage prediction SVM support vector machine model is obtained by training.
[0175] Step 4: Calculate the prediction accuracy based on the SVM prediction model. Traverse each array group of the latest data set, input to the SVM support vector machine model, get the prediction result, and then compare with the true result. This paper uses the prediction accuracy P as the evaluation fitness function, the value is between [0, 1], the larger the score means the better the model performance, the calculation formula is as follows.
[0176] Where TrueSize represents the number of correct predictions. DataSetSize represents the number of data in the latest data set.
[0177]
[0178] In summary, based on the current data set, the current NewPara is input, and the prediction accuracy P of the output result is calculated NewPara , that is, the fitness function value.
[0179] Step 5: New parameter is better than current parameter. If P NewPara >P BestPara , it means that the network model of NewPara performs better, and step 6 is turned to, otherwise step 7 is turned to. Note that BestPara here is the parameter with the best performance of the BP network model so far.
[0180] Step 6: Receive new parameter. At this time, it is found that the performance of the parameter is better, and BestPara, P BestPara , CurrPara and P CurrPara are selected to be updated. Refer to the following formula.
[0181] BestPara = NewPara
[0182] P BestPara = P NewPara
[0183] CurrPara = NewPara
[0184] P CurrPara = P NewPara
[0185] Step 7: Acceptance probability is met. That is, the parameter variable NewPara found this time does not perform as expected. At this time, it is selected to accept NewPara according to a certain probability, and the probability formula is as follows, where NowTemp represents the current temperature, and gradually decreases.
[0186]
[0187] Then calculate a [0, 1] random probability r, if prob is greater than r, go to step 8, otherwise go to step 9.
[0188] Step 8: Receive new parameters according to probability. At this time, it is selected to update CurrPara and P CurrPara , as follows.
[0189] CurrPara = NewPara
[0190] P CurrPara = P NewPara
[0191] Step 9: Iteration upper limit is met. Steps 2 to 8 are the innermost loop, and each time it is executed, the iteration count is incremented by one. If the iteration count exceeds the maximum value MaxIterCnt (which can be customized and configured by default 100), go to step 10, otherwise go to step 2.
[0192] Step 10: Reduce temperature. After the innermost loop is executed, the temperature is attenuated. NowTemp represents the current temperature, which is initialized to MaxTemp (which can be customized and configured by default 100), and the minimum value is MinTemp (which can be customized and configured, and MinTemp < MaxTemp by default 1). The attenuation formula is as follows:
[0193] NowTemp = DecayRate * NowTemp
[0194] Where DecayRate represents the decay rate, with a value range of [0, 1), which can be customized and configured by default 0.99.
[0195] Step 11: The temperature lower limit is reached. Steps 2 to 10 are cycles of the intermediate layer, and each time they are executed, the temperature is attenuated once. When NowTemp≤MinTemp, that is, the current temperature has reached the temperature lower limit, it means that the optimal parameter value has been found, at which time the entire simulated annealing search process ends, and step 12 is turned to, otherwise, step 2 is turned to.
[0196] Step 12: The optimal parameters of the SVM prediction model are found. When this step is reached, that is, the entire simulated annealing process is completed, it means that the optimal parameters BestPara have been obtained.
[0197] BestPara={C,g}
[0198] Step 13: Update the SVM prediction model. In step 1, the latest data set is obtained; in step 12, the key parameters BestPara of the SVM support vector machine are determined. Facing the latest data set, the well leakage prediction SVM support vector machine model is obtained by training.
[0199] At the same time, the SVM model update threshold Delt is reset to the default value (which can be customized, and the default value is 1). The SVM model update threshold Delt indicates whether it needs to be updated. If Delt>0, it means that it is not necessary to update temporarily, otherwise it needs to be updated immediately.
[0200] Step 14: Obtain real-time data. Here, the real-time data is obtained from the drilling report, mud report, completion report and other data on site, or from the monitoring system on site, which belongs to the first-line real-time operation data. Each set of data includes lithology, aperture, porosity, pore pressure, fracture pressure, shear stress, gel strength, pump pressure, bit rotation speed, and original fracture direction.
[0201] These data can be manually copied according to the needs, or automatically generated by the monitoring system. Based on these data, the well leakage prediction SVM support vector machine model is input to make on-site well leakage prediction.
[0202] Step 15: Determine the prediction accuracy based on the SVM prediction model. Based on the real-time data, the well leakage prediction SVM support vector machine model is input to make on-site well leakage prediction. Then, combined with artificial experience, it is determined whether the prediction result is correct.
[0203] Step 16: Add real-time data to the data set. If the prediction result is correct, the real-time data is directly added to the data set, that is, the data set is updated. If the prediction result is incorrect, the result is modified to be correct, and then the real-time data is added to the data set, that is, the data set is updated.
[0204] Step 17: Update the update threshold. Based on real-time data prediction, if the prediction fails, the Delt update formula is as follows:
[0205]
[0206] Based on real-time data prediction, if the prediction is successful, Delt updates the formula as follows:
[0207]
[0208] Here, MaxFailCnt represents the maximum number of failed predictions (configurable by default, 50), and MaxSuccCnt represents the maximum number of successful predictions (configurable by default, 200). Typically, MaxFailCnt... <MaxSuccCnt)。
[0209] In summary, assuming the current model has FailCnt as the number of failures and SuccCnt as the number of successes, if... This means the model needs to be updated.
[0210] Step 18: Update the SVM model. If the SVM model update threshold Delt is less than 0, the SVM model needs to be updated; proceed to step 19. Otherwise, the current model can continue to be used; proceed to step 14.
[0211] Step 19: Reset all parameters. Reset the parameters related to simulated annealing, including resetting the current temperature NowTemp to MaxTemp, resetting the inner loop iteration count to 0, etc. Proceed to Step 1.
[0212] In summary, steps 1 to 13 involve finding the optimal parameters based on the latest dataset, and then iteratively updating to obtain the optimal SVM well leakage prediction model. Steps 14 to 19 involve using real-time operational data to predict whether well leakage will occur using the SVM support vector machine model for well leakage prediction. These two processes are independent and do not affect each other. When the SVM well leakage prediction model iteration is not complete, the prediction model uses the previous version; when the iteration is complete, a version update is triggered, during which well leakage prediction is temporarily suspended, and after the update, the latest version of the model is used.
[0213] In summary, this invention proposes a real-time prediction method for well leakage accidents. By improving simulated annealing to find the optimal parameters of the SVM (Support Vector Machine), and simultaneously supporting rapid updates of the classification model, the well leakage prediction model becomes more accurate and real-time. Compared to existing technologies, this invention offers at least the following advantages:
[0214] 1) A well leakage prediction method based on SVM (Support Vector Machine) is proposed, which significantly enhances the intelligence level of accident early warning.
[0215] 2) An improved simulated annealing method was proposed to search for the optimal parameters of SVM support vector machine, which automates the network parameter tuning process and greatly improves the accuracy of early warning.
[0216] 3) Integrating field operation data to verify prediction effectiveness accelerates the iterative upgrade of the SVM well leakage prediction model, thereby ensuring the real-time update and rapid prediction capability of the SVM well leakage prediction model.
[0217] On the other hand, such as Figure 9 As shown, this embodiment of the invention provides a real-time well leakage accident prediction device 900, which may include:
[0218] The first module 901 is used to acquire the drilling data set; the data set includes multiple sets of feature data and annotation information indicating whether a well leakage accident has occurred under the condition of the data set;
[0219] The second module 902 is used to randomly generate key parameters within a preset interval; the key parameters include regularization coefficients and kernel parameters.
[0220] The third module 903 is used to set a preset support vector machine by setting key parameters, and then iteratively upgrade the support vector machine based on the data set using a simulated annealing strategy to obtain the target support vector machine.
[0221] The fourth module 904 is used to acquire real-time feature data from the drilling site and input the real-time feature data into the target support vector machine to obtain the well leakage prediction result.
[0222] The fifth module 905 is used to obtain the accuracy of the well leakage prediction results in response to the verification command of the target object;
[0223] Accuracy includes both correct and incorrect results; when the accuracy is incorrect, the well leakage prediction result is corrected according to the verification instruction.
[0224] Module 6, 906, is used to associate real-time feature data with well leakage prediction results and add them to the dataset; it also performs decay updates on the preset update threshold based on accuracy.
[0225] Module 7, 907, is used to return to the step of acquiring real-time feature data of the drilling site when the next prediction node is reached, until the update threshold is less than or equal to 0, reset the target parameters, return to the step of randomly generating key parameters in a preset range, and continuously update the target support vector machine; the target parameters include the update threshold.
[0226] The content of the method embodiments of the present invention is applicable to the device embodiments. The specific functions implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0227] On the other hand, embodiments of the present invention also provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method for predicting the bottom boundary of the hydrate stability domain. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0228] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0229] like Figure 10 As shown, Figure 10 The hardware structure of an electronic device 1000 according to another embodiment is illustrated. The electronic device 1000 includes:
[0230] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0231] The memory 1002 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1002 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 to execute the network node population optimization method of the embodiments of this invention.
[0232] Input / output interface 1003 is used to implement information input and output;
[0233] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0234] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);
[0235] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.
[0236] The electronic device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0237] The content of the method embodiments of the present invention is applicable to the embodiments of the present electronic device. The specific functions implemented by the embodiments of the present electronic device are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0238] Another aspect of this invention provides a computer-readable storage medium storing a program that is executed by a processor to implement the aforementioned method.
[0239] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD to ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, wherein computer-readable program code is carried. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0240] The content of the method embodiments of the present invention is applicable to the computer-readable storage medium embodiments. The specific functions implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0241] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.
[0242] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0243] It should be noted that although several modules for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0244] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of the present invention.
[0245] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented in this invention. Alternative embodiments are contemplated, in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.
[0246] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0247] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0248] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution means, apparatus, or device (such as a computer-based device, a processor-including device, or other means that can fetch and execute instructions from, or in conjunction with, an instruction execution means, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution means, apparatus, or device.
[0249] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0250] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution device. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0251] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0252] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0253] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.
Claims
1. A method for real-time prediction of a well kick incident, characterized in that, The method comprises the following steps: obtaining a data set of a well drilling; the data set comprises a plurality of sets of feature data and label information of whether a lost circulation accident occurs under each set of data condition; randomly generating a key parameter in a preset interval; the key parameter comprises a regularization coefficient and a kernel parameter; setting a preset support vector machine through the key parameter, and then iteratively upgrading the support vector machine based on the data set through a simulated annealing strategy to obtain a target support vector machine; obtaining real-time feature data of a well drilling site, inputting the real-time feature data into the target support vector machine to obtain a lost circulation prediction result; obtaining the accuracy of the lost circulation prediction result in response to a checking instruction of a target object; wherein the accuracy comprises correct and incorrect; when the accuracy is incorrect, the lost circulation prediction result is corrected according to the checking instruction; associating and adding the real-time feature data and the lost circulation prediction result to the data set; and updating a preset update threshold based on the accuracy; wherein updating the preset update threshold based on the accuracy comprises the following steps: when the accuracy is correct, the difference between the update threshold and a first decay parameter is taken as the update threshold, otherwise, the difference between the update threshold and a second decay parameter is taken as the update threshold; wherein the first decay parameter is determined based on the inverse of a preset maximum number of failures, and the second decay parameter is determined based on the inverse of a preset maximum number of successes; when reaching a next prediction node, returning to execute the step of obtaining real-time feature data of a well drilling site until the update threshold is less than or equal to 0, resetting a target parameter, returning to execute the step of randomly generating a key parameter in a preset interval, and continuously updating the target support vector machine; the target parameter comprises the update threshold.
2. The method of real-time prediction of loss circulation incidents according to claim 1, characterized in that, The step of setting a preset support vector machine through the key parameter, and then iteratively upgrading the support vector machine based on the data set through a simulated annealing strategy to obtain a target support vector machine comprises the following steps: setting a preset support vector machine through the key parameter, and then training the support vector machine using the data set to obtain a vector machine model; performing fitness evaluation based on the training result of the data set to obtain the prediction accuracy rate of the vector machine model; when the prediction accuracy rate is greater than a target threshold, updating the target threshold through the prediction accuracy rate, taking the prediction accuracy rate as the historical accuracy rate of the next round, and taking the key parameter as the optimal parameter and the historical parameter; otherwise, determining the acceptance probability of the key parameter based on the prediction accuracy rate and the historical accuracy rate of the last round in combination with the current temperature; when the acceptance probability meets a preset condition, taking the prediction accuracy rate as the historical accuracy rate of the next round, and taking the key parameter as the historical parameter; adding 1 to the iteration number, updating the historical parameter based on a preset rule, taking the updated result as the key parameter, and returning to execute the step of setting a preset support vector machine through the key parameter until the iteration number reaches a number threshold; The current temperature is attenuated based on a preset attenuation rate, the iteration number is set to 0, and the step of setting the preset support vector machine by the key parameter is returned to be executed until the current temperature reaches a temperature threshold, and the optimal parameter is output; The support vector machine is set by the optimal parameter to obtain the target support vector machine; The target parameter includes the iteration number and the current temperature; the initialization and reset of the iteration number are both 0, and the initialization and reset of the current temperature are both preset maximum temperatures.
3. The method of real-time prediction of loss circulation incidents according to claim 2, wherein, The training result includes the accident prediction result of each group of feature data in the data set; the fitness evaluation is performed based on the training result of the data set to obtain the prediction accuracy of the vector machine model, including the following steps: The accident prediction result corresponding to each group of feature data in the data set is compared with the labeled information; According to the comparison result, the number of correctly predicted samples is obtained, and the prediction accuracy of the vector machine model is obtained based on the ratio of the sample number to the total number of samples in the data set.
4. The method of real-time prediction of loss circulation incidents according to claim 2, wherein, The acceptance probability of the key parameter is determined based on the prediction accuracy and the historical accuracy of the last round, combined with the current temperature, including the following steps: An exponential value is obtained according to the ratio of the difference between the historical accuracy of the last round and the prediction accuracy to the current temperature; The natural constant is used as the base, the exponential value is used as the index, and the acceptance probability of the key parameter is obtained by exponential operation based on the base and the index; The preset condition represents whether the acceptance probability is greater than a random probability; the random probability is randomly generated in a preset range.
5. The real-time loss circulation incident prediction method of claim 2, wherein, The historical parameter is updated based on a preset rule, including the following steps: The regularization coefficient is first updated according to the ratio of the product of the first random number and the iteration number to the number threshold; The first update represents that the regularization coefficient is the sum of the regularization coefficient and the ratio; The kernel parameter is secondly updated according to the second random number; The second update represents that the kernel parameter is the sum of the kernel parameter and the second random number.
6. The method of real-time prediction of loss circulation incidents of claim 1, wherein, The well loss prediction result includes occurrence of well loss and non-occurrence of well loss; when the accuracy is wrong, the well loss prediction result is corrected according to the collation instruction, including the following steps: When the well loss prediction result is wrong and is predicted as the occurrence of well loss, the well loss prediction result is corrected as the non-occurrence of well loss; When the well loss prediction result is wrong and is predicted as the non-occurrence of well loss, the well loss prediction result is corrected as the occurrence of well loss.
7. A real-time prediction device for well kick incidents, characterized by, It includes: The first module is used for acquiring a data set of drilling; the data set includes multiple groups of feature data and labeled information of whether well loss accident occurs under the condition of the group of data; The second module is used for randomly generating key parameters in a preset interval; the key parameters include regularization coefficients and kernel parameters; The third module is configured to set a preset support vector machine through the key parameters, and then iteratively upgrade the support vector machine through a simulated annealing strategy based on the data set to obtain a target support vector machine. The fourth module is configured to obtain real-time characteristic data of a drilling site, input the real-time characteristic data into the target support vector machine to obtain a lost circulation prediction result. The fifth module is configured to obtain accuracy of the lost circulation prediction result in response to a checking instruction of a target object. The accuracy includes correctness and error. When the accuracy is error, the lost circulation prediction result is corrected according to the checking instruction. The sixth module is configured to associate and add the real-time characteristic data and the lost circulation prediction result to the data set, and update a preset update threshold based on the accuracy. The update of the preset update threshold based on the accuracy includes the following steps: When the accuracy is correctness, a difference between the update threshold and a first attenuation parameter is taken as the update threshold, otherwise, a difference between the update threshold and a second attenuation parameter is taken as the update threshold. The first attenuation parameter is determined based on a reciprocal of a preset maximum failure number, and the second attenuation parameter is determined based on a reciprocal of a preset maximum success number. The seventh module is configured to return to the step of obtaining the real-time characteristic data of the drilling site when a next prediction node is reached, until the update threshold is less than or equal to 0, reset a target parameter, return to the step of randomly generating the key parameters in a preset range, and continuously update the target support vector machine. The target parameter includes the update threshold.
8. An electronic device, comprising: The device includes a processor and a memory. The memory is configured to store a program. The processor executes the program to implement the method of any one of claims 1 to 6.
9. A computer storage medium having stored thereon a program that is executable by a processor, the program comprising instructions for causing the processor to perform the method of any one of claims 1-8. The program executable by the processor, when executed by the processor, is configured to implement the method of any one of claims 1 to 6.
Citation Information
Patent Citations
State evaluation method based on characteristic parameters of transformer
CN102567739A
Radar target robust identification method based on multi-domain feature fusion under short residence condition
CN114662528A