Method, device, computer storage medium and terminal for determining depth of crude oil dehydration

By predicting the water content of crude oil at the dehydration outlet using a neural network model and optimizing operating parameters, the problem of determining the dehydration depth in the dehydration of crude oil with high water content was solved, achieving a low-energy-consumption and low-cost dehydration process, and improving safety and economy.

CN122389533APending Publication Date: 2026-07-14PETROCHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PETROCHINA CO LTD
Filing Date
2025-01-13
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately determine the dehydration depth in crude oil dehydration processes with high water content and emulsification levels, leading to high energy consumption, increased costs, and greater safety risks.

Method used

A neural network model is used to predict the outlet water content of crude oil after dehydration, and the operating parameters of the second-stage dehydration are updated based on this. The cost model is optimized by combining a penalty term to determine the dehydration depth with the lowest overall cost.

Benefits of technology

It improves the accuracy of operating parameters, reduces energy consumption and costs, reduces carbon emissions, and enhances safety and the economics of the dehydration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122389533A_ABST
    Figure CN122389533A_ABST
Patent Text Reader

Abstract

A method, apparatus, computer storage medium, and terminal for determining the depth of crude oil dehydration are disclosed. In this embodiment, first process data is input into a pre-trained first neural network model for crude oil dehydration to obtain the outlet water content of the first stage. Based on the outlet water content of the first stage, second operating parameters for the second stage of crude oil dehydration are updated. Compared to related technologies that directly determine the dehydration depth information based on the first and second operating parameters of the first and second stages of crude oil dehydration, this embodiment improves the accuracy of the second operating parameters. The first operating parameters and the updated second operating parameters from the second process data are input into a pre-trained cost model for calculation. This improves the computational quality of the cost model while reducing its computational load, resulting in the lowest overall cost method for obtaining the crude oil dehydration depth information. This reduces energy consumption in the crude oil dehydration process and provides a foundation for reducing carbon emissions from crude oil dehydration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This article relates to crude oil processing technology, and more particularly to a method, apparatus, computer storage medium and terminal for determining the depth of crude oil dehydration. Background Technology

[0002] Increased water content in crude oil increases the proportion of ineffective work in the power system and the proportion of ineffective heat energy in the thermal system, and also easily causes corrosion and scaling in storage and transportation equipment. As major oilfields enter the middle and late stages of development, enhanced oil recovery methods such as water injection, polymer injection, and polymer injection are increasingly widely used, and the water content of the produced fluid in oil wells is increasing year by year, with the degree of emulsification of the oil-water mixture becoming more and more serious. When the water content of crude oil is high or the degree of emulsification is high, the relevant technologies generally adopt a two-stage crude oil dehydration method for crude oil dehydration treatment.

[0003] Currently, related technologies for two-stage crude oil dehydration include the following categories: pre-dehydration with electro-dehydration, three-phase separation with electro-dehydration, thermochemical dehydration with electro-dehydration, pre-dehydration with heating and chemical dehydration, three-phase separation with heating and chemical dehydration, and thermochemical dehydration with heating and chemical dehydration. To reduce the cost of crude oil dehydration, these technologies input the operating parameters of the first and second stages of crude oil dehydration into a cost model for training. This results in the lowest-cost operating parameters for both stages, and based on these parameters, information is obtained to rationally allocate the dehydration depth, thus achieving the desired crude oil dehydration process. Summary of the Invention

[0004] This application provides a method for determining the depth of crude oil dehydration, including: The first process data of a predetermined number of crude oil dehydration stages, which are stored in advance, are input into the first neural network model of a predetermined number of crude oil dehydration stages to obtain the outlet water content of the predetermined number of crude oil dehydration stages. The water content at the outlet of the first stage of crude oil dehydration is used as the water content at the inlet of the second stage of crude oil dehydration, and the second operating parameters of the second stage of crude oil dehydration in the second process data of the preset number are updated. The first operating parameters of crude oil dehydration in the first process data and the second operating parameters of crude oil dehydration in the updated second process data are input into the pre-trained cost model to obtain the dehydration depth information when the total cost of crude oil dehydration is minimized.

[0005] On the other hand, embodiments of this application also provide a computer storage medium storing a computer program, which, when executed by a processor, implements the above-described method for determining the depth of crude oil dehydration.

[0006] Furthermore, embodiments of this application also provide a terminal, including: a memory and a processor, wherein the memory stores a computer program; wherein, The processor is configured to execute computer programs in memory; When the computer program is executed by the processor, it implements the method for determining the depth of crude oil dehydration as described above.

