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

By adopting the AIRIOT IoT Internet of Things design platform and SOA microservice design in the petrochemical oil feed measurement method, combining binary search algorithms and fitting calculations, the stability, accuracy and integration problems of the existing petrochemical oil feed measurement methods are solved, efficient and accurate oil feed measurement and data management are achieved, and intelligent and digital transformation of the petrochemical industry has been promoted.

CN119618337AActive Publication Date: 2025-03-14AEROSPACE HI TECH HLDG GROUP
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing petrochemical oil feed measurement methods have problems such as insufficient stability and accuracy, difficulty in effectively integrating with the AIRIOT IoT design platform, failure to comprehensively consider various factors affecting oil feed measurement, and lack of historical data records after real-time data calculation.

Method used

The petrochemical oil feed measurement method based on the AIRIOT Internet of Things design platform is adopted, and parameters such as oil tank liquid level, water level and temperature are obtained in real time through SOA's microservice design and IoT low-code development platform. The oil tank liquid level, water level and temperature are used to perform dynamic calculations using correction factors such as volume correction value coefficient and static pressure compensation. The nonlinear relationship is processed in combination with the binary search algorithm and fitting calculation to ensure the accuracy of the measurement results.

Benefits of technology

It improves the accuracy and efficiency of petrochemical oil metering, optimizes resource allocation and operation efficiency, improves the scalability and flexibility of the system, and promotes the digital transformation and intelligent upgrading of the petrochemical industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119618337A_ABST
    Figure CN119618337A_ABST
Patent Text Reader

Abstract

The invention discloses a petrochemical oil metering method based on an AIRIOT internet-of-things design platform, and relates to the technical field of oil metering, the method adopts an SOA micro-service design and utilizes an internet-of-things low-code development platform, and the metering method executed under the platform comprises the following steps: S1, obtaining 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; according to the technical key points, the petrochemical oil metering method based on the AIRIOT Internet of Things design platform has multiple beneficial effects of improving metering precision and efficiency, optimizing resource allocation, improving operation efficiency, improving system expansibility and flexibility and promoting digital transformation and intelligent upgrading; the effects jointly promote 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 invention relates to the technical field of oil metering, and in particular to a petrochemical oil metering method based on the AIRIOT Internet of Things design platform. Background Art

[0002] With the development of the petrochemical industry, the requirements for automation and intelligence of the metering system are getting higher and higher. How to ensure the accuracy and reliability of metering data and further improve the intelligence level of the system is an important challenge currently faced. Therefore, the further optimization and upgrading of petrochemical oil metering methods is an important issue currently faced by the petrochemical industry.

[0003] When designing an oil metering method, it is necessary to be able to achieve real-time monitoring and accurate metering of oil, and provide a scientific basis for oil management through data analysis and processing. The traditional metering method has the following technical pain points:

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

[0005] 2. How to effectively integrate AIRIOT IoT design platform with existing petrochemical oil metering equipment and systems;

[0006] 3. The traditional metering method only measures oil by acquiring three collected data: oil tank level, water level and temperature. It does not comprehensively consider other factors that affect oil measurement, making it difficult to achieve accurate oil measurement.

[0007] 4. There is no record of historical data after real-time data calculation, and sequence data cannot be stored and queried efficiently. Summary of the invention

[0008] 1. Technical issues to be resolved

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

[0010] (II) Technical solution

[0011] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0012] A petrochemical oil metering method based on AIRIOT Internet of Things design platform, which adopts SOA microservice design and uses the Internet of Things low-code development platform. The steps of executing the metering method under the platform are:

[0013] S1. Obtain project parameter configuration and basic information of oil tanks;

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

[0015] S3. Calculate the initial apparent volume zcstj based on the liquid level yw and the oil tank volume coefficient table;

[0016] S4. Under the condition of subtracting the water volume, the apparent volume jsstj after the water volume is subtracted is calculated based on the initial apparent volume zcstj and the water volume stj;

[0017] S5. Based on the liquid level yw, the static pressure compensation coefficient table and the constructed static pressure fitting function, combined with the apparent volume jsstj after the water volume reduction, the apparent volume jybcstj with static pressure compensation is obtained;

[0018] S6. Calculate the corrected apparent volume rjxzstj of the tank volume based on the volume correction coefficient rjxzz of each oil tank and the apparent volume jybcstj with static pressure compensation;

