Method and equipment for determining pipeline cleaning strategy, medium and product
By using data-driven modeling and regression analysis, a mathematical relationship model between cleaning rate and key factors was established, which solved the problem of low efficiency in cleaning agent screening during the cleaning of decommissioned oil pipelines, and achieved scientific optimization of cleaning strategies and cost control.
Patent Information
- Application Number
- CN202511471281.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2026-02-13
AI Technical Summary
Existing technologies for cleaning decommissioned oil pipelines suffer from problems such as low efficiency in selecting cleaning agents, high cost, and unstable results, making it difficult to meet the requirements for safe, economical, and efficient cleaning.
Using data-driven modeling and regression analysis, a mathematical relationship model between cleaning rate and key factors was established. Through multiple regression, ridge regression, lasso regression and stepwise regression, the relationship between the cleaning rate of the cleaning agent and the residual components and cleaning process parameters was fitted, and the cleaning strategy with the minimum error assessment was determined.
The scientific optimization of the cleaning agent formula has improved cleaning efficiency and systematicity, reduced costs, and met the cleaning needs of decommissioned oil pipelines.
Smart Images

Figure CN121528368A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of pipeline oil pollution cleaning, and particularly relates to a pipeline cleaning strategy determination method and device, a medium and a product. BACKGROUND
[0002] With the continuous development of the global oil and gas industry, early-stage constructed oil pipelines gradually enter the retirement period, and the importance of the disposal work of the retired pipelines is increasingly highlighted, and the number and scale of the retired pipelines show a trend of continuous expansion. If a large number of retired pipelines are not disposed properly, the pollutants (such as oil sludge, sulfides, heavy metals, etc.) remaining in the inner wall of the pipelines may cause serious environmental pollution due to corrosion leakage, threatening the safety of soil, groundwater and ecological systems. In addition, as potential resource carriers, the demand for recycling and reuse (such as being used for new medium transportation and engineering test verification) of the retired pipelines is continuously increasing, which puts forward higher requirements for standardized and efficient cleaning and disposal.
[0003] Therefore, how to optimize the pipeline cleaning strategy becomes a technical problem to be solved. SUMMARY
[0004] The present application aims to provide a pipeline cleaning strategy determination method, device, medium and product, and aims to solve the problem of how to optimize the pipeline cleaning strategy.
[0005] To achieve the above-mentioned purpose, the present application adopts the following technical solutions: In a first aspect, the present application provides a pipeline cleaning strategy determination method, comprising: obtaining sample data of pipeline cleaning, the sample data comprising: a cleaning rate of a cleaning agent, a residue component and a cleaning process parameter; based on the sample data, fitting the relationship between the cleaning rate of the cleaning agent and the residue component and the cleaning process parameter by using multiple regression, ridge regression, lasso regression and stepwise regression respectively, to obtain a cleaning effect multiple regression model, a cleaning effect ridge regression model, a cleaning effect lasso regression model and a cleaning effect stepwise regression model; determining an error evaluation index of each regression model in the cleaning effect multiple regression model, the cleaning effect ridge regression model, the cleaning effect lasso regression model and the cleaning effect stepwise regression model for determining the pipeline cleaning strategy; determining a target cleaning rate model from the cleaning effect multiple regression model, the cleaning effect ridge regression model, the cleaning effect lasso regression model and the cleaning effect stepwise regression model according to a preset index threshold, the error evaluation index of the target cleaning rate model for determining the pipeline cleaning strategy being less than the preset index threshold; and determining a target strategy for pipeline cleaning through the target cleaning rate model.
[0006] The method for determining a pipeline cleaning strategy provided by the embodiments of the present application can scientifically and accurately establish a mathematical relationship model between the cleaning rate and the key factors by means of data-driven modeling, regression analysis and linear programming optimization, and reveal the mathematical relationship between the cleaning efficiency and the parameters. In this way, the limitations of traditional empirical tests can be overcome, and the systematicness and scientificity of the optimization of the cleaning agent formula screening can be improved, so as to achieve the optimization of the pipeline cleaning strategy.
[0007] In some embodiments, the method for obtaining the sample data of the pipeline cleaning comprises: obtaining original data of the pipeline cleaning; and performing normalization processing on the original data to obtain the sample data, in a case where the original data conforms to a normal distribution.
[0008] In some embodiments, the method further comprises: reobtaining the data of the pipeline cleaning, in a case where the original data does not conform to the normal distribution.
[0009] In some embodiments, the residue component comprises a plurality of first sub-components, and the cleaning process parameter comprises a plurality of first sub-parameters. The method for fitting the relationship between the cleaning rate of the cleaning agent and the residue component and the cleaning process parameter based on the sample data by using the multiple regression, the ridge regression, the lasso regression and the stepwise regression respectively to obtain the cleaning effect multiple regression model, the cleaning effect ridge regression model, the cleaning effect lasso regression model and the cleaning effect stepwise regression model comprises: performing pairwise factor analysis on the cleaning rate of the cleaning agent and each first sub-component and each first sub-parameter in the sample data to determine the correlation degree of each first sub-component with the cleaning rate of the cleaning agent and the correlation degree of each first sub-parameter with the cleaning rate of the cleaning agent; determining target data from the sample data according to a preset correlation degree threshold, the target data comprising the cleaning rate of the cleaning agent, at least one second sub-component of the plurality of first sub-components and at least one second sub-parameter of the plurality of first sub-parameters, the correlation degree of the second sub-component with the cleaning rate of the cleaning agent being greater than the preset correlation degree threshold, and the correlation degree of the second sub-parameter with the cleaning rate of the cleaning agent being greater than the preset correlation degree threshold; and fitting the relationship between the cleaning rate of the cleaning agent and the at least one second sub-component and the at least one second sub-parameter based on the target data by using the multiple regression, the ridge regression, the lasso regression and the stepwise regression respectively to obtain the cleaning effect multiple regression model, the cleaning effect ridge regression model, the cleaning effect lasso regression model and the cleaning effect stepwise regression model.
[0010] In some embodiments, the error evaluation index of each regression model is determined in combination with the mean square error, the mean absolute error, the root mean square error and the determination coefficient of the model.
[0011] In some embodiments, the method further comprises: determining contribution rates of each first independent variable in the target strategy to the pipeline cleaning, each first independent variable comprising a residue component and a cleaning process parameter; and determining a master factor from each first independent variable according to a preset contribution rate threshold, the master factor comprising at least one second independent variable, the second independent variable having a contribution rate to the pipeline cleaning greater than the preset contribution rate threshold.
[0012] In some embodiments, the master factor is divided into controllable factors and uncontrollable factors; and the method further comprises: determining parameter values of each second independent variable in the controllable factors according to cost information of each second independent variable in the controllable factors, the total cost corresponding to the parameter values of each second independent variable in the controllable factors being less than a preset cost threshold.
[0013] In a second aspect, the present application provides a device for determining a pipeline cleaning strategy, the device comprising: an acquisition module and a processing module.
[0014] The acquisition module is configured to acquire sample data of pipeline cleaning, the sample data comprising: a cleaning rate of a cleaning agent, a residue component, and a cleaning process parameter; the processing module is configured to, based on the sample data, respectively fit relationships between the cleaning rate of the cleaning agent and the residue component and the cleaning process parameter by using multiple regression, ridge regression, lasso regression, and stepwise regression, to obtain a cleaning effect multiple regression model, a cleaning effect ridge regression model, a cleaning effect lasso regression model, and a cleaning effect stepwise regression model; the processing module is further configured to determine error evaluation indexes of each regression model in the cleaning effect multiple regression model, the cleaning effect ridge regression model, the cleaning effect lasso regression model, and the cleaning effect stepwise regression model for determining the pipeline cleaning strategy; the processing module is further configured to determine a target cleaning rate model from the cleaning effect multiple regression model, the cleaning effect ridge regression model, the cleaning effect lasso regression model, and the cleaning effect stepwise regression model according to a preset index threshold, the error evaluation index of the target cleaning rate model for determining the pipeline cleaning strategy being less than the preset index threshold; and the processing module is further configured to determine a target strategy for pipeline cleaning by using the target cleaning rate model.
[0015] In a third aspect, the present application provides a device for determining a pipeline cleaning strategy, the device comprising: a processor and a memory, the processor and the memory being coupled, the memory being configured to store one or more programs comprising computer execution instructions, and the processor being configured to execute the computer execution instructions stored in the memory to implement the pipeline cleaning strategy determination method described in any of the first aspect when the device for determining a pipeline cleaning strategy is running.
[0016] In a fourth aspect, the present application provides a computer readable storage medium, the computer readable storage medium storing instructions, and the instructions, when running on a computer, causing the computer to execute the pipeline cleaning strategy determination method described in any of the first aspect.
[0017] In a fifth aspect, the present application provides a computer program product applied to a pipeline cleaning strategy determination device, the computer program product comprising computer instructions, when the computer instructions are run on the pipeline cleaning strategy determination device, the pipeline cleaning strategy determination device implements the pipeline cleaning strategy determination method described in any of the first aspect.
[0018] The technical problems solved by the pipeline cleaning strategy determination apparatus, device, computer storage medium or computer program product and the technical effects achieved by the pipeline cleaning strategy determination apparatus, device, computer storage medium or computer program product can refer to the technical problems solved and the technical effects achieved by the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0020] Figure 1 An example schematic diagram of a pipeline cleaning strategy determination system provided by the embodiments of the present application; Figure 2 A flowchart of a pipeline cleaning strategy determination method provided by the embodiments of the present application; Figure 3 A particle swarm algorithm flowchart provided by the embodiments of the present application; Figure 4 A cleaning agent formula optimization flowchart provided by the embodiments of the present application; Figure 5 A structural schematic diagram of a pipeline cleaning strategy determination apparatus provided by the embodiments of the present application; Figure 6 A structural schematic diagram of a pipeline cleaning strategy determination device provided by the embodiments of the present application; Figure 7 A conceptual partial view of a computer program product provided by the embodiments of the present application. DETAILED DESCRIPTION
[0021] The technical solutions of the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0022] In the description of this application, it should be understood that the terms "upper," "lower," "left," "right," "front," "rear," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or relative positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and for simplification, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. Unless otherwise specified, the above-mentioned orientational descriptions can be flexibly set in practical applications, provided that the relative positional relationships shown in the accompanying drawings are satisfied.
[0023] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0024] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "communication" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection. They can refer to a direct connection or an indirect connection through an intermediate medium, or a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0025] In embodiments of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, article, or apparatus that includes that element.
[0026] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0027] In the description of this specification, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0028] As shown in the background section, the cleaning of decommissioned oil pipelines often employs a combination of physical and chemical cleaning methods. Physical cleaning can effectively remove loose dirt and solid impurities, but its effectiveness in removing stubborn oil stains, sludge, and chemical corrosion is limited; chemical cleaning, on the other hand, dissolves or decomposes oil stains and deposits through a chemical reaction between the cleaning agent and the contaminants.
[0029] However, due to significant differences in the physicochemical properties of crude oil from different regions and the complex and diverse types of residues in decommissioned pipelines, the selection and optimization of cleaning agents are crucial to the success of chemical cleaning. Cleaning agents must be precisely formulated according to the specific contamination conditions of oil and gas pipelines to achieve the best cleaning effect. Existing technologies mainly employ single-factor control experiments or orthogonal experimental design, using different process parameters such as cleaning agent dosage, cleaning temperature, time, and number of cycles to conduct cleaning agent testing and optimization.
[0030] Due to the vast selection space brought about by the combination of multiple variables, the complex nonlinearity and interaction between variables, the differences in different cleaning needs, and external conditions, the screening and optimization process generally suffers from problems such as reliance on empirical formulas, numerous experiments, low screening efficiency, large fluctuations in cleaning effects, and difficulty in cost control.
[0031] In other words, currently, given the numerous and complex influencing factors, there is no method to determine the main controlling factors of the cleaning effect of cleaning agents. It is difficult to achieve precise optimization of the formula according to the cleaning target, and it is impossible to meet the safe, economical and efficient cleaning needs of decommissioned oil pipelines.
[0032] Therefore, there is an urgent need to establish a systematic, data-driven modeling method for cleaning agent optimization analysis, to provide scientific guidance for the formulation design of cleaning agents for decommissioned oil pipelines, and thus optimize pipeline cleaning strategies.
[0033] To address the aforementioned technical problems, this application provides a method for determining pipeline cleaning strategies. Through data-driven modeling, regression analysis, and linear programming optimization, a mathematical relationship model between cleaning rate and key factors is scientifically and accurately established, revealing the mathematical relationship between cleaning efficiency and various parameters. This approach overcomes the limitations of traditional empirical experiments, enhancing the systematic and scientific nature of cleaning agent formulation screening and optimization, thereby achieving strategy optimization for pipeline cleaning.
[0034] In response, this application provides a system for determining a pipeline cleaning strategy, such as... Figure 1 As shown, it includes: a device for determining the pipeline cleaning strategy (hereinafter referred to as the "determination device") and a data acquisition device.
[0035] The data acquisition device can collect relevant data during the cleaning process of decommissioned oil pipelines and send the collected data to the determination device.
[0036] The determination device can establish multiple regression models for determining pipeline cleaning strategies based on the data collected by the data acquisition device for pipeline cleaning, and select the optimal cleaning rate model with the smallest error assessment from them, and then determine the pipeline cleaning strategy based on the optimal cleaning rate model.
[0037] It should be noted that, in this embodiment, the data acquisition device can be a sensor at the cleaning site of the decommissioned oil pipeline, or a server or terminal connected to the sensor at the cleaning site. Furthermore, the determination device can be a server or a terminal. Also, the data acquisition device and the determination device can be deployed in the same device or in different devices.
[0038] The server can be a single physical server or a server cluster consisting of multiple servers. Alternatively, the server cluster can be a distributed cluster. Alternatively, the server can be a cloud server. This application does not limit the specific implementation of the server.
[0039] The terminal can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, or other device with sending and receiving functions. This application does not impose any special restrictions on the specific form of the terminal. It can interact with the user through one or more methods such as keyboard, touchpad, touch screen, remote control, voice interaction, or handwriting device.
[0040] After introducing the application scenarios and implementation environment of the embodiments of this application, the method for determining the pipeline cleaning strategy provided by the embodiments of this application will be described in detail below in conjunction with the above implementation environment.
[0041] The methods in the following embodiments can all be implemented in the above-described application scenarios and implementation environments. The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0042] Figure 2 This is a flowchart illustrating a method for determining a pipeline cleaning strategy, as provided in an embodiment of this application. Figure 2 As shown, the method is applied to a prediction device, including: S201-S205.
[0043] S201. Obtain sample data for pipeline cleaning.
[0044] The sample data includes: the cleaning efficiency of the cleaning agent, the composition of the residue, and the cleaning process parameters.
[0045] As one possible approach, in the process of determining the device to acquire sample data, the research objective can be clearly defined, and the dependent variable characterizing the cleaning effect can be determined as the cleaning rate; the influencing factors of the research can be clearly defined, and the independent variables affecting the cleaning effect can be determined, which can be divided into uncontrollable residue components and controllable cleaning process parameters based on whether they are controllable.
[0046] Specifically, uncontrollable residues of organic and inorganic components may include: (1) Inorganic components in pipeline residues include amphibole, clay minerals, anhydrite, barite, hematite, analcime, magnesite, pyrite, dolomite, plagioclase, calcite, potassium feldspar, quartz, etc.
[0047] (2) Organic components in pipeline residues, including n-octane, n-nonane, n-decane, nC11, nC12, nC13, nC14, nC15, nC16, nC17, nC18, nC19, nC20, nC21, nC22, nC23, nC24, nC25, nC26, nC27, nC28, nC29, nC30, nC31, nC32, nC33, nC34, nC35, etc.
[0048] Controllable cleaning process parameters may include: cleaning agent dosage, cleaning temperature, stirring speed, contact time, etc.
[0049] In some embodiments, during the process of determining the device acquiring sample data of pipeline cleaning (i.e., S201), the determining device can acquire raw data of pipeline cleaning, and if the raw data conforms to a normal distribution, normalize the raw data to obtain sample data.
[0050] Furthermore, the device can reacquire pipeline cleaning data even when the original data does not conform to a normal distribution.
[0051] In other words, the deterministic device can acquire relevant data on the cleaning process through indoor experiments, specifically including raw data such as the cleaning agent's cleaning rate, the organic and inorganic components of residues, and cleaning process parameters. Next, the device can extract this raw data and conduct visual analysis of its basic statistical indicators to determine whether the selected variables follow a normal distribution. If the cleaning data does not conform to a normal distribution, the data is reacquired. Afterward, the device can use data normalization methods to eliminate the dimensions of each parameter and map the data range to the same interval.
[0052] It should be noted that the normalization method used by the above-mentioned determining device can be the Min-Max method or the Z-score method.
[0053] Furthermore, the aforementioned basic statistical indicators can include extreme values, mean, variance, and distribution characteristics; visualization analysis can be achieved through visualization charts, including QQ plots, frequency plots, box plots, and statistical tables. The sample data conforms to a normal distribution, which can ensure the accuracy and scientific nature of the data analysis, as well as the universality of the sample and reduce errors when manually selecting data.
[0054] S202. Based on the sample data, the relationship between the cleaning rate of the cleaning agent and the residual components and cleaning process parameters was fitted by multiple regression, ridge regression, lasso regression and stepwise regression respectively, to obtain the multiple regression model, ridge regression model, lasso regression model and stepwise regression model of cleaning effect.
[0055] In other words, the determination device can use normalized cleaning data to fit the relationship between the cleaning agent cleaning rate and the residual components and cleaning process parameters using multiple regression, ridge regression, lasso regression and stepwise regression respectively, to obtain the cleaning effect multiple regression model, cleaning effect ridge regression model, cleaning effect lasso regression model and cleaning effect stepwise regression model.
[0056] It should be noted that the methods for the above-mentioned multiple regression, ridge regression, lasso regression, and stepwise regression can be illustrated as shown in Figures 1-4 below: 1. Multiple regression method: The following model is used for calculation, as shown in Formula 1: Formula 1.
[0057] in, It is the response vector (equivalent to the cleaning rate of the cleaning agent mentioned above). It is a design matrix (including the above-mentioned residue components and cleaning process parameters). It is a parameter vector. It is the error vector.
[0058] Furthermore, the least squares estimate of the parameters can be expressed as shown in Equation 2: Formula 2.
[0059] Furthermore, the model parameters are determined by minimizing the difference between the model predictions and the actual observations, i.e., the residual sum of squares (RSS). The residual sum of squares (RSS) can be represented by Equation 3: Formula 3.
[0060] in, for The Middle Column (equivalent to the first) The cleaning rate (predicted next time) for The Middle Column (equivalent to the first) The residual composition and cleaning process parameters (predicted in the second phase).
[0061] 2. Ridge Regression Method: Given a design matrix... and response vector Then, the following model is used for calculation, as shown in Formula 4: Formula 4.
[0062] in, Used to indicate an error function It is a non-negative adjustment parameter that determines the strength of regularization; the second term It is a regularization term that penalizes the magnitude of the coefficients; when When, ridge regression degenerates into standard linear regression, when As the regularization increases, its effect intensifies, and the estimated values of the coefficients shrink.
[0063] 3. Lasso Regression Method: Given a design matrix... and response vector Then, the following model is used for calculation, as shown in Formula 5: Formula 5.
[0064] in, It is a non-negative adjustment parameter that determines the strength of regularization; the second term It is a regularization term that penalizes the magnitude of the coefficient.
[0065] 4. Stepwise Regression Method: Stepwise regression is an iterative method, which can be divided into forward selection, backward elimination, or bidirectional stepwise process. In forward selection, the model starts with no predictor variables and then adds predictor variables one by one, selecting the predictor variable that provides the greatest improvement each time. In backward elimination, the model starts with all predictor variables and then removes predictor variables one by one, removing the predictor variable that provides the least improvement to the model each time. Bidirectional stepwise regression combines forward selection and backward elimination, considering both adding and removing predictor variables. The decision at each step is based on the Akaike Information Criterion (AIC) or the Bayesian Information Criterion (BIC).
[0066] For two or more models, a smaller AIC value indicates a better model; the AIC formula can be shown in Formula 6: Formula Six.
[0067] in, It is the number of parameters in the model; It is the maximum likelihood of the model.
[0068] BIC imposes a stricter penalty on the parameters in the model. The BIC formula can be shown in Formula 7: Formula 7.
[0069] in, It represents the number of data points.
[0070] AIC (Adaptive Inference) considers model complexity and data fit, attempting to strike a balance between selecting a sufficiently complex model to fit the data well and choosing a simple model to avoid overfitting. BIC (Basic Inference) tends to select a simpler model compared to AIC. Generally, if the primary goal of model selection is prediction, AIC may be preferred. If the goal is to select a simple model that still explains the data well, BIC may be preferred.
[0071] In some embodiments, the residue components may include multiple first sub-components (such as the above-mentioned amphibole, n-nonane, etc.), and the cleaning process parameters may include multiple first sub-parameters (such as the above-mentioned cleaning temperature, stirring speed, etc.).
[0072] Thus, in the process of obtaining the multiple regression model, ridge regression model, lasso regression model, and stepwise regression model of cleaning effect based on sample data (i.e., S202), the device can perform pairwise factor analysis on the cleaning rate of the cleaning agent in the sample data with each first sub-component and each first sub-parameter to determine the degree of correlation between each first sub-component and the cleaning rate of the cleaning agent, as well as the degree of correlation between each first sub-parameter and the cleaning rate of the cleaning agent.
[0073] Next, the determining device can determine target data from the sample data based on a preset correlation threshold. The target data includes the cleaning rate of the cleaning agent, at least one second sub-component among multiple first sub-components, and at least one second sub-parameter among multiple first sub-parameters. The correlation between the second sub-component and the cleaning rate of the cleaning agent is greater than the preset correlation threshold, and the correlation between the second sub-parameter and the cleaning rate of the cleaning agent is greater than the preset correlation threshold.
[0074] Subsequently, the device can fit the relationship between the cleaning rate of the cleaning agent and at least one second sub-component and at least one second sub-parameter based on the target data using multiple regression, ridge regression, lasso regression and stepwise regression respectively, to obtain the multiple regression model of cleaning effect, the ridge regression model of cleaning effect, the lasso regression model of cleaning effect and the stepwise regression model of cleaning effect.
[0075] In other words, the determination device can perform pairwise factor analysis based on normalized cleaning data, and obtain a single-factor equation for the cleaning rate in terms of residue composition and cleaning process parameters through simple linear regression. Linear regression refers to fitting the mathematical relationship between each parameter and the cleaning rate by plotting a scatter plot, and initially obtaining the relationship between each pair of factors through Pearson correlation analysis.
[0076] In this way, before building the model, all independent variables can be screened by the degree of correlation between the cleaning rate of the dependent variable and the residual components and cleaning process parameters of each independent variable, so as to obtain independent variables with a high degree of correlation and avoid the negative impact of independent variables with a low degree of correlation on the subsequent model building process.
[0077] S203. Determine the error evaluation index of each regression model in the multiple regression model, ridge regression model, lasso regression model, and stepwise regression model for cleaning effect.
[0078] In some embodiments, the error evaluation index for each regression model can be a combination of the mean squared error (MSE), mean absolute error (MAE), root mean squared error (RMSE), and coefficient of determination. It's confirmed.
[0079] In other words, the error evaluation index of a regression model can be a weighted evaluation index, and the weighted evaluation index of the regression model... It can be shown in Formula 8 below: Formula 8.
[0080] S204. Based on the preset index threshold, determine the target cleaning rate model from the multiple regression model of cleaning effect, the ridge regression model of cleaning effect, the lasso regression model of cleaning effect, and the stepwise regression model of cleaning effect.
[0081] Among them, the target cleanliness rate model determines that the error evaluation index of the pipeline cleaning strategy is less than the preset index threshold.
[0082] In other words, after determining the weighted evaluation index of each model, the determining device can determine the model with the smallest weighted evaluation index based on the weighted evaluation index of each model; if there is only one model with the smallest weighted evaluation index, then the model with the smallest weighted evaluation index is taken as the optimal cleanliness rate model; if there are two or more models with the smallest weighted evaluation index, then the optimal cleanliness rate model is selected based on at least one of the coefficient of determination, mean square error, root mean square error, and mean absolute error.
[0083] S205. Determine the target strategy for pipeline cleaning using the target cleanliness rate model.
[0084] Understandably, by using data-driven modeling, regression analysis, and linear programming optimization, a scientific and accurate mathematical model can be established to demonstrate the relationship between cleaning efficiency and key factors, revealing the mathematical relationship between cleaning efficiency and various parameters. This approach can overcome the limitations of traditional empirical experiments, improve the systematic and scientific nature of cleaning agent formulation screening and optimization, and ultimately optimize pipeline cleaning strategies.
[0085] In some embodiments, after determining the target strategy through the target cleanliness rate model (i.e., S205 above), the determining device can determine the contribution rate of each first independent variable in the target strategy to pipeline cleaning, where each first independent variable includes residue components and cleaning process parameters. Then, the determining device can determine the controlling factor from each first independent variable based on a preset contribution rate threshold. The controlling factor includes at least one second independent variable whose contribution rate to pipeline cleaning is greater than the preset contribution rate threshold.
[0086] In other words, the determination device can calculate the contribution rate of each independent variable based on the optimal cleaning rate model and the contribution rate formula. The independent variable with the largest contribution rate is the main controlling factor for cleaning decommissioned oil pipelines using the target cleaning agent.
[0087] The contribution rate formula can be shown in Formula Nine below: Formula Nine.
[0088] in, It is the first in the model of residual organic and inorganic components, cleaning process parameters, etc. The contribution rate of each parameter; It is the first of the organic and inorganic components of the residue in the model, the cleaning process parameters, etc. The coefficients of each parameter; It is the first of the organic and inorganic components of the residue in the model, the cleaning process parameters, etc. The absolute value of the coefficients of each parameter.
[0089] In this embodiment of the disclosure, after determining the main controllable factor, the determining device can further determine its controllability, that is, the main controllable factor can be divided into controllable factors and uncontrollable factors. Next, the determining device can determine the parameter values of each second independent variable in the controllable factor based on the cost information of each second independent variable in the controllable factor, wherein the total cost corresponding to the parameter values of each second independent variable in the controllable factor is less than a preset cost threshold.
[0090] In other words, based on the aforementioned optimal cleaning rate model, cost constraints are introduced, and multiple constraints are combined with a linear programming particle swarm optimization algorithm to calculate and obtain the cleaning parameters with the lowest cost. This allows for the quantitative identification of the main factors affecting the cleaning effect, achieving a dual optimization between cleaning effect and cost.
[0091] Among them, the particle swarm optimization algorithm is just one way to find the optimal solution in linear programming problems.
[0092] The particle swarm optimization algorithm draws inspiration from the foraging patterns of birds and fish. Abstracted mathematically, it is an algorithm where particles in a region continuously search for the optimal solution. The changes in particle positions primarily depend on the following formulas ten and eleven: Formula 10.
[0093] Formula 11.
[0094] in, For the first The velocity of the particle in the next iteration is represented by the inertial term in the formula; For the first The self-cognition item of the next iteration, For the first The group cognition term in the next iteration, where... and As a learning factor, For the first The position vector of the particle in the next iteration.
[0095] Particle swarm optimization (PSO) is a computer algorithm primarily based on mathematical concepts. It requires iterative searching for the global optimum. Therefore, the quantities in a particular iteration of the formula do not need to be manually calculated. After programming, only some parameters of the PSO algorithm need to be specified to complete the calculation. The specific parameters are as follows: (1) Objective function: The objective of optimization problems is usually to find the combination of variables that minimizes (or maximizes) the value of the objective function, including linear objective functions and nonlinear objective functions.
[0096] (2) Range of variables: refers to the range of values of variables in the objective function. This is a key parameter that determines the feasible region and an important parameter for whether the objective function optimization problem has a solution.
[0097] (3) Equality constraints: The general form of equality constraints is .
[0098] (4) Inequality constraints: The general form of inequality constraints is as follows: Not equal to 0.
[0099] (5) Inertia weight: The inertia weight comes from the inertia term. This inertia term has a significant effect on a single particle and even the entire particle swarm. The magnitude of the inertia term determines the initial velocity of the particle from the 0th to the 1st iteration, which is the driving force for the entire particle swarm to search. In addition, after one iteration, the inertia term retains the velocity of the particle after the previous motion, and the inertia weight is generally less than or equal to 1. The inertia weight determines the degree to which the next particle motion is affected by the previous motion.
[0100] (6) Number of particles, which is the number of points in the initially selected feasible region.
[0101] (7) Number of iterations: the maximum number of computations required for the algorithm to find the optimal solution.
[0102] For example, such as Figure 3 The diagram shows the particle swarm optimization (PSO) algorithm flowchart. It initializes the particle swarm and parameter settings, setting T=1. Next, it calculates the objective function value, updates the individual optimal value Pbest and the swarm optimal value Gbest, and then determines whether the convergence criterion is met. If the convergence criterion is met, it outputs the optimal result and the number of iterations. If the convergence criterion is not met, it updates the position and velocity vectors of each particle, sets T=1, and recalculates the objective function value.
[0103] In summary, the pipeline cleaning strategy determination method provided in this application can optimize the cleaning agent formulation for decommissioned oil pipelines, such as... Figure 4 As shown, it illustrates a flowchart for optimizing cleaning agent formulations, including: Step 1: Multidimensional parameter characterization: Clarify the research objectives and influencing factors, and determine the dependent variable characterizing the cleaning effect and the independent variable affecting the cleaning effect.
[0104] Step 2: Raw Data Acquisition and Preprocessing: Raw data such as cleaning rate, residue composition and cleaning process parameters are obtained through indoor experiments. Visual analysis of basic statistical indicators of raw data is carried out, and the raw data is processed using normalization methods.
[0105] Step 3: Pairwise regression analysis; simple linear regression is used to obtain a single-factor equation for the cleaning rate in terms of residue composition and cleaning process parameters.
[0106] Step 4: Establish the optimal cleaning rate model: Establish a multivariate equation for the cleaning rate in relation to the residue composition and cleaning process parameters using four fitting models: multiple linear regression, stepwise regression, ridge regression, and lasso regression. Determine the weighted evaluation index and select the optimal cleaning rate model.
[0107] Step 5: Quantitative diagnosis of key control factors; Based on the optimal cleanliness rate model, and combined with the contribution rate, calculate the key controllable factors of cleanliness rate.
[0108] Step 6: Multi-dimensional parameter optimization: Introduce cost constraints and use the linear programming particle swarm algorithm to back-calculate and obtain the cleaning parameters with the lowest cost.
[0109] In other words, by comprehensively considering multidimensional variables such as residue composition and cleaning process parameters, and obtaining raw data through indoor experiments, combined with various regression modeling methods and error assessment indicators, a mathematical relationship model between cleaning rate and key factors is scientifically and accurately established. This model reveals the mathematical relationship between cleaning efficiency and various parameters, quantitatively identifies the main controlling factors affecting cleaning effect, and overcomes the limitations of traditional empirical experiments. It enhances the systematicness and scientific rigor of cleaning agent formulation screening and optimization, providing a scientific basis for cleaning agent formulation design. Simultaneously, this invention introduces cost constraints and applies inverse calculation methods such as linear programming to the optimization of cleaning agent parameters. This allows for the reverse derivation of the lowest-cost formulation scheme while meeting cleaning effect requirements, achieving a balance between cleaning efficiency and economy, and possessing good engineering adaptability and application value.
[0110] The following example uses citric acid cleaning agent to clean the residues of decommissioned pipelines in Dalian, Zhuozhou, Langfang, Jinzhou, Qinhuangdao, and Shenyang to evaluate the applicability and accuracy of the pipeline cleaning strategy determination method provided in this application.
[0111] Step 1: Multidimensional parameter characterization: Define the research objectives and determine the cleaning rate as the dependent variable characterizing the cleaning effect; identify the influencing factors and determine the independent variables affecting the cleaning effect.
[0112] (1) Characterization of cleaning effect.
[0113] Through literature review and theoretical analysis, multidimensional parameters for quantitatively evaluating the cleaning rate of citric acid cleaning agents were identified. In this study, steel sheets of similar size and mass (thin steel sheets) were used to simulate pipe walls for residue cleaning evaluation tests. First, the steel sheets were heated in an electric heating drying oven at 200 degrees Celsius for 30 minutes, then removed. Residue of similar mass was sequentially adhered to the steel sheets. After cooling to room temperature, the sheets were weighed, and the mass of the steel sheets with attached residue before cleaning was recorded. Then, the steel sheets were immersed in the test cleaning agent, with variations in test temperature, stirring speed, and immersion time. The mass of the steel sheets with attached residue after cleaning was recorded, thus calculating the cleaning rate. The cleaning rate calculation formula is shown in Formula XII below: Formula twelve.
[0114] in, Cleanliness rate, in % The mass of the steel sheet with residue before cleaning is expressed in grams (g). The mass of the steel sheet with residue after cleaning is expressed in grams.
[0115] (2) Characterization of independent variables affecting cleaning effect.
[0116] Factors affecting the cleaning efficiency of cleaning agents can be categorized by whether the variables are controllable, including uncontrollable organic and inorganic residues and controllable engineering factors.
[0117] (2.1) Uncontrollable residues of organic and inorganic components Inorganic components in pipeline residues include: amphibole, clay minerals, anhydrite, barite, hematite, analcime, magnesite, pyrite, dolomite, plagioclase, calcite, potassium feldspar, and quartz.
[0118] Organic component content in pipeline residue: n-octane, n-nonane, n-decane, nC11, nC12, nC13, nC14, nC15, nC16, nC17, nC18, nC19, nC20, nC21, nC22, nC23, nC24, nC25, nC26, nC27, nC28, nC29, nC30, nC31, nC32, nC33, nC34, nC35.
[0119] (2.2) Controllable engineering factors Cleaning process parameters: cleaning agent dosage, stirring speed, contact time, and cleaning temperature.
[0120] To facilitate subsequent data processing, the above variables are numbered, and the cleanliness rate is... Quartz is Potassium feldspar is Calcite is plagioclase is Dolomite is Pyrite is Magnesite is , cubic zeolite is Hematite is Barite is Anhydrite is The clay content is Anatase is n-Octane is n-Nonane is n-Decane is nC11 is nC12 is nC13 is nC14 is nC15 is nC16 is nC17 is nC18 is nC19 is nC20 is nC21 is nC22 is nC23 is nC24 is nC25 is nC26 is nC27 is nC28 is nC29 is nC30 is nC31 is nC32 is nC33 is nC34 is nC35 is The stirring speed is Contact time is The cleaning temperature is The cleaning agent dosage is .
[0121] Step Two: Raw Data Acquisition and Preprocessing Data related to the cleaning process were obtained through indoor experiments, including raw data such as cleaning agent cleaning rate, organic and inorganic components of residues, and cleaning process parameters, as shown in Table 1. The raw data information was extracted, and a visual analysis of the basic statistical indicators was conducted to determine whether the selected variables followed a normal distribution. If the cleaning data did not conform to a normal distribution, new cleaning data was obtained; data normalization methods were used to eliminate the dimensions of each parameter and map the data range to the same interval.
[0122] Table 1. Relationship between cleaning efficiency of citric acid cleaning agent and content of residual components and cleaning process parameters
[0123] Step 3: Pairwise regression analysis: Based on the normalized cleaning data, pairwise factor analysis was performed, and a single-factor equation for the cleaning rate in terms of residue composition and cleaning process parameters was obtained through simple linear regression: The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: ; The one-way fitting relationship is as follows: .
[0124] Step 4: Establish the optimal cleaning rate model: Based on normalized cleaning data, multiple regression, ridge regression, lasso regression and stepwise regression were used to fit the relationship between cleaning agent cleaning rate and residual components and cleaning process parameters, respectively, to obtain multiple regression model, ridge regression model, lasso regression model and stepwise regression model of cleaning effect, and the weighted evaluation index of each model was determined.
[0125] Multiple regression models can provide In the multiple regression model, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,clear When the coefficients are zero, the model's MSE, MAE, and RMSE are... They are 1.39793E-28, 9.69595E-15, 1.18234E-14, and 1.
[0126] Ridge regression models can provide The model obtained from ridge regression has the following parameters: MSE, MAE, RMSE. The values are 3.692584965, 1.605033893, 1.921609993, and 0.997560792, respectively.
[0127] Lasso regression model can provide In the model obtained from lasso regression, only , , , , The coefficients are not zero, and the model's MSE, MAE, and RMSE are... The values are 1.306499737, 0.99749412, 1.143022194, and 0.999136966, respectively.
[0128] Stepwise regression models can provide In the fitted model, only The coefficients are not zero. The model's MSE, MAE, and RMSE are... The values are 401.8081, 18.03666667, 20.04515153, and 0.734577895, respectively.
[0129] Based on the weighted evaluation indices of each model, the model with the smallest weighted evaluation index is determined. If there is only one model with the smallest weighted evaluation index, then that model is selected as the optimal cleanliness rate model. If there are two or more models with the smallest weighted evaluation index, then the optimal cleanliness rate model is selected based on at least one of the following: coefficient of determination, mean square error, root mean square error, and mean absolute error. The weighted evaluation index for the regression model is... , Mean square error, Mean absolute error Root mean square difference The coefficient of determination is used. The error assessment indices for multiple regression, stepwise regression, ridge regression, and lasso regression are calculated to be 1.93919E-15, 204.6177919, 2.167393006, and 0.852768422, respectively. It can be seen that the multiple regression model has the smallest weighted evaluation index, and is therefore determined to be the optimal cleanliness rate model. The model equation is: .
[0130] Step 5: Quantitative Diagnosis of Controlling Factors: After selecting the optimal model, the contribution rate of each independent variable is calculated using the contribution rate formula. (Quartz) The contribution rate was 0.165 for pyrite. The contribution rate was 0.065, anhydrite. The contribution rate was 0.333, nC35 The contribution rate was 0.556, and the stirring speed was... The contribution rate was 0.00055, and the cleaning temperature was... The contribution rate was 0.047. Comparing the contribution rates of each variable, it can be seen that the main controlling factor is the nC35 content. However, the nC35 content is an uncontrollable variable. Therefore, the main controllable factor for the cleaning rate is the cleaning temperature.
[0131] Step Six: Multi-dimensional Parameter Optimization Based on the optimal cleaning rate model selected in step four, cost constraints are introduced, and combined with multiple constraints, the cleaning parameters with the lowest cost are obtained by back-calculation using the linear programming particle swarm algorithm.
[0132] 1. Determine the basic parameters of the algorithm.
[0133] (1) Determine the objective function.
[0134] In step four, the optimal cleanliness model equation has been selected as follows: Among them, variables , , , , , The corresponding variable names are quartz, pyrite, anhydrite, nC35, stirring speed, and cleaning temperature. Quartz, pyrite, anhydrite, and nC35 are all residues from decommissioned pipelines and are uncontrollable variables; therefore, they are not included in the cost function. The unit price corresponding to the remaining variables is... Cost function It can be shown in the following formula thirteen: Formula Thirteen.
[0135] (2) Determine the constraints.
[0136] ① Equality Constraints: Cleaning Agent Cleaning Rate Model Equation These are the primary equality constraints.
[0137] ② Inequality constraints; the values of each variable are within a certain range, and the stirring time ranges from [15, 30] square meters per hour (m²). 3 / h), and the cleaning temperature is [30, 60]℃.
[0138] To ensure the optimization results are acceptable for engineering applications, further constraints are introduced, requiring the cleanliness rate predicted by the regression model to meet the user-defined target value. The inequality relationship can be represented by the following formula fourteen: Formula Fourteen.
[0139] If a certain configuration If the above conditions cannot be met, a penalty will be imposed. This allows for the automatic exclusion of combinations that do not meet the cleanliness requirements during the optimization process.
[0140] (3) Determining the inertia weight.
[0141] Inertia weights are used to balance the global search and local exploration capabilities of the particle swarm optimization algorithm; larger values enhance exploration, while smaller values promote convergence. Setting w=0.7 balances convergence speed and search capability, making it suitable for most optimization problems.
[0142] (4) The number of particles is determined.
[0143] More particles result in a more comprehensive search but also increase computational cost, while too few particles can easily lead to getting stuck in local optima. Setting the number of particles to 30 is a commonly used default value in most literature and engineering practice, offering stable results and high efficiency, and can be adjusted according to the complexity of the problem.
[0144] (5) Determine the number of iterations.
[0145] The number of iterations determines the search depth. Too few iterations make convergence difficult, while too many iterations lead to high computational costs and diminishing returns. Setting the number of iterations to 100-200 is sufficient for most medium-complexity problems, with 100 being the commonly used default value.
[0146] 2. Program calculation.
[0147] Using a Python program, the configuration corresponding to each particle is evaluated for cost through an objective function. If the predicted cleanliness rate constraint is met, the calculated cost is returned; otherwise, it is assigned a value of positive infinity.
[0148] During the iteration process, particles continuously update their position and velocity, guided by their individual historical best position (pbest) and global best position (gbest), gradually approaching the optimal parameter combination. To improve the stability and diversity of solutions, this study repeats the optimization process 10 times, selecting the top 10 lowest-cost optimal configurations as the recommended results.
[0149] The method proposed in this application can systematically and efficiently identify the main controlling factors affecting the cleaning effect and optimize the cleaning process parameters, so as to achieve a balance between cleaning efficiency and economy, and has good engineering adaptability and promotion and application value.
[0150] The above description primarily focuses on the solutions provided by the embodiments of this application from the perspective of computer devices. It is understood that, in order to achieve the aforementioned functions, the computer device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the steps for determining the pipeline cleaning strategy in the various examples described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0151] This application also provides a device for determining a pipeline cleaning strategy. This device can be a computer device, a central processing unit (CPU) within the aforementioned computer device, a processing module within the aforementioned computer device for determining the pipeline cleaning strategy, or a client within the aforementioned computer device for determining the pipeline cleaning strategy.
[0152] This application embodiment can divide the pipeline cleaning strategy determination device into functional modules or functional units according to the above method example. For example, each function can be divided into a separate functional module or functional unit, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or in software functional modules or functional units. The module or unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0153] like Figure 5 The diagram shown is a structural schematic of a pipe cleaning strategy determination device provided in an embodiment of this application. The pipe cleaning strategy determination device 500 may include an acquisition module 501 and a processing module 502.
[0154] The acquisition module 501 is used to acquire sample data for pipeline cleaning, including the cleaning rate of the cleaning agent, residue composition, and cleaning process parameters. The processing module 502 is used to fit the relationship between the cleaning rate of the cleaning agent and the residue composition and cleaning process parameters based on the sample data using multiple regression, ridge regression, lasso regression, and stepwise regression, respectively, to obtain a multiple regression model, a ridge regression model, a lasso regression model, and a stepwise regression model for cleaning effect. The processing module 502 is also used to determine the error evaluation index of the pipeline cleaning strategy for each regression model in the multiple regression model, ridge regression model, lasso regression model, and stepwise regression model for cleaning effect. The processing module 502 is also used to determine a target cleaning rate model from the multiple regression model, ridge regression model, lasso regression model, and stepwise regression model for cleaning effect according to a preset index threshold, where the error evaluation index of the pipeline cleaning strategy determined by the target cleaning rate model is less than the preset index threshold. Finally, the processing module 502 is used to determine the target strategy for pipeline cleaning using the target cleaning rate model.
[0155] In some embodiments, the acquisition module 501 is specifically used to acquire raw data of pipeline cleaning; the processing module 502 is further used to normalize the raw data to obtain sample data if the raw data conforms to a normal distribution.
[0156] In some embodiments, the acquisition module 501 is further configured to acquire pipeline cleaning data again if the original data does not conform to a normal distribution.
[0157] In some embodiments, the residue components include multiple first sub-components, and the cleaning process parameters include multiple first sub-parameters. The processing module 502 is specifically used to perform pairwise factor analysis on the cleaning rate of the cleaning agent in the sample data with each first sub-component and each first sub-parameter to determine the correlation between each first sub-component and the cleaning rate of the cleaning agent, and the correlation between each first sub-parameter and the cleaning rate of the cleaning agent. The processing module 502 is also used to determine target data from the sample data according to a preset correlation threshold. The target data includes the cleaning rate of the cleaning agent, at least one second sub-component among the multiple first sub-components, and at least one second sub-parameter among the multiple first sub-parameters. The correlation between the second sub-component and the cleaning rate of the cleaning agent is greater than the preset correlation threshold, and the correlation between the second sub-parameter and the cleaning rate of the cleaning agent is greater than the preset correlation threshold. The processing module 502 is also used to, based on the target data, use multiple regression, ridge regression, lasso regression, and stepwise regression to fit the relationship between the cleaning rate of the cleaning agent and at least one second sub-component and at least one second sub-parameter, respectively, to obtain a multiple regression model, a ridge regression model, a lasso regression model, and a stepwise regression model for the cleaning effect.
[0158] In some embodiments, the error evaluation index for each regression model is determined by combining the model's mean squared error, mean absolute error, root mean squared error, and coefficient of determination.
[0159] In some embodiments, the processing module 502 is further configured to determine the contribution rate of each first independent variable in the target strategy to pipeline cleaning, wherein each first independent variable includes residual components and cleaning process parameters; the processing module 502 is further configured to determine the controlling factor from each first independent variable according to a preset contribution rate threshold, wherein the controlling factor includes at least one second independent variable, and the contribution rate of the second independent variable to pipeline cleaning is greater than the preset contribution rate threshold.
[0160] In some embodiments, the main control factors are divided into controllable factors and uncontrollable factors; the processing module 502 is further configured to determine the parameter values of each second independent variable in the controllable factors based on the cost information of each second independent variable in the controllable factors, wherein the total cost corresponding to the parameter values of each second independent variable in the controllable factors is less than a preset cost threshold.
[0161] Figure 6 This is a schematic diagram of a device for determining a pipeline cleaning strategy, provided in an embodiment of this application. The device may include a processor 602, which can be used to execute application code to implement the pipeline cleaning strategy determination method of this application.
[0162] Processor 602 may be a CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of programs according to the present application.
[0163] like Figure 6 As shown, the device for determining the pipeline cleaning strategy may further include a memory 603. The memory 603 stores the application code that executes the scheme of this application, and its execution is controlled by the processor 602.
[0164] Memory 603 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory 603 may exist independently and be connected to processor 602 via bus 604. Memory 603 may also be integrated with processor 602.
[0165] like Figure 6 As shown, the device for determining the pipeline cleaning strategy may further include a communication interface 601, wherein the communication interface 601, processor 602, and memory 603 may be coupled to each other, for example, through a bus 604. The communication interface 601 is used for information exchange with other devices, for example, supporting information exchange between the device for determining the pipeline cleaning strategy and other devices.
[0166] It should be pointed out that, Figure 6 The equipment structure shown does not constitute a limitation on the specific equipment required for this pipeline cleaning strategy, except... Figure 6 In addition to the components shown, the equipment for determining the pipeline cleaning strategy may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0167] In actual implementation, Figure 5 The functions implemented by the processing module 502 in the middle can all be provided by Figure 6 The processor 602 shown calls the program code in memory 603 to implement this.
[0168] This application also provides a computer-readable storage medium storing instructions that, when executed by a processor of a computer device, enable the computer to perform the determination of the pipeline cleaning strategy provided in the embodiments described above. For example, the computer-readable storage medium may be a memory 603 including instructions, which may be executed by a processor 602 of a computer device to complete the method described above. Optionally, the computer-readable storage medium may be a non-transitory computer-readable storage medium, such as a ROM, RAM, CD-ROM, magnetic tape, floppy disk, or optical data storage device.
[0169] Figure 7 This is a conceptual partial view of a computer program product provided in an embodiment of this application. The computer program product includes a computer program for executing computer processes on a computing device.
[0170] In one embodiment, a computer program product is provided using a signal bearer medium 700. The signal bearer medium 700 may include one or more program instructions that, when executed by one or more processors, can provide the above-mentioned... Figure 2 The described function or part of the function. Therefore, for example, refer to... Figure 2 In the embodiment shown, one or more features of S201-S205 can be fulfilled by one or more instructions associated with the signal carrying medium 700. Furthermore, Figure 7 The program instructions in the document also describe example instructions.
[0171] In some examples, the signal carrying medium 700 may include a computer-readable medium 701, such as, but not limited to, a hard disk drive, a compact disc (CD), a digital versatile disc (DVD), a digital magnetic tape, a memory, a read-only memory (ROM), or a random access memory (RAM), etc.
[0172] In some implementations, the signal carrying medium 700 may include a computer recordable medium 702, such as, but not limited to, a memory, a read / write (R / W) CD, a R / W DVD, etc.
[0173] In some implementations, the signal carrying medium 700 may include a communication medium 703, such as, but not limited to, digital and / or analog communication media (e.g., fiber optic cables, waveguides, wired communication links, wireless communication links, etc.).
[0174] The signal-bearing medium 700 can be transmitted by a wireless communication medium 703. One or more program instructions may be, for example, computer-executable instructions or logical implementation instructions.
[0175] In some examples, such as targeting Figure 5 The device for determining the described pipeline cleaning strategy can be configured to provide various operations, functions, or actions in response to one or more program instructions in a computer-readable medium 701, a computer-recordable medium 702, and / or a communication medium 703.
[0176] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0177] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0178] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be in one place or distributed in multiple different locations. Some or all of the constituent units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0179] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0180] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, essentially, or the part that contributes to the prior art, or a complete or partial classification of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0181] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for determining a pipeline cleaning strategy, characterized in that, The method includes: Obtain sample data for pipeline cleaning, including: cleaning rate of cleaning agent, residue composition and cleaning process parameters; Based on the sample data, multiple regression, ridge regression, lasso regression and stepwise regression were used to fit the relationship between the cleaning rate of the cleaning agent and the residual components and the cleaning process parameters, respectively, to obtain the multiple regression model, ridge regression model, lasso regression model and stepwise regression model of the cleaning effect; The error evaluation index of the pipeline cleaning strategy is determined for each of the following regression models: the multiple regression model for cleaning effect, the ridge regression model for cleaning effect, the lasso regression model for cleaning effect, and the stepwise regression model for cleaning effect. Based on a preset index threshold, a target cleanliness model is determined from the multiple regression model of cleaning effect, the ridge regression model of cleaning effect, the lasso regression model of cleaning effect, and the stepwise regression model of cleaning effect. The error evaluation index of the target cleanliness model for determining the pipeline cleaning strategy is less than the preset index threshold. The target cleaning rate model is used to determine the target strategy for pipeline cleaning.
2. The method according to claim 1, characterized in that, The acquisition of sample data for pipeline cleaning includes: Obtain raw data from pipeline cleaning; If the original data conforms to a normal distribution, the original data is normalized to obtain the sample data.
3. The method according to claim 2, characterized in that, The method further includes: If the original data does not conform to a normal distribution, the pipeline cleaning data is reacquired.
4. The method according to claim 1, characterized in that, The residue components include multiple first sub-components, and the cleaning process parameters include multiple first sub-parameters; Based on the sample data, the relationships between the cleaning rate of the cleaning agent and the residual components and the cleaning process parameters are fitted using multiple regression, ridge regression, lasso regression, and stepwise regression, respectively, to obtain multiple regression models, ridge regression models, lasso regression models, and stepwise regression models for cleaning effect, including: A pairwise factor analysis was performed on the cleaning rate of the cleaning agent in the sample data with each first sub-component and each first sub-parameter to determine the degree of correlation between each first sub-component and the cleaning rate of the cleaning agent, as well as the degree of correlation between each first sub-parameter and the cleaning rate of the cleaning agent. According to a preset correlation threshold, target data is determined from the sample data. The target data includes the cleaning rate of the cleaning agent, at least one second sub-component among the plurality of first sub-components, and at least one second sub-parameter among the plurality of first sub-parameters. The correlation between the second sub-component and the cleaning rate of the cleaning agent is greater than the preset correlation threshold, and the correlation between the second sub-parameter and the cleaning rate of the cleaning agent is greater than the preset correlation threshold. Based on the target data, the relationship between the cleaning rate of the cleaning agent and the at least one second sub-component and the at least one second sub-parameter is fitted using multiple regression, ridge regression, lasso regression and stepwise regression respectively, to obtain the cleaning effect multiple regression model, the cleaning effect ridge regression model, the cleaning effect lasso regression model and the cleaning effect stepwise regression model.
5. The method according to claim 1, characterized in that, The error evaluation index for each regression model is determined by combining the model's mean square error, mean absolute error, root mean square error, and coefficient of determination.
6. The method according to claim 1, characterized in that, The method further includes: Determine the contribution rate of each first independent variable in the target strategy to pipeline cleaning, wherein each first independent variable includes the residue composition and the cleaning process parameters; Based on a preset contribution rate threshold, a controlling factor is determined from each of the first independent variables. The controlling factor includes at least one second independent variable, and the contribution rate of the second independent variable to pipeline cleaning is greater than the preset contribution rate threshold.
7. The method according to claim 6, characterized in that, The main controllable factors are divided into controllable factors and uncontrollable factors; the method also includes: Based on the cost information of each second independent variable in the controllable factors, the parameter values of each second independent variable in the controllable factors are determined, and the total cost corresponding to the parameter values of each second independent variable in the controllable factors is less than a preset cost threshold.
8. A device for determining a pipeline cleaning strategy, characterized in that, include: Processor and memory; The processor and the memory are coupled; The memory is used to store one or more programs, the one or more programs including computer-executable instructions, wherein when the pipe cleaning strategy determination device is running, the processor executes the computer-executable instructions stored in the memory to cause the pipe cleaning strategy determination device to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium storing instructions, characterized in that, When the computer executes the instructions, the computer performs the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, The computer program product includes computer program instructions that, when executed, implement the method as described in any one of claims 1-7.