[0007] Furthermore, embodiments of this application also provide an apparatus for determining the depth of crude oil dehydration, comprising: a first calculation unit, an update unit, and a cost calculation unit; wherein, The first processing unit is configured to input a pre-stored, preset number of first process data for crude oil dehydration into a pre-trained first neural network model for crude oil dehydration to obtain the outlet water content of the preset number of crude oil dehydration processes. The update unit is set to: use the outlet water content of a preset number of first-stage crude oil dehydration as the inlet water content of second-stage crude oil dehydration, and update the second operating parameters of second-stage crude oil dehydration in a preset number of second process data. The cost calculation unit is set to input the first operating parameters of crude oil dehydration in the first process data and the second operating parameters of crude oil dehydration in the updated second process data into the pre-trained cost model to obtain the dehydration depth information when the total cost of crude oil dehydration is the lowest.

[0008] This embodiment of the present disclosure inputs the first process data into a pre-established first neural network model for crude oil dehydration to obtain the outlet water content of the first stage of crude oil dehydration. Based on the outlet water content of the first stage of crude oil dehydration, the second operating parameters for the second stage of crude oil dehydration are updated. Compared with related technologies that directly determine the dehydration depth information based on the first operating parameters of the first stage of crude oil dehydration and the second operating parameters of the second stage of crude oil dehydration, this embodiment of the present disclosure improves the accuracy of the second operating parameters. The first operating parameters and the second operating parameters in the updated second process data are input into a pre-established cost model for calculation. While improving the calculation quality of the cost model, the computational load of the cost model is reduced, resulting in obtaining the dehydration depth information of crude oil dehydration at the lowest overall cost. This reduces the energy consumption of the crude oil dehydration process and provides a foundation for reducing carbon emissions from crude oil dehydration.

[0009] Other features and advantages of this application will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the application. Other advantages of this application can be realized and obtained by means of the solutions described in the description and the accompanying drawings. Attached Figure Description

[0010] The accompanying drawings are used to provide an understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0011] Figure 1This is a flowchart illustrating a method for determining the depth of crude oil dehydration according to an embodiment of this disclosure; Figure 2 This is a schematic diagram of the structure of the first neural network model according to an embodiment of the present disclosure; Figure 3 This is a schematic diagram of the structure of the second neural network model according to an embodiment of the present disclosure; Figure 4 This is a structural block diagram of an apparatus for determining the depth of crude oil dehydration according to an embodiment of the present disclosure. Detailed Implementation

[0012] This application describes several embodiments, but these descriptions are exemplary and not restrictive, and it will be apparent to those skilled in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with, or may replace, any feature or element of any other embodiment.

[0013] This application includes and contemplates combinations of features and elements known to those skilled in the art. The embodiments, features, and elements disclosed in this application can also be combined with any conventional features or elements to form unique inventive solutions. Any feature or element of any embodiment can also be combined with features or elements from other inventive solutions to form another unique inventive solution. Therefore, it should be understood that any feature shown and / or discussed in this application can be implemented individually or in any suitable combination. Therefore, the embodiments are not limited except by the limitations imposed by the appended claims and their equivalents. Furthermore, various modifications and changes can be made within the scope of the appended claims.

[0014] Furthermore, in describing representative embodiments, the specification may have presented methods and / or processes as a specific sequence of steps. However, the method or process should not be limited to the specific order of steps described herein, to the extent that it does not depend on such a specific order. As will be understood by those skilled in the art, other sequences of steps are also possible. Therefore, the specific order of steps set forth in the specification should not be construed as a limitation of the claims. Moreover, the claims concerning the method and / or process should not be limited to the steps performed in the written order, and those skilled in the art will readily understand that these orders can be varied and still remain within the spirit and scope of the embodiments of this application.

[0015] Figure 1A flowchart of a method for determining crude oil dehydration depth according to an embodiment of this disclosure is shown below. Figure 1 As shown, it includes: Step 101: Input the pre-stored first process data of a preset number of crude oil dehydration stages into the pre-trained first neural network model of crude oil dehydration stages to obtain the outlet water content of the preset number of crude oil dehydration stages. Step 102: Use the outlet water content of a preset number of first-stage crude oil dehydration stages as the inlet water content of the second-stage crude oil dehydration stages, and update the second operating parameters of the second-stage crude oil dehydration in the preset number of second process data. Step 103: Input the first operating parameters of crude oil dehydration in the first process data and the second operating parameters of crude oil dehydration in the updated second process data into the pre-trained cost model to obtain the dehydration depth information when the total cost of crude oil dehydration is the lowest.