[0019] S7, based on the obtained oil standard density ypbzmd, temperature wd and volume correction coefficient table, call the constructed volume correction function, and calculate the standard volume bztj in combination with the corrected apparent volume rjxzstj of the tank capacity;

[0020] S8, based on the obtained oil standard density ypbzmd, temperature wd and density correction coefficient table, and calling the density fitting function, calculate the apparent density smd;

[0021] S9. Establish a standard mass calculation model and calculate the standard mass bzzl based on the standard density ypbzmd and standard volume bztj of the oil product.

[0022] The technical points are:

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

[0024] 2. Use binary search algorithm to quickly locate the correction coefficient of petrochemical oil metering, and store the correction coefficient in an ordered array in a certain order (such as ascending or descending order); when it is necessary to find the correction coefficient of a certain oil, the binary 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 metering, optimize the efficiency of table lookup, and meet the scenario of large data volume and frequent search;

[0025] 3. Fitting calculation processes the nonlinear relationship between the liquid level, temperature and correction coefficient of the oil tank. By fitting multidimensional data such as volume coefficient and density correction coefficient, reasonable interpolation and approximation are performed based on irregular data points to calculate more accurate volume and density results. Fitting calculation of nonlinear relationships avoids the accuracy problem of traditional linear interpolation and improves the calculation accuracy of volume and density.

[0026] 4. Use the IoT low-code development platform (AIRIOT) to simplify the development process through a graphical interface, reduce development costs and difficulties, and use IoT technology to obtain data such as liquid level, water level, and temperature from oil tank equipment in real time. Through a unified interface design, the data collection and preprocessing process is simplified to meet application requirements in different scenarios. Use IoT devices to collect data such as the liquid level, water level, and temperature of the oil tank in real time, and perform dynamic calculations in combination with standard density and correction factors;

[0027] 5. Support simulation to verify the rationality and accuracy of the calculation process, provide real-time feedback on measurement anomalies, and support 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, standard density of the oil product, type of oil tank and name of the oil product; the project parameter configuration includes but is not limited to the project unit code, business type and whether the water volume is reduced; the basic information of the oil tank and the project parameter configuration are obtained from the relational database built into the low-code development platform;

[0029] If the setting of whether to reduce volume in the project parameter configuration is yes, the water volume is subtracted according to the configuration information;

[0030] If the setting of whether to reduce the volume in the project parameter configuration is No, no response action will be taken.

[0031] The monitoring data is obtained through IoT technology to obtain real-time data of corresponding data points in the time series database built into the low-code development platform, and the monitoring data is converted into the BigDecimal data type.

[0032] The process of calculating the initial visual 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 the 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 in the search range until the left boundary exceeds the right boundary; calculate the middle index: calculate the middle index and get the level of the middle element; compare values: if the level of the middle element is equal to the target value, return the index; if the level of the middle element is less than the target value, update the left boundary; if the 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 negative search position, if found, return directly;

[0035] Check the index: if an exact match is found, that is, index>=0, the corresponding volume coefficient is directly returned; if not found, the position where the fitting calculation should be performed is calculated;

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

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

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

[0039] The fitting calculation formula is:

[0040]

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

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

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

[0044] Furthermore, the volume correction function first finds the position of the temperature wd and the oil standard density ypbzmd in the volume correction coefficient table through a binary tree index search, and performs a fitting calculation to obtain the volume correction coefficient; fitting process: when there is no exact match between the temperature wd and the oil standard density ypbzmd, the two closest temperature points will be found, and a fitting calculation will be performed to obtain the volume correction coefficient vcf. The volume correction coefficient fitting calculation formula is as follows:

[0045]

[0046] In the formula: wd: input temperature; wd1: the nearest value that can be found in the volume coefficient table for the measured temperature less than this value; xs1: the corresponding volume correction factor vcf queried based on wd1; wd2: the nearest value that can be found in the volume coefficient table for the measured liquid level greater than this value; xs2: the corresponding volume correction factor vcf queried based on wd2.

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

[0048] The density fitting function is based on the temperature wd and density parameters. First, it performs a binary search through the binary tree index search function to find the nearest correction coefficient to calculate 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 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 in the search range until the left boundary exceeds the right boundary; calculate the middle index: calculate the middle index and get the temperature of the middle element; compare values: 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 negative search position, if found, return directly;

