Petrochemical oil metering method based on AIRIOT Internet of Things design platform

By adopting SOA microservices and the AIRIOT low-code platform in petrochemical oil metering, and combining dynamic calculation of volume and density correction coefficients, the inaccuracy and integration problems of traditional petrochemical oil metering have been solved, achieving efficient and accurate oil metering and system scalability, and promoting the digital transformation of the petrochemical industry.

CN119618337BActive Publication Date: 2025-11-07AEROSPACE HI TECH HLDG GROUP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411565941.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-11-07
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

Traditional petrochemical oil metering methods suffer from unstable and inaccurate metering systems, difficulty in integrating with the AIRIOT IoT platform, failure to comprehensively consider influencing factors, and lack of historical data records.

Method used

Employing SOA microservice design and combining it with the AIRIOT IoT low-code platform, the system acquires real-time data from oil tanks, performs dynamic calculations using volume and density correction coefficients, and optimizes the metering process by combining binary search algorithms and fitting calculations. It also supports simulation and anomaly feedback.

Benefits of technology

It has improved the accuracy and efficiency of petrochemical oil metering, optimized resource allocation, enhanced system scalability and flexibility, and promoted digital transformation and intelligent upgrading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119618337B_ABST
    Figure CN119618337B_ABST
Patent Text Reader

Abstract

The application discloses a petrochemical oil metering method based on an AIRIOT Internet of Things design platform, relates to the technical field of oil metering, and adopts the micro-service design of SOA and utilizes the low-code development platform of the Internet of Things to execute the steps of the metering method under the platform, namely, S1, acquiring project parameter configuration and oil tank basic information; S2, acquiring real-time monitoring data of the oil tank; wherein the monitoring data comprises a liquid level yw, a water level sw and an average temperature wd; and the technical key points are that the petrochemical oil metering method based on the AIRIOT Internet of Things design platform has multiple beneficial effects of improving metering accuracy and efficiency, optimizing resource allocation and improving operation efficiency, improving system expansibility and flexibility, and promoting digital transformation and intelligent upgrading, which jointly promote the digital transformation and intelligent upgrading of the petrochemical industry.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of oil metering, in particular to a petrochemical oil metering method based on an AIRIOT Internet of Things design platform. BACKGROUND

[0002] With the development of the petrochemical industry, the automation and intelligence of the metering system are increasingly required, and how to ensure the accuracy and reliability of the metering data to further improve the intelligent level of the system is an important challenge currently faced, so the further optimization and upgrading of the petrochemical oil metering method is an important issue currently faced by the petrochemical industry.

[0003] When designing the oil metering method, real-time monitoring and accurate metering of oil should be realized, and scientific basis for the management of oil should be provided through data analysis and processing, and the traditional designed metering method has the following technical pain points:

[0004] 1. How to ensure the stability and accuracy of the metering system;

[0005] 2. How to effectively integrate the AIRIOT Internet of Things design platform with the existing petrochemical oil metering equipment and system;

[0006] 3. The traditional metering method only obtains three collected data of oil tank liquid level, water level and temperature for oil metering, without comprehensively considering other factors affecting oil measurement, so it is difficult to achieve accurate and precise oil metering;

[0007] 4. After real-time data calculation, there is no record of historical data, and sequence data cannot be efficiently stored and queried. SUMMARY

[0008] (I) Technical problems solved

[0009] In view of the deficiencies of the prior art, the present application provides a petrochemical oil metering method based on an AIRIOT Internet of Things design platform, which solves the problems proposed in the background art.

[0010] (II) Technical scheme

[0011] To achieve the above purpose, the present application is realized by the following technical scheme:

[0012] A petrochemical oil metering method based on an AIRIOT Internet of Things design platform, which adopts SOA micro-service design and utilizes an Internet of Things low-code development platform, and the steps of the metering method executed under the platform are as follows:

[0013] S1, obtaining project parameter configuration and oil tank basic information;

[0014] S2, acquire real-time monitoring data of the oil tank; wherein the monitoring data comprises liquid level yw, water level sw and average temperature wd;

[0015] S3, calculate initial apparent volume zcstj according to the liquid level yw and the oil tank volume coefficient table;

[0016] S4, calculate apparent volume after water volume reduction jsstj according to the initial apparent volume zcstj and the water volume stj under the condition of subtracting the water volume;

[0017] S5, obtain apparent volume with static pressure compensation jybcstj according to the liquid level yw, the static pressure compensation coefficient table and the built static pressure fitting function, combined with the apparent volume after water volume reduction jsstj;

[0018] S6, calculate apparent volume after tank volume correction rjxzstj according to the volume correction coefficient rjxzz of each oil tank and the apparent volume with static pressure compensation jybcstj;

[0019] S7, calculate standard volume bztj according to the acquired oil product standard density ypbzmd, temperature wd and volume correction coefficient table, call the built volume correction function, and combine the apparent volume after tank volume correction rjxzstj;

[0020] S8, calculate apparent density smd according to the acquired oil product standard density ypbzmd, temperature wd and density correction coefficient table, and call the density fitting function;

[0021] S9, establish a standard mass calculation model, and calculate standard mass bzzl according to the oil product standard density ypbzmd and standard volume bztj.

[0022] The technical points are:

[0023] 1. According to the national standard GBT1885-1998 (the standard specifies the method for converting the glass petroleum density meter reading (apparent density) obtained at non-standard temperature into the density (standard density) at standard temperature and the volume correction coefficient, and is applicable to crude oil, lubricating oil and other liquid petroleum products), real-time acquisition of oil tank liquid level, water level, temperature and other parameters, use of volume correction coefficient, static pressure compensation and other correction factors for dynamic calculation to ensure high accuracy of the measurement results;

[0024] 2. The dichotomy search algorithm is used to quickly locate the correction coefficient of petrochemical oil measurement, and the correction coefficient is stored in an ordered array in a certain order (such as ascending order or descending order); when it is necessary to find the correction coefficient of a certain oil, the dichotomy search algorithm can be used to quickly locate the target value in the ordered array, which can greatly improve the accuracy and efficiency of petrochemical oil measurement, optimize the table lookup efficiency, and meet the scenario of large amount of data and frequent lookup.

[0025] 3. The nonlinear relationship between the liquid level, temperature and correction factor of the oil tank is fitted and calculated. By fitting and processing the multi-dimensional data such as volume coefficient and density correction coefficient, reasonable interpolation and approximation are performed according to irregular data points, and more accurate volume and density results are calculated. The nonlinear relationship is fitted and calculated to avoid the precision problem of traditional linear interpolation and improve the calculation precision of volume and density.

[0026] 4. The low-code development platform (AIRIOT) of the Internet of Things is used to simplify the development process through a graphical interface, reduce development costs and difficulty, and use Internet of Things technology to obtain liquid level, water level, temperature and other data from oil tank equipment in real time. Through unified interface design, the data acquisition and preprocessing process is simplified to adapt to the application requirements in different scenarios. The liquid level, water level, temperature and other data of the oil tank are collected in real time through the Internet of Things equipment, and dynamic calculation is performed combined with standard density and correction factor;

[0027] 5. Support for simulation and easy verification of the rationality and accuracy of the calculation process, real-time feedback of measurement abnormalities, and support for independent expansion and function optimization through modular design to ensure system stability;

[0028] The basic information of the oil tank includes but is not limited to the name, number, volume correction value, oil standard density, tank type and oil name of the oil tank equipment. The project parameter configuration includes but is not limited to the project unit code, business type and whether to reduce the water volume. The basic information of the oil tank and the project parameter configuration are obtained from the relational database built-in the low-code development platform;

[0029] If the project parameter configuration sets whether to reduce the volume to yes, the water volume is reduced according to the configuration information.

[0030] If the project parameter configuration sets whether to reduce the volume to no, no response action is performed.

[0031] The monitoring data is obtained by the Internet of Things technology to obtain real-time data of the corresponding data point in the time series database built-in the low-code development platform, and the monitoring data is converted to the BigDecimal data type.

[0032] The process of calculating the initial apparent volume zcstj is as follows:

[0033] Binary search algorithm: first call the binary search function to find the index position of the liquid level in the oil tank volume coefficient table;

[0034] Initialize Boundaries: Set the left boundary of the search range to 0 and the right boundary to the last index of the list; Loop Search: Loop through the search range until the left boundary exceeds the right boundary; Calculate Middle Index: Calculate the middle index and get the liquid level of the middle element; Compare Values: If the liquid level of the middle element is equal to the target value, return that index; if the liquid level of the middle element is less than the target value, update the left boundary; if the liquid level of the middle element is greater than the target value, update the right boundary; Return Search Position: If the target value is not found, return the search position in negative form; if found, return directly.

[0035] Check the index: If an exact match is found (index >= 0), the corresponding volume factor is returned directly; otherwise, the position where the fit calculation should be performed is calculated.

[0036] Handling boundary cases: Check if the fitted calculation position is within the valid range. If the fitted calculation position is 0 or equal to the size of the tank volume coefficient table, return 0.

[0037] Obtaining upper and lower bounds: Use the insertion position to obtain the upper and lower bounds of the liquid level and volume coefficient;

[0038] Fitting: The initial apparent volume zcstj is found in the oil tank volume coefficient table based on the liquid level. If the corresponding data can be found directly, then the search can be performed directly; if the corresponding data cannot be found, the following fitting calculation formula is used to perform the fitting operation.

[0039] The fitting calculation formula is:

[0040]

[0041] In the formula, yw: the input liquid level value, yw1: the most recent value found in the tank volume coefficient table for oil tanks with a liquid level lower than this value; tj1: the corresponding apparent volume value found based on yw1, yw2: the most recent value found in the tank volume coefficient table for oil tanks with a liquid level higher than this value, and tj2: the corresponding apparent volume value found based on yw2.

[0042] The formula used to calculate the apparent volume jsstj after water reduction is: zcstj-stj=jsstj.

[0043] Next, the formula used to calculate the apparent volume rjxzstj after the tank volume correction is: rjxzstj=jybcstj*rjxzz.

[0044] Further, the volume correction function first finds the positions of the temperature wd and the standard density ypbzmd of the oil product in the volume correction coefficient table through a binary tree index lookup method, and performs fitting calculation to obtain the volume correction coefficient; the fitting process: when there is no exact matching value between the temperature wd and the standard density ypbzmd of the oil product, the two closest temperature points are found, and the volume correction coefficient vcf is obtained through fitting calculation. The volume correction coefficient fitting calculation formula is as follows:

[0045]

[0046] In the formula: wd: input temperature; wd1: the nearest value in the volume coefficient table that can be searched for less than the value of the measured temperature; xs1: the corresponding volume correction coefficient vcf queried according to wd1; wd2: the nearest value in the volume coefficient table that can be searched for greater than the value of the measured temperature; xs2: the corresponding volume correction coefficient vcf queried according to wd2.