[0016] This embodiment of the present disclosure inputs the first process data into a pre-trained first neural network model for crude oil dehydration to obtain the outlet water content of the first stage of crude oil dehydration. Based on the outlet water content of the first stage of crude oil dehydration, the second operating parameters for the second stage of crude oil dehydration are updated. Compared with related technologies that directly determine the dehydration depth information based on the first operating parameters of the first stage of crude oil dehydration and the second operating parameters of the second stage of crude oil dehydration, this embodiment of the present disclosure improves the accuracy of the second operating parameters. The first operating parameters and the second operating parameters in the updated second process data are input into a pre-trained cost model for calculation. While improving the calculation quality of the cost model, the computational load of the cost model is reduced, resulting in the lowest overall cost method for obtaining the dehydration depth information of crude oil dehydration. This reduces the energy consumption of the crude oil dehydration process and provides a foundation for reducing carbon emissions from crude oil dehydration.

[0017] In one exemplary instance, the preset quantity in this disclosure embodiment can be set by a person skilled in the art based on experience; for example, the preset quantity may be greater than 100. In one exemplary instance, the method of this disclosure embodiment further includes: When the water content at the outlet of a crude oil dehydration stage output by the first neural network model exceeds the preset first outlet water content percentage threshold, a first penalty term is added to the cost model to penalize the cost of the crude oil dehydration stage.

[0018] In one exemplary instance, the expression for the first penalty term in this disclosure embodiment is: ; In the formula, Ф 1P This represents the outlet water content of a segment of crude oil dehydration output by the first neural network model, where m represents the first outlet water content percentage threshold, and r represents the output water content of the first segment of crude oil dehydration. 1惩罚 This represents the first penalty coefficient used to penalize the cost of dehydrating a segment of crude oil.

[0019] In one exemplary instance, the method of this disclosure embodiment further includes: The updated second process data is input into the pre-trained second neural network model for two-stage crude oil dehydration to obtain the outlet water content of the two-stage crude oil dehydration. When the outlet water content of the second-stage crude oil dehydration output by the second neural network model is greater than the preset second outlet water content percentage threshold, a second penalty term is added to the cost model to penalize the cost of the second-stage crude oil dehydration.

[0020] In one exemplary instance, the expression for the second penalty term in this disclosure embodiment is: ; In the formula, Ф 2P This represents the outlet water content of the second-stage crude oil dehydration process output by the second neural network model, where n represents the second outlet water content percentage threshold, and r represents the output water content of the second-stage crude oil dehydration process. 2惩罚 This represents the second penalty coefficient, which penalizes the cost of the second stage of crude oil dehydration.

[0021] This embodiment of the disclosure avoids the safety risks caused by excessively high water content at the outlet during the crude oil dehydration process by adding a penalty term to the cost model, thereby improving the safety of the crude oil dehydration process.

[0022] In one exemplary instance, the cost of dehydration R 总脱水 With the minimum as the optimization objective, the mathematical expression of the cost model in this embodiment, which includes both a first penalty term and a second penalty term, is as follows:

[0023] Among them, R 一段 R represents the cost of dehydrating a segment of crude oil. 电脱 This indicates the cost of the second stage of crude oil dehydration.

[0024] This disclosure embodiment obtains the operating parameters for crude oil dehydration through cost model calculations. Based on the obtained operating parameters, the dehydration depth information of crude oil dehydration is obtained with reference to relevant principles. The dehydration depth information of crude oil dehydration may include the outlet water content of the first stage of crude oil dehydration. In this disclosure embodiment, the outlet water content of the second stage of crude oil dehydration only needs to meet the qualified standards for crude oil dehydration in the relevant technology. In the cost model calculation process, the main focus is on obtaining the information on the outlet water content of the first stage of crude oil dehydration that can achieve the lowest cost, provided that the outlet water content of the second stage of crude oil dehydration meets the qualified standards for crude oil dehydration.

[0025] In one exemplary instance, a crude oil dehydration process according to an embodiment of this disclosure may include: pre-dehydration or thermochemical dehydration.

[0026] In one exemplary instance, the second stage of crude oil dehydration according to the present disclosure may include: three-phase separation dehydration, electro-dehydration, or thermochemical dehydration.

[0027] In one exemplary instance, the first operating parameter for calculating the cost of a first stage of crude oil dehydration and the second operating parameter for calculating the cost of a second stage of crude oil dehydration in the cost model of this disclosure can be determined by those skilled in the art with reference to relevant technical analysis.

[0028] In one exemplary instance, when a segment of crude oil dehydration in this embodiment of the disclosure is pre-dehydration, the calculation... The first operating parameters that need to be used may include: first processing volume, first drug volume, and first interface height, etc. When crude oil dehydration is performed using thermochemical dehydration, calculate... The first operating parameters required may include: first processing volume, first drug quantity, first interface height, and first temperature, etc. When crude oil dehydration is performed as a three-phase separation dehydration, the calculation is as follows: The first operating parameters required may include: first throughput, first dosage, first oil-water interface height, first gas-liquid interface height, first temperature, and first operating pressure, etc. When the second stage of crude oil dehydration is electro-dehydration, the calculation is performed. The second operating parameters required may include: second throughput, second dehydration temperature, second dehydration voltage, second dehydration residence time, etc. When the second stage of crude oil dehydration is thermochemical dehydration, the calculation is... The second operating parameters required may include: second processing volume, second drug quantity, second interface height, and second temperature.

