Liquid cargo safety analysis method based on digital twin technology
The liquid cargo safety analysis method constructed through digital twin technology solves the problems of high model accuracy and personnel skill requirements in the existing technology, realizes real-time monitoring and resource optimization, and ensures the accuracy and efficiency of liquid cargo safety analysis.
Patent Information
- Application Number
- CN202410930882.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Existing liquid cargo safety analysis methods suffer from model accuracy challenges, high personnel skill requirements and misjudgment problems, resulting in low analysis efficiency and inaccurate results.
Through the liquid cargo safety analysis method based on digital twin technology, we obtain data and images of the storage tank, build a three-dimensional scene model, estimate the replenishment amount of liquid cargo and the maximum flow rate of the pipeline, monitor the status of the storage tank in real time, and adjust the liquid level height and pipeline flow rate. Stay safe.
It achieves real-time monitoring and early warning, optimizes resource allocation, ensures production continuity, improves analysis efficiency and accuracy, and reduces misjudgments and resource waste.
Smart Images

Figure CN118485369B_ABST
Abstract
Description
Technical Field
[0001] The present invention discloses a liquid cargo safety analysis method based on digital twin technology and relates to the field of liquid safety analysis. Background Art
[0002] The existing methods for analyzing the safety of liquid cargoes have the following deficiencies:
[0003] Model accuracy challenge: The accuracy of the digital twin model directly affects the accuracy of the analysis results, and building a high-precision model is a difficult problem.
[0004] High personnel skill requirements: Operating and maintaining digital twin systems requires professionals to have a high level of technical skills and knowledge reserves.
[0005] Causes misjudgment: If there are errors in the digital twin model or the data is inaccurate, it will lead to deviations in the analysis results, thus causing misjudgment. Summary of the invention
[0006] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a liquid cargo safety analysis method based on digital twin technology, aiming to solve the problem of low efficiency of liquid cargo safety analysis.
[0007] In order to achieve the above object, the present invention is implemented through the following technical solutions: The liquid cargo safety analysis method based on digital twin technology includes:
[0008] Step S1: Obtain the number of current storage tanks and the weight, liquid level, liquid temperature and cavity temperature of the liquid cargo in each storage tank to obtain liquid data;
[0009] Obtain multi-angle pictures of the storage tank to obtain image data;
[0010] Step S2: Obtain the current time and determine the target quarter of the enterprise; obtain the historical data of the enterprise according to the target quarter; combine the historical data to process the liquid data once, and estimate the liquid cargo replenishment amount and the maximum flow of the pipeline;
[0011] Step S3: construct a three-dimensional scene model of the storage tank based on the image data; obtain the ambient temperature outside the storage tank and determine whether the storage tank is safe; if it is safe, do not process it; if it is not safe, perform secondary processing on the liquid data based on the maximum flow rate and adjust the liquid level height of the storage tank and the pipeline flow rate;
[0012] Step S4: Summarize the three-dimensional scene model and the amount of liquid cargo replenishment, and feed back to the user.
[0013] Furthermore, the specific steps of step S2 are as follows:
[0014] Step S21: Get the current time, recorded as t; define judgment formula 21, and determine the production quarter of the enterprise according to t as the target quarter;
[0015] Judgment formula 21: ; Among them, at i Indicates the start time of the i-th production quarter; bt i represents the end time of the i-th production quarter;
[0016] Step S22: Obtain historical data of the enterprise according to the target quarter;
[0017] Historical data include: the total incoming volume and daily incoming volume of liquid cargoes and the total outgoing volume and daily outgoing volume of liquid cargoes in the target quarters of the past three years;
[0018] Step S23: The total purchase and total shipment of liquid goods in the target quarters of the enterprise in the past three years are recorded as:
[0019] In the past year, the total purchase volume is Oi1, and the total shipment volume is Oo1;
[0020] In the past two years, the total purchase volume is Oi2, and the total shipment volume is Oo2;
[0021] In the past three years, the total purchase volume is Oi3, and the total shipment volume is Oo3;
[0022] Step S24: define calculation formula 22: ; The value range of m is 1 to 3, and the value range of n is 2 to 3; X n and X m , respectively, represents the total purchase volume or total shipment volume in the past m years and the past n years; up (X) m-n It indicates the growth rate of total liquid cargo purchase or total cargo shipment from the enterprise in the past m years to the past n years;
[0023] Substitute Oi1 and Oi2 into the X in equation 22. n and X m , calculate the total liquid cargo purchase volume growth rate up (Oi) in the past 1 to 2 years 1-2 ; Substitute Oi2 and Oi3 into X in equation 22 n and X m , calculate the total liquid cargo purchase volume growth rate up (Oi) in the past 2 to 3 years 2-3 ;
[0024] Substitute Oo1 and Oo2 into the X in equation 22 n and X m , calculate the total shipment growth rate of liquid cargo in the past 1 to 2 years up (Oo) 1-2; Substitute Oo2 and Oo3 into X in equation 22 n and X m , calculate the total shipment growth rate of liquid cargo in the past 2 to 3 years up (Oo) 2-3 ;
[0025] Step S25: record the duration of the enterprise's target quarter as dd; obtain the daily liquid cargo purchase and shipment volume of the enterprise's target quarters in the past three years, respectively, as:
[0026] In the past year, the purchase volume is Ai1~Ai dd , shipment volume Ao1~Ao dd ;
[0027] In the past two years, the purchase volume is Bi1~Bi dd , shipment volume Bo1~Bo dd ;
[0028] In the past three years, the purchase volume is Ci1~Ci dd , shipment volume Co1~Co dd ;
[0029] Step S26: Calculate and count the average, median and mode of the target quarterly liquid cargo purchase and shipment volumes of the enterprise in the past three years, respectively, and record them as:
[0030] In the past year, the corresponding means are aAi and aAo, the medians are cAi and cAo, and the modes are fAi and fAo;
[0031] In the past two years, the corresponding means are aBi and aBo, the medians are cBi and cBo, and the modes are fBi and fBo;
[0032] In the past three years, the corresponding means are aCi and aCo, the medians are cCi and cCo, and the modes are fCi and fCo;
[0033] Step S27: Summarize the data in steps S23 to S26, estimate and calculate the liquid cargo replenishment amount and the maximum flow rate of the pipeline.
[0034] Furthermore, the specific steps of step S27 are as follows:
[0035] Step S271: define judgment formula 23, substitute the daily liquid cargo purchase and shipment volume of the enterprise in the target quarters of the past three years into judgment formula 23, and count the number of judgment formulas 23 satisfied by the enterprise in the past three years, and record them as adi and ado, bdi and bdo, and cdi and cdo respectively;
[0036] Judgment formula 23: 3*Y m ≥aY+cY+fY and 3*Z m ≥aZ+cZ+fZ;
[0037] Among them, Y m It represents the daily liquid cargo purchase volume of the enterprise in the target quarter in the past three years, that is, Y m The range of the indication is: purchase quantity Ai1~Ai dd , purchase quantity Bi1~Bi dd , purchase quantity Ci1~Ci dd ;
[0038] aY, cY and fY represent: m The mean, median and mode of liquid cargo purchase volume in the corresponding year;
[0039] Among them, Z m It represents the daily liquid cargo shipment volume of the enterprise in the target quarter in the past three years, i.e. Z m The range of the shipment volume is Ao1~Ao dd , shipment volume Bo1~Bo dd , shipment volume Co1~Co dd ;
[0040] aZ, cZ and fZ respectively represent: m Mean, median and mode of liquid cargo shipments in the corresponding years;
[0041] Step S272: construct the state transition matrix of the purchase growth rate of the enterprise's target quarterly liquid goods, matrix 24; and the state transition matrix of the shipment growth rate, matrix 25;
[0042] Matrix 24:
[0043] ;
[0044] Matrix 25:
[0045] ;
[0046] Wherein, n represents the number of iterations of matrix 24 and matrix 25, and × represents matrix multiplication; n is a natural number, and the initial value of n is 1; each time the state transfer matrix is iterated once, n is increased by 1 on the original basis;
[0047] Use the NumPy library function to iterate matrix 24 and matrix 25 to obtain steady-state state transfer matrices, which are recorded as matrix C24 and matrix C25;
[0048] Step S273: define a 3-row 1-column matrix of [1,0,0] as a first dimension reduction matrix; multiply the matrix C24 and the matrix C25 with the first dimension reduction matrix respectively to obtain the matrix D24 and the matrix D25;
[0049] Step S274: define a 2-row 1-column matrix of [1,0] as a secondary dimension reduction matrix, and multiply the matrix D24 and the matrix D25 with the secondary dimension reduction matrix respectively to obtain the matrix E24 and the matrix E25;
[0050] Read the values of matrix E24 by column, and record them as uui1 and uui2 respectively; calculate the sum uui of uui1 and uui2, where uui is the growth coefficient of liquid cargo purchase volume;
[0051] Read the values of matrix E25 by column, and record them as uuo1 and uuo2 respectively; calculate the sum uuo of uuo1 and uuo2, where uuo is the growth coefficient of liquid cargo shipment volume;
[0052] Step S275: The number of storage tanks is recorded as sn; the weight of the liquid cargo in each storage tank is recorded as m1, m2~m sn ;
[0053] Calculate the total weight of liquid cargo in all storage tanks, expressed as mm;
[0054] Step S276: record the start time of the target progress as st, and the end time as ft; obtain the cumulative purchase volume and cumulative shipment volume of liquid goods in the enterprise from st to t, and record them as Zi and Zo respectively;
[0055] Step S277: Estimate the amount of liquid cargo to be replenished and calculate the maximum flow rate of the pipeline.
[0056] Furthermore, the specific steps of step S277 are as follows:
[0057] Step S2771: Estimate the total incoming volume IM of liquid cargo. The calculation formula of IM is as follows:
[0058] ;
[0059] Estimate the total shipment volume OM of liquid cargo. The calculation formula of OM is as follows:
[0060] ; Wherein, t represents the current time;
[0061] Step S2772: Estimate the remaining incoming quantity RI of liquid cargo, RI = IM - Zi; the remaining outgoing quantity RO, RO = OM - Zo;
[0062] Step S2773: determine whether RI+mm≥RO is established;
[0063] If this is true, the liquid cargo replenishment amount ΔCM = RI;
[0064] If not, the liquid cargo replenishment ΔCM = RO;
[0065] Step S2774: Obtain the working time of the pipeline, recorded as wt; obtain the number of pipelines connected to the storage tank, recorded as pn;
[0066] Calculate the maximum flow rate Vm of the pipeline. The calculation formula of Vm is as follows:
[0067] .
[0068] Furthermore, the specific steps of step S3 are as follows:
[0069] Step S31: constructing a three-dimensional scene model of the storage tank according to the image data;
[0070] Step S32: Summarize the liquid data corresponding to the storage tanks No. 1 to No. sn, record the liquid level as h, the liquid temperature as to, and the cavity temperature as ta, and obtain;
[0071] Liquid data corresponding to storage tank No. 1, m1, h1, to1 and ta1;
[0072] Liquid data corresponding to storage tank No. 2, m2, h2, to2 and ta2;
[0073] Similarly, the liquid data corresponding to the storage tank No. sn, m sn 、h sn 、to sn And sn ;
[0074] Where sn represents the number of storage tanks and m represents the weight of liquid cargo;
[0075] Step S33: obtaining the cross-sectional area of the pipeline, denoted as sp; obtaining the cross-sectional area of the storage tank, denoted as ss;
[0076] Get the safe temperature of the liquid cargo, recorded as tt; determine tt≥(to1+to2+……+to sn ) / sn is established;
[0077] If so, it means that the liquid temperature is safe, and the liquid level and pipeline flow rate are not adjusted, and steps S34 to S37 are skipped;
[0078] If not, it means that the liquid temperature is too high, and the liquid level and pipeline flow rate are adjusted, and the process goes to step S34;
[0079] Step S34: obtaining the ambient temperature outside the storage tank, denoted as ti;
[0080] Definition judgment formula 31: (ti>ta i )∩(ti>to i ); where the value range of i is 1 to sn;
[0081] Set the to1~to corresponding to the storage tanks 1~sn sn and ta1~ta sn , substituted into judgment formula 31; the storage tanks satisfying judgment formula 31 are summarized as adjustment storage tanks, and the number of adjustment storage tanks is counted, recorded as rn; the storage tanks not satisfying judgment formula 31 are summarized as target storage tanks, and the number of target storage tanks is counted, recorded as on; rn, on and sn satisfy sn=rn+on;
[0082] Step S35: Define judgment formula 32: ; Where x represents 1 to rn;
[0083] Adjust the storage tank to1~to sn and ta1~ta sn , substituted into judgment formula 32; the adjustment storage tanks satisfying judgment formula 32 are summarized as primary adjustment storage tanks, and the number of primary adjustment storage tanks is counted, recorded as an; the adjustment storage tanks not satisfying judgment formula 32 are summarized as secondary adjustment storage tanks, and the number of secondary adjustment storage tanks is counted, recorded as bn; an, bn and rn satisfy rn=an+bn;
[0084] Step S36: adjusting the liquid level and pipeline flow rate corresponding to the storage tank once;
[0085] Step S37: Repeat the same steps of adjusting the liquid level and pipeline flow corresponding to the primary adjustment storage tank, and adjust the liquid level and pipeline flow corresponding to the secondary adjustment storage tank; if liquid cargo is moved into the secondary adjustment storage tank, the liquid cargo in the target storage tank is moved into the secondary adjustment storage tank; if liquid cargo is moved out of the secondary adjustment storage tank, the liquid cargo in the secondary adjustment storage tank is moved into the target storage tank.
[0086] Furthermore, the specific steps of step S31 are as follows:
[0087] Step S311: Count the total number of pictures in the image data, recorded as pp; create three blank image sets; respectively collect the aerial, horizontal and side pictures in the image data, and fill them into the blank image sets to obtain image set 1, image set 2 and image set 3;
[0088] Step S312: process image set 1; count the number of pictures in image set 1 and record it as pp1;
[0089] Using the Harris algorithm, calculate the horizontal gradient and vertical gradient of each pixel of the first image in image set 1;
[0090] Horizontal gradient Ix(x,y): ;
[0091] Vertical gradient Iy(x,y): ;
[0092] Among them, (x, y) represents the coordinates of the pixel in the image, G represents the Gaussian filter, and I represents the image; Represents the derivative of the pixel in the horizontal direction of the image; Represents the derivative of the pixel in the vertical direction of the image;
[0093] Step S313: repeat step S312 to extract the horizontal gradient and vertical gradient of the 2nd to pp1th pictures in image set 1;
[0094] Step S314: using the Ransac algorithm, feature matching is performed according to the order of the time frames of the images in the image set 1 to obtain feature points of the three-dimensional structure of the storage tank;
[0095] Step S315: using the ICP algorithm and the NDT algorithm to perform point cloud registration on the feature points; then using the Delaunay triangulation expansion algorithm to perform point cloud expansion to obtain a point cloud model of the storage tank;
[0096] Step S316: Use meshlab software to recreate the point cloud model to obtain a storage tank model 1;
[0097] Step S317: Repeat the same steps of processing image set 1 to process image set 2 and image set 3 to obtain storage tank model 2 and storage tank model 3; use the Meshlab system to splice storage tank model 1, storage tank model 2 and storage tank model 3 to obtain a three-dimensional scene model of the storage tank.
[0098] Furthermore, the specific steps of step S36 are as follows:
[0099] Step S361: adjusting the liquid level and pipeline flow of the first primary adjustment storage tank;
[0100] Get the specific heat capacity of the liquid cargo, recorded as co; get the density and specific heat capacity of the oil and gas, recorded as ρa and ca respectively; get the total height of the storage tank, recorded as HH;
[0101] Calculate the volume of oil and gas Va, Va = (HH-ho) * ss; where ho represents h1;
[0102] Step S362: Define the heat transfer equation Q1 from the ambient temperature to the liquid temperature i→o :
[0103] ;
[0104] Heat transfer equation from ambient temperature to (oil and gas) cavity temperature Q1 i→a :
[0105] ; Where mo represents the weight of liquid cargo, ma represents the weight of oil and gas, ma=Va*ρa;
[0106] Equation Q1 i→o and Q1 i→a To and ta in it represent to1 and ta1 respectively;
[0107] Step S363: Substitute equation Q1 i→o and equation Q1 i→a The values of are recorded as Qio and Qia respectively; compare the sizes of Qio and Qia;
[0108] If Qio≥Qia, the liquid cargo transfers heat to the oil and gas, the pressure in the storage tank increases, the storage tank removes the liquid cargo, and the process goes to step S364;
[0109] If Qio<Qia, the oil gas transfers heat to the liquid cargo, the pressure in the storage tank decreases, and the storage tank is moved into the liquid cargo, and the process goes to step S365;
[0110] Step S364: Qio≥Qia, the storage tank removes the liquid cargo;
[0111] Step S365: Qio<Qia, liquid cargo is moved into the storage tank;
[0112] Step S366: Repeat the same steps of adjusting the liquid level height and pipeline flow rate of the first one-time adjustment storage tank, and adjust the liquid level height and pipeline flow rate of the second to an one-time adjustment storage tanks.
[0113] Furthermore, the specific steps of step S364 are as follows:
[0114] Step S3641: Calculate the heat Q2 transferred from the liquid cargo to the oil and gas, Q2 = 1 / 2 (Qio + Qia) - Qia;
[0115] The total volume of liquid cargo removed from the storage tank, ΔV, is calculated as follows:
[0116] ;
[0117] Step S3642: Calculate the adjusted liquid level Δh, Δh=ho-ΔV / ss; where ho represents h1;
[0118] The pipeline flow rate of the connection (the first primary adjustment storage tank) is Δvv, Δvv = ΔV / sp;
[0119] Step S3643: Determine the size of Δvv and Vm;
[0120] If Δvv≤Vm, the liquid cargo in the first adjusted storage tank is moved to the nearest target storage tank at a rate of Δvv until the liquid level becomes Δh;
[0121] If Δvv>Vm, the liquid cargo in the first adjustment storage tank will be moved to the nearest target storage tank at a rate of Vm until the liquid level becomes Δh.
[0122] Furthermore, the specific steps of step S365 are as follows:
[0123] Step S3651: Calculate the heat Q2 transferred from the liquid cargo to the oil and gas, Q2 = 1 / 2 (Qio + Qia) - Qio;
[0124] The total volume of liquid cargo transferred into the storage tank, ΔV, is calculated as follows:
[0125] ;
[0126] Step S3652: Calculate the adjusted liquid level Δh, Δh=ho+ΔV / ss; where ho represents h1;
[0127] The connected pipeline flow rate Δvv, Δvv = ΔV / sp;
[0128] Step S3653: Determine the size of Δvv and Vm;
[0129] If Δvv≤Vm, the liquid cargo in the nearest secondary adjustment storage tank is moved into the first primary adjustment storage tank at a rate of Δvv until the liquid level becomes Δh;
[0130] If Δvv>Vm, the liquid cargo in the nearest secondary adjustment storage tank will be moved into the first primary adjustment storage tank at a rate of Vm until the liquid level becomes Δh.
[0131] Compared with the prior art, the present invention has the following beneficial effects:
[0132] Real-time monitoring and early warning: The present invention can monitor the operating status of the storage tank in real time, detect abnormal situations in time, and provide strong support for preventing safety accidents; through the data model, managers can quickly understand the operating status of the entire system, so as to make faster and more accurate decisions.
[0133] Optimize resource allocation: The present invention can help enterprises allocate resources more reasonably, reduce waste, improve efficiency, reduce resource waste, and reduce operating costs.
[0134] Ensure production continuity: The present invention can reduce the risk of production interruption and ensure production continuity through the prediction and monitoring of digital twins. BRIEF DESCRIPTION OF THE DRAWINGS
[0135] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0136] Figure 1 It is a schematic diagram of the method of the present invention;
[0137] Figure 2 This is a schematic diagram of some liquid data of the present invention;
[0138] Figure 3 This is a schematic diagram of the three-dimensional scene model of the storage tank of the present invention. DETAILED DESCRIPTION
[0139] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0140] Please participate Figures 1 to 3 , the liquid cargo safety analysis methods based on digital twin technology include:
[0141] Step S1: Obtain the number of current (liquid cargo) storage tanks and the weight, liquid level, liquid temperature and (oil and gas) cavity temperature of the liquid cargo in each (liquid cargo) storage tank to obtain liquid data;
[0142] Obtain multi-angle pictures of the storage tank to obtain image data;
[0143] It should be noted that the "liquid cargo" in the present invention refers to liquid fossil energy such as petroleum, gasoline, and diesel;
[0144] “Vapour” means the gas produced by the evaporation of liquid cargo in the storage tank;
[0145] “Multi-angle photos” refer to aerial, horizontal and side views of storage tanks (for liquid cargo).
[0146] Step S2: Obtain the current time and determine the target quarter of the enterprise; obtain the historical data of the enterprise according to the target quarter; combine the historical data to process the liquid data once, and estimate the liquid cargo replenishment amount and the maximum flow of the pipeline;
[0147] The specific steps of step S2 are as follows:
[0148] Step S21: Get the current time, recorded as t; define judgment formula 21, and determine the production quarter of the enterprise according to t as the target quarter;
[0149] Judgment formula 21: ; Among them, at i Indicates the start time of the i-th production quarter; bt irepresents the end time of the i-th production quarter;
[0150] It should be noted that the "production quarter" in the present invention refers to the operating cycle of an enterprise engaged in the production and sales of liquid goods.
[0151] Step S22: Obtain historical data of the enterprise according to the target quarter;
[0152] Historical data include: the total incoming volume and daily incoming volume of liquid cargoes and the total outgoing volume and daily outgoing volume of liquid cargoes in the target quarters of the past three years;
[0153] Step S23: The total purchase and total shipment of liquid goods in the target quarters of the enterprise in the past three years are recorded as:
[0154] In the past year, the total purchase volume is Oi1, and the total shipment volume is Oo1;
[0155] In the past two years, the total purchase volume is Oi2, and the total shipment volume is Oo2;
[0156] In the past three years, the total purchase volume is Oi3, and the total shipment volume is Oo3;
[0157] Step S24: define calculation formula 22: ; The value range of m is 1 to 3, and the value range of n is 2 to 3; X n and X m , respectively, represents the total purchase volume or total shipment volume in the past m years and the past n years; up (X) m-n It indicates the growth rate of total liquid cargo purchase or total cargo shipment from the enterprise in the past m years to the past n years;
[0158] Substitute Oi1 and Oi2 into the X in equation 22. n and X m , calculate the total liquid cargo purchase volume growth rate up (Oi) in the past 1 to 2 years 1-2 ; Substitute Oi2 and Oi3 into X in equation 22 n and X m , calculate the total liquid cargo purchase volume growth rate up (Oi) in the past 2 to 3 years 2-3 ;
[0159] Substitute Oo1 and Oo2 into the X in equation 22 n and X m , calculate the total shipment growth rate of liquid cargo in the past 1 to 2 years up (Oo) 1-2 ; Substitute Oo2 and Oo3 into X in equation 22 n and X m , calculate the total shipment growth rate of liquid cargo in the past 2 to 3 years up (Oo) 2-3 ;
[0160] Step S25: record the duration of the enterprise's target quarter as dd; obtain the daily liquid cargo purchase and shipment volume of the enterprise's target quarters in the past three years, respectively, as:
[0161] In the past year, the purchase volume is Ai1~Ai dd , shipment volume Ao1~Ao dd ;
[0162] In the past two years, the purchase volume is Bi1~Bi dd , shipment volume Bo1~Bo dd ;
[0163] In the past three years, the purchase volume is Ci1~Ci dd , shipment volume Co1~Co dd ;
[0164] Step S26: Calculate and count the target quarterly liquid cargo purchase and shipment volumes (Ai1~Ai dd and Ao1~Ao dd , Bi1~Bi dd and Bo1~Bo dd and Ci1~Ci dd and Co1~Co dd ) are denoted by:
[0165] In the past year, (Ai1~Ai dd and Ao1~Ao dd ) The corresponding means aAi and aAo, medians cAi and cAo, and modes fAi and fAo;
[0166] In the past two years, (Bi1~Bi dd and Bo1~Bo dd ) The corresponding means aBi and aBo, medians cBi and cBo, and modes fBi and fBo;
[0167] In the past three years, (Ci1~Ci dd and Co1~Co dd ) The corresponding means aCi and aCo, medians cCi and cCo, and modes fCi and fCo;
[0168] Step S27: Summarize the data in steps S23 to S26, estimate and calculate the liquid cargo replenishment amount and the maximum flow rate of the pipeline;
[0169] Step S271: define judgment formula 23, substitute the daily liquid cargo purchase and shipment volume of the enterprise in the target quarters of the past three years into judgment formula 23, and count the number of judgment formulas 23 satisfied by the enterprise in the past three years, which are recorded as adi and ado, bdi and bdo, and cdi and cdo respectively; wherein adi and ado represent the daily liquid cargo purchase and shipment volume of the enterprise in the target quarters of the past one year; bdi and bdo represent the daily liquid cargo purchase and shipment volume of the enterprise in the target quarters of the past two years; cdi and cdo represent the daily liquid cargo purchase and shipment volume of the enterprise in the target quarters of the past two years;
[0170] Judgment formula 23: 3*Y m ≥aY+cY+fY and 3*Z m ≥aZ+cZ+fZ;
[0171] Among them, Y m It represents the daily liquid cargo purchase volume of the enterprise in the target quarter in the past three years, that is, Y m The range of the indication is: purchase quantity Ai1~Ai dd , purchase quantity Bi1~Bi dd , purchase quantity Ci1~Ci dd ;
[0172] aY, cY and fY represent: m The mean, median and mode of liquid cargo purchase volume in the corresponding year;
[0173] Among them, Z m It represents the daily liquid cargo shipment volume of the enterprise in the target quarter in the past three years, i.e. Z m The range of the shipment volume is Ao1~Ao dd , shipment volume Bo1~Bo dd , shipment volume Co1~Co dd ;
[0174] aZ, cZ and fZ respectively represent: m Mean, median and mode of liquid cargo shipments in the corresponding years;
[0175] Step S272: construct the state transition matrix of the purchase growth rate of the enterprise's target quarterly liquid goods, matrix 24; and the state transition matrix of the shipment growth rate, matrix 25;
[0176] Matrix 24:
[0177] ;
[0178] Matrix 25:
[0179] ;
[0180] Wherein, n represents the number of iterations of (state transfer) matrix 24 and matrix 25 (the power operation on the left of matrix 24 and matrix 25), × represents matrix multiplication; n is a natural number, and the initial value of n is 1; each time the state transfer matrix is iterated, n is increased by 1 on the original basis;
[0181] Use the NumPy library function to iterate (state transfer) matrix 24 and matrix 25 to obtain steady-state state transfer matrices, which are recorded as matrix C24 and matrix C25;
[0182] Step S273: define a 3-row 1-column matrix of [1,0,0] as a first dimension reduction matrix; multiply the matrix C24 and the matrix C25 with the first dimension reduction matrix respectively to obtain the matrix D24 and the matrix D25;
[0183] Step S274: define a 2-row 1-column matrix of [1,0] as a secondary dimension reduction matrix, and multiply the matrix D24 and the matrix D25 with the secondary dimension reduction matrix respectively to obtain the matrix E24 and the matrix E25;
[0184] Read the values of matrix E24 by column, and record them as uui1 and uui2 respectively; calculate the sum uui of uui1 and uui2, where uui is the growth coefficient of liquid cargo purchase volume;
[0185] Read the values of matrix E25 by column, and record them as uuo1 and uuo2 respectively; calculate the sum uuo of uuo1 and uuo2, where uuo is the growth coefficient of liquid cargo shipment volume;
[0186] Step S275: The number of storage tanks is recorded as sn; the weight of the liquid cargo in each storage tank is recorded as m1, m2~m sn ;
[0187] Calculate the total weight of liquid cargo in all storage tanks, expressed as mm;
[0188] Step S276: record the start time of the target progress as st, and the end time as ft; obtain the cumulative purchase volume and cumulative shipment volume of liquid goods in the enterprise from st to t, and record them as Zi and Zo respectively;
[0189] Step S277: estimating the replenishment amount of liquid cargo and calculating the maximum flow rate of the pipeline;
[0190] Step S2771: Estimate the (current) total incoming volume IM of liquid cargo. The calculation formula of IM is as follows:
[0191] ;
[0192] Estimate the (current) total liquid cargo shipments OM, which is calculated as follows:
[0193] ; Wherein, t represents the current time;
[0194] Step S2772: Estimate the remaining incoming quantity RI of liquid cargo, RI = IM - Zi; the remaining outgoing quantity RO, RO = OM - Zo;
[0195] Step S2773: determine whether RI+mm≥RO is established;
[0196] If this is true, the liquid cargo replenishment amount ΔCM = RI;
[0197] If not, the liquid cargo replenishment ΔCM = RO;
[0198] Step S2774: Obtain the working time of the pipeline, recorded as wt; obtain the number of pipelines connected to the (liquid cargo) storage tank, recorded as pn;
[0199] Calculate the maximum flow rate Vm of the pipeline. The calculation formula of Vm is as follows:
[0200] .
[0201] Step S3: construct a three-dimensional scene model of the (liquid cargo) storage tank based on the image data; obtain the ambient temperature outside the (liquid cargo) storage tank, and determine whether the (liquid cargo) storage tank is safe; if it is safe, do not process it; if it is not safe, perform secondary processing on the liquid data based on the maximum flow rate, and adjust the liquid level height and pipeline flow rate of the (liquid cargo) storage tank;
[0202] The specific steps of step S3 are as follows:
[0203] Step S31: Please refer to Figure 3 , based on the image data, construct a three-dimensional scene model of the storage tank;
[0204] Step S311: Count the total number of pictures in the image data, recorded as pp; create three blank image sets; respectively collect the aerial, horizontal and side pictures in the image data, and fill them into the blank image sets to obtain image set 1, image set 2 and image set 3;
[0205] Step S312: process image set 1; count the number of pictures in image set 1 and record it as pp1;
[0206] Using the Harris (corner detection) algorithm, calculate the horizontal gradient and vertical gradient of each pixel of the first image in image set 1;
[0207] Horizontal gradient Ix(x,y): ;
[0208] Vertical gradient Iy(x,y): ;
[0209] Where (x, y) represents the coordinates of the pixel in the image (the first image in image set 1), G represents the Gaussian filter, and I represents the image (the first image in image set 1); Represents the derivative of the pixel in the horizontal direction of the image; Represents the derivative of the pixel in the vertical direction of the image;
[0210] Step S313: repeat step S312 to extract the horizontal gradient and vertical gradient of the 2nd to pp1th pictures in image set 1;
[0211] Step S314: using the Ransac algorithm, feature matching is performed according to the order of the time frames of the images in the image set 1 to obtain feature points of the three-dimensional structure of the storage tank;
[0212] Step S315: using the ICP (Iterative Closest Point) algorithm and the NDT (Normal Distribution Transform) algorithm to perform point cloud registration on the feature points; then using the Delaunay triangulation expansion algorithm to perform point cloud expansion to obtain a point cloud model of the storage tank;
[0213] Step S316: Use meshlab software to recreate the point cloud model to obtain a storage tank model 1;
[0214] Step S317: Repeat the same steps of processing image set 1 to process image set 2 and image set 3 to obtain storage tank model 2 and storage tank model 3; use the Meshlab system to splice storage tank model 1, storage tank model 2 and storage tank model 3 to obtain a three-dimensional scene model of the storage tank;
[0215] Step S32: Summarize the liquid data corresponding to the storage tanks No. 1 to No. sn (liquid cargo), record the liquid level as h, the liquid temperature as to, and the cavity temperature (of oil and gas) as ta, and obtain;
[0216] Liquid data corresponding to storage tank No. 1 (liquid cargo), m1, h1, to1 and ta1;
[0217] Liquid data corresponding to storage tank No. 2 (liquid cargo), m2, h2, to2 and ta2;
[0218] Similarly, the liquid data corresponding to the storage tank with the number sn (liquid cargo), m sn 、h sn 、to sn And sn ;
[0219] Where sn represents the number of storage tanks (for liquid cargo) and m represents the weight of the liquid cargo;
[0220] m1, h1, to1 and ta1 represent the weight, liquid level, liquid temperature and cavity temperature (for oil and gas) of the liquid cargo corresponding to storage tank No. 1 (for liquid cargo), respectively;
[0221] m2, h2, to2 and ta2 represent the weight, liquid level, liquid temperature and cavity temperature (of oil and gas) of the liquid cargo corresponding to storage tank No. 2 (liquid cargo), respectively;
[0222] By analogy, m sn 、h sn 、to sn And sn Respectively represent the weight of liquid cargo, liquid level, liquid temperature and cavity temperature (for oil and gas) corresponding to the storage tank with number sn (liquid cargo);
[0223] Step S33: obtaining the cross-sectional area of the pipeline, denoted as sp; obtaining the cross-sectional area of the storage tank, denoted as ss;
[0224] Get the safe temperature of the liquid cargo, recorded as tt; determine tt≥(to1+to2+……+to sn ) / sn is established;
[0225] If so, it means that the liquid temperature is safe, and the liquid level and pipeline flow rate are not adjusted, and steps S34 to S37 are skipped;
[0226] If not, it means that the liquid temperature is too high, and the liquid level and pipeline flow rate are adjusted, and the process goes to step S34;
[0227] Step S34: obtaining the (current) ambient temperature outside the storage tank, denoted as ti;
[0228] Definition judgment formula 31: (ti>ta i )∩(ti>to i ); where the value range of i is 1 to sn;
[0229] Set to1~to corresponding to storage tanks No. 1~sn (liquid cargo) sn and ta1~ta sn , substituted into judgment formula 31; the storage tanks satisfying judgment formula 31 are summarized as adjustment storage tanks, and the number of adjustment storage tanks is counted, recorded as rn; the storage tanks not satisfying judgment formula 31 are summarized as target storage tanks, and the number of target storage tanks is counted, recorded as on; rn, on and sn satisfy sn=rn+on;
[0230] Step S35: Define judgment formula 32: ; Where x represents 1 to rn;
[0231] Adjust the storage tank to1~to sn and ta1~ta sn , substituted into judgment formula 32; the adjustment storage tanks satisfying judgment formula 32 are summarized as primary adjustment storage tanks, and the number of primary adjustment storage tanks is counted, recorded as an; the adjustment storage tanks not satisfying judgment formula 32 are summarized as secondary adjustment storage tanks, and the number of secondary adjustment storage tanks is counted, recorded as bn; an, bn and rn satisfy rn=an+bn;
[0232] Step S36: adjusting (the 1st to anth) the liquid level height and pipeline flow rate corresponding to the storage tank once;
[0233] Step S361: adjusting the liquid level and pipeline flow of the first primary adjustment storage tank;
[0234] Get the specific heat capacity of the liquid cargo, recorded as co; get the density and specific heat capacity of the oil and gas, recorded as ρa and ca respectively; get the total height of the storage tank, recorded as HH;
[0235] Calculate the volume of oil and gas Va, Va = (HH-ho) * ss; where ho represents h1;
[0236] Step S362: Define the heat transfer equation Q1 from the ambient temperature to the liquid temperature i→o :
[0237] ;
[0238] Heat transfer equation from ambient temperature to (oil and gas) cavity temperature Q1 i→a :
[0239] ; Where mo represents the weight of liquid cargo, ma represents the weight of oil and gas, ma=Va*ρa;
[0240] Equation Q1 i→o and Q1 i→a To and ta in it represent to1 and ta1 respectively;
[0241] Step S363: Substitute equation Q1 i→o and equation Q1 i→a The values of are recorded as Qio and Qia respectively; compare the sizes of Qio and Qia;
[0242] If Qio≥Qia, the liquid cargo transfers heat to the oil and gas, the pressure in the storage tank increases, the storage tank removes the liquid cargo, and the process goes to step S364;
[0243] If Qio<Qia, the oil gas transfers heat to the liquid cargo, the pressure in the storage tank decreases, and the storage tank is moved into the liquid cargo, and the process goes to step S365;
[0244] Step S364: Qio≥Qia, the storage tank removes the liquid cargo;
[0245] Step S3641: Calculate the heat Q2 transferred from the liquid cargo to the oil and gas, Q2 = 1 / 2 (Qio + Qia) - Qia;
[0246] The total volume of liquid cargo removed from the storage tank, ΔV, is calculated as follows:
[0247] ;
[0248] Step S3642: Calculate the adjusted liquid level Δh, Δh=ho-ΔV / ss; where ho represents h1 (the liquid level corresponding to the first adjustment of the storage tank);
[0249] The pipeline flow rate of the connection (the first primary adjustment storage tank) is Δvv, Δvv = ΔV / sp;
[0250] Step S3643: Determine the size of Δvv and Vm;
[0251] If Δvv≤Vm, the liquid cargo in the first one-time adjustment storage tank is moved to the nearest target storage tank (to the first one-time adjustment storage tank) at a rate of Δvv until the liquid level of the first one-time adjustment storage tank becomes Δh;
[0252] If Δvv>Vm, the liquid cargo in the first adjustment storage tank is moved into the nearest target storage tank (the first adjustment storage tank) at a rate of Vm until the liquid level of the (first adjustment storage tank) becomes Δh;
[0253] Step S365: Qio<Qia, liquid cargo is moved into the storage tank;
[0254] Step S3651: Calculate the heat Q2 transferred from the liquid cargo to the oil and gas, Q2 = 1 / 2 (Qio + Qia) - Qio;
[0255] The total volume of liquid cargo transferred into the storage tank, ΔV, is calculated as follows:
[0256] ;
[0257] Step S3652: Calculate the adjusted liquid level Δh, Δh=ho+ΔV / ss; where ho represents h1;
[0258] The pipeline flow rate of the connection (the first primary adjustment storage tank) is Δvv, Δvv = ΔV / sp;
[0259] Step S3653: Determine the size of Δvv and Vm;
[0260] If Δvv≤Vm, the liquid cargo in the nearest secondary adjustment storage tank is transferred to the first primary adjustment storage tank at a rate of Δvv until the liquid level in the first primary adjustment storage tank reaches Δh;
[0261] If Δvv>Vm, the liquid cargo in the nearest secondary adjustment storage tank is moved into the first primary adjustment storage tank at a rate of Vm until the liquid level in the first primary adjustment storage tank becomes Δh;
[0262] Step S366: Expand the range of to and ta in the equations Q1i→o and Q1i→a in steps S361 to S365 to to2 to an and ta2~ta an ,ho's range of expression is extended to ho2~ho an Repeat the same steps of adjusting the liquid level height and pipeline flow rate of the first one-time adjustment storage tank, and adjust the liquid level height and pipeline flow rate of the second to an one-time adjustment storage tanks;
[0263] Step S37: Repeat the same steps of adjusting the liquid level and pipeline flow corresponding to the primary adjustment storage tanks (No. 1 to No. an), and adjust the liquid level and pipeline flow corresponding to the secondary adjustment storage tanks (No. 1 to No. bn); if liquid cargo is moved into the secondary adjustment storage tank, the liquid cargo in the target storage tank is moved into the secondary adjustment storage tank; if liquid cargo is moved out of the secondary adjustment storage tank, the liquid cargo in the secondary adjustment storage tank is moved into the target storage tank.
[0264] Step S4: Summarize the three-dimensional scene model and the amount of liquid cargo replenishment, and feed back to the user.
[0265] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technical personnel in this field according to actual conditions. For example, if there are weight coefficients and proportional coefficients, their set sizes are to quantify each parameter to obtain a specific value, which is convenient for subsequent comparison. Regarding the size of the weight coefficient and the proportional coefficient, it is sufficient as long as it does not affect the proportional relationship between the parameter and the quantized value.
[0266] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. Liquid cargo safety analysis method based on digital twin technology, characterized in that: Analytical methods include: Step S1: Obtain the number of current storage tanks and the weight, liquid level, liquid temperature and cavity temperature of the liquid cargo in each storage tank to obtain liquid data; Obtain multi-angle pictures of the storage tank to obtain image data; Step S2: Obtain the current time and determine the target quarter of the enterprise; obtain the historical data of the enterprise according to the target quarter; combine the historical data, process the liquid data once, estimate the liquid cargo replenishment amount, and calculate the maximum flow of the pipeline; Step S3: construct a three-dimensional scene model of the storage tank based on the image data; obtain the ambient temperature outside the storage tank and determine whether the storage tank is safe; if it is safe, do not process it; if it is not safe, perform secondary processing on the liquid data based on the maximum flow rate and adjust the liquid level height of the storage tank and the pipeline flow rate; Step S4: Summarize the three-dimensional scene model and the amount of liquid cargo replenishment, and feed back to the user; The specific steps of step S2 are as follows: Step S21: Get the current time, recorded as t; define judgment formula 21, and determine the production quarter of the enterprise according to t as the target quarter; Judgment formula 21: ; Among them, at i Indicates the start time of the i-th production quarter; bt i represents the end time of the i-th production quarter; Step S22: Obtain historical data of the enterprise according to the target quarter; Historical data include: the total incoming volume and daily incoming volume of liquid cargoes and the total outgoing volume and daily outgoing volume of liquid cargoes in the target quarters of the past three years; Step S23: The total purchase and total shipment of liquid goods in the target quarters of the enterprise in the past three years are recorded as: In the past year, the total purchase volume is Oi1, and the total shipment volume is Oo1; In the past two years, the total purchase volume is Oi2, and the total shipment volume is Oo2; In the past three years, the total purchase volume is Oi3, and the total shipment volume is Oo3; Step S24: define calculation formula 22: ; The value range of m is 1 to 3, and the value range of n is 2 to 3; X n and X m Respectively represents the total purchase volume or total shipment volume in the past m years and the past n years; up(X) m-n It indicates the growth rate of total liquid cargo purchase or total cargo shipment from the enterprise in the past m years to the past n years; Substitute Oi1 and Oi2 into the X in equation 22. n and X m , calculate the total liquid cargo purchase volume growth rate up (Oi) in the past 1 to 2 years 1-2 ; Substitute Oi2 and Oi3 into X in equation 22 n and X m , calculate the total liquid cargo purchase volume growth rate up (Oi) in the past 2 to 3 years 2-3 ; Substitute Oo1 and Oo2 into the X in equation 22 n and X m , calculate the total shipment growth rate of liquid cargo in the past 1 to 2 years up (Oo) 1-2 ; Substitute Oo2 and Oo3 into X in equation 22 n and X m , calculate the total shipment growth rate of liquid cargo in the past 2 to 3 years up (Oo) 2-3 ; Step S25: record the duration of the enterprise's target quarter as dd; obtain the daily liquid cargo purchase and shipment volume of the enterprise's target quarters in the past three years, respectively, as: In the past year, the purchase volume is Ai1~Ai dd , shipment volume Ao1~Ao dd ; In the past two years, the purchase volume is Bi1~Bi dd , shipment volume Bo1~Bo dd ; In the past three years, the purchase volume is Ci1~Ci dd , shipment volume Co1~Co dd ; Step S26: Calculate and count the average, median and mode of the target quarterly liquid cargo purchase and shipment volumes of the enterprise in the past three years, respectively, and record them as: In the past year, the corresponding means are aAi and aAo, the medians are cAi and cAo, and the modes are fAi and fAo; In the past two years, the corresponding means are aBi and aBo, the medians are cBi and cBo, and the modes are fBi and fBo; In the past three years, the corresponding means are aCi and aCo, the medians are cCi and cCo, and the modes are fCi and fCo; Step S27: Summarize the data in steps S23 to S26, estimate the replenishment amount of liquid cargo, and calculate the maximum flow rate of the pipeline; The specific steps of step S3 are as follows: Step S31: constructing a three-dimensional scene model of the storage tank according to the image data; Step S32: Summarize the liquid data corresponding to the storage tanks No. 1 to No. sn, record the liquid level as h, the liquid temperature as to, and the cavity temperature as ta, and obtain; The liquid data corresponding to storage tank No. 1 are: m1, h1, to1 and ta1; The liquid data corresponding to storage tank No. 2 are: m2, h2, to2 and ta2; Similarly, the liquid data corresponding to the storage tank No. sn, m sn 、h sn 、to sn And sn ; Where sn represents the number of storage tanks and m represents the weight of liquid cargo; Step S33: obtaining the cross-sectional area of the pipeline, denoted as sp; obtaining the cross-sectional area of the storage tank, denoted as ss; Get the safe temperature of the liquid cargo, recorded as tt; determine tt≥(to1+to2+……+to sn ) / sn is established; If so, it means that the liquid temperature is safe, and the liquid level and pipeline flow rate are not adjusted, and steps S34 to S37 are skipped; If not, it means that the liquid temperature is too high, and the liquid level and pipeline flow are adjusted, and the process goes to step S34; Step S34: obtaining the ambient temperature outside the storage tank, denoted as ti; Definition judgment formula 31: (ti>ta i )∩(ti>to i ); where the value range of i is 1 to sn; Set the to1~to corresponding to the storage tanks 1~sn sn and ta1~ta sn , substituted into judgment formula 31; the storage tanks satisfying judgment formula 31 are summarized as adjustment storage tanks, and the number of adjustment storage tanks is counted, recorded as rn; the storage tanks not satisfying judgment formula 31 are summarized as target storage tanks, and the number of target storage tanks is counted, recorded as on; rn, on and sn satisfy sn=rn+on; Step S35: Define judgment formula 32: ; Where x represents 1 to rn; Adjust the storage tank to1~to sn and ta1~ta sn , substituted into judgment formula 32; the adjustment storage tanks satisfying judgment formula 32 are summarized as primary adjustment storage tanks, and the number of primary adjustment storage tanks is counted, recorded as an; the adjustment storage tanks not satisfying judgment formula 32 are summarized as secondary adjustment storage tanks, and the number of secondary adjustment storage tanks is counted, recorded as bn; an, bn and rn satisfy rn=an+bn; Step S36: adjusting the liquid level and pipeline flow rate corresponding to the storage tank once; Step S37: Repeat the same steps of adjusting the liquid level and pipeline flow corresponding to the primary adjustment storage tank, and adjust the liquid level and pipeline flow corresponding to the secondary adjustment storage tank; if liquid cargo is moved into the secondary adjustment storage tank, the liquid cargo in the target storage tank is moved into the secondary adjustment storage tank; if liquid cargo is moved out of the secondary adjustment storage tank, the liquid cargo in the secondary adjustment storage tank is moved into the target storage tank.
2. The liquid cargo safety analysis method based on digital twin technology according to claim 1 is characterized in that: The specific steps of step S27 are as follows: Step S271: define judgment formula 23, substitute the daily liquid cargo purchase and shipment volume of the enterprise in the target quarters of the past three years into judgment formula 23, and count the number of judgment formulas 23 satisfied by the enterprise in the past three years, and record them as adi and ado, bdi and bdo, and cdi and cdo respectively; Among them, adi and ado represent the daily liquid cargo purchase and shipment volume of the enterprise in the target quarter of the past year; bdi and bdo represent the daily liquid cargo purchase and shipment volume of the enterprise in the target quarter of the past two years; cdi and cdo represent the daily liquid cargo purchase and shipment volume of the enterprise in the target quarter of the past two years; Judgment formula 23: 3*Y m ≥aY+cY+fY and 3*Z m ≥aZ+cZ+fZ; Among them, Y m It represents the daily liquid cargo purchase volume of the enterprise in the target quarter in the past three years, that is, Y m The range of the indication is: purchase quantity Ai1~Ai dd , purchase quantity Bi1~Bi dd , purchase quantity Ci1~Ci dd ; aY, cY and fY represent: m The mean, median and mode of liquid cargo purchase volume in the corresponding year; Among them, Z m It represents the daily liquid cargo shipment volume of the enterprise in the target quarter in the past three years, i.e. Z m The range of the shipment volume is Ao1~Ao dd , shipment volume Bo1~Bo dd , shipment volume Co1~Co dd ; aZ, cZ and fZ respectively represent: m Mean, median and mode of liquid cargo shipments in the corresponding years; Step S272: construct the state transition matrix of the purchase growth rate of the enterprise's target quarterly liquid goods, set as matrix 24; and the state transition matrix of the shipment growth rate, set as matrix 25; Matrix 24: ; Matrix 25: ; Wherein, n represents the number of iterations of matrix 24 and matrix 25, and × represents matrix multiplication; n is a natural number, and the initial value of n is 1; each time the state transfer matrix is iterated once, n is increased by 1 on the original basis; Use the NumPy library function to iterate matrix 24 and matrix 25 to obtain steady-state state transfer matrices, which are recorded as matrix C24 and matrix C25; Step S273: define a 3-row 1-column matrix of [1,0,0] as a first dimension reduction matrix; multiply the matrix C24 and the matrix C25 with the first dimension reduction matrix respectively to obtain the matrix D24 and the matrix D25; Step S274: define a 2-row 1-column matrix of [1,0] as a secondary dimension reduction matrix, and multiply the matrix D24 and the matrix D25 with the secondary dimension reduction matrix respectively to obtain the matrix E24 and the matrix E25; Read the values of matrix E24 by column, and record them as uui1 and uui2 respectively; calculate the sum uui of uui1 and uui2, where uui is the growth coefficient of liquid cargo purchase volume; Read the values of matrix E25 by column, and record them as uuo1 and uuo2 respectively; calculate the sum uuo of uuo1 and uuo2, where uuo is the growth coefficient of liquid cargo shipment volume; Step S275: The number of storage tanks is recorded as sn; the weight of the liquid cargo in each storage tank is recorded as m1, m2~m sn ; Calculate the total weight of liquid cargo in all storage tanks, expressed as mm; Step S276: record the start time of the target progress as st, and the end time as ft; obtain the cumulative purchase volume and cumulative shipment volume of liquid goods of the enterprise from st to t, which are recorded as Zi and Zo respectively; where t represents the current time; Step S277: Estimate the amount of liquid cargo to be replenished and calculate the maximum flow rate of the pipeline.
3. The liquid cargo safety analysis method based on digital twin technology according to claim 2 is characterized in that: The specific steps of step S277 are as follows: Step S2771: Estimate the total incoming volume IM of liquid cargo. The calculation formula of IM is as follows: ; Estimate the total shipment volume OM of liquid cargo. The calculation formula of OM is as follows: ; Wherein, t represents the current time; Step S2772: Estimate the remaining incoming quantity RI of liquid cargo, RI = IM - Zi; the remaining outgoing quantity RO, RO = OM - Zo; Step S2773: determine whether RI+mm≥RO is established; If this is true, the liquid cargo replenishment amount ΔCM = RI; If not, the liquid cargo replenishment ΔCM = RO; Step S2774: Obtain the working time of the pipeline, recorded as wt; obtain the number of pipelines connected to the storage tank, recorded as pn; Calculate the maximum flow rate Vm of the pipeline. The calculation formula of Vm is as follows: 。 4. The liquid cargo safety analysis method based on digital twin technology according to claim 1 is characterized in that: The specific steps of step S31 are as follows: Step S311: Count the total number of pictures in the image data, recorded as pp; create three blank image sets; respectively collect the aerial, horizontal and side pictures in the image data, and fill them into the blank image sets to obtain image set 1, image set 2 and image set 3; Step S312: process image set 1; count the number of pictures in image set 1 and record it as pp1; Using the Harris algorithm, calculate the horizontal gradient and vertical gradient of each pixel of the first image in image set 1; Horizontal gradient Ix(x,y): ; Vertical gradient Iy(x,y): ; Among them, (x, y) represents the coordinates of the pixel in the image, G represents the Gaussian filter, and I represents the image; Represents the derivative of the pixel in the horizontal direction of the image; Represents the derivative of the pixel in the vertical direction of the image; Step S313: repeat step S312 to extract the horizontal gradient and vertical gradient of the 2nd to pp1th pictures in image set 1; Step S314: using the Ransac algorithm, feature matching is performed according to the order of the time frames of the images in the image set 1 to obtain feature points of the three-dimensional structure of the storage tank; Step S315: using the ICP algorithm and the NDT algorithm to perform point cloud registration on the feature points; then using the Delaunay triangulation expansion algorithm to perform point cloud expansion to obtain a point cloud model of the storage tank; Step S316: Use meshlab software to recreate the point cloud model to obtain a storage tank model 1; Step S317: Repeat the same steps of processing image set 1 to process image set 2 and image set 3 to obtain storage tank model 2 and storage tank model 3; use the Meshlab system to splice storage tank model 1, storage tank model 2 and storage tank model 3 to obtain a three-dimensional scene model of the storage tank.
5. The liquid cargo safety analysis method based on digital twin technology according to claim 1 is characterized in that: The specific steps of step S36 are as follows: Step S361: adjusting the liquid level and pipeline flow of the first primary adjustment storage tank; Get the specific heat capacity of the liquid cargo, recorded as co; get the density and specific heat capacity of the oil and gas, recorded as ρa and ca respectively; get the total height of the storage tank, recorded as HH; Calculate the volume of oil and gas Va, Va = (HH-ho) * ss; where ho represents the liquid level; Step S362: Define the heat transfer equation Q1 from the ambient temperature to the liquid temperature i→o : ; Heat transfer equation from ambient temperature to cavity temperature Q1 i→a : ; Where mo represents the weight of liquid cargo, ma represents the weight of oil and gas, ma=Va*ρa; Equation Q1 i→o and Q1 i→a To and ta in it represent to1 and ta1 respectively; Step S363: Substitute equation Q1 i→o and equation Q1 i→a The values of are recorded as Qio and Qia respectively; compare the sizes of Qio and Qia; If Qio≥Qia, the liquid cargo transfers heat to the oil and gas, the pressure in the storage tank increases, the storage tank removes the liquid cargo, and the process goes to step S364; If Qio<Qia, the oil gas transfers heat to the liquid cargo, the pressure in the storage tank decreases, and the storage tank is moved into the liquid cargo, and the process goes to step S365; Step S364: If Qio≥Qia, the storage tank removes the liquid cargo; Step S365: If Qio<Qia, liquid cargo is moved into the storage tank; Step S366: Repeat the same steps of adjusting the liquid level height and pipeline flow rate of the first one-time adjustment storage tank, and adjust the liquid level height and pipeline flow rate of the second to an one-time adjustment storage tanks.
6. The liquid cargo safety analysis method based on digital twin technology according to claim 5 is characterized in that: The specific steps of step S364 are as follows: Step S3641: Calculate the heat Q2 transferred from the liquid cargo to the oil and gas, Q2 = 1 / 2 (Qio + Qia) - Qia; The total volume of liquid cargo removed from the storage tank, ΔV, is calculated as follows: ; Step S3642: Calculate the adjusted liquid level Δh, Δh=ho-ΔV / ss; where ho represents the liquid level; The flow rate of the connecting pipeline is Δvv, Δvv = ΔV / sp; Step S3643: Determine the size of Δvv and Vm; If Δvv≤Vm, the liquid cargo in the first adjusted storage tank is moved to the nearest target storage tank at a rate of Δvv until the liquid level becomes Δh; If Δvv>Vm, the liquid cargo in the first adjustment storage tank will be moved to the nearest target storage tank at a rate of Vm until the liquid level becomes Δh.
7. The liquid cargo safety analysis method based on digital twin technology according to claim 5 is characterized in that: The specific steps of step S365 are as follows: Step S3651: Calculate the heat Q2 transferred from the liquid cargo to the oil and gas, Q2 = 1 / 2 (Qio + Qia) - Qio; The total volume of liquid cargo transferred into the storage tank, ΔV, is calculated as follows: ; Step S3652: Calculate the adjusted liquid level Δh, Δh=ho+ΔV / ss; Connecting pipeline flow rate Δvv, Δvv = ΔV / sp; Step S3653: Determine the size of Δvv and Vm; If Δvv≤Vm, the liquid cargo in the nearest secondary adjustment storage tank is moved into the first primary adjustment storage tank at a rate of Δvv until the liquid level becomes Δh; If Δvv>Vm, the liquid cargo in the nearest secondary adjustment storage tank will be moved into the first primary adjustment storage tank at a rate of Vm until the liquid level becomes Δh.