[0047] Finally, the standard volume bztj is calculated through the formula: rjxzstj*vcf=bztj.

[0048] The density fitting function first performs binary search through a binary tree index lookup function according to the temperature wd and the density parameter to find the nearest correction coefficient for calculating the apparent density smd. The specific core calculation process is as follows:

[0049] Binary search algorithm:

[0050] First, call the binary search function to find the index position of the temperature in the density correction coefficient table; initialize the boundary: set the left boundary of the search range to 0 and the right boundary to the last index of the list; loop search: loop in the search range until the left boundary exceeds the right boundary; calculate the middle index: calculate the middle index and obtain the temperature of the middle element; compare the value: if the temperature of the middle element is equal to the target value, return the index; if the temperature of the middle element is less than the target value, update the left boundary; if the temperature of the middle element is greater than the target value, update the right boundary; return the search position; if the target value is not found, return the search position of the negative value, if found, directly return;

[0051] Check the index: if the exact match index>=0 is found, directly return the apparent density value smd found by the density correction coefficient table; if not found, calculate the position for fitting calculation;

[0052] Handle boundary conditions: check if the fitting calculation position is within the valid range, if the fitting calculation position is 0 or equal to the size of the density coefficient table, return 0;

[0053] Get upper and lower bounds: use the insertion position to obtain the liquid level and density coefficient of the upper and lower bounds;

[0054] The fitting is performed: the apparent density is looked up in the density correction coefficient table according to the temperature, if the corresponding data can be directly found, the direct lookup can be performed, if the corresponding data cannot be found, the fitting calculation formula is used to perform the fitting operation;

[0055] The fitting calculation formula is:

[0056]

[0057] Wherein, wd: input temperature value, wd1: the nearest value in the density correction coefficient table less than the measured temperature, smd1: the corresponding apparent density queried according to wd1, wd2: the nearest value in the density correction coefficient table greater than the measured temperature, smd2: the corresponding apparent density queried according to wd2.

[0058] The formula used for further calculating the standard mass bzzl is: (ypbzmd-1.1)*bztj=bzzl.

[0059] (Three) beneficial effects

[0060] The present application provides a kind of petrochemical oil metering method based on AIRIOT Internet of Things design platform, with the following beneficial effects:

[0061] I. improve the measurement accuracy and efficiency

[0062] Real-time data acquisition and analysis: the system relied on by the petrochemical oil metering method based on AIRIOT Internet of Things design platform can real-time, accurately collect various parameters of petrochemical oil, such as liquid level, temperature, volume, mass, etc., and perform efficient data processing and analysis through AIRIOT Internet of Things platform. The system can automatically correct errors caused by temperature, pressure and other factors, improve the accuracy of measurement. At the same time, the system can update data in real time, to ensure that management personnel can grasp the dynamic situation of oil at any time;

[0063] Automatic measurement process: by integrating various sensors and intelligent devices, the system can automatically complete the measurement process of petrochemical oil, without manual intervention, thereby greatly improving the measurement efficiency;

[0064] II. Optimize resource allocation and improve operational efficiency

[0065] Data visualization and report generation: AIRIOT platform provides rich data visualization tools, which can visually display petrochemical oil metering data in the form of charts, curves, etc., to facilitate management personnel to quickly understand the operation status of the warehouse area; In addition, the system can automatically generate various data reports to provide decision support for management and improve operational efficiency;

[0066] Intelligent decision-making and optimization: The system on which the petrochemical oil measurement method based on the AIRIOT Internet of Things design platform relies, i.e., the petrochemical oil measurement system based on the AIRIOT platform, can achieve fine management of oil inventory. The system can automatically calculate inventory and predict future demand, which helps optimize resource allocation, reduce inventory backlog and waste, and improve operational efficiency. At the same time, the system can track and analyze the use of oil, providing strong support for cost control and energy conservation and emission reduction.

[0067] III. Improve system scalability and flexibility

[0068] Modular design: The petrochemical oil measurement system based on the AIRIOT platform adopts modular design, with relatively independent functional modules, facilitating system expansion and upgrading, which provides good technical support for future business development of enterprises.

[0069] Flexible deployment and integration: The system supports multiple deployment methods, such as cloud deployment and local deployment, and can seamlessly integrate with other information systems to achieve data sharing and business process collaboration.

[0070] IV. Promote digital transformation and intelligent upgrade

[0071] Digital transformation: The petrochemical oil measurement system based on the AIRIOT platform is an important part of the digital transformation and intelligent upgrade of the petrochemical industry. By integrating advanced technologies such as the Internet of Things, big data, and artificial intelligence, the system can provide comprehensive digital solutions to promote intelligent production, management, and decision-making, helping to improve competitiveness and achieve sustainable development.

[0072] In summary, the petrochemical oil measurement method based on the AIRIOT Internet of Things design platform has multiple benefits, such as improving measurement accuracy and efficiency, optimizing resource allocation and improving operational efficiency, improving system scalability and flexibility, and promoting digital transformation and intelligent upgrade. These effects collectively drive the digital transformation and intelligent upgrade of the petrochemical industry. BRIEF DESCRIPTION OF DRAWINGS

[0073] Figure 1 The overall calculation process diagram of the present application;

[0074] Figure 2 The platform design diagram in the present application;