[0029] If the water content at the outlet of a crude oil dehydration stage is Ф 1P Greater than m, or the outlet water content Ф of the second-stage crude oil dehydration. 2P If the rate is greater than n, a penalty is imposed on the objective function of cost. Specifically, when the second-stage crude oil dehydration is electro-dehydration, m can be 30%; if the second-stage crude oil dehydration is thermochemical dehydration, m can be 50%, n can be 0.5%, and the first penalty coefficient r... 1惩罚 The value can be 100,000 yuan, and the second penalty coefficient r 2惩罚 The value can be set to 100,000 yuan. The above value can be determined by those skilled in the art based on the oil quality and other requirements.

[0030] In one exemplary instance, when the first stage of crude oil dehydration is pre-dehydration, the first amount of pre-dehydration agent added is C1 ∈ [20, 50], and the first interface height of pre-dehydration is h1 ∈ [2.1, 2.3]. When the second stage of crude oil dehydration is electro-dehydration, the second amount of pre-dehydration agent added is C2 ∈ [20, 80], the second interface height of the second stage of crude oil dehydration is h2 ∈ [0.4, 0.6], the second dehydration treatment temperature is T2 ∈ [40, 68], the second dehydration voltage is V2 ∈ [220, 340], and the second dehydration residence time is t2 ∈ [30, 45].

[0031] In one exemplary embodiment, the present disclosure can obtain a first neural network model by training a neural network algorithm in the related art with a first process data having a number of groups greater than or equal to 300; the first process data can be obtained from the dewatering station industrial control system, and the number of groups of the first process data can be determined and adjusted with reference to the related art.

[0032] If the first stage of crude oil dehydration is pre-dehydration, each set of first process data includes the first operating parameters, the inlet water content of the first stage of crude oil dehydration, and the outlet water content of the first stage of crude oil dehydration. If the crude oil dehydration of a stage is thermochemical dehydration, each set of first process data includes the first operating parameters, the inlet water content of the crude oil dehydration of a stage, and the outlet water content of the crude oil dehydration of a stage. If the crude oil dehydration stage is a three-phase separation dehydration, each set of first process data includes the first operating parameters, the inlet water content of the crude oil dehydration stage, and the outlet water content of the crude oil dehydration stage.

[0033] In one exemplary instance, embodiments of this disclosure can obtain a second neural network model by training a neural network algorithm in the related art with a second process data having a number of groups greater than or equal to 100; the second process data can be obtained from the dewatering station industrial control system, and the number of groups of the second process data can be determined and adjusted with reference to the related art.

[0034] If the second stage crude oil dehydration is a thermochemical dehydration unit, each set of second process data includes: second operating parameters, inlet water content of the second stage crude oil dehydration and outlet water content of the second stage crude oil dehydration; If the second stage crude oil dehydration is an electro-dehydration unit, each set of second process data includes: second operating parameters, inlet water content of the second stage crude oil dehydration and outlet water content of the second stage crude oil dehydration.

[0035] In one exemplary instance, the first neural network model of this disclosure establishes a mapping relationship between the inlet water content of a first-stage crude oil dehydration unit, the first operating parameter, and the outlet water content of the first-stage crude oil dehydration unit; taking the pre-dehydration unit as an example: like Figure 2As shown, the input layer of the first neural network model has two neurons, representing the first drug dosage C1 and the first interface height h1, respectively; it contains two hidden layers, with hidden layer 1 and hidden layer 2 having 8 and 5 neurons, respectively; the output layer has one neuron, representing the outlet water content Ф of a crude oil dehydration stage. 1p .

