A gas station oil loss statistical analysis method and system based on big data
Patent Information
- Application Number
- CN202611480517.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-22
- Publication Date
- 2026-10-27
AI Technical Summary
若一个油品对应多个油罐,或者加油枪出口与油罐之间的台账对应不准确,入库记录、罐存变化记录和出库记录可能在汇总后被抵消,异常来源不容易被定位到具体油罐及其入口或出口记录
[0015]本发明基于加油站既有液位仪、卸油计量设备、加油机、销售系统和业务单据形成的数据链路,将油罐、卸油入口、液位仪记录和加油枪出口按设备台账对应到同一统计任务,在保留油品差量和油品差量占比口径的同时,引入闭合指纹用于区分方向相反、幅度超限和待确认情形,从而降低跨罐汇总抵消对异常来源判断的影响,提高库存核对任务分派、单据复核、设备检查和处理留痕的针对性;本发明依托现有采集设备和管理系统运行,不要求改造油罐、加油机或管线,并使多站点、长周期油品损耗统计结果便于追溯和复核。
Smart Images

Figure CN122988955A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil management technology, and more specifically, to a method and system for statistical analysis of oil loss at gas stations based on big data. Background Technology
[0002] In station-level and regional-level oil inventory management systems, tank level gauges, unloading metering equipment, fuel dispensers, sales systems, and inventory documents typically generate records for inventory, receipt, delivery, transfer, and stocktaking, respectively. The system aggregates these records by shift, day, or settlement cycle, and outputs oil quantity discrepancies, oil quantity discrepancy percentages, reports, and anomaly records for inventory counting, document verification, and operational management. As the number of chain stations increases, data sources, collection frequencies, equipment numbers, tank / fuel dispenser correspondences, and business document attributions all become factors in the statistical calculations. The data platform needs to unify units, align time boundaries, and verify record quality before generating verifiable results.
[0003] In practice, traditional station-level aggregation methods focus more on the difference results at the oil product or station level. If one oil product corresponds to multiple oil tanks, or if the ledgers for the fuel dispenser outlet and the oil tank are inaccurate, the inbound records, tank inventory change records, and outbound records may be offset after aggregation, making it difficult to pinpoint the source of the anomaly to the specific oil tank and its inlet or outlet records. For situations such as cross-shift unloading, delayed liquid level records, cross-period attribution of fuel dispenser cumulative counts, and delays in entering transfer orders and inventory correction orders, relying solely on the final difference and the percentage of difference is insufficient to distinguish between record attribution errors, measurement deviations, abnormal equipment status, and business document delays. Summary of the Invention
[0004] This invention provides a method and system for statistical analysis of fuel loss at gas stations based on big data, which solves the technical problems mentioned in the background.
[0005] To achieve the above-mentioned objectives, the present invention provides the following technical solution.
[0006] A method for statistical analysis of fuel loss at gas stations based on big data, comprising:
[0007] Establish a statistical task that includes gas station number, oil tank number, oil product number, fuel dispenser number, fuel nozzle number, and statistical period identifier;
[0008] Obtain on-site oil volume records, business records, and equipment status records within the same statistical period. On-site oil volume records provide changes in tank oil volume, unloaded oil volume, and added oil volume. Business records provide the amount of oil transferred in, the amount of oil transferred out, and the amount of inventory correction.
[0009] Perform unit unification, time alignment, and data quality checks on the acquired records;
[0010] Based on the on-site connection relationship between the oil tank and the unloading inlet, level gauge, and refueling nozzle outlet in the equipment ledger, establish a dual-boundary statistical unit for the same tank;
[0011] Generate the book ending oil quantity and the ending tank oil quantity, and generate the oil quality difference and the percentage of oil quality difference;
[0012] Based on the changes in oil volume in the tank, the amount of oil unloaded, and the amount of oil added, a closure difference, the total scale of the three on-site quantities, the closure ratio, and the flow direction consistency value are generated. The closure difference characterizes the degree of non-closure between the change in oil volume in the tank and the expected change. The total scale of the three on-site quantities serves as the scale benchmark for scaling the closure difference. The expected change and the expected change direction are both determined by the amount of oil unloaded and the amount of oil added. The flow direction consistency value characterizes whether the change direction of oil volume in the tank is consistent with the expected change direction. The flow direction consistency value and the closure ratio form a closure fingerprint.
[0013] An anomaly list and verification task are generated based on closed fingerprints, oil quality difference, and oil quality difference percentage.
[0014] Compared with the prior art, the present invention has the following substantial features and significant progress:
[0015] This invention leverages the data link formed by existing level gauges, unloading metering equipment, fuel dispensers, sales systems, and business documents at gas stations. It maps oil tanks, unloading inlets, level gauge records, and fuel nozzle outlets to the same statistical task according to equipment ledgers. While retaining the definitions of oil quality difference and its percentage, it introduces closed-loop fingerprints to distinguish between opposite directions, exceeding limits, and pending confirmation situations. This reduces the impact of cross-tank aggregation on anomaly source identification and improves the targeting of inventory reconciliation task assignment, document review, equipment inspection, and processing record keeping. This invention operates on existing data acquisition equipment and management systems without requiring modifications to oil tanks, fuel dispensers, or pipelines, and facilitates traceability and verification of oil quality loss statistics across multiple sites and over long periods. Attached Figure Description
[0016] Figure 1 This is the architecture and data flow diagram of the present invention. Detailed Implementation
[0017] The following description is provided in conjunction with the accompanying drawings. It should be understood that the following embodiments are for illustrative purposes only and are not intended to limit the invention; those skilled in the art can make equivalent substitutions or combinations for the specific implementations.
[0018] This implementation method is applicable to gas station sites equipped with one or more oil tanks, unloading inlets, level gauges, fuel dispensers, fuel nozzle outlets, station-level management systems, and regional-level data platforms. This implementation method is used to uniformly process on-site oil quantity records, business records, and equipment status records, and to generate anomaly lists and verification tasks.
[0019] In this embodiment, the on-site oil quantity record provides the change value of oil quantity in the tank, the amount of oil unloaded, and the amount of oil added; the operational record provides the amount of oil transferred in, the amount of oil transferred out, and the inventory correction amount; and the equipment status record is used to determine whether the level gauge, unloading equipment, and refueling machine are in a reliable state within the statistical period. After the above records enter the data platform within the same statistical period, they are not directly offset against each other according to the station-level total; instead, the on-site connection relationship between the oil tank, unloading inlet, level gauge, and refueling nozzle outlet is maintained first.
[0020] like Figure 1 As shown, this system includes a statistical object creation module, a multi-source record acquisition module, a data standardization module, a data quality inspection module, a dual-boundary statistical unit creation module for the same tank, a book-based ending oil quantity calculation module, a ending tank oil quantity determination module, a closed-loop fingerprint generation module, and a hierarchical task generation module. The statistical object creation module outputs statistical tasks. The multi-source record acquisition module receives on-site oil quantity records, business records, and equipment status records. The data standardization module generates standard records, and the data quality inspection module generates valid standard records. These valid standard records are then fed into the dual-boundary statistical unit creation module for the same tank, the book-based ending oil quantity calculation module, and the ending tank oil quantity determination module, respectively. Subsequently, the closed-loop fingerprint generation module generates closed-loop fingerprints, oil quality difference, and oil quality difference percentages. Finally, the hierarchical task generation module generates an anomaly list and verification tasks.
[0021] Specifically, the dual-boundary statistical unit for the same tank is a data grouping object formed based on the on-site connection relationship between the oil tank and the unloading inlet, level gauge, and refueling nozzle outlet in the equipment ledger. For an oil tank, the dual-boundary statistical unit for the same tank maintains the sequential relationship of the oil unloading inlet entering the oil tank, the level gauge reflecting the changes in the oil tank, and the refueling nozzle outlet discharging oil from the oil tank, so that the changes in the oil volume in the tank, the amount of oil unloaded, and the amount of oil dispensed are calculated within the same physical source range.
[0022] Through the above settings, this implementation method retains the book-entry oil quantity, the ending tank oil quantity, the oil quality difference, and the proportion of the oil quality difference. Furthermore, it generates a closed-loop difference, the total scale of the three on-site quantities, a closed-loop ratio, and a flow direction consistency value based on the changes in tank oil quantity, the amount of oil unloaded, and the amount of oil added. The flow direction consistency value and the closed-loop ratio form a closed-loop fingerprint. This closed-loop fingerprint enables the data platform to distinguish between situations where the direction of change in tank oil quantity is opposite to the expected direction, where the direction of change is consistent with the expected direction but the closed-loop ratio exceeds the limit, and where a positive or negative judgment cannot be formed. This improves the traceability of the anomaly list and verification tasks.
[0023] Example 2:
[0024] The statistical object creation module is used to create statistical tasks that include gas station number, tank number, fuel type number, fuel dispenser number, fuel nozzle number, and statistical period identifier. The gas station number uniquely identifies the gas station, the tank number uniquely identifies the tank within the gas station, the fuel type number identifies the type of fuel stored in the tank, the fuel dispenser number and fuel nozzle number identify the source of the exit record corresponding to the dispensed fuel quantity, and the statistical period identifier defines the start and end times of this statistical period.
[0025] When establishing statistical tasks, the station-level management system first creates master data for oil tanks and oil product codes, and records the corresponding unloading inlet, fuel dispenser number, and fuel nozzle number for each oil tank according to the equipment ledger. The equipment ledger can be derived from existing equipment files, construction and acceptance data, or fuel nozzle number and oil tank correspondence data in the operation and management system. Its function is to establish a correspondence between statistical tasks and oil tanks, oil product codes, unloading inlets, and fuel nozzle outlets.
[0026] The statistical period can be configured according to shift, calendar day, week, month, or the inventory cycle already adopted by the enterprise. The statistical period identifier should be able to associate the start and end times of the period, so that on-site oil volume records, business records, and equipment status records can all be classified into the same statistical period. For records spanning multiple statistical periods, the data platform does not directly merge them into the current statistical period. Instead, the data quality inspection module marks records spanning multiple statistical periods to avoid mixing oil unloading, oil adding, or changes in tank oil volume from different statistical periods into the same closed fingerprint.
[0027] Specifically, after the statistical task is sent to the multi-source record acquisition module, the multi-source record acquisition module uses the gas station number, oil tank number, oil product number, fuel dispenser number, fuel nozzle number and statistical period identifier in the statistical task as search constraints to obtain the on-site oil volume record, business record and equipment status record corresponding to the statistical task.
[0028] As an optional implementation, the station-level management system should save the creation time, statistical period identifier, equipment ledger version, and task status of statistical tasks. The equipment ledger version is used to confirm the on-site connection relationships between oil tanks and unloading inlets, level gauges, and refueling nozzle outlets within the same statistical period. When the equipment ledger is maintained or corrected during the statistical period, the data platform can perform calculations according to the equipment ledger version that was already in effect at the beginning of the statistical period.
[0029] The multi-source record acquisition module is used to acquire on-site oil quantity records, business records, and equipment status records within the same statistical period. On-site oil quantity records provide the changes in tank oil quantity, the amount of oil unloaded, and the amount of oil added. Business records provide the amount of oil transferred in, the amount of oil transferred out, and inventory corrections. Equipment status records are used to determine whether the level gauge, unloading equipment, and refueling machine are in a reliable state within the statistical period.
[0030] The change in tank oil volume recorded on-site is determined by the tank oil volume at the beginning and end of the statistical period. The tank oil volume at the beginning of the statistical period corresponds to the initial tank oil volume, and the tank oil volume at the end of the statistical period corresponds to the final tank oil volume. When the level gauge can directly output the change field, the data platform can read this change field; when the level gauge only outputs the endpoint tank oil volume, the data platform can calculate the change in tank oil volume based on the tank oil volume at the beginning and end of the statistical period for the same tank.
[0031] The amount of oil unloaded is determined jointly by the unloading record, the tank level change record, and the unloading equipment status record. The unloading record can come from the unloading metering equipment or a confirmed unloading order. The tank level change record is used to help verify the trend of changes within the tank during unloading. The unloading equipment status record is used to confirm whether the unloading equipment is in normal condition during unloading. When the unloading equipment status record is normal and the unloading record has been confirmed, the data platform uses the quantity in the unloading record as the amount of oil unloaded. The tank level change record is used to verify the consistency of this unloaded oil amount.
[0032] When inconsistencies arise between unloading records, tank level change records, and unloading equipment status records, the data platform processes them in the order of status first, then documents, and finally level verification. If the unloading equipment status record indicates a fault, maintenance, shutdown, or communication interruption, the corresponding unloaded oil volume will not be included in the valid standard record, and a pending verification mark will be generated. If the unloading equipment status record is normal, but the difference between the unloading record and the tank level change record exceeds the company's existing measurement error range, the number of unloading records, the number of tank level change records, and the source index will be retained, and a pending verification mark will be generated. If manual verification confirms that the number of unloading records is valid, the number of unloading records will be used as the unloaded oil volume. If manual verification confirms that the unloading record is invalid, the number confirmed by the manual verification record will be used as the unloaded oil volume.
[0033] The amount of fuel dispensed is determined by the fuel dispenser's transaction log, the fuel nozzle number, and the corresponding fuel tank. The fuel dispenser's transaction log provides the cumulative fuel dispensed from each fuel nozzle outlet within the same statistical period. The fuel nozzle number is used to locate the specific fuel nozzle outlet, and the fuel tank correspondence is used to confirm which fuel tank the fuel nozzle outlet is connected to on-site. When a fuel tank corresponds to multiple fuel nozzle outlets, the data platform summarizes the fuel dispensed from multiple fuel nozzle outlets within the same statistical period into the fuel dispensed from that fuel tank, but still retains the source index for each fuel nozzle number.
[0034] The oil transfer-in, oil transfer-out, and inventory correction amounts recorded in the business records are used to generate the book ending oil quantity. Oil transfer-in represents the amount of oil transferred into the current statistical object during the statistical period; oil transfer-out represents the amount of oil transferred out of the current statistical object during the statistical period; and inventory correction amount represents the approved correction amount added to inventory. Business records that did not occur are treated as zero.
[0035] The equipment status log includes the operational status of level gauges, unloading equipment, refueling machines, and related data interfaces. The log can include states such as normal, communication interrupted, under maintenance, out of service, abnormal, or requiring manual verification. The purpose of the equipment status log is to determine whether on-site oil quantity records and business records can be used as valid standard records for inclusion in the accounting end-of-period oil quantity calculation module, the end-of-period tank oil quantity determination module, and the same-tank dual-boundary statistical unit establishment module.
[0036] Example 3:
[0037] After receiving on-site oil quantity records, business records, and equipment status records from the multi-source record acquisition module, the data standardization module unifies the units and aligns the times of the acquired records to form standard records. Unit unification means unifying the oil quantity units in records from different sources to liters, so that the initial tank oil quantity, ending tank oil quantity, oil unloaded, oil added, oil transferred in, oil transferred out, inventory correction, book ending oil quantity, oil quality difference, and tank oil quantity change values can be calculated under the same dimension.
[0038] When the source system outputs field oil quantity records or business records in liters, the data standardization module directly retains the quantity values in those records. When the source system outputs business records in tons or kilograms, the data standardization module can convert them to liters according to the company's existing density conversion rules or the density data corresponding to the oil grade. Density data is a routine basic data in oil inventory management, and the data standardization module should save the oil grade used for conversion, the source of the density data, and the conversion time for subsequent verification.
[0039] Time alignment refers to unifying on-site oil volume records, business records, and equipment status records to the same time zone and time format, and determining record affiliation based on the statistical period identifier in the statistical task. For records whose times fall between the start and end of a period, the data standardization module classifies them into the current statistical period. For records that are exactly at the period boundary, the data standardization module processes them according to the boundary affiliation rules configured in the station-level management system and retains the boundary affiliation marker.
[0040] Standard records should at least retain the gas station number, tank number, fuel type number, fuel dispenser number, fuel nozzle number, statistical period identifier, record time, quantity, unit, source system, and source index. The source index is used to trace back from the anomaly list and verification tasks to the original on-site fuel volume records, business records, and equipment status records, enabling personnel to verify unloading records, tank level change records, unloading equipment status records, fuel dispenser flow records, and manual review records.
[0041] The data quality inspection module checks for missing times and quantities in on-site oil volume records, business records, and equipment status records. It marks duplicate records, out-of-bounds values, and records spanning statistical periods, and generates a "pending review" mark for records that fail the data quality inspection. The results of the data quality inspection include valid standard records and records marked with "pending review." Valid standard records can be used for subsequent calculations, while records marked with "pending review" are used for manual verification or to prompt processing personnel in anomaly lists and verification tasks.
[0042] For records with missing time information, the data quality inspection module cannot determine whether the record belongs to the current statistical period, and therefore does not directly participate in the generation of closed fingerprints. For on-site oil quantity records or business records with missing quantities, the data quality inspection module cannot determine the corresponding tank oil quantity change value, unloaded oil quantity, added oil quantity, transferred-in oil quantity, transferred-out oil quantity, or inventory correction amount, and therefore generates a pending verification mark. For cases where equipment status records are missing, the data quality inspection module can retain the corresponding on-site oil quantity record, but needs to indicate the missing equipment status record in the source index for subsequent verification.
[0043] Duplicate records can be identified based on a combination of record number, source system, record time, equipment number, and quantity. Completely duplicate records will not be counted twice in oil unloading, oil adding, oil transfer, oil transfer out, or inventory correction quantities. The data quality inspection module marks duplicate records and retains only one acceptable record when forming valid standard records. Retention rules can be determined according to source system priority, record generation time, or existing enterprise data governance rules.
[0044] Out-of-boundary values are determined based on tank capacity, level gauge range, the incremental relationship of cumulative fuel dispenser counts, and the reasonable range of business records. Initial tank inventory, ending tank inventory, unloaded oil, dispensed oil, and transferred-in or transferred-out quantities less than zero are marked as out-of-boundary values; initial tank inventory or ending tank inventory exceeding the corresponding tank capacity in the equipment ledger are marked as out-of-boundary values; level gauge records exceeding the level gauge range are marked as out-of-boundary values; and cumulative fuel dispenser counts showing a reverse change relative to the previous valid standard record are marked as out-of-boundary values. The reasonable range of business records is pre-saved by the station-level management system based on tank capacity, statistical period, and business type. Transferred-in oil, transferred-out oil, or inventory correction quantities exceeding the reasonable range of the business record are marked as out-of-boundary values. Out-of-boundary values are not entered into the closed-loop fingerprint generation module unless manually reviewed and confirmed as valid standard records.
[0045] Cross-statistical period records refer to records whose recording time, business occurrence time, or equipment status time is inconsistent with the statistical period identifier. For cross-statistical period records, the data quality inspection module does not assign them to the current statistical period, but instead generates a "to be reviewed" mark and retains the source index. This avoids amplifying the closure difference or misjudging the consistency value due to cross-shift unloading, delayed uploading of fuel dispenser flow records, or lag in business record entry.
[0046] The data quality inspection module sends valid standard records to the same tank dual boundary statistical unit establishment module, the book ending oil quantity calculation module, and the ending tank oil quantity determination module.
[0047] Example 4:
[0048] The module for establishing dual-boundary statistical units for the same tank establishes these units based on the on-site connection relationships between the oil tank and its unloading inlet, level gauge, and refueling nozzle outlet, as recorded in the equipment ledger. Each dual-boundary statistical unit centers on a single oil tank and binds its corresponding unloading inlet, level gauge, and refueling nozzle outlet to the same statistical task.
[0049] For the statistical unit with dual boundaries in the same tank, the inlet side is characterized by the amount of oil unloaded corresponding to the unloading inlet, the tank side by the change in the amount of oil in the tank corresponding to the level gauge, and the outlet side by the amount of oil dispensed corresponding to the refueling nozzle outlet. Since the amount of oil unloaded increases the amount of oil in the tank, and the amount of oil dispensed decreases the amount of oil in the tank, the change in the amount of oil in the tank should form a verifiable relationship with both the amount of oil unloaded and the amount of oil dispensed.
[0050] When establishing a dual-boundary statistical unit for the same tank, the data platform first locates the tank based on the gas station number and tank number in the statistical task. Then, it finds the corresponding unloading inlet and level gauge for that tank according to the equipment ledger. Simultaneously, it locates the fuel nozzle outlet connected to that tank based on the fuel nozzle number and tank correspondence. If one tank corresponds to multiple fuel nozzle outlets, these multiple outlets still belong to the same dual-boundary statistical unit. If one oil product code corresponds to multiple tanks, the data platform establishes a corresponding dual-boundary statistical unit for each tank separately, without merging the data from multiple tanks before calculating the closure fingerprint.
[0051] The same tank dual-boundary statistical unit establishment module provides the closed fingerprint generation module with the tank oil quantity change value, unloaded oil quantity, and added oil quantity.
[0052] When equipment ledger entries are incomplete or conflicting, the module for establishing dual-boundary statistical units for the same tank generates a checkmark. For example, if the same fuel nozzle number corresponds to two tank numbers in the equipment ledger, the data platform cannot arbitrarily assign the amount of fuel dispensed from that nozzle to one of the tanks; if the same tank lacks a corresponding level gauge, the data platform cannot generate a reliable value for the change in the amount of fuel in the tank. All of these situations require either a verification task or manual review.
[0053] The establishment of a dual-boundary statistical unit for the same tank distinguishes this implementation method from the direct aggregation method at the station level. The direct aggregation method at the station level may offset anomalies between multiple tanks, while the dual-boundary statistical unit for the same tank requires that the unloading volume, the change in the tank volume, and the dispensing volume of each tank be reconciled within the same on-site connection relationship. This allows subsequent closed fingerprints to pinpoint the specific tank, unloading inlet, level gauge, and refueling nozzle outlet.
[0054] Example: None
[0055] The book-based ending oil quantity calculation module generates the book-based ending oil quantity based on the beginning tank inventory, unloaded oil, added oil, transferred-in oil, transferred-out oil, and inventory corrections. The book-based ending oil quantity reflects the inventory results calculated within the statistical period based on the beginning tank inventory, incoming oil, outgoing oil, and approved corrections. The book-based ending oil quantity calculation module receives valid standard records from the data quality check module and performs calculations according to the same gas station number, tank number, oil product code, and statistical period identifier.
[0056]
[0057] Among them, the book ending oil volume This represents the ending oil volume, expressed in liters, generated according to the receipt, dispatch, and inventory relationships. Beginning tank inventory. This represents the amount of oil in the same tank at the start of the statistical period, in liters. (Oil unloaded) This refers to the amount of oil entering the tank from the unloading inlet during the statistical period, expressed in liters. (Intake volume) This represents the amount of oil transferred into the current statistical object within the statistical period, in liters. (Fuel added / discharged) This represents the amount of fuel dispensed from the fuel tank via the fuel nozzle during the statistical period, expressed in liters. (Fuel Dispensing Volume) This refers to the oil volume of the current statistical object within the statistical period, expressed in liters. Inventory correction amount. This is the approved correction amount included in inventory, in liters.
[0058] The module for determining the final tank oil inventory is based on level gauge records, equipment status records, and manual verification records. Priority is given to level gauge records near the end of the statistical period where the equipment status record shows normal readings. If unloading, refueling, or level fluctuations occur near the end of the statistical period, the module selects level gauge records after the level has stabilized, according to the waiting time pre-saved by the station-level management system. Level stabilization means that the change in the final tank oil inventory corresponding to consecutive level gauge records within the waiting time is less than or equal to the oil volume corresponding to the level gauge resolution. If a level gauge record is marked as faulty, under maintenance, out of service, or experiencing a communication interruption by the equipment status record, the confirmed manual verification record is used to determine the final tank oil inventory, and the alternative reason is saved.
[0059] When anomalies are found simultaneously in the level gauge record, equipment status record, and manual verification record, the end-of-period tank oil quantity determination module determines the reliable source in the order of equipment status record, manual verification record, and level gauge record. If the equipment status record indicates a fault, maintenance, shutdown, or communication interruption, the level gauge record is not considered a valid source for the end-of-period tank oil quantity. If the manual verification record has been confirmed, it is used to determine the end-of-period tank oil quantity. If the manual verification record has not yet been confirmed, a pending verification mark is generated for the corresponding statistical period, and the formal oil difference quantity dependent on that end-of-period tank oil quantity is not generated temporarily.
[0060] Both the book-entry oil quantity and the ending tank inventory retain source indexes. The source index for the book-entry oil quantity points to the valid standard records corresponding to the beginning tank inventory, unloaded oil quantity, added oil quantity, transferred-in oil quantity, transferred-out oil quantity, and inventory correction quantity. The source index for the ending tank inventory points to level gauge records, equipment status records, and manual verification records. The source index is written into subsequent anomaly lists and verification tasks, enabling processing personnel to trace back to the original records from the hierarchical task generation module.
[0061] After receiving the ending oil quantity from the book oil quantity calculation module and the ending tank oil quantity determination module, the closed fingerprint generation module first generates the oil quality difference. The oil quality difference is used to retain the existing inventory loss statistics, so that this implementation method can be compatible with the original reports, verification processes and management systems.
[0062]
[0063] Among them, oil quality difference This represents the difference between the book value of oil at the end of the period and the oil inventory in tanks at the end of the period, expressed in liters. Oil inventory in tanks at the end of the period. This represents the amount of oil in the same tank at the end of the statistical period, in liters. If the oil quality difference is positive, it means that the book value of oil at the end of the period is greater than the amount of oil remaining in the tank at the end of the period; if the oil quality difference is negative, it means that the book value of oil at the end of the period is less than the amount of oil remaining in the tank at the end of the period.
[0064] The closed fingerprint generation module also generates the percentage of oil difference. The percentage of oil difference is used to express the ratio of the oil difference to the total amount of oil unloaded and added during the same period, making the oil difference comparable across different statistical periods or different tanks.
[0065]
[0066] Among them, the proportion of oil product difference This is a dimensionless quantity representing the ratio of the difference in oil quality to the total amount of oil unloaded and oil added during the same period. (Oil unloaded volume) And the amount of oil added All data originates from valid standard records within the same statistical period. When the sum of the oil unloaded and oil added in the same period is zero, the closed fingerprint generation module does not generate the oil quality difference ratio and saves this non-generation result as status information for subsequent verification.
[0067] The generation of oil difference and oil difference percentage does not replace closed fingerprints. Oil difference and oil difference percentage reflect the difference between the book ending oil quantity and the ending tank inventory, while closed fingerprints reflect the direction and magnitude relationship between the changes in tank oil quantity, unloaded oil quantity, and added oil quantity within the same tank's dual-boundary statistical unit. Both are jointly entered into the hierarchical task generation module, ensuring that the anomaly list and verification tasks retain existing statistical standards while also enabling traceability based on the on-site connection relationships of the same oil tank.
[0068] The closed fingerprint generation module generates a closed difference value based on the change in oil level in the tank, the amount of oil unloaded, and the amount of oil added. The closed difference value characterizes the degree of non-closure between the change in oil level in the tank and the expected change. The expected change is determined by the amount of oil unloaded and the amount of oil added. The unloaded amount increases the oil level in the tank, while the added amount decreases it. Therefore, the expected change can be obtained by subtracting the added amount from the unloaded amount. The closed difference value is generated by subtracting the unloaded amount from the change in oil level in the tank and then adding the added amount.
[0069]
[0070] Among them, the closure difference This represents the degree of quantitative closure between the change in oil level in the tank and the expected change, expressed in liters. This represents the change in oil volume within the same tank during the same statistical period, expressed in liters. (Oil unloaded) This refers to the amount of oil entering the tank within the same statistical period, expressed in liters. Oil added / discharged volume. This represents the amount of oil dispensed through the corresponding refueling nozzle outlet of the oil tank within the same statistical period, expressed in liters.
[0071] The total scale of the three on-site quantities is determined by the change in oil volume in the tank, the amount of oil unloaded, and the amount of oil added, and serves as the scale benchmark for scaling the closure difference. The total scale of the three on-site quantities is used to avoid large-scale oil tanks exhibiting larger closure differences simply because of their large turnover, thus enabling the closure ratio to compare the degree of non-closure of different oil tanks and different statistical periods.
[0072]
[0073] Among them, the total scale of the three on-site measurements This is the sum of the absolute value of the change in oil level in the tank, the amount of oil unloaded, and the amount of oil added, expressed in liters. The change in oil level in the tank may be positive, negative, or zero; therefore, the absolute value of the change in oil level in the tank is used when generating the total scale of the three on-site quantities. The amounts of oil unloaded and added are non-negative oil level records within the same statistical period.
[0074] The closure ratio is generated based on the closure difference and the total scale of the three field quantities. The closure ratio represents the proportion of the closure difference to the total scale of the three field quantities, is dimensionless, and is used to reflect the relative magnitude of the degree of non-closure within the statistical unit with two boundaries in the same tank.
[0075]
[0076] Among them, the closure ratio This is the ratio of the absolute value of the closure difference to the total scale of the three on-site quantities, and is dimensionless. Closure difference Absolute values are used in the calculation because the closure ratio is used to express the degree of amplitude exceeding the limit, while directional information is expressed separately by the flow direction consistency value. When the total scale of the three field quantities is zero, the closure fingerprint generation module does not generate a closure ratio.
[0077] When the total scale of the three on-site quantities is zero, it indicates that the change in oil volume in the tank, the amount of oil unloaded, and the amount of oil added have not formed a valid non-zero flow scale. At this time, forcibly generating a closure ratio will cause a division by zero problem. Therefore, the closure fingerprint generation module does not generate a closure ratio and saves the corresponding statistical period as a case of no flow or pending confirmation.
[0078] The closed fingerprint generation module generates a flow direction consistency value based on the direction of change in oil volume within the tank and the expected direction of change. The direction of change in oil volume within the tank is determined by the change in oil volume. The expected direction of change is determined by the amount of oil unloaded and the amount of oil added. If the amount of oil unloaded is greater than the amount of oil added, the expected direction of change is an increase in oil volume within the tank; if the amount of oil unloaded is less than the amount of oil added, the expected direction of change is a decrease in oil volume within the tank; if the amount of oil unloaded is equal to the amount of oil added, no positive or negative judgment can be formed regarding the expected direction of change.
[0079]
[0080] Among them, the consistent flow value This is a dimensionless result indicating whether the direction of change in the oil volume within the tank matches the expected direction. (Sign function) This is a regular symbolic function that outputs when the input is greater than zero. Output when input is less than zero Output when input equals zero Changes in oil level in the tank The symbol indicates the direction of change in the amount of oil in the tank and the amount of oil unloaded. Subtract the amount of oil added The symbol indicates that there should be a change in direction.
[0081] When the flow direction is consistent, the value is When the direction of change in oil volume within the tank is consistent with the expected direction, if the closure ratio does not exceed the pre-configured closure ratio threshold, no verification task triggered by the closure fingerprint will be generated; if the closure ratio exceeds the pre-configured closure ratio threshold, a general verification task will be generated. When the flow direction consistency value is... When the change in oil volume in the tank is opposite to the expected change direction, a priority verification task is generated directly.
[0082] When the flow direction is consistent, the value is When this occurs, it indicates that at least one of the directions of change in oil volume within the tank and the expected direction of change cannot be determined as either positive or negative. The closed fingerprint generation module marks the corresponding statistical period as pending confirmation based on whether there are non-zero records for the amount of oil unloaded, the amount of oil added, and the change in oil volume within the tank. This pending confirmation mark is used to distinguish between no circulation cycle and unilateral circulation states, avoiding the direct treatment of data lacking a basis for direction determination as normal data.
[0083] A closure fingerprint is formed by combining the flow direction consistency value and the closure ratio. The closure fingerprint is stored in a fixed order, allowing the hierarchical task generation module to first determine whether the directions are opposite, and then determine whether the amplitude exceeds the pre-configured closure ratio threshold.
[0084]
[0085] Among them, closed fingerprints For the consistent value from the flow ratio of closure The resulting binary record is dimensionless. The flow direction consistency value provides a basis for direction verification, and the closure ratio provides a basis for amplitude verification.
[0086] The closed fingerprint generation module also saves the closure difference, the total scale of the three on-site quantities, the closure ratio, the flow consistency value, the oil difference, the percentage of the oil difference, the statistical period identifier, the oil tank number, the oil grade number, the record status, and the source index. This saved information allows subsequent anomaly lists and verification tasks to trace back to the on-site oil quantity records, business records, and equipment status records corresponding to each calculation result.
[0087] Example 6:
[0088] The hierarchical task generation module generates an anomaly list and verification tasks based on the closed fingerprint, oil quality difference, and oil quality difference percentage. The module first verifies the oil quality difference and its percentage according to pre-configured oil quality difference management thresholds, then performs direction verification based on the flow consistency value in the closed fingerprint, and finally performs amplitude verification based on the closure ratio in the closed fingerprint.
[0089] Pre-configured oil difference management thresholds are used for difference verification under existing oil loss statistical standards. These thresholds include numerical thresholds for oil difference in liters and dimensionless thresholds for the percentage of oil difference. The numerical threshold ranges from zero liters to greater than or equal to the numerical threshold, while the percentage threshold ranges from zero to greater than or equal to the numerical threshold. The data platform saves these pre-configured thresholds by gas station number, tank number, oil product code, and statistical period identifier, ensuring that the same threshold version is used when the same statistical task is repeatedly calculated.
[0090] The pre-configured oil differential management thresholds are saved by the station-level management system or regional data platform before the start of the statistical period. When the enterprise management system, oil tank capacity, oil grade, statistical period or metering equipment accuracy changes, the data platform generates a new threshold version and records the effective time.
[0091] Pre-configured closure ratio thresholds are used for amplitude verification of closure ratios. These pre-configured closure ratio thresholds are dimensionless proportional values, ranging from greater than zero to less than or equal to one. The data platform stores these pre-configured closure ratio thresholds by gas station number, tank number, oil product type, and statistical period identifier, providing a fixed comparison benchmark for amplitude verification of closure ratios.
[0092] The pre-configured closure ratio threshold is saved by the station-level management system or regional data platform before the start of the statistical period. When there are changes to the tank capacity table, level gauge accuracy, unloading metering equipment accuracy, fuel dispenser metering accuracy, or enterprise management system, the data platform generates a new threshold version and records the effective time. After the closure fingerprint generation module outputs the closure ratio, the hierarchical task generation module only calls the pre-configured closure ratio threshold that is effective for that statistical period for comparison.
[0093] When the flow direction consistency value indicates that the direction of oil volume change in the tank is opposite to the expected direction, the hierarchical task generation module generates a priority verification task. The priority verification task includes at least the statistical period identifier, gas station number, tank number, oil product code, trigger reason, closure fingerprint, closure difference, total scale of the three on-site quantities, closure ratio, flow direction consistency value, oil product difference, oil product difference percentage, and source index. Personnel can check the unloading records, tank level change records, unloading equipment status records, fuel dispenser flow records, fuel nozzle numbers, and tank correspondences based on the source index.
[0094] When the flow direction consistency value indicates that the direction of change in oil volume within the tank is consistent with the expected direction of change and the closure ratio exceeds the pre-configured closure ratio threshold, the hierarchical task generation module generates a general verification task. The general verification task is used to indicate that while the directional relationship within the same oil tank is not conflicting, the degree of quantity non-closure exceeds the scope of routine management. Personnel can check for measurement deviations, recording delays, lag in business record entry, or manual review of records.
[0095] When at least one of the directions of change in oil volume within the tank and the expected direction of change cannot be determined as positive or negative, the tiered task generation module marks the corresponding statistical period as pending confirmation based on whether there are non-zero records for the unloaded oil volume, the added oil volume, and the change in oil volume within the tank. The purpose of the pending confirmation status is to allow processing personnel to confirm the completeness of the data in conjunction with the no-flow or unilateral-flow status.
[0096] As an optional implementation method, the equipment ledger shows complete on-site connections between the oil tank and the unloading inlet, level gauge, and refueling nozzle outlet. The equipment status records of the level gauge, unloading equipment, and refueling machine all show normal operation. The on-site oil volume records, business records, and equipment status records all pass data quality checks. The statistical period includes both unloading and dispensing oil volumes, and the changes in oil volume within the tank are generally consistent with the expected changes.
[0097] For example, within a statistical period, the amount of oil unloaded is liters, the amount of oil added is The change in oil level in the tank is liters. The fingerprint generation module generates a closure difference.
[0098]
[0099] In this operating condition, the change should be the amount of oil unloaded minus the amount of oil added, i.e. The change in oil level in the tank is liters. The difference between the closure values is as follows: The oil level in the tank changes in the direction of increase, just as it should, and the consistent flow direction is [value missing]. If the closure ratio does not exceed the pre-configured closure ratio threshold, and the oil difference and the proportion of oil difference do not exceed the pre-configured oil difference management threshold, the hierarchical task generation module will not generate a verification task based on the closure fingerprint.
[0100] As an alternative implementation, the on-site oil volume record shows that the amount of oil unloaded is less than the amount of oil added, so the expected direction of change should be a decrease in the oil volume in the tank; however, the level gauge record shows a positive change in the oil volume in the tank, indicating that the direction of change is an increase. This situation demonstrates that the direction of change in the oil volume in the tank is opposite to the expected direction.
[0101] For example, within a statistical period, the amount of oil unloaded is liters, the amount of oil added is The change in oil level in the tank is liters. The fingerprint generation module generates a closure difference.
[0102]
[0103] At this point, the change should be: The volume increased, but the change in the amount of oil in the tank was [value missing]. The oil volume in the tank changes in the opposite direction to the expected direction, while the flow direction is consistent. Even if the difference in oil quality or the proportion of the difference in oil quality has not significantly exceeded the pre-configured threshold for oil quality difference management, the tiered task generation module still generates priority verification tasks based on the consistency value of the flow direction.
[0104] Prioritize verifying the following information recorded in the task: tank number, source index corresponding to the unloading inlet, source index corresponding to the level gauge record, source index corresponding to the refueling nozzle outlet, closure fingerprint, closure difference, total scale of the three on-site quantities, closure ratio, flow direction consistency value, oil quality difference, oil quality difference percentage, and source index. Based on this information, processing personnel should prioritize checking for errors in the correspondence between refueling nozzle numbers and tanks, whether unloading records span statistical periods, whether tank level change records are delayed, whether unloading equipment status records are abnormal, and whether refueling machine transaction records are complete.
[0105] As an optional implementation, field oil quantity records, business records, or equipment status records may contain missing, duplicate, out-of-bounds, or cross-statistical period records. The data quality check module first checks the standard records and generates a "pending review" mark for records that fail the data quality check. When multiple anomalies occur simultaneously, the data quality check module processes them in the following order: equipment status anomalies, equipment ledger conflicts, missing time, missing quantity, out-of-bounds values, duplicate records, and records crossing statistical periods. If a previous type of anomaly has already prevented a record from being included in the valid standard records, the subsequent type of anomaly is only saved as a reason for pending review. Records marked with a "pending review" mark are not directly entered into the closed fingerprint generation module as valid standard records unless the record is manually reviewed and confirmed to be usable.
[0106] If the level gauge record is marked as faulty by the equipment status record, the end-of-period tank oil quantity determination module uses the verified manual review record to determine the end-of-period tank oil quantity and saves the alternative reason. At this time, the closed fingerprint generation module can still generate a closed fingerprint if the changes in tank oil quantity, the amount of oil unloaded, and the amount of oil added all have valid sources; if the changes in tank oil quantity cannot be reliably determined, the corresponding statistical period enters the pending confirmation state.
[0107] If the sum of the oil unloaded and oil added in the same period is zero, the closed fingerprint generation module will not generate the oil difference ratio. If the total scale of the three on-site quantities is zero, the closed fingerprint generation module will not generate the closure ratio. If at least one of the direction of change of oil volume in the tank and the expected direction of change cannot form a positive or negative judgment, the closed fingerprint generation module will mark the corresponding statistical period as pending confirmation based on whether there are non-zero records for the oil unloaded, oil added, and oil volume change values in the tank.
[0108] If the fuel dispenser's transaction record shows that fuel was dispensed from the nozzle, but the fuel nozzle number and corresponding tank information are missing in the equipment ledger, the dual-boundary statistical unit creation module for the same tank will not forcibly assign the dispensed fuel volume to any tank, but will instead generate a checkmark. If the unloading record shows unloaded fuel, but the unloading equipment status record shows an anomaly, the data quality check module will retain the source index of the unloaded fuel, and subsequent anomaly list and verification task prompts will prompt the processing personnel to conduct document verification or equipment inspection.
[0109] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for statistical analysis of fuel loss at gas stations based on big data, characterized in that, include: Establish a statistical task that includes gas station number, oil tank number, oil product number, fuel dispenser number, fuel nozzle number, and statistical period identifier; Obtain on-site oil volume records, business records, and equipment status records within the same statistical period. On-site oil volume records provide changes in tank oil volume, unloaded oil volume, and added oil volume. Business records provide the amount of oil transferred in, transferred out, and inventory corrections. Perform unit unification, time alignment, and data quality checks on the acquired records; Based on the on-site connection relationship between the oil tank and the unloading inlet, level gauge, and refueling nozzle outlet in the equipment ledger, establish a dual-boundary statistical unit for the same tank; Generate the book ending oil quantity and the ending tank oil quantity, and generate the oil quality difference and the percentage of oil quality difference; Based on the changes in oil volume in the tank, the amount of oil unloaded, and the amount of oil added, a closure difference, the total scale of the three on-site quantities, the closure ratio, and the flow direction consistency value are generated. The closure difference characterizes the degree of non-closure between the change in oil volume in the tank and the expected change. The total scale of the three on-site quantities serves as the scale benchmark for scaling the closure difference. The expected change and the expected change direction are both determined by the amount of oil unloaded and the amount of oil added. The flow direction consistency value characterizes whether the change direction of oil volume in the tank is consistent with the expected change direction. The flow direction consistency value and the closure ratio form a closure fingerprint. An anomaly list and verification task are generated based on closed fingerprints, oil quality difference, and oil quality difference percentage.
2. The method for statistical analysis of fuel loss at gas stations based on big data as described in claim 1, characterized in that, When establishing the statistical task, master data for oil tanks and oil product numbers are created in the station-level management system. The unloading inlet, fuel dispenser number, and fuel nozzle number corresponding to each oil tank are recorded according to the equipment ledger, so that the statistical task corresponds to the oil tank, oil product number, unloading inlet, and fuel nozzle outlet.
3. The method for statistical analysis of fuel loss at gas stations based on big data as described in claim 1, characterized in that, The data quality check includes checking whether the time and quantity of the on-site oil volume record, the business record, and the equipment status record are missing, marking duplicate records, out-of-bounds values, and records spanning statistical periods, and generating a review mark for records that fail the data quality check.
4. The method for statistical analysis of fuel loss at gas stations based on big data as described in claim 1, characterized in that, The amount of oil unloaded is determined by the unloading record, the tank level change record, and the unloading equipment status record; the amount of oil dispensed is determined by the fuel dispenser flow record, the fuel nozzle number, and the tank correspondence; the change in the amount of oil in the tank is determined by the amount of oil in the same tank at the beginning and end of the statistical period.
5. The method for statistical analysis of fuel loss at gas stations based on big data as described in claim 1, characterized in that, When generating the book-state ending oil quantity, the book-state ending oil quantity is generated based on the beginning tank oil quantity, unloaded oil quantity, added oil quantity, transferred-in oil quantity, transferred-out oil quantity, and inventory correction quantity; when determining the ending tank oil quantity, the ending tank oil quantity is determined based on the level gauge record, equipment status record, and manual verification record.
6. The method for statistical analysis of fuel loss at gas stations based on big data as described in claim 1, characterized in that, The closure ratio is generated based on the closure difference and the total scale of the three field quantities; the total scale of the three field quantities is determined by the change in the amount of oil in the tank, the amount of oil unloaded, and the amount of oil added, and serves as the scale benchmark for scaling the closure difference; the flow direction consistency value is generated based on the change direction of the amount of oil in the tank and the expected change direction.
7. The method for statistical analysis of fuel loss at gas stations based on big data according to claim 1, characterized in that, When the sum of the oil unloaded and oil added in the same period is zero, no oil difference ratio is generated; when the total scale of the three on-site quantities is zero, no closure ratio is generated; when at least one of the direction of change of oil volume in the tank and the expected direction of change cannot form a positive or negative judgment, the corresponding statistical period is marked as pending confirmation based on whether there are non-zero records of the oil unloaded, oil added, and oil volume change values in the tank; when generating an anomaly list and verification tasks, firstly, the oil difference and oil difference ratio are verified according to the pre-configured oil difference management threshold, then the direction is verified based on the flow consistency value in the closure fingerprint, and the amplitude is verified based on the closure ratio in the closure fingerprint. When the flow consistency value indicates that the direction of change of oil volume in the tank is opposite to the expected direction of change, a priority verification task is generated; when the flow consistency value indicates that the direction of change of oil volume in the tank is consistent with the expected direction of change and the closure ratio exceeds the pre-configured closure ratio threshold, a general verification task is generated.
8. A big data-based statistical analysis system for fuel loss at gas stations, characterized in that, It includes a statistical object establishment module, a multi-source record collection module, a data standardization module, a data quality inspection module, a dual-boundary statistical unit establishment module for the same tank, a book-based end-of-period oil quantity calculation module, an end-of-period tank oil quantity determination module, a closed fingerprint generation module, and a hierarchical task generation module; The statistical object creation module outputs statistical tasks; The multi-source recording and acquisition module sends the on-site oil volume record, business record, and equipment status record to the data standardization module; The data standardization module sends the standard records to the data quality inspection module; The data quality inspection module sends valid standard records to the book-end oil quantity calculation module, the end-of-period tank oil quantity determination module, and the same tank dual-boundary statistical unit establishment module. The same tank dual boundary statistical unit establishment module provides the closed fingerprint generation module with the tank oil volume change value, unloaded oil volume and added oil volume; The book-based ending oil quantity calculation module and the ending tank oil quantity determination module provide the book-based ending oil quantity and the ending tank oil quantity to the closed fingerprint generation module. The closed fingerprint generation module provides the hierarchical task generation module with the closed fingerprint, oil quality difference, and oil quality difference percentage. The hierarchical task generation module generates an exception list and verification tasks.
9. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the method for statistical analysis of fuel loss at gas stations based on big data, as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements a big data-based statistical analysis method for oil loss at gas stations, as described in any one of claims 1 to 7.