[0075] Figure 3 The flowchart of the binary search algorithm in the present application;

[0076] Figure 4 The fitting calculation process diagram in the present application;

[0077] Figure 5 The schematic diagram of the graphical interface of the real-time historical data collection is shown in the present application. DETAILED DESCRIPTION

[0078] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0079] The core logic processing strategy of the present application is outlined as follows:

[0080] Firstly, key system parameters need to be extracted from the system configuration parameters, including water volume, per-tank volume correction coefficient and oil standard density, etc. These parameters are the basis for subsequent calculations, so their accuracy and reliability must be ensured;

[0081] Secondly, three real-time data provided by the liquid level meter need to be obtained, which are the liquid level, water level and temperature of the oil tank. These data are dynamically changing, so they need to be obtained in real time to ensure the accuracy of the calculation results;

[0082] Thirdly, the tank liquid level is consulted to obtain the volume coefficient table (i.e. the oil tank volume coefficient table), through which the preliminary apparent volume zcstj can be calculated. This apparent volume is based on the current oil tank liquid level value;

[0083] Fourthly, it needs to be determined whether the water volume needs to be subtracted according to the system configuration. If the water volume does not need to be subtracted, the apparent volume at this time is zcstj, otherwise, if the water volume needs to be subtracted, the water volume is calculated according to the oil tank water level and the volume coefficient table, and the water volume is subtracted from the preliminary apparent volume zcstj to obtain the corrected apparent volume jsstj;

[0084] Fifthly, the corresponding compensation value is found according to the liquid level (with water) and the static pressure coefficient table (i.e. the static pressure compensation coefficient table), and is added to the corrected apparent volume jsstj to obtain the apparent volume with static pressure compensation value, which is denoted as jybcstj. This step is to compensate for the volume change caused by the change of static pressure;

[0085] Sixthly, the apparent volume is multiplied by the per-tank volume correction coefficient to obtain the tank volume corrected apparent volume, which is denoted as rjxzstj. This step is to further correct the volume error caused by the difference in oil tank volume;

[0086] Step 7: According to the standard density and temperature of the oil product, consult the volume coefficient table (i.e. volume correction coefficient table) to obtain the volume correction coefficient (vcf). This coefficient is used to further correct the volume change caused by temperature changes.

[0087] Step 8: Multiply the apparent volume by the volume correction coefficient (vcf) to calculate the standard volume, denoted as bztj. This standard volume is the final result after correction, ensuring that it is close to the actual volume of the oil product.

[0088] Step 9: According to the standard density and temperature of the oil product, consult the density coefficient table to obtain the apparent density, denoted as jssmd. This apparent density is based on the density value of the oil product at the current temperature.

[0089] Subsequently, we need to subtract a fixed value of 1.1 (air buoyancy coefficient) from the standard density, and then multiply this difference by the standard volume to obtain the standard mass, denoted as bzzl. This step is to calculate the actual mass of the oil product, taking into account the effect of air buoyancy.

[0090] At this point, we have completed the core steps of the entire calculation process, from extracting system parameters to finally calculating the standard mass of the oil product. Each step is crucial to ensure the accuracy and reliability of the calculation results.

[0091] Example 1:

[0092] Please refer to Figures 1 to 5 The embodiment provides a petrochemical oil metering method based on an AIRIOT Internet of Things design platform. Based on the AIRIOT Internet of Things design platform, advanced Internet of Things technology, sensor technology, data acquisition and processing technology are integrated to realize real-time monitoring and accurate metering of petrochemical oil.

[0093] The system running the petrochemical oil metering method based on the AIRIOT Internet of Things design platform includes an oil storage container, a sensor, a data acquisition module, a processing and calculation center, and an interactive interface. The sensor is installed on the oil storage container to monitor the liquid level, temperature, pressure and other parameters of the oil in real time. The data acquisition module collects sensor data and transmits it to the processing and calculation center through wireless or wired means. The processing and calculation center uses the AIRIOT Internet of Things design platform to analyze and process the collected data, realizing real-time monitoring and metering of the oil. The interactive interface provides an intuitive operation interface, allowing operators to easily view oil information, historical data, system status and perform simulation calculations. This system can improve the accuracy of petrochemical oil metering, reduce human error, and improve the operational efficiency and management level of petrochemical enterprises.

[0094] Refer to Figure 2As shown, based on the ability of function expansion of each function layer of the platform, the edge layer can support access to more actual devices on site, access to high-precision sensors and high-quality measurement devices and instruments through ability expansion; the platform layer can realize the docking ability of more digital models of petrochemical oil measurement through interface expansion of the underlying SDK, and can customize various data points, calculate data points, satisfy the data structure and data definition of measurement, and provide application services; the application layer expansion realizes the display of more complex and more accurate business information and provides multi-dimensional display and analysis statistics of real-time and historical measurement data; based on the technical base of the AIRIOT platform, the petrochemical oil measurement method is innovated, and it is possible to conveniently obtain various oil measurement data through data interface; after data collection, the data storage function of AIRIOT can be used for efficient data management; finally, through the data display function, the oil measurement result is intuitively presented, providing accurate data support for the petrochemical industry; realizing the innovative integration of the Internet of Things design platform (low-code development platform) and the fine business petrochemical oil measurement method and system and the presentation of application value.

[0095] The technical steps of the above measurement method are as follows:

[0096] S1: Obtain necessary system parameter configuration and oil tank basic information