[0036] The mathematical expression is shown below: Ф 1p =r(W 1,1,5 Z 5,1 +B 1,1,1 (1) Z 1,5,1 =s(W 1,5,8 Y 1,8,1 +B 1,5,1 (2) Y 1,8,1 =s(W 1,8,2 X 1,2,1 +B 1,8,1 (3) in, X 1=( C 1, h 1) ’ The input matrix is ​​a 2x1 matrix; W 1,8,2 The weight matrix from the input layer to the first hidden neuron is an 8x2 matrix; B 1,8,1 Let be the bias matrix of the first layer of hidden neurons, which is an 8-row, 1-column matrix; Y 1,8,1 This is the output matrix of the first layer of hidden neurons, which is an 8x1 matrix; W 1,5,8 The weight matrix from the first hidden neuron to the second hidden neuron is a 5x8 matrix; B 1,5,1 This is the bias matrix of the hidden neurons in the second layer, which is a 5x1 matrix; Z 1,5,1 This is the output matrix of the second layer of hidden neurons, which is a 5x1 matrix; W 1,1,5 This is the weight matrix from the hidden neurons in the second layer to the neurons in the output layer; it is a 1-row, 5-column matrix. B 1,1,1 This represents the bias value of the output layer neurons.

[0037] The first neural network model after training should minimize the sum of squared relative errors, that is... min E1(W1, B1) = min ∑(Ф 1p / Ф-1)2 (4) In one exemplary instance, the input layer and hidden layer of the first neural network model in this embodiment of the present disclosure both use the Sigmoid first activation function s(X1), expressed as: s(X1)=1 / (1+e -X1 The output layer of the first neural network uses the ReLU first activation function r(X1), which is expressed as r(X1)=max(0,X1). In the formula, X1 is obtained from the first operation parameter through the first linear operation.

[0038] The first linear operation in this embodiment can be selected and adjusted by a technician based on experience. By using the first activation function s(X1) of Sigmoid and the first activation function r(X1) of ReLU, the gradient vanishing of the first neural network model is avoided, the complexity of the first neural network model is reduced, and the first penalty term of the cost model can be adapted.

[0039] In one exemplary instance, the second neural network model of this disclosure establishes a mapping relationship between the inlet water content, the second operating parameters, and the outlet water content of the two-stage crude oil dehydration process; taking the electro-dehydration unit as an example: The second neural network model is trained using data from different second temperatures T2, second drug dosage C2, second voltage V2, second inlet moisture content w2, second interface height h2, and second residence time t2; for example... Figure 3 As shown, the input layer of the second neural network model has 6 neurons, representing T2, C2, V2, w2, h2, and t2 respectively; where w2 is the outlet water content Φ obtained from training the first neural network model. 1p Hidden layer 1 and hidden layer 2 have 8 and 5 neurons respectively; the output layer has 1 neuron, representing the outlet water cut Ф of the two-stage crude oil dehydration process. 2p .

[0040] The mathematical expression is shown below: Ф 2p =r(W 2,1,5 Z 2,5,1 +B 2,1,1 (5) Z 2,5,1 =s(W 2,5,8 Y 2,8,1 +B 2,5,1 (6) Y 2,8,1 =s(W 2,8,6 X 6,1 +B 2,8,1 (7) Where X2=(T2, C2, V2, w2, h2, t2)' is the input matrix, which is a 6-row, 1-column matrix; where, W 2,8,6 This is the weight matrix from the input layer to the first hidden neuron, which is an 8x6 matrix; B 2,8,1 Let be the bias matrix of the first layer of hidden neurons, which is an 8-row, 1-column matrix; Y 2,8,1 This is the output matrix of the first layer of hidden neurons, which is an 8x1 matrix; W 2,5,8 The weight matrix from the first hidden neuron to the second hidden neuron is a 5x8 matrix; B 2,5,1 This is the bias matrix of the hidden neurons in the second layer, which is a 5x1 matrix; Z 2,5,1 This is the output matrix of the second layer of hidden neurons, which is a 5x1 matrix; W 2,1,5 This is the weight matrix from the hidden neurons in the second layer to the neurons in the output layer; it is a 1-row, 5-column matrix. B 2,1,1 This represents the bias value of the output layer neurons.

[0041] The trained second neural network model should minimize the sum of squared relative errors, that is... min E2(W2, B2) = min ∑(Ф 2p / Ф -1) 2 (8) In one exemplary instance, the input layer and hidden layer of the second neural network model in this embodiment of the present disclosure both use the Sigmoid second activation function s(X2), with the expression: s(X2)=1 / (1+e -X2 The output layer of the second neural network uses the ReLU second activation function r(X2), which is expressed as r(X2) = max(0, X2). In the formula, X2 is obtained from the second operation parameter through the second linear operation.

[0042] The second linear operation in this embodiment can be selected and adjusted by a technician based on experience. By using the Sigmoid second activation function s(X2) and the ReLU second activation function r(X2), the gradient vanishing of the second neural network model is avoided, and the complexity of the second neural network model is reduced. In addition, the second penalty term of the cost model can be adapted.

[0043] In one exemplary instance, the first neural network model and the second neural network model of this disclosure are connected in series. The outlet water content of the first stage of crude oil dehydration output by the first neural network model is the inlet water content of the second stage of crude oil dehydration. In other words, the outlet water content Ф of the first stage of crude oil dehydration output by the first neural network model is... 1p The inlet water content w2 of the two-stage crude oil dehydration is used as input to the second neural network model to realize the connection between the first neural network model and the second neural network model.

[0044] This disclosure also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the above-described method for determining the depth of crude oil dehydration.

[0045] This disclosure also provides a terminal, including: a memory and a processor, wherein the memory stores a computer program; wherein, The processor is configured to execute computer programs in memory; When a computer program is executed by a processor, it implements the method described above for determining the depth of crude oil dehydration.

[0046] Figure 4 A structural block diagram of the apparatus for determining the depth of crude oil dehydration according to an embodiment of this disclosure is shown below. Figure 4 As shown, it includes: a first calculation unit, an update unit, and a cost calculation unit; wherein, The first processing unit is configured to input a pre-stored, preset number of first process data for crude oil dehydration into a pre-trained first neural network model for crude oil dehydration to obtain the outlet water content of the preset number of crude oil dehydration processes. The update unit is set to: use the outlet water content of a preset number of first-stage crude oil dehydration as the inlet water content of second-stage crude oil dehydration, and update the second operating parameters of second-stage crude oil dehydration in a preset number of second process data. The cost calculation unit is set to input the first operating parameters of crude oil dehydration in the first process data and the second operating parameters of crude oil dehydration in the updated second process data into the pre-trained cost model to obtain the dehydration depth information when the total cost of crude oil dehydration is the lowest.

[0047] In one exemplary instance, the apparatus of this disclosure embodiment further includes a penalty processing unit, configured as follows: When the water content at the outlet of a crude oil dehydration stage output by the first neural network model exceeds the preset first outlet water content percentage threshold, a first penalty term is added to the cost model to penalize the cost of the crude oil dehydration stage.

[0048] In one exemplary instance, the expression for the first penalty term in this disclosure embodiment is: ; In the formula, Ф 1P This represents the water content at the outlet of a crude oil dehydration stage, where m represents the first outlet water content threshold, and r represents the water content at the outlet. 1惩罚 This represents the first penalty coefficient used to penalize the cost of dehydrating a segment of crude oil.

[0049] In one exemplary instance, the penalty processing unit of this disclosure embodiment is further configured as follows: The updated second process data is input into the pre-trained second neural network model for two-stage crude oil dehydration to obtain the outlet water content of the two-stage crude oil dehydration. When the outlet water content of the second-stage crude oil dehydration output by the second neural network model is greater than the preset second outlet water content percentage threshold, a second penalty term is added to the cost model to penalize the cost of the second-stage crude oil dehydration.

[0050] In one exemplary instance, the expression for the second penalty term in this disclosure embodiment is: ; In the formula, Ф 2P This represents the outlet water content of the second-stage crude oil dehydration process output by the second neural network model, where n represents the second outlet water content percentage threshold, and r represents the output water content of the second-stage crude oil dehydration process. 2惩罚 This represents the second penalty coefficient, which penalizes the cost of the second stage of crude oil dehydration.

[0051] In one exemplary instance, when the cost model of this disclosure embodiment simultaneously adds a first penalty term and a second penalty term, the expression is:

[0052] Among them, R 一段 R represents the cost of dehydrating a segment of crude oil. 电脱 This indicates the cost of the second stage of crude oil dehydration.

[0053] In one exemplary instance, the input layer and hidden layer of the first neural network model in this embodiment of the present disclosure both use the Sigmoid first activation function s(X1), expressed as: s(X1)=1 / (1+e -X1 The output layer of the first neural network uses the ReLU first activation function r(X1), which is expressed as r(X1)=max(0,X1). The second neural network model uses the sigmoid second activation function s(X2) for both the input layer and hidden layer, with the expression: s(X2)=1 / (1+e -X2 The output layer of the second neural network uses the ReLU second activation function r(X2), which is expressed as r(X2) = max(0, X2). X1 is obtained from the first operation parameter through the first linear operation, and X2 is obtained from the second operation parameter through the second linear operation.

[0054] The following application examples briefly illustrate the embodiments of this disclosure. These application examples are only used to illustrate the embodiments of this disclosure and are not intended to limit the scope of protection of the embodiments of this disclosure.

[0055] Application Examples In this embodiment of the invention, when the second-stage crude oil dehydration is performed using electro-dehydration, the outlet water content of the second-stage crude oil dehydration is [missing information]. Ф 电脱 This can be expressed as the second temperature T2, second dosage C2, second voltage V2, second interface height h2, second residence time t2, and second inlet water content w2 (i.e., the outlet water content of a first-stage crude oil dehydration process). Ф 一段 When crude oil is dehydrated into a pre-dehydration stage, Ф 一段 crude oil dehydration Ф 预脱 Mapping relationship: Ф 电脱 = f ( T 2, C 2, V 2, Ф 预脱 , h 2, t 2) (9) Ф 电脱 = r ( W 2,1,5 Z 2,5,1 + B 2,1,1 (10) Z 2,5,1 = s ( W 2,5,8 Y 2,8,1 + B 2,5,1 (11) Y 2,8,1 = s ( W 2,8,6 X 2,6,1 + B 2,8,1 (12) in, X2,6,1 =( T 2, C 2, V 2, Ф 预脱 , h 2, t 2) ' is a 6-row, 1-column matrix; This disclosure embodiment W 2,8,6 Let be the weight matrix from the input layer to the first hidden neuron in the electro-dehydration process. It is an 8x6 matrix, and the values ​​of can be:

[0056] B 2,8,1 This is the partial value matrix of the first layer of hidden neurons in the electro-dehydration process. It is an 8x1 matrix with possible values: (-1.2 0.1 -2.0 1.5 -2.4 -2.7 0.0 2.1)'; Y 2,8,1 This is the output matrix of the first layer of hidden neurons in the electro-dehydration process, an 8x1 matrix; W 2,5,8 This is the weight matrix for the first to second hidden neurons in the electro-dehydration process. It is a 5x8 matrix with possible values:

[0057] B 2,5,1 This is the partial value matrix of the second hidden neurons in the electro-dehydration layer. It is a 5x1 matrix, and the values ​​can be: (1.9 0 1.4-2.5 0.1)' Z 2,5,1 This is the output matrix of the second layer of hidden neurons in the electro-dehydration process, a 5x1 matrix; W 2,1,5 This is the weight matrix from the second hidden neuron in the electro-dehydration layer to the output neuron. It is a 1x5 matrix, and the values ​​can be: (-1.7 -2.5 0.9-1.7 2.1) B 2,1,1 This is the bias value for the output layer neurons in the electro-dehydrated state, with a value of -2.9.

[0058] s(X2) is the second activation function of the Sigmoid algorithm, expressed as: s(X2) = 1 / (1 + e^(-1 / 2)) -X2r(X2) is the second activation function of ReLU, and its expression is r(X2)=max(0,X2).

[0059] When crude oil dehydration is performed as pre-dehydration, the outlet water content of the pre-dehydration stage of crude oil dehydration is... Ф 预脱 This can be represented as a mapping relationship between the first dosage C1 added during pre-dehydration and the first interface height h1 during pre-dehydration: Ф 预脱 = g (C1, h1) (13) Ф 预脱 = r ( W 1,1,5 Z 5,1 + B 1,1,1 (14) Z 1,5,1 = s ( W 1,5,8 Y 1,8,1 + B 1,5,1 (15) Y 1,8,1 = s ( W 1,8,2 X 1,2,1 + B 1,8,1 (16) in, X 1,2,1 =(C1, h1)' is a 2-row, 1-column matrix; W 1,8,2 This is the weight matrix from the input layer to the first hidden neuron. It is an 8x2 matrix with possible values:

[0060] B 1,8,1 This is the partial value matrix of the first layer of hidden neurons, an 8x1 matrix, with possible values: (-3.1 0.4 2.9 0 -1.8 -0.8 1.2 0.2)' Y 1,8,1 This is the output matrix of the first layer of hidden neurons, an 8x1 matrix; W 1,5,8 The weight matrix from the first hidden neuron to the second hidden neuron is a 5x8 matrix, and its values ​​can be:

[0061] B 1,5,1 This is the bias matrix for the second layer of hidden neurons. It is a 5x1 matrix with possible values: (-1.9 -2.9 2.1 -0.6 -2)' Z 1,5,1 This is the output matrix of the second layer of hidden neurons, a 5x1 matrix; W 1,1,5 This is the weight matrix from the hidden neurons in the second layer to the output neurons. It is a 1x5 matrix, and the values ​​can be: (0.4 2.6 2.6 3.1 1) B 1,1,1 This is the bias value for the output layer neurons, and its value can be 1.8.

[0062] This embodiment of the present disclosure can use a genetic algorithm as the optimization algorithm for the cost model, using binary Gray encoding, an individual length of 29, a population of 41, a recombination coefficient of 0.7, and a mutation coefficient of 1.7%. The optimized results are shown in Table 1. It can be seen that reasonably adjusting the dehydration depth of the first stage of crude oil dehydration can reduce the total dehydration cost of crude oil dehydration. Taking the first stage of crude oil dehydration as pre-dehydration and the second stage of crude oil dehydration as electro-dehydration as an example, when the first stage of crude oil dehydration is too deep, compared with the optimized case of this embodiment, the outlet water content of the pre-dehydration in Case 1 is lower (20%), resulting in excessive pre-dehydration cost. Although the inlet water content and the amount of processed liquid in the second stage of electro-dehydration are lower, and the electro-dehydration cost is lower, the total cost of crude oil dehydration is 14.6% higher than that of the optimized case. When the pre-dehydration is too shallow, compared with the optimized case, that is, the outlet water content of the pre-dehydration is higher (30%). Although the pre-dehydration cost is lower, the inlet water content and the amount of processed liquid in the second stage of electro-dehydration are larger, and the electro-dehydration cost is higher, and the total cost is 17.7% higher than that of the optimized case.

[0063]

[0064] Table 1 It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term "computer storage medium" includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

Claims

1. A method for determining the depth of crude oil dehydration, characterized in that, include: The first process data of a predetermined number of crude oil dehydration stages, which are stored in advance, are input into the first neural network model of a predetermined number of crude oil dehydration stages to obtain the outlet water content of the predetermined number of crude oil dehydration stages. The water content at the outlet of the first stage of crude oil dehydration is used as the water content at the inlet of the second stage of crude oil dehydration, and the second operating parameters of the second stage of crude oil dehydration in the second process data of the preset number are updated. The first operating parameters of crude oil dehydration in the first process data and the second operating parameters of crude oil dehydration in the updated second process data are input into the pre-trained cost model to obtain the dehydration depth information when the total cost of crude oil dehydration is minimized.

2. The method according to claim 1, characterized in that, The method further includes: When the outlet water content of the crude oil dehydration stage output by the first neural network model is greater than the preset first outlet water content percentage threshold, a first penalty term is added to the cost model to penalize the cost of the crude oil dehydration stage.

3. The method according to claim 2, characterized in that, The expression for the first penalty term is: ; In the formula, Ф 1P The water content at the outlet of the crude oil dehydration process is represented by m, where m represents the first outlet water content percentage threshold, and r represents the water content at the outlet. 1惩罚 This represents the first penalty coefficient that penalizes the cost of dehydrating the crude oil in the aforementioned segment.

4. The method according to any one of claims 2 to 3, characterized in that, The method further includes: The updated second process data is input into the pre-trained second neural network model for two-stage crude oil dehydration to obtain the outlet water content of the two-stage crude oil dehydration. When the outlet water content of the second-stage crude oil dehydration output by the second neural network model is greater than the preset second outlet water content percentage threshold, a second penalty term is added to the cost model to penalize the cost of the second-stage crude oil dehydration.

5. The method according to claim 4, characterized in that, The expression for the second penalty term is: ; In the formula, Ф 2P This represents the outlet water content of the second-stage crude oil dehydration process output by the second neural network model, where n represents the second outlet water content percentage threshold, and r represents the output water content of the second-stage crude oil dehydration process. 2惩罚 This represents the second penalty coefficient that penalizes the cost of the two-stage crude oil dehydration process.

6. The method according to claim 4, characterized in that: The first neural network model uses the sigmoid first activation function s(X1) for both the input layer and hidden layer, with the expression: s(X1)=1 / (1+e -X1 The first neural network's output layer uses the ReLU first activation function r(X1), expressed as r(X1) = max(0, X1). The second neural network model uses the sigmoid second activation function s(X2) for both the input layer and hidden layer, with the expression: s(X2)=1 / (1+e -X2 The second neural network's output layer uses the ReLU second activation function r(X2), expressed as r(X2) = max(0, X2). Wherein, X1 is obtained by the first operation parameter through the first linear operation, and X2 is obtained by the second operation parameter through the second linear operation.

7. The method according to claim 4, characterized in that, When the cost model simultaneously adds the first penalty term and the second penalty term, the expression is: Among them, R 一段 R represents the cost of dehydrating a segment of crude oil. 电脱 This indicates the cost of the second stage of crude oil dehydration.

8. A computer storage medium storing a computer program that, when executed by a processor, implements the method for determining the depth of crude oil dehydration as described in any one of claims 1 to 7.

9. A terminal, comprising: A memory and a processor, wherein the memory stores a computer program; wherein, The processor is configured to execute computer programs in memory; When the computer program is executed by the processor, it implements the method for determining the depth of crude oil dehydration as described in any one of claims 1 to 7.

10. An apparatus for determining the depth of crude oil dehydration, comprising: The system comprises a first calculation unit, an update unit, and a cost calculation unit; among which... The first processing unit is configured to input a pre-stored, preset number of first process data for crude oil dehydration into a pre-trained first neural network model for crude oil dehydration to obtain the outlet water content of the preset number of crude oil dehydration processes. The update unit is set to: use the outlet water content of a preset number of first-stage crude oil dehydration as the inlet water content of second-stage crude oil dehydration, and update the second operating parameters of second-stage crude oil dehydration in a preset number of second process data. The cost calculation unit is set to input the first operating parameters of crude oil dehydration in the first process data and the second operating parameters of crude oil dehydration in the updated second process data into the pre-trained cost model to obtain the dehydration depth information when the total cost of crude oil dehydration is the lowest.