[0051] Check index: if an exact match index>=0 is found, then directly return the apparent density value smd found in the corresponding density correction coefficient table; if not found, calculate the position where the fitting calculation should be performed;

[0052] Handling boundary conditions: Check whether 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 get the liquid level and density coefficient of the upper and lower bounds;

[0054] Fitting: Look up the density correction coefficient table according to the temperature. If the corresponding data can be found directly, just look it up directly. If the corresponding data cannot be found, use the following fitting calculation formula to perform the fitting operation;

[0055] The fitting calculation formula is:

[0056]

[0057] Wherein, wd: input temperature value, wd1: the nearest value found in the density correction coefficient table for the measured temperature less than this value, smd1: the corresponding apparent density found based on wd1, wd2: the nearest value found in the density correction coefficient table for the measured liquid level greater than this value, smd2: the corresponding apparent density found based on wd2.

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

[0059] (III) Beneficial effects

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

[0061] 1. Improve measurement accuracy and efficiency

[0062] Real-time data collection and analysis: The system based on the petrochemical oil metering method based on the AIRIOT IoT design platform can collect various parameters of petrochemical oil in real time and accurately, such as liquid level, temperature, volume, quality, etc., by integrating high-precision sensors and intelligent instruments, and perform efficient data processing and analysis through the AIRIOT IoT platform. The system can automatically correct errors caused by factors such as temperature and pressure to improve the accuracy of measurement. At the same time, the system can update data in real time to ensure that managers can grasp the dynamic situation of oil at any time;

[0063] Automated metering process: By integrating multiple sensors and intelligent devices, the system can automatically complete the metering process of petrochemical oil without manual intervention, thus greatly improving metering efficiency;

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

[0065] Data visualization and report generation: AIRIOT platform provides a variety of data visualization tools, which can intuitively display petrochemical oil metering data in the form of charts, curves, etc., so that managers can quickly understand the operation status of the storage area; in addition, the system can also automatically generate various data reports to provide decision-making support for management and improve operational efficiency;

[0066] Intelligent decision-making and optimization: The system based on the petrochemical oil metering method based on the AIRIOT IoT design platform, namely the petrochemical oil metering system based on the AIRIOT platform, can realize the refined management of oil inventory. The system can automatically calculate the inventory and predict future demand, which helps to optimize the source configuration, reduce inventory backlog and waste, and improve operational efficiency. At the same time, the system can also track and analyze the use of oil, providing strong support for cost control and energy conservation and emission reduction.

[0067] 3. Improve system scalability and flexibility

[0068] Modular design: The petrochemical oil metering system based on AIRIOT platform adopts modular design. Each functional module is relatively independent, which is convenient for system expansion and upgrading. This provides good technical support for the future business development of the enterprise.

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

[0070] 4. Promote digital transformation and intelligent upgrading

[0071] Digital transformation: The petrochemical oil metering system based on the AIRIOT platform is an important part of the digital transformation and intelligent upgrading 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 enterprises to achieve intelligent production, management, and decision-making, which will help improve competitiveness and achieve sustainable development.

[0072] In summary, the petrochemical oil metering method based on the AIRIOT Internet of Things design platform has multiple beneficial effects, such as improving metering accuracy and efficiency, optimizing resource allocation and improving operational efficiency, enhancing system scalability and flexibility, and promoting digital transformation and intelligent upgrading. These effects have jointly promoted the digital transformation and intelligent upgrading of the petrochemical industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] Figure 1 It is a schematic diagram of the overall calculation process of the present invention;

[0074] Figure 2 This is a schematic diagram of the platform design in the present invention;

[0075] Figure 3 It is a schematic diagram of the flow of the binary search algorithm in the present invention;

[0076] Figure 4 It is a schematic diagram of the fitting calculation process in the present invention;

[0077] Figure 5 This is a schematic diagram of a graphical interface showing real-time historical collection data in the present invention. DETAILED DESCRIPTION

[0078] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0079] The core logic processing strategy of the present invention is summarized as follows:

[0080] First, it is necessary to extract key system parameters from the system configuration parameters. These parameters include water reduction volume, correction factor of each oil tank volume, and standard density of oil products. These parameters are the basis for subsequent calculations, so their accuracy and reliability must be ensured.