[0097] S1.1: Obtain all oil tank device information (name, number, volume correction value, oil standard density, oil tank type, oil name, etc.) from the relational database;

[0098] S1.2: Obtain project basic information and project system parameter configuration information (project unit code, business type, whether to reduce volume, etc.) from the relational database, if the project system parameter configuration information sets whether to reduce volume to yes, then subtract the water volume according to the configuration information, otherwise, do not consider whether to reduce the volume.

[0099] S2: Obtain real-time monitoring data of the oil tank

[0100] S2.1: Obtain real-time data of each oil tank liquid level (yw), water level (sw), average temperature (wd) and other data points in the time series database through the Internet of Things technology method, and convert the data to high-precision BigDecimal data type, and the precision control can be set respectively (according to the accuracy requirement).

[0101] S3: Calculate the initial apparent volume

[0102] S3.1: Calculate the initial apparent volume zcstj according to the data point liquid level (yw) and the oil tank volume coefficient table, and the specific core calculation process is as follows (S3.2-S3.6):

[0103] The tank volume factor table is referenced as shown below:

[0104] Volume factor table

[0105]

[0106]

[0107] S3.2: Binary search algorithm

[0108] First call the binary search function to find the index position of the liquid level in the tank volume factor table;

[0109] S3.2.1: Initialize boundaries

[0110] Set the left boundary (left) of the search range to 0 and the right boundary (right) to the last index of the list;

[0111] S3.2.2: Loop search

[0112] Loop in the search range until left exceeds right;

[0113] S3.2.3: Calculate the middle index

[0114] Calculate the middle index (mid) and get the liquid level of the middle element;

[0115] S3.2.4: Compare values

[0116] If the liquid level of the middle element is equal to the target value, return the index; if the liquid level of the middle element is less than the target value, update the left boundary; if the liquid level of the middle element is greater than the target value, update the right boundary;

[0117] S3.2.5: Return search position

[0118] If the target value is not found, return the search position of the negative value (-left-1), if found, return directly;

[0119] S3.3: Check index

[0120] If an exact match is found (index >= 0), return the corresponding volume factor (stj) directly; if not found, calculate the position where the fitting calculation should be performed;

[0121] S3.4: Handle boundary cases

[0122] Check if the fitting calculation position is within the valid range; if the fitting calculation position is 0 or equal to the size of the volume factor table, return 0, because there is no valid volume factor available;

[0123] S3.5: Get upper and lower bounds

[0124] The liquid level and the volume coefficient are obtained using the insertion position, which are lowerBound and upperBound, respectively;

[0125] S3.6: Fitting

[0126] Fitting: The initial apparent volume zcstj is found according to the liquid level in the oil tank volume coefficient table. If the corresponding data can be directly found, it can be directly found. If the corresponding data cannot be found, the fitting calculation formula is used to perform fitting operation;

[0127] The fitting calculation formula is:

[0128]

[0129] In the formula, yw: input liquid level value, yw1: the nearest value found in the oil tank volume coefficient table less than the measured liquid level; tj1: the corresponding apparent volume value found according to yw1, yw2: the nearest value found in the oil tank volume coefficient table greater than the measured liquid level, tj2: the corresponding apparent volume value found according to yw2.

[0130] S4: Water volume processing

[0131] S4.1: If the water volume needs to be subtracted, the water volume stj is calculated according to the water level (sw) and the oil tank volume coefficient table (table same as S3.1) by calling the oil tank volume coefficient fitting function. The specific core calculation process is as follows (S4.2-S4.7);

[0132]

[0133] In the formula, sw: input water level value; yw1: the nearest value found in the oil tank volume coefficient table less than the measured liquid level; tj1: the corresponding apparent volume value found according to yw1, yw2: the nearest value found in the oil tank volume coefficient table greater than the measured liquid level, tj2: the corresponding apparent volume value found according to yw2;

[0134] S4.2: Binary search algorithm

[0135] First, call the binary search function to find the index position of the liquid level in the oil tank volume coefficient table; sW

[0136] S4.2.1: Initialize boundaries

[0137] Set the left boundary (left) of the search range to 0 and the right boundary (right) to the last index of the list;

[0138] S4.2.2: Loop search​

[0139] Looping in the search range until left exceeds right;

[0140] S4.2.3: Calculate the middle index

[0141] Calculate the middle index (mid) and get the liquid level of the middle element;

[0142] S4.2.4: Compare the value

[0143] If the liquid level of the middle element is equal to the target value, return the index; if the liquid level of the middle element is less than the target value, update the left boundary; if the liquid level of the middle element is greater than the target value, update the right boundary;

[0144] S4.2.5: Return the search position

[0145] If the target value is not found, return the search position of negative value (-left-1), if found, return directly;

[0146] S4.3: Check the index

[0147] If an exact match is found (index >= 0), return the corresponding volume coefficient (stj) directly; if not found, calculate the position where the fitting calculation should be performed;

[0148] S4.4: Handle boundary cases

[0149] Check if the fitting calculation position is within the valid range; if the fitting calculation position is 0 or equal to the size of the volume coefficient table, return 0, because there is no valid volume coefficient available;

[0150] S4.5: Get the upper and lower bounds

[0151] Use the insertion position to get the liquid level and volume coefficient of the upper and lower bounds, which are lowerBound and upperBound respectively;

[0152] S4.6: Calculate the apparent volume jsstj after water reduction using the formula (zcslj) - water volume (slj) = jsstj;

[0153] S5: Static pressure compensation

[0154] S5.1: Through the static pressure compensation coefficient table, use the liquid level (yw) to find the static pressure compensation value bcz, if not found, find the correct compensation coefficient by calling the static pressure fitting function, the static pressure fitting function is as follows:

[0155]

[0156] In the formula: yw: input liquid level value; yw1: the nearest value of the static pressure coefficient table that can be found for the measured liquid level less than the value; tj1: the corresponding apparent volume value queried according to yw1; yw2: the nearest value of the static pressure coefficient table that can be found for the measured liquid level greater than the value; tj2: the corresponding apparent volume value queried according to yw2; the specific core calculation process is as follows (S5.2-S5.6); static pressure coefficient table

[0157]

[0158]

[0159] S5.2: Binary search algorithm

[0160] First, call the binary search function to find the index position of the liquid level yw0 in the static pressure compensation coefficient table;

[0161] S5.2.1: Initialize boundaries

[0162] Set the left boundary (left) of the search range to 0 and the right boundary (right) to the last index of the list;

[0163] S5.2.2: Loop search

[0164] Loop in the search range until left exceeds right;

[0165] S5.2.3: Calculate the middle index

[0166] Calculate the middle index (mid) and get the liquid level of the middle element;

[0167] S5.2.4: Compare values

[0168] If the liquid level of the middle element is equal to the target value, return the index; if the liquid level of the middle element is less than the target value, update the left boundary; if the liquid level of the middle element is greater than the target value, update the right boundary;

[0169] S5.2.5: Return search position

[0170] If the target value is not found, return the search position of the negative value (-left-1), and if it is found, return directly;

[0171] S5.3: Check index

[0172] If an exact match is found (index >= 0), return the compensation value found in the static pressure compensation coefficient table (bcz) directly; if not found, calculate the position where fitting calculation should be performed (insertPosition);

[0173] S5.4: Handle boundary cases

[0174] Check if the fitted calculation position is in the valid range; if the fitted calculation position is 0 or equal to the size of the static pressure compensation coefficient table, return 0, because there is no valid static pressure coefficient available;

[0175] S5.5: Obtain the upper and lower bounds

[0176] Use the insertion position to obtain the liquid level and static pressure coefficient of the upper and lower bounds, respectively, lowerBound and upperBound;

[0177] S5.6: Calculate the apparent volume with static pressure compensation using the formula jsstj+bcz=jybcstj;

[0178] S6: Tank volume correction

[0179] S6.1: Calculate the apparent volume after tank volume correction rjxzstj=jybcstj*rjxzz according to the volume correction value coefficient rjxzz of each tank (data obtained from the volume correction value of the equipment information of the tank)

[0180] S7: Volume correction coefficient

[0181] S7.1: According to the standard density of the oil ypbzmd and the temperature wd, look up the volume correction coefficient table. If the corresponding correction coefficient cannot be found, use the volume correction function to calculate it, and obtain the volume correction coefficient vcf. The volume correction function is as follows:

[0182]

[0183] In the formula: wd: input temperature; wd1: the nearest value that can be found in the volume coefficient table less than the measured temperature; xs1: the corresponding volume correction coefficient vcf queried according to wd1; wd2: the nearest value that can be found in the volume coefficient table greater than the measured liquid level; xs2: the corresponding volume correction coefficient vcf queried according to wd2.

[0184] Volume coefficient table

[0185]

[0186]

[0187] S7.2: Calculate the standard volume bztj by the formula rjxzstj*vcf=bztj;

[0188] S8: Apparent density calculation

[0189] S8.1: According to the temperature wd and the standard density ypbzmd, look up the density correction coefficient table to find the corresponding apparent density value. If not found, call the density fitting function to calculate the apparent density smd, the density fitting function is as follows:

[0190]

[0191] Where, wd: input temperature value, wd1: the nearest value in the density correction coefficient table less than the measured temperature, smd1: the corresponding apparent density queried according to wd1, wd2: the nearest value in the density correction coefficient table greater than the measured temperature, smd2: the corresponding apparent density queried according to wd2.

[0192] The specific fitting calculation process is as follows (S8.2-S8.6);

[0193] Density coefficient table

[0194]

[0195]

[0196] S8.2: Binary search algorithm

[0197] Call the binary search function to find the index position of the temperature in the density correction coefficient table;

[0198] S8.2.1: Initialize boundaries

[0199] Set the left boundary (left) of the search range to 0 and the right boundary (right) to the last index of the list;

[0200] S8.2.2: Loop search

[0201] Loop in the search range until left exceeds right;

[0202] S8.2.3: Calculate the middle index

[0203] Calculate the middle index (mid) and get the temperature of the middle element;

[0204] S8.2.4: Compare values

[0205] If the temperature of the middle element is equal to the target value, return the index; if the temperature of the middle element is less than the target value, update the left boundary; if the temperature of the middle element is greater than the target value, update the right boundary;

[0206] S8.2.5: Return search position

[0207] If the target value is not found, return the search position of the negative value (-left-1), if found, directly return;

[0208] S8.3: Check index

[0209] If an exact match is found (index >= 0), directly return the corresponding apparent density value (smd) found by the density correction coefficient table lookup. If not found, calculate the position where the fitting calculation should be performed;

[0210] S8.4: Handle boundary conditions

[0211] Check if the fitting calculation position is within the valid range. If the fitting calculation position is 0 or equal to the size of the density coefficient table, return 0, because there is no valid density coefficient available;

[0212] S8.5: Get upper and lower bounds

[0213] Use the insertion position to get the liquid level and density coefficient of the upper and lower bounds, respectively, lowerBound and upperBound;

[0214] S8.6: Perform fitting

[0215] Use the calculation formula shown in S8.1 to perform fitting operation to obtain the apparent density value;

[0216]

[0217] Where, wd: input temperature value, wd1: the nearest value in the density correction coefficient table less than the measured temperature, smd1: the corresponding apparent density queried according to wd1, wd2: the nearest value in the density correction coefficient table greater than the measured liquid level, smd2: the corresponding apparent density queried according to wd2.

[0218] S9: Standard mass calculation

[0219] S9.1: Calculate the standard mass bzzl using the formula (ypbzmd-1.1)*bztj = bzzl:

[0220] By using the above technical solutions, the following effects are achieved:

[0221] 1. Ensure the stability and accuracy of the measurement system

[0222] In order to ensure the stability and accuracy of the measurement system, optimization is carried out from both hardware and software aspects. First, high-precision sensors and high-quality measurement equipment are selected to ensure their stable operation in various working environments. Second, the equipment is calibrated and maintained regularly to reduce errors. In addition, advanced data processing algorithms are used. The algorithms are designed according to the national standard GBT1885-1998 to obtain and accurately calculate multiple parameters such as tank level, water level, and temperature in real time. Various correction factors such as volume correction value coefficient and static pressure compensation are used to ensure the high precision of the measurement results. The collected data are analyzed and corrected in real time to improve the accuracy of the measurement results.

[0223] 2. Integrating the AIRIOT Internet of Things design platform with existing petrochemical oil measurement equipment and systems

[0224] The integration is carried out in the following steps: First, analyze the architecture and data interface of the existing system to determine the feasibility of integration. Then, design the corresponding data collection and transmission scheme according to the characteristics of the AIRIOT platform. Next, develop middleware to achieve seamless data integration. Finally, test and debug the system to ensure that the integrated system can run stably and the data transmission is accurate.

[0225] 3. Combining regular calibration of oil depots with comprehensive consideration of various factors affecting oil measurement, such as water reduction, tank deformation, and static pressure coefficient, to analyze the complex interactions between these factors and their impact on oil measurement, achieving accurate and precise oil measurement. Business-driven synchronous transformation processing logic is configured to allow the algorithm to be extended and modified according to different conditions, taking full advantage of the low-code platform development configuration to reduce the cost of algorithm maintenance and avoid the limitations of hard coding.

[0226] 4. The measurement results will not only be transmitted in real time to the designated system through the Internet of Things platform, but also stored in a time series database. The data are arranged in chronological order to facilitate future query and analysis. Time stamps are used to ensure data consistency and ensure that data query and calculation are performed at the same time point, thereby avoiding data loss and update delays. In addition, by using a distributed architecture, the accuracy and integrity of data transmission are ensured, preventing measurement errors caused by data loss.

[0227] In the application, the values of the formulas involved are calculated after dimensionless, and the establishment of the formulas is based on a large amount of data collected by software simulation to obtain a formula closest to the real situation. Some coefficients or weights in the formula are set by technicians in the field according to actual conditions, so they are not described here.

[0228] The above-described embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the above-described embodiments can be implemented in whole or in part in the form of a computer program product. A person of ordinary skill in the art can be aware that units and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on the specific application and design constraints of the technical solutions.

[0229] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, and can be located in one place or distributed on multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiments.

[0230] The above describes only specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application.

Claims

