Crude oil pipeline flow characteristic mining method and system, processing equipment and storage medium
By combining the large language model and symbol regression method, the crude oil pipeline flow characteristic model is constructed based on the basic symbol library, which solves the calculation complexity and ‘black box’ problems of traditional analysis methods, and realizes high-precision and high-real-time flow characteristic analysis.
Patent Information
- Application Number
- CN202411549856.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-14
AI Technical Summary
The traditional crude oil pipeline flow characteristics analysis methods have problems with time and resource consumption, computational complexity and the ‘black box’ model, resulting in insufficient accuracy, real-time and multi-factor coupled analysis.
A candidate set of the flow characteristic model of crude oil pipeline is established based on a pre-constructed basic symbol library, combined with a large language model and a symbol regression method, and the model structure is optimized through the scoring standards to obtain the optimal flow characteristic model.
The construction of flow characteristic model with high precision and real-time performance is realized, which reduces the time and cost of experimental data and model construction, improves the interpretability and reliability of the model, and enhances generalization and real-time response capabilities.
Smart Images

Figure CN119442180A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of crude oil pipeline flow characteristic analysis, and in particular to a crude oil pipeline flow characteristic mining method, system, processing equipment and storage medium. Background Art
[0002] In the oil industry, the flow characteristics of crude oil pipelines are of great significance for improving oil transportation efficiency and ensuring safe operation. The flow of crude oil in pipelines is affected by many factors, such as rheological properties, pipeline structure and operating environment. Traditionally, these characteristics are characterized by complex experiments and mathematical models, such as the Bingham model and the Herschel-Bulkley model. However, traditional methods rely on a large amount of experimental data and complex mathematical calculations, which consumes a lot of time and human resources. Traditional flow characteristic analysis methods mainly include experimental methods and numerical simulation methods. The experimental method requires a large number of experiments to establish a rheological characteristic model by collecting experimental data. This is not only time-consuming and labor-intensive, but also the model needs to be readjusted when the experimental conditions change. On the other hand, the numerical simulation method uses computational fluid dynamics (CFD) to simulate the flow of crude oil in the pipeline by numerically solving the fluid motion equations. However, this method usually requires high-performance computing resources, and the calculation process is complex and time-consuming.
[0003] With the development of big data and artificial intelligence, data-driven methods have gradually attracted attention. These methods use machine learning and data mining methods to automatically extract features and build models from a large amount of experimental data and monitoring data. Although these methods have improved computational efficiency, there are still some problems. For example, data-driven models are often "black box" models that lack in-depth understanding and interpretation of physical processes, which makes the reliability and interpretability of the models questionable. To solve these problems, researchers have proposed symbolic regression methods. Symbolic regression is a modeling method based on evolutionary algorithms that searches the mathematical expression space to find the mathematical model that best explains the data. The symbolic regression method can generate models with clear physical meanings, thereby improving the interpretability of the model. However, symbolic regression is sensitive to the noise of the input data, and the stability and accuracy of the model significantly depend on the pre-definition of the symbol pool, which to some extent limits its application.
[0004] In summary, the challenges faced by traditional methods in analyzing crude oil pipeline flow characteristics include time and resource consumption, computational complexity, and the “black box” problem, and they are insufficient in terms of accuracy, real-time, and multi-factor coupling analysis. Summary of the invention
[0005] In view of the above problems, the purpose of the present invention is to provide a crude oil pipeline flow characteristics mining method, system, processing equipment and storage medium that can solve the shortcomings in accuracy, real-time and multi-factor coupling analysis.
[0006] To achieve the above objectives, the present invention adopts the following technical solutions: In a first aspect, a method for mining flow characteristics of a crude oil pipeline is provided, comprising:
[0007] Based on the pre-built basic symbol library, combined with the large language model and symbolic regression method, a candidate set of flow characteristic characterization models of the crude oil pipeline to be tested is established;
[0008] Based on the scoring criteria for the characterization model quality, the candidate set of pipeline crude oil flow characteristic characterization models is scored, and based on the scoring results, the structure of the pipeline crude oil flow characteristic characterization model is optimized and iterated to obtain the optimal pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested.
[0009] Furthermore, the construction process of the basic symbol library is as follows:
[0010] Analyze the rheological model and extract physical quantities, symbols, and arithmetic operators;
[0011] The extracted physical quantities and symbols are integrated to form a basic symbol library.
[0012] Furthermore, based on the pre-built basic symbol library, combined with the large language model and the symbolic regression method, a candidate set of the pipeline crude oil flow characteristic characterization model of the crude oil pipeline to be tested is established, including:
[0013] Through sparse symbolic regression for constant terms, a prototype equation for characterizing flow characteristics of pipeline crude oil with constant terms is randomly generated.
[0014] The large language model is used to fit and optimize the randomly generated pipeline crude oil flow characteristic characterization equation prototype to generate the initial pipeline crude oil flow characteristic characterization equation of the crude oil pipeline to be tested;
[0015] Based on the initial pipeline crude oil flow characteristic characterization equation, a candidate set of pipeline crude oil flow characteristic characterization models for the crude oil pipeline to be tested that meets physical laws and target requirements is obtained.
[0016] Furthermore, the prototype of the pipeline crude oil flow characteristic characterization equation with constant terms is randomly generated by sparse symbolic regression for constant terms, including:
[0017] Determine symbolic regression expressions;
[0018] PDEs or ODEs are used to control equations, and the constant terms of symbolic regression expressions are optimized to form a prototype equation for characterizing the flow characteristics of pipeline crude oil with constant terms.
[0019] Furthermore, the large language model is used to fit and optimize the randomly generated pipeline crude oil flow characteristic characterization equation prototype to generate the initial pipeline crude oil flow characteristic characterization equation of the crude oil pipeline to be tested, including:
[0020] Using prompt words, the large language model is guided to randomly generate a prototype of the equation representing the flow characteristics of pipeline crude oil according to the constructed basic symbol library and problem description;
[0021] Introduce some text knowledge and field measured data to train the large language model to obtain a trained large language model;
[0022] The randomly generated prototype of the pipeline crude oil flow characteristic characterization equation is input into the trained large language model, and based on the pre-established constraints, the initial pipeline crude oil flow characteristic characterization equation of the crude oil pipeline to be tested is screened and generated.
[0023] Furthermore, the scoring criteria based on the characterization model quality are used to score the candidate set of pipeline crude oil flow characteristic characterization models, and based on the scoring results, the structure of the pipeline crude oil flow characteristic characterization model is optimized and iterated to obtain the optimal pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested, including:
[0024] Based on a predefined scoring standard, each pipeline crude oil flow characteristic characterization equation in the candidate set of pipeline crude oil flow characteristic characterization models is scored to obtain a corresponding scoring result;
[0025] Based on the scoring results, the structure of the pipeline crude oil flow characteristics characterization model is optimized and iterated to obtain the optimal pipeline crude oil flow characteristics characterization model, in which the scoring results are used as the loss function for optimization and iteration.
[0026] Furthermore, the scoring criteria are:
[0027]
[0028] Among them, S is a comprehensive evaluation index of model quality; is the normalization factor; N is the total number of parameters in the regression model; NRMSE is the normalized root mean square error; m is the number of equation terms; ζ1 is the penalty coefficient; is the output corresponding to the i-th input data point; is the output of the equation, x i is the ith input data point.
[0029] In a second aspect, a crude oil pipeline flow characteristic mining system is provided, comprising:
[0030] A candidate set building module is used to build a candidate set of a pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested based on a pre-built basic symbol library, combined with a large language model and a symbolic regression method;
[0031] The scoring module is used to score the candidate set of pipeline crude oil flow characteristic characterization models based on the scoring criteria for characterizing the quality of the model, and based on the scoring results, optimize and iterate the structure of the pipeline crude oil flow characteristic characterization model to obtain the optimal pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested.
[0032] In a third aspect, a processing device is provided, comprising computer program instructions, wherein the computer program instructions, when executed by the processing device, are used to implement the steps corresponding to the above-mentioned crude oil pipeline flow characteristics mining method.
[0033] In a fourth aspect, a computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, are used to implement the steps corresponding to the above-mentioned crude oil pipeline flow characteristics mining method.
[0034] The present invention adopts the above technical solution, which has the following advantages:
[0035] 1. Construct a high-precision, high-real-time model: The present invention constructs a characterization model that can accurately reflect the flow characteristics of crude oil pipelines by integrating multi-source information such as crude oil flow characteristics, pipeline structural parameters and operating environment, thereby providing scientific decision-making support for the safe and efficient transportation of crude oil pipelines.
[0036] 2. Reduce costs: By combining large language models and symbolic regression methods, the flow characteristic model can be extracted quickly and accurately, greatly reducing the time and cost of experimental data and model construction.
[0037] 3. Innovative application of large language model (LLM): This invention uses the powerful generation and reasoning capabilities of the large language model to combine complex physical processes such as crude oil flow and heat transfer with symbolic regression algorithms to generate a mathematical model with physical significance, ensuring the physical rationality and interpretability of the model, and helping to deeply understand the complex physical process of crude oil flow in the pipeline.
[0038] 4. Improve the interpretability and reliability of the model: The present invention introduces symbolic regression and prior physical knowledge to ensure that the model not only has high-precision prediction capabilities, but also can satisfy the laws of physics, thus overcoming the limitations of traditional data-driven models in terms of physical rationality.
[0039] 5. Enhance the generalization ability and real-time response of the model: The present invention uses actual crude oil pipeline operation data to train and optimize the model, so that it has strong generalization ability and real-time response speed, and can adapt to changes in different crude oil properties, pipeline structures and operating environments.
[0040] 6. Assist in online monitoring and optimization: The present invention provides pipeline operators with timely and accurate safety risk assessments and optimized operation suggestions, reduces the probability of pipeline flow blockages and leakage accidents, and improves the efficiency and safety of crude oil transportation.
[0041] 7. High utilization value: The model constructed by the present invention is a proxy model with high utilization value. It can provide scientific decision-making support for the safe and efficient transportation of crude oil pipelines. It is expected to be widely used in related fields, promote the application breadth and extrapolation performance of simulation methods, and provide strong guarantee for the safe transportation and optimized operation of crude oil pipelines.
[0042] In summary, the present invention can be widely used in the field of crude oil pipeline flow characteristic analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Throughout the accompanying drawings, the same reference numerals are used to represent the same components. In the accompanying drawings:
[0044] Figure 1 It is a schematic diagram of the calculation process and implementation flow of the method provided by one embodiment of the present invention;
[0045] Figure 2 is a schematic diagram of an optimization target of a symbolic regression expression provided by an embodiment of the present invention;
[0046] Figure 3 It is a schematic diagram of the regression effect of the method provided by an embodiment of the present invention on a general model;
[0047] Figure 4 It is a schematic diagram of the regression effect of the method provided by one embodiment of the present invention on the classic pipeline crude oil rheological model. DETAILED DESCRIPTION
[0048] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0049] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0050] Although the terms first, second, third, etc. can be used in the text to describe multiple elements, components, regions, layers and / or sections, these elements, components, regions, layers and / or sections should not be limited by these terms. These terms can only be used to distinguish an element, component, region, layer or section from another region, layer or section. Unless the context clearly indicates, terms such as "first", "second" and other numerical terms do not imply order or sequence when used in the text. Therefore, the first element, component, region, layer or section discussed below can be referred to as the second element, component, region, layer or section without departing from the teaching of the example embodiments.
[0051] At present, the challenges faced by traditional methods in the analysis of crude oil pipeline flow characteristics include time and resource consumption, computational complexity and "black box" problems, and there are deficiencies in accuracy, real-time and multi-factor coupling analysis. In recent years, large language models (LLMs) have made significant progress in the field of natural language processing, showing strong reasoning ability and computational efficiency. Through large-scale pre-training, large language models can generate high-quality text and perform well on multiple tasks. Applying large language models to the analysis of crude oil pipeline flow characteristics can take advantage of their powerful generation and reasoning capabilities to automatically extract features from data and generate physically meaningful mathematical models. By combining large language models with symbolic regression, the advantages of both can be fully utilized. The large language model is responsible for generating the initial mathematical expressions, while symbolic regression fits and optimizes these expressions to obtain the optimal flow characteristic model. This method can not only improve the computational efficiency and model stability, but also ensure the physical rationality and interpretability of the model. The present embodiment provides a method for mining the flow characteristics of crude oil pipelines, including: based on a pre-constructed basic symbol library, combined with a large language model and a symbolic regression method, a candidate set of pipeline crude oil flow characteristic characterization models for the crude oil pipeline to be tested is established; based on a scoring standard for the quality of the characterization model, the candidate set of pipeline crude oil flow characteristic characterization models is scored, and based on the scoring results, the structure of the pipeline crude oil flow characteristic characterization model is optimized and iterated to obtain the optimal pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested. The present invention introduces a large language model and a symbolic regression method to provide a new solution for the analysis of crude oil pipeline flow characteristics. This method can quickly and accurately extract flow characteristic models from a large amount of experimental and monitoring data, significantly improve the analysis efficiency and model accuracy, and provide strong technical support for the safe operation and optimization of crude oil pipelines.
[0052] Example 1
[0053] like Figure 1 As shown, this embodiment provides a method for mining flow characteristics of a crude oil pipeline, comprising the following steps:
[0054] 1) Construct a basic symbol library for characterizing the flow characteristics of pipeline crude oil.
[0055] 2) Based on the constructed basic symbol library, combined with the large language model and symbolic regression method, a candidate set of flow characteristic characterization models of the crude oil pipeline to be tested is established.
[0056] 3) Based on the scoring criteria for the characterization model quality, the candidate set of pipeline crude oil flow characteristic characterization models is scored, and based on the scoring results, the above step 2) is repeated to optimize and iterate the structure of the pipeline crude oil flow characteristic characterization model to obtain the optimal pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested.
[0057] In a preferred embodiment, in the above step 1), in order to accurately characterize the flow characteristics of pipeline crude oil, it is necessary to construct a basic symbol library for characterizing the flow characteristics of pipeline crude oil. The basic symbol library includes common physical quantities and arithmetic operators so as to be able to express complex fluid dynamics processes, specifically:
[0058] 1.1) Analyze the existing rheological model and extract key physical quantities and symbols, including velocity u, pressure p, temperature T, shear rate and shear stress τ, as well as common arithmetic operators (such as addition, subtraction, multiplication, and division) and differential symbols (such as wait).
[0059] Specifically, existing rheological models include the Bingham model and the Herschel-Bulkley model, which are used to describe the rheological properties of non-Newtonian fluids (such as crude oil). For example, the mathematical expression of the Bingham model is:
[0060]
[0061] Where τ is the shear stress; τ0 is the yield stress; v p is the plastic viscosity; is the shear rate.
[0062] 1.2) Integrate the extracted physical quantities, symbols and arithmetic operators to form a basic symbol library.
[0063] Specifically, by constructing a basic symbol library for characterizing the flow characteristics of pipeline crude oil, the necessary tools and foundation can be provided for the construction of subsequent models, thereby achieving accurate description and analysis of the flow characteristics of pipeline crude oil.
[0064] In a preferred embodiment, in the above step 2), based on the constructed basic symbol library, combined with the large language model and symbolic regression method, a candidate set of the pipeline crude oil flow characteristic characterization model of the crude oil pipeline to be tested is established, specifically:
[0065] 2.1) Based on the concept of symbolic regression, a prototype equation for characterizing the flow characteristics of pipeline crude oil with a constant term is randomly generated through sparse symbolic regression for the constant term:
[0066] 2.1.1) Determine the symbolic regression expression.
[0067] Specifically, symbolic regression is a modeling method based on evolutionary algorithms. It searches the mathematical expression space to find the mathematical model that best explains the data. The goal of symbolic regression is to find a mathematical expression that can accurately describe the experimental data. For example, the symbolic regression expression can be:
[0068]
[0069] Among them, f is an unknown function, which is fitted and optimized by symbolic regression method; τ0, μ p , k and n are parameters to be determined.
[0070] 2.1.2) PDEs or ODEs control equations are used to optimize the constant terms of the symbolic regression expression to form a prototype equation for characterizing the flow characteristics of pipeline crude oil with constant terms. The constant term is the key to the regression effect of the symbolic regression expression. In this regard, the present invention considers two types of control equations, PDEs and ODEs, and uses different methods to optimize the constants according to the specific characteristics they represent:
[0071] Specifically, for the PDEs control equation, the constant mainly appears as the coefficient of the function term. Therefore, the optimization process using the PDEs control equation is:
[0072] ① Split the expression tree into monomials according to the “+” and “-” operators at the top.
[0073] ②Use sparse regression method to solve the coefficients of the split monomial, such as Figure 2 shown.
[0074] ③ The terms with non-zero coefficients are retained and the other terms are removed to simplify and obtain the symbolic regression expression with constant terms to optimize the objective Then the prototype equation for the flow characteristics of pipeline crude oil with constant terms is formed:
[0075]
[0076] Among them, ξ is the weight vector corresponding to each calculation symbol, which is used to determine the form of each symbol in the final expression; Θ(u,x) is the symbol set covering all parameters to be regressed; u t is the regression expression; λ is the dynamic penalty coefficient, which is used to control the complexity of the regression equation.
[0077] Specifically, for ODEs control equations, constants can appear at any position in the expression tree. Therefore, the optimization process using ODEs control equations is:
[0078] ① Generate equation skeleton through LLMs (Large Language Models).
[0079] ② Use the Broyden-Fletcher-Goldfarb-Shanno algorithm (BFGS, an iterative algorithm for unconstrained optimization problems) to perform the following optimization objectives
[0080]
[0081] Among them, x i is the ith input data point, is the output corresponding to the i-th input data point, representing the characteristics of the input sample; It is the output of an equation or model and depends on the input data.
[0082] ③ The gradient descent algorithm is used to perform multiple rounds of optimization iterations on the above optimization objectives, and finally the values of all constants in the expression tree are determined to form a prototype equation for characterizing the flow characteristics of pipeline crude oil with constant terms.
[0083] 2.2) Introducing actual data and knowledge, a large language model is used to fit and optimize the randomly generated prototype of the pipeline crude oil flow characteristic characterization equation to generate the initial pipeline crude oil flow characteristic characterization equation for the crude oil pipeline to be tested.
[0084] Specifically, large language models (LLMs) use their powerful generation and reasoning capabilities to generate candidate equations in various forms based on the input symbol library and problem description. Through large-scale pre-training, large language models can generate mathematical expressions that conform to physical laws. The prototype and prior knowledge of the pipeline crude oil flow characteristic characterization equation obtained by multiple symbolic regressions can be input into the large language model to screen and generate the initial pipeline crude oil flow characteristic characterization equation. The specific process is as follows:
[0085] 2.2.1) Use prompt words to guide the large language model to randomly generate prototype equations for characterizing the flow characteristics of pipeline crude oil based on the constructed basic symbol library and problem description.
[0086] 2.2.2) In order to improve the accuracy and effectiveness of the generated equation, some text knowledge and field measured data are introduced to train the large language model to obtain a trained large language model, so that the large language model can generate mathematical expressions that conform to physical laws based on the constructed basic symbol library.
[0087] 2.2.3) To further optimize the generation process, constraints are established through natural language to prevent the generation of equations that violate specified conditions. Constraints include limiting the length of equations, the frequency of specific symbols, and preventing the generation of invalid nested combinations.
[0088] 2.2.4) The randomly generated prototype of the pipeline crude oil flow characteristic characterization equation is input into the trained large language model, and based on the established constraints, the initial pipeline crude oil flow characteristic characterization equation of the crude oil pipeline to be tested is screened and generated.
[0089] Specifically, a classic example of the candidate set is shown in the following formula (5). The initial pipeline crude oil flow characteristic characterization equation generated by the large language model is:
[0090]
[0091] Among them, α is a parameter to be determined.
[0092] 2.3) Based on the initial pipeline crude oil flow characteristic characterization equation, a candidate set of pipeline crude oil flow characteristic characterization models for the crude oil pipeline to be tested that conforms to physical laws and target requirements is obtained.
[0093] In a preferred embodiment, in the above step 3), based on the scoring criteria for characterizing the quality of the model, the candidate set of pipeline crude oil flow characteristic characterization models is scored, and based on the scoring results, the above step 2) is repeated to optimize and iterate the structure of the pipeline crude oil flow characteristic characterization model to obtain the optimal pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested, specifically:
[0094] 3.1) Define scoring criteria to characterize model quality.
[0095] Specifically, in order to scientifically and reasonably score the candidate set of pipeline crude oil flow characteristics characterization models, the scoring criteria are defined from three aspects: fitting accuracy (mean square error), model complexity (number of equation terms) and physical meaning:
[0096]
[0097] Among them, S is a comprehensive evaluation index of model quality; is the normalization factor; N is the total number of parameters in the regression model; NRMSE is the normalized root mean square error, which is used as a fitness indicator to evaluate the difference between the left and right sides of the equation; m is the number of equation terms; ζ1 is the penalty coefficient; is the output corresponding to the i-th input data point; is the output of the equation, x i is the ith input data point.
[0098] 3.2) Based on the defined scoring criteria, each pipeline crude oil flow characteristic characterization equation in the candidate set of pipeline crude oil flow characteristic characterization models is scored to obtain a corresponding scoring result.
[0099] 3.3) Based on the scoring results, the structure of the pipeline crude oil flow characteristic characterization model is optimized and iterated to obtain the optimal pipeline crude oil flow characteristic characterization model, wherein the scoring results are used as the following optimization and iteration loss function:
[0100] 3.3.1) Local modification: The self-optimization process is used to adjust the pipeline crude oil flow characteristics characterization model to improve its fitting accuracy.
[0101] 3.3.2) Global Search: Combined with genetic algorithms, global search and mutation operations are performed to explore new model structures.
[0102] 3.3.3) Feedback improvement: The data in the actual pipeline and the domain knowledge corresponding to the flow of crude oil pipelines (such as physical knowledge such as circular pipe laminar flow) are input into the large language model. Based on the multimodal learning ability of the large language model itself, the model generated by it is corrected through feedback, and the parameters and structure of the generated model are optimized to gradually approach the optimal solution.
[0103] 3.3.4) After multiple rounds of iterative optimization, the model with the highest score and conforming to the physical meaning (including conforming to circular tube laminar flow, avoiding negative parameters, and dimensional matching) is selected as the final pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested. This model not only has high-precision prediction capabilities, but also has strong interpretability and stability, and can effectively guide decision-making and optimization in practical applications.
[0104] The crude oil pipeline flow characteristics mining method of the present invention is described in detail below through specific embodiments. To verify the feasibility and effect of the method of the present invention, two actual cases are used to verify the effect:
[0105] 1. General Model
[0106] Select expressions with key regression difficulties such as constant terms and trigonometric function terms for testing:
[0107] y=3x 3 +2x 2 -1000x sin(x) (8)
[0108] The single regression calculation efficiency of the method of the present invention is 0.72s. The comparison between the prediction results and the original data is as follows: Figure 3 After 9 regression cycles, the calculated deviation from the true data is 2.4%.
[0109] (II) Classical pipeline crude oil rheological model
[0110] The Bingham model of the above formula (1) is mined and tested, and four parameter sequences of the Bingham model (τ0, τ, n), calculate the parameter sequence according to the calculation formula of the Bingham model to obtain the target value v. The calculation result is as follows Figure 4 shown.
[0111] At the same time, the anti-noise ability of the method of the present invention is tested. Under a data noise level of 5%, the correct equation can still be regressed, which can prove the effectiveness of the method of the present invention.
[0112] Example 2
[0113] This embodiment provides a crude oil pipeline flow characteristic mining system, including:
[0114] The symbol library building module is used to build a basic symbol library for characterizing the flow characteristics of pipeline crude oil.
[0115] The candidate set building module is used to build a candidate set of the pipeline crude oil flow characteristic characterization model of the crude oil pipeline to be tested based on a pre-built basic symbol library, combined with a large language model and a symbolic regression method.
[0116] The scoring module is used to score the candidate set of pipeline crude oil flow characteristic characterization models based on the scoring criteria for characterizing the quality of the model, and based on the scoring results, optimize and iterate the structure of the pipeline crude oil flow characteristic characterization model to obtain the optimal pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested.
[0117] The system provided in this embodiment is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for specific processes and detailed contents, which will not be repeated here.
[0118] Example 3
[0119] This embodiment provides a processing device corresponding to the crude oil pipeline flow characteristics mining method provided in Example 1. The processing device can be suitable for client processing devices, such as mobile phones, laptops, tablet computers, desktop computers, etc., to execute the method of Example 1.
[0120] The processing device includes a processor, a memory, a communication interface and a bus, and the processor, the memory and the communication interface are connected through the bus to complete mutual communication. The memory stores a computer program that can be run on the processing device, and the processing device executes the crude oil pipeline flow characteristic mining method provided in this embodiment 1 when running the computer program.
[0121] In some implementations, the memory may be a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.
[0122] In some other implementations, the processor may be a central processing unit (CPU), a digital signal processor (DSP), or other general-purpose processors of various types, which are not limited herein.
[0123] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0124] Those skilled in the art will understand that the structure of the above-mentioned computing device is only a partial structure related to the solution of the present invention, and does not constitute a limitation on the computing device to which the solution of the present invention is applied. The specific computing device may include more or fewer components, or combine certain components, or have a different arrangement of components.
[0125] Example 4
[0126] This embodiment provides a computer program product corresponding to the crude oil pipeline flow characteristics mining method provided in Example 1. The computer program product may include a computer-readable storage medium on which computer-readable program instructions for executing the crude oil pipeline flow characteristics mining method described in Example 1 are loaded.
[0127] Computer readable storage media can be tangible devices that hold and store instructions used by instruction execution devices. Computer readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any combination thereof.
[0128] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.
[0129] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0130] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0132] The above embodiments are only used to illustrate the present invention, wherein the structure, connection mode and manufacturing process of each component may be changed. Any equivalent transformations and improvements based on the technical solution of the present invention should not be excluded from the protection scope of the present invention.
Claims
1. A method for mining flow characteristics of crude oil pipelines, characterized in that: include: Based on the pre-built basic symbol library, combined with the large language model and symbolic regression method, a candidate set of flow characteristic characterization models of the crude oil pipeline to be tested is established; Based on the scoring criteria for the characterization model quality, the candidate set of pipeline crude oil flow characteristic characterization models is scored, and based on the scoring results, the structure of the pipeline crude oil flow characteristic characterization model is optimized and iterated to obtain the optimal pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested.
2. A crude oil pipeline flow characteristics mining method as claimed in claim 1, characterized in that: The construction process of the basic symbol library is as follows: Analyze the rheological model and extract physical quantities, symbols, and arithmetic operators; The extracted physical quantities and symbols are integrated to form a basic symbol library.
3. A crude oil pipeline flow characteristics mining method as claimed in claim 1, characterized in that: The method is based on the pre-built basic symbol library, combined with the large language model and the symbolic regression method, to establish a candidate set of the pipeline crude oil flow characteristic characterization model of the crude oil pipeline to be tested, including: Through sparse symbolic regression for constant terms, a prototype equation for characterizing flow characteristics of pipeline crude oil with constant terms is randomly generated. The large language model is used to fit and optimize the randomly generated pipeline crude oil flow characteristic characterization equation prototype to generate the initial pipeline crude oil flow characteristic characterization equation of the crude oil pipeline to be tested; Based on the initial pipeline crude oil flow characteristic characterization equation, a candidate set of pipeline crude oil flow characteristic characterization models for the crude oil pipeline to be tested that meets physical laws and target requirements is obtained.
4. A method for mining flow characteristics of a crude oil pipeline as claimed in claim 3, characterized in that: The method randomly generates a prototype of a flow characteristic characterization equation of pipeline crude oil with a constant term by sparse symbolic regression for the constant term, including: Determine symbolic regression expressions; PDEs or ODEs are used to control equations, and the constant terms of symbolic regression expressions are optimized to form a prototype equation for characterizing the flow characteristics of pipeline crude oil with constant terms.
5. A method for mining flow characteristics of a crude oil pipeline as claimed in claim 3, characterized in that: The large language model is used to fit and optimize the randomly generated pipeline crude oil flow characteristic characterization equation prototype to generate the initial pipeline crude oil flow characteristic characterization equation of the crude oil pipeline to be tested, including: Using prompt words, the large language model is guided to randomly generate a prototype of the equation representing the flow characteristics of pipeline crude oil according to the constructed basic symbol library and problem description; Introduce some text knowledge and field measured data to train the large language model to obtain a trained large language model; The randomly generated prototype of the pipeline crude oil flow characteristic characterization equation is input into the trained large language model, and based on the pre-established constraints, the initial pipeline crude oil flow characteristic characterization equation of the crude oil pipeline to be tested is screened and generated.
6. A crude oil pipeline flow characteristic mining method as claimed in claim 1, characterized in that: The scoring criteria based on the characterization model quality are used to score the candidate set of pipeline crude oil flow characteristic characterization models, and based on the scoring results, the structure of the pipeline crude oil flow characteristic characterization model is optimized and iterated to obtain the optimal pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested, including: Based on a predefined scoring standard, each pipeline crude oil flow characteristic characterization equation in the candidate set of pipeline crude oil flow characteristic characterization models is scored to obtain a corresponding scoring result; Based on the scoring results, the structure of the pipeline crude oil flow characteristics characterization model is optimized and iterated to obtain the optimal pipeline crude oil flow characteristics characterization model, in which the scoring results are used as the loss function for optimization and iteration.
7. A method for mining flow characteristics of a crude oil pipeline as claimed in claim 6, characterized in that: The scoring criteria are: Among them, S is a comprehensive evaluation index of model quality; is the normalization factor; N is the total number of parameters in the regression model; NRMSE is the normalized root mean square error; m is the number of equation terms; ζ1 is the penalty coefficient; is the output corresponding to the i-th input data point; is the output of the equation, x i is the ith input data point.
8. A crude oil pipeline flow characteristics mining system, characterized in that: include: A candidate set building module is used to build a candidate set of a pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested based on a pre-built basic symbol library, combined with a large language model and a symbolic regression method; The scoring module is used to score the candidate set of pipeline crude oil flow characteristic characterization models based on the scoring criteria for characterizing the quality of the model, and based on the scoring results, optimize and iterate the structure of the pipeline crude oil flow characteristic characterization model to obtain the optimal pipeline crude oil flow characteristic characterization model for the crude oil pipeline to be tested.
9. A processing device, characterized in that: It comprises computer program instructions, wherein the computer program instructions, when executed by a processing device, are used to implement the steps corresponding to the crude oil pipeline flow characteristic mining method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, wherein the computer program instructions, when executed by a processor, are used to implement the steps corresponding to the crude oil pipeline flow characteristic mining method according to any one of claims 1 to 7.
Citation Information
Cited By
Nuclear accident fault diagnosis method and equipment combining physical constraint and large language model
CN120724343A
Nuclear accident fault diagnosis method and equipment combining physical constraints and large language model
CN120724343B