[0081] Secondly, we need to obtain three real-time data provided by the level meter, 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] In the third step, we will consult the volume coefficient table (i.e., the oil tank volume coefficient table) according to the oil tank level. Through this table, we can calculate the preliminary apparent volume, recorded as zcstj, which is based on the value of the current oil tank level;

[0083] The fourth step is to decide whether to subtract the water volume 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 volume coefficient table will be consulted according to the water level of the oil tank, the water volume will be calculated, and the water volume will be subtracted from the preliminary apparent volume zcstj to obtain the corrected apparent volume, recorded as jsstj.

[0084] The fifth step is to find the corresponding compensation value according to the liquid level (water content) and the static pressure coefficient table (i.e., the static pressure compensation coefficient table), and add it to the corrected apparent volume jsstj to obtain the apparent volume with static pressure compensation value, recorded as jybcstj. This step is to compensate for the volume change caused by the static pressure change;

[0085] The sixth step is to multiply the apparent volume by the correction coefficient of each tank volume to obtain the tank volume corrected apparent volume, recorded as rjxzstj. This step is to further correct the volume error caused by the difference in tank volume.

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

[0087] Step 8: Multiply the apparent volume by the volume correction factor (vcf) to calculate the standard volume, recorded as bztj; this standard volume is the final result after correction to ensure that it is close to the actual oil volume;

[0088] Step 9: According to the standard density and temperature of the oil, consult the density coefficient table to obtain the apparent density, recorded as jssmd; this apparent density is the value of the oil density at the current temperature;

[0089] Then, 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 get the standard mass, recorded as bzzl; this step is to calculate the actual mass of the oil, taking into account the influence of air buoyancy;

[0090] So far, we have completed the core steps of the entire calculation process, from extracting system parameters to finally calculating the standard quality of oil products. Each step is crucial to ensure the accuracy and reliability of the calculation results.

[0091] Embodiment 1:

[0092] See also Figures 1 to 5 ,This embodiment provides a petrochemical oil metering method based on the AIRIOT Internet of Things design platform, wherein the AIRIOT Internet of Things design platform can realize real-time monitoring and accurate metering of petrochemical oil by integrating advanced Internet of Things technology, sensor technology, and data acquisition and processing technology;

[0093] The system operated by the petrochemical oil metering method based on the AIRIOT Internet of Things design platform includes oil storage containers, sensors, data acquisition modules, processing and computing centers, and interactive interfaces. The sensors are installed on the oil storage containers to monitor the oil level, temperature, pressure and other parameters in real time. The data acquisition module is responsible for collecting sensor data and transmitting it to the processing and computing center wirelessly or wired. The processing and computing center uses the AIRIOT Internet of Things design platform to analyze and process the collected data to achieve real-time monitoring and metering of oil. The interactive interface provides an intuitive operating interface, allowing operators to easily view oil information, historical data, system status, and perform simulation calculations. The system can improve the accuracy of petrochemical oil metering, reduce errors in manual operations, and improve the operating efficiency and management level of petrochemical enterprises.

[0094] Reference Figure 2As shown in the figure, based on the functional expansion capabilities of each functional layer of the platform, the edge layer can support the access of more actual equipment on site, high-precision sensors, high-quality metering equipment and instruments through capability expansion; the platform layer realizes the docking capability of more digital models of petrochemical oil metering through the interface expansion of the underlying SDK, and can customize various data points and calculate data points to meet the data structure of metering and the calculation, storage and analysis of data definition and provide application services; the application layer expansion realizes the display of more complex and accurate business information and provides multi-dimensional display and analysis statistics of real-time and historical metering data; based on the technical foundation of the AIRIOT platform, the petrochemical oil metering method can be innovated, and it is possible to easily obtain various types of oil metering data through the data interface; after data collection, the data storage function of AIRIOT can be used to efficiently manage data; finally, through the data display function, the oil metering results can be intuitively presented, providing accurate data support for the petrochemical industry; the innovative integration and application value presentation of the Internet of Things design platform (low-code development platform) and the refined business petrochemical oil metering method and system are realized.

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

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

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

[0098] S1.2: Obtain the basic project information and project system parameter configuration information (project unit code, business type, whether to reduce water volume, etc.) from the relational database. If the project system parameter configuration information sets whether to reduce volume as yes, the water volume is subtracted according to the configuration information; otherwise, whether to reduce the volume is not considered.

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

[0100] S2.1: Use IoT technology to obtain real-time data of data points such as the liquid level (yw), water level (sw), and average temperature (wd) of each oil tank in the time series database, and convert the data into a high-precision BigDecimal data type. The precision control can be set separately (according to the accuracy requirements).

[0101] S3: Calculate the initial view volume

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

[0103] The reference table of oil tank volume coefficient is as follows:

[0104] Volume coefficient 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 oil tank volume coefficient table;

[0109] S3.2.1: Initialize Boundary

[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: Cyclic search

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

[0113] S3.2.3: Calculate intermediate index

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

[0115] S3.2.4: Comparison values

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

[0117] S3.2.5: Return search location

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

[0119] S3.3: Check indexes

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

[0121] S3.4: Handling edge cases

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

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

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

[0125] S3.6: Perform the fit

[0126] Perform fitting: the initial apparent volume zcstj is searched in the oil tank volume coefficient table according to the liquid level. If the corresponding data can be directly found, it can be directly searched; if the corresponding data cannot be found, the following 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 for the measured liquid level less than this value; tj1: the corresponding apparent volume value queried according to yw1, yw2: the nearest value found in the oil tank volume coefficient table for the measured liquid level greater than this value, tj2: the corresponding apparent volume value queried according to yw2.

[0130] S4: Water volume reduction treatment

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

[0132]

[0133] Where, sw: input water level value; yw1: the nearest value found in the oil tank volume coefficient table for the measured liquid level less than this value; tj1: the corresponding apparent volume value found based on yw1, yw2: the nearest value found in the oil tank volume coefficient table for the measured liquid level greater than this value, tj2: the corresponding apparent volume value found based on yw2;

[0134] S4.2: Binary Search Algorithm

[0135] First, call the binary search function to find the liquid level sW Index position in the tank volume factor table;

[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: Cyclic search

[0139] Loop within the search range until left exceeds right;

[0140] S4.2.3: Calculate intermediate index

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

[0142] S4.2.4: Comparison values

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

[0144] S4.2.5: Return search location

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

[0146] S4.3: Check index

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

[0148] S4.4: Handling edge cases

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

[0150] S4.5: Obtaining upper and lower bounds

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

[0152] S4.6: Use the formula initial apparent volume (zcslj) - water volume (slj) = jsstj to calculate the apparent volume after water reduction jsstj;

[0153] S5: Static pressure compensation

[0154] S5.1: Use the liquid level (yw) to find the static pressure compensation value bcz through the static pressure compensation coefficient table. If it cannot be found, find the correct compensation coefficient by calling the static pressure fitting function. The static pressure fitting function is as follows:

[0155]

[0156] Where: yw: input liquid level value; yw1: the nearest value that can be found in the static pressure coefficient table of the measured liquid level that is less than this value; tj1: the corresponding apparent volume value queried according to yw1; yw2: the nearest value that can be found in the static pressure coefficient table of the measured liquid level that is greater than this 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: Cyclic search

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

[0165] S5.2.3: Calculate intermediate index

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

[0167] S5.2.4: Comparison values

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

[0169] S5.2.5: Return search location

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

[0171] S5.3: Check index

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

[0173] S5.4: Handling edge cases

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

[0175] S5.5: Obtaining lower and upper bounds

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

[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: Based on the volume correction coefficient rjxzz of each oil tank (the data is obtained from the volume correction value of the equipment information of the oil tank), calculate the apparent volume of the tank after volume correction rjxzstj=jybcstj*rjxzz

[0180] S7: Volume correction factor

[0181] S7.1: According to the standard density ypbzmd and temperature wd of the oil product, look up the volume correction factor table. If the corresponding correction factor cannot be found, use the volume correction function to fit and calculate to obtain the volume correction factor 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 for the measured temperature less than this value; xs1: the corresponding volume correction factor vcf queried based on wd1; wd2: the nearest value that can be found in the volume coefficient table for the measured liquid level greater than this value; xs2: the corresponding volume correction factor vcf queried based on 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 it cannot be found, call the density fitting function to calculate the apparent density smd. The density fitting function is as follows:

[0190]

[0191] Wherein, wd: input temperature value, wd1: the nearest value found in the density correction coefficient table for the measured temperature less than this value, smd1: the corresponding apparent density found based on wd1, wd2: the nearest value found in the density correction coefficient table for the measured liquid level greater than this value, smd2: the corresponding apparent density found based on 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: Cyclic search

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

[0202] S8.2.3: Calculate intermediate index

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

[0204] S8.2.4: Comparison 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 location

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

[0208] S8.3: Check index

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

[0210] S8.4: Handling edge cases

[0211] Check whether the calculated position is within the valid range. If the calculated position is 0 or equal to the size of the density coefficient table, return 0 because no valid density coefficient is available.

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

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

[0214] S8.6: Perform the fit

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

[0216]

[0217] Wherein, wd: input temperature value, wd1: the nearest value found in the density correction coefficient table for the measured temperature less than this value, smd1: the corresponding apparent density found based on wd1, wd2: the nearest value found in the density correction coefficient table for the measured liquid level greater than this value, smd2: the corresponding apparent density found based on wd2.

[0218] S9: Standard mass calculation

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

[0220] By adopting the above technical solution, 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 metering system, optimization is carried out from both hardware and software aspects. First, high-precision sensors and high-quality metering equipment are selected to ensure that they can operate stably 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 oil tank level, water level, temperature, etc. in real time, and use multiple correction factors such as volume correction coefficient and static pressure compensation to ensure the high accuracy of the metering results. The collected data is analyzed in real time and the metering data is corrected to improve the accuracy of the metering results;

[0223] 2. Effectively integrate AIRIOT IoT design platform with existing petrochemical oil metering equipment and systems

[0224] Effective 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 connection; finally, conduct system testing and debugging to ensure that the integrated system can run stably and the data transmission is accurate;

[0225] 3. Combine the regular calibration of the oil depot with comprehensive consideration of the impact of multiple factors on oil measurement, such as whether water reduction, tank deformation, static pressure coefficient and many other factors can be considered at the same time, and the complex interaction between them can be analyzed to achieve accurate oil measurement. The business driver performs synchronous transformation processing logic based on the system configuration so that the algorithm can be expanded and modified according to different conditions, making full use of the advantages of low-code platform development and configuration, making the later maintenance cost of the algorithm lower and avoiding the limitations of hard coding;

[0226] 4. The measurement results will not only be transmitted to the designated system in real time through the IoT platform, but also stored in the time series database. The data is arranged in chronological order, which can quickly process and analyze the data for future query and analysis. Timestamps 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 adopting a distributed architecture, the accuracy and integrity of data transmission are guaranteed to prevent measurement errors caused by data loss.

[0227] In the application, the several formulas involved are all calculated by taking their numerical values ​​after removing the dimensions, and the formulas are established by collecting a large amount of data and performing software simulation to obtain a formula for the most recent actual situation. Some coefficients or weights in the formulas are set by technical personnel in this field according to actual conditions, so they will not be elaborated here.

[0228] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. A person of ordinary skill in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution.

[0229] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0230] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A petrochemical oil metering method based on AIRIOT Internet of Things design platform, characterized in that: This method adopts SOA microservice design and uses the IoT low-code development platform. The steps to execute the metering method on this platform are as follows: S1. Obtain project parameter configuration and basic information of oil tanks; S2. Obtain real-time monitoring data of the oil tank; wherein the monitoring data includes liquid level yw, water level sw and average temperature wd; S3. Calculate the initial apparent volume zcstj based on the liquid level yw and the oil tank volume coefficient table; S4. Under the condition of subtracting the water volume, the apparent volume jsstj after the water volume is subtracted is calculated based on the initial apparent volume zcstj and the water volume stj; S5. Based on the liquid level yw, the static pressure compensation coefficient table and the constructed static pressure fitting function, combined with the apparent volume jsstj after the water volume reduction, the apparent volume jybcstj with static pressure compensation is obtained; S6. Calculate the corrected apparent volume rjxzstj of the tank volume based on the volume correction coefficient rjxzz of each oil tank and the apparent volume jybcstj with static pressure compensation; S7, based on the obtained oil standard density ypbzmd, temperature wd and volume correction coefficient table, call the constructed volume correction function, and calculate the standard volume bztj in combination with the corrected apparent volume rjxzstj of the tank capacity; S8, based on the obtained oil standard density ypbzmd, temperature wd and density correction coefficient table, and calling the density fitting function, calculate the apparent density smd; S9. Establish a standard mass calculation model and calculate the standard mass bzzl based on the standard density ypbzmd and standard volume bztj of the oil product.

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

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

4. According to claim 1, a petrochemical oil metering method based on AIRIOT Internet of Things design platform is characterized in that: The process of calculating the initial visual 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 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 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 values: If the level of the middle element is equal to the target value, return the index; if the level of the middle element is less than the target value, update the left boundary; if the 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 negative search position, if found, return directly; Check the index: if an exact match is found, that is, index>=0, the corresponding volume coefficient stj is directly returned; if not found, the position where the fitting calculation should be performed is calculated; Handling boundary conditions: Check whether the fitting calculation position is within the valid range. If the fitting calculation position is 0 or equal to the size of the tank volume coefficient table, return 0; Get upper and lower bounds: Use the insertion position to get the liquid level and volume coefficient of the upper and lower bounds; Perform fitting: the initial apparent volume zcstj is searched in the oil tank volume coefficient table according to the liquid level. If the corresponding data can be directly found, it can be directly searched; if the corresponding data cannot be found, the following fitting calculation formula is used to perform fitting operation; The fitting calculation formula is: Where, yw: input liquid level value, yw1: the nearest value found in the oil tank volume coefficient table of the measured liquid level that is less than this value; tj1: the corresponding apparent volume value queried based on yw1, yw2: the nearest value found in the oil tank volume coefficient table for the measured liquid level greater than this value, tj2: the corresponding apparent volume value queried based on yw2.

5. According to claim 1, a petrochemical oil metering method based on AIRIOT Internet of Things design platform is 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 AIRIOT Internet of Things design platform according to claim 1 is characterized in that: The formula used to calculate the corrected apparent volume rjxzstj of the tank capacity is: rjxzstj=jybcstj*rjzxx.

7. The petrochemical oil metering method based on AIRIOT Internet of Things design platform according to claim 1 is characterized in that: The volume correction function first finds the position of the temperature wd and the standard density of the oil product ypbzmd in the volume correction coefficient table through a binary tree index search, and performs a fitting calculation to obtain the volume correction coefficient; the fitting process: when there is no exact match between the temperature wd and the standard density of the oil product ypbzmd, the volume correction function will find the two closest temperature points, and perform a fitting calculation to obtain the volume correction coefficient vcf, and the standard volume bztj is calculated through the formula: rjszstj*vcf=bztj.

8. The petrochemical oil metering method based on AIRIOT Internet of Things design platform according to claim 1 is characterized in that: The density fitting function is based on the temperature wd and density parameters. First, it performs a binary search through the binary tree index search function to find the nearest correction coefficient to calculate the apparent density smd. The specific core calculation process is as follows: Binary search algorithm: First, call the binary search function to find the index position of the temperature in the density correction coefficient table; initialize the 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 in the search range until the left boundary exceeds the right boundary; calculate the middle index: calculate the middle index and get the temperature of the middle element; Compare values: 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 negative search position, if found, return directly; Check index: If an exact match index>=0 is found, the apparent density value smd found in the corresponding density correction coefficient table is directly returned; If not found, the position where the fitting calculation should be performed is calculated; Handling boundary conditions: Check whether 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: Look up the density correction coefficient table according to the temperature. If the corresponding data can be found directly, just look it up directly. If the corresponding data cannot be found, use the following fitting calculation formula to perform the fitting operation; The fitting calculation formula is: Wherein, wd: input temperature value, wd1: the nearest value found in the density correction coefficient table for the measured temperature less than this value, smd1: the corresponding apparent density found based on wd1, wd2: the nearest value found in the density correction coefficient table for the measured liquid level greater than this value, smd2: the corresponding apparent density found based on wd2.

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

Citation Information

Patent Citations

  • Intelligent measuring and counting system of oil product tank farm

    CN101038201A

  • Automatic oil tank volume list generating system

    CN101046403A

  • Liquid storage tank and liquid weight measuring method

    CN105486373A

  • Edge computing-based gas station automatic oil discharge detection method and system

    CN110608783A

  • Product oil storage tank monitoring and alarming integrated equipment

    CN111811576A