1. A method for measuring petrochemical oil based on AIRIOT Internet of Things design platform, characterized in that, The method adopts the micro-service design of the SOA, and utilizes the low-code development platform of the Internet of Things, and steps of the metering method are executed under the platform: S1, obtaining project parameter configuration and tank basic information; S2, obtaining real-time monitoring data of the tank; wherein, the monitoring data comprises liquid level yw, water level sw and average temperature wd; S3, calculating initial apparent volume zcstj according to the liquid level yw and tank volume coefficient table; S4, calculating apparent volume after water volume reduction jsstj according to the initial apparent volume zcstj and water volume stj under the condition of subtracting water volume; S5, obtaining apparent volume with static pressure compensation jybcstj according to the liquid level yw, static pressure compensation coefficient table and built static pressure fitting function, and combining the apparent volume after water volume reduction jsstj; S6, calculating apparent volume after tank volume correction rjxzstj according to the volume correction coefficient table of each tank and the apparent volume with static pressure compensation jybcstj; S7, calculating standard volume bztj according to the obtained oil product standard density ypbzmd, temperature wd and volume correction coefficient table, calling the built volume correction function, and combining the apparent volume after tank volume correction rjxzstj; the volume correction function firstly finds the position of the temperature wd and the oil product standard density ypbzmd in the volume correction coefficient table through the binary tree index searching method, and performs fitting calculation to obtain the volume correction coefficient; the fitting process is as follows: when there is no accurate matching value between the temperature wd and the oil product standard density ypbzmd, the volume correction function finds two closest temperature points and performs fitting calculation to obtain the volume correction coefficient vcf, and the standard volume bztj is calculated through the formula: rjszstj* vcf= bztj; S8, calculating apparent density smd according to the obtained oil product standard density ypbzmd, temperature wd and density correction coefficient table, and calling the density fitting function; the density fitting function firstly performs binary search through the binary tree index searching function according to the temperature wd and the density parameter to find the nearest correction coefficient to calculate the apparent density smd, and the specific core calculation process is as follows: Binary search algorithm: Firstly, the binary search function is called to find the index position of the temperature in the density correction coefficient table; the boundary is initialized: the left boundary of the search range is set to 0, and the right boundary is set to the last index of the list; the search is performed in the search range in a loop until the left boundary exceeds the right boundary; the middle index is calculated: the middle index is calculated, and the temperature of the middle element is obtained; the value is compared: if the temperature of the middle element is equal to the target value, the index is returned; if the temperature of the middle element is less than the target value, the left boundary is updated; if the temperature of the middle element is greater than the target value, the right boundary is updated; the search position is returned; if the target value is not found, the search position of the negative value is returned, and if the target value is found, it is directly returned; Checking the index: if the exact match index >=0 is found, the apparent density value smd found from the density correction coefficient table is directly returned; if not found, the position for which fitting calculation should be performed is calculated; Processing boundary conditions: check if the fitting calculation position is within the valid range, if the fitting calculation position is 0 or equal to the size of the density coefficient table, return 0; Get upper and lower bounds: use the insertion position to get the liquid level and density coefficient of the upper and lower bounds; Fitting: according to the temperature, find the corresponding data in the density correction coefficient table. If the corresponding data can be directly found, it can be directly found. If the corresponding data cannot be found, the following fitting calculation formula is used to perform fitting operation; The fitting calculation formula is: ; wherein, : input temperature value, : the most recent value found in the density correction factor table for a measured temperature less than this value, : the corresponding apparent density found in the table, : the most recent value found in the density correction factor table for a measured level greater than this value, : the corresponding apparent density found in the table, : the most recent value found in the density correction factor table for a measured level greater than this value, : the corresponding apparent density found in the table. S9, establish a standard quality calculation model, and calculate the standard mass bzzl according to the standard density ypbzmd and the standard volume bztj of the oil product.

2. The petrochemical oil metering method based on the AIRIOT Internet of Things design platform according to claim 1, characterized in that: The basic information of the oil tank includes the name, number, volume correction value, standard density of the oil product, type of the oil tank and name of the oil product; the project parameter configuration includes the project unit code, business type and whether to reduce the water volume; the basic information of the oil tank and the project parameter configuration are obtained from the relational database built in the low-code development platform; If the project parameter configuration sets whether to reduce the volume to yes, the water volume is reduced according to the configuration information; If the project parameter configuration sets whether to reduce the volume to no, no response action is taken.

3. The petrochemical oil metering method based on the AIRIOT Internet of Things design platform according to claim 1, characterized in that: The monitoring data is obtained by the Internet of Things technology to obtain the real-time data of the corresponding data point in the time series database built in the low-code development platform, and the monitoring data is converted to the BigDecimal data type.

4. The petrochemical oil metering method based on the AIRIOT Internet of Things design platform according to claim 1, characterized in that: The process of calculating the initial apparent volume zcstj is as follows: Binary search algorithm: first call the binary search function to find the index position of the liquid level in the oil tank volume coefficient table; Initialize the boundary: set the left boundary of the search range to 0 and the right boundary to the last index of the list; loop search: loop in the search range until the left boundary exceeds the right boundary; calculate the middle index: calculate the middle index and get the liquid level of the middle element; Compare the value: if the liquid level of the middle element is equal to the target value, return the index; if the liquid level of the middle element is less than the target value, update the left boundary; if the liquid level of the middle element is greater than the target value, update the right boundary; return the search position: if the target value is not found, return the search position of the negative value, if it is found, return directly; Check the index: if the exact match is found, that is, index >=0, return the corresponding volume coefficient stj; if not found, calculate the position for fitting calculation; Processing boundary conditions: check if the fitting calculation position is within the valid range, if the fitting calculation position is 0 or equal to the size of the density coefficient table, return 0; Get upper and lower bounds: use the insertion position to get the liquid level and density coefficient of the upper and lower bounds; Fitting: the initial apparent volume zcstj is found according to the liquid level in the oil tank volume coefficient table. If the corresponding data can be directly found, it can be directly found. If the corresponding data cannot be found, the following fitting calculation formula is used to perform fitting operation; The fitting calculation formula is: zcstj = 0 ; In the formula, : The input liquid level value, The most recent value found in the tank volume coefficient table for tanks with liquid levels below this value; :according to The corresponding apparent volume value found in the query. The most recent value found in the tank volume coefficient table for tanks with measured liquid levels exceeding this value. :according to The corresponding apparent volume value found.

5. The petrochemical oil metering method based on the AIRIOT Internet of Things design platform according to claim 1, characterized in that: The formula used to calculate the apparent volume jsstj after reducing the water volume is: zcstj-stj=jsstj.

6. The petrochemical oil metering method based on the AIRIOT Internet of Things design platform according to claim 1, characterized in that: The formula used to calculate the apparent volume rjxzstj after correcting the tank volume is: rjxzstj=jybcstj*rjzxx.

7. The petrochemical oil metering method based on the AIRIOT Internet of Things design platform according to claim 1, characterized in that: The formula used to calculate the standard quality bzzl is: (ypbzmd - 1.1) * bztj = bzzl.

Citation Information

Patent Citations

  • Intelligent measuring and counting system of oil product tank farm

    CN101038201A