A data analysis-based abnormal metering identification method and system for a fuel dispenser

CN122595112APending Publication Date: 2026-08-18LINYI METROLOGICAL VERIFICATION INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610632267.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-09
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0003]然而现有技术仍存在不足之处,现有基于数据分析的加油机异常计量识别技术,核心问题在于难以对流速数据中多尺度、复杂且具有隐蔽性的异常模式进行有效建模与识别

Benefits of technology

[0056]本发明有益效果为:本发明通过宏观形态异常特征(捕捉阶梯突变、线性漂移等整体轮廓异常)、流速波动特征(量化传感器误差下的离散度,对平台震荡敏感)和交易微观特征(刻画脉冲凹陷、周期性篡改等局部结构)的协同建模,首次实现了对加油机计量作弊行为从整体形态、趋势扰动到微观波动的多层次、互补性刻画。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122595112A_ABST
    Figure CN122595112A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on data analysis's abnormal metering identification method and system of petrol pump, it is related to intelligent metering abnormal identification technical field, including, to flow velocity time series respectively extract macroscopic morphological abnormal feature and flow velocity fluctuation feature, to flow velocity difference sequence extract transaction microscopic feature;The application is cooperated modeling by flow velocity time series and flow velocity difference sequence, combines the macroscopic morphological similarity degree matching of abnormal template, flow velocity fluctuation uncertainty interval extension and flow velocity fluctuation visual angle divergence analysis, realizes the systematic characterization to petrol pump metering process;By combining multi-feature discretization modeling and entropy and mutual information analysis mechanism of three-dimensional joint probability distribution, realize the deep mining of statistical dependence relationship and cooperative change mode between multidimensional features, and combined with symmetric measure and skew-symmetric measure, construct two-dimensional decision space, realize the hierarchical identification and dynamic decision of different complexity, different intensity abnormal mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent metering anomaly identification technology, and in particular to a method and system for identifying abnormal metering in fuel dispensers based on data analysis. Background Technology

[0002] With the continuous improvement of informatization and intelligence in the refined oil retail industry, and the gradual rise of data analysis and anomaly detection technology, fuel dispenser metering systems are gradually developing from traditional mechanical metering to electronic, digital and networked methods.

[0003] However, existing technologies still have shortcomings. The core problem with existing data analysis-based abnormal metering identification technologies for refueling machines is that they are difficult to effectively model and identify multi-scale, complex, and hidden abnormal patterns in flow rate data.

[0004] Traditional methods often rely on single statistical features or simple threshold discrimination, lacking the ability to comprehensively characterize the macroscopic morphology, microscopic fluctuations, and coupling relationships between features of flow velocity time series. This results in poor identification of deceptive cheating behaviors such as step-like abrupt changes, linear drift, and impulse interference, making it difficult to achieve a balance between high accuracy and low false positives. Summary of the Invention

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0006] In a first aspect, the present invention provides a method for identifying abnormal metering of fuel dispensers based on data analysis, comprising:

[0007] Collect the flow rate time series and flow rate difference series of oil volume traded at oil pumps;

[0008] Macroscopic anomaly features and flow velocity fluctuation features are extracted from the flow velocity time series, and micro-trading features are extracted from the flow velocity difference series.

[0009] The three extracted features are mapped to discrete observation variables, and a three-dimensional joint probability distribution is constructed within a sliding window to calculate the marginal entropy and joint entropy.

[0010] Based on marginal entropy and joint entropy, symmetric and oblique symmetric measures are calculated respectively, and the two are concatenated to form a two-dimensional decision vector;

[0011] Anomalies in fuel dispenser metering are identified based on two-dimensional decision vectors.

[0012] As a preferred embodiment of the data analysis-based method for identifying abnormal metering of fuel dispensers according to the present invention, wherein: the collection of the flow rate time series and flow rate difference series of the fuel dispenser transaction volume includes:

[0013] After a transaction is completed by the fuel dispenser, the fuel dispenser metering system records the original fields of each transaction, including the amount of fuel traded, the refueling duration, and the timestamp of the transaction completion.

[0014] Calculate the flow rate for each transaction time and compare it with adjacent transaction times to generate a flow rate difference sequence;

[0015] Define two first-in-first-out queues of fixed length W, to store the flow rate time series and the flow rate difference series, respectively.

[0016] As a preferred embodiment of the data analysis-based method for identifying abnormal metering of fuel dispensers according to the present invention, the step of extracting macroscopic morphological abnormal features includes:

[0017] The fuel dispenser metering system pre-stores a set of abnormal pattern templates obtained from the analysis of historical cheating cases. Each abnormal pattern template is a vector of length M, which is a typical abnormal flow velocity change pattern, where M≤W.

[0018] From the end of the flow velocity time series, extract the latest subsequence of length M as the real-time subsequence to be matched, and normalize it.

[0019] Calculate the similarity between the normalized real-time subsequence and each abnormal morphological template, and take the maximum value among all abnormal template similarities as the macroscopic morphological abnormal feature.

[0020] As a preferred embodiment of the data analysis-based method for identifying abnormal metering of fuel dispensers according to the present invention, the step of extracting flow velocity fluctuation features includes:

[0021] By introducing an uncertainty factor, each data point in the real-time subsequence is expanded into a number of closed intervals to obtain the velocity fluctuation sequence;

[0022] Define the velocity fluctuation column in the velocity fluctuation sequence;

[0023] Define the line of sight from the geometric center of velocity fluctuation column i to the geometric center of velocity fluctuation column j, and the tangent of the angle between this line of sight and the horizontal line to obtain the velocity fluctuation angle;

[0024] For each time step in the velocity fluctuation sequence, define a time neighborhood centered on it;

[0025] Calculate the velocity fluctuation angle clustering degree at each time step;

[0026] Calculate the median of the velocity fluctuation angle cluster sequence and use it as the median of the velocity fluctuation sequence;

[0027] Calculate the absolute deviation sequence of flow velocity fluctuations based on the median of the flow velocity fluctuation sequence;

[0028] Calculate the median of the absolute deviation sequence of flow velocity fluctuations, and then multiply this median by the range of uncertainty factors to expand it. Use the expanded upper limit value as the characteristic of flow velocity fluctuations.

[0029] As a preferred embodiment of the data analysis-based method for identifying abnormal metering at fuel dispensers according to the present invention, the extraction of transaction micro-features includes:

[0030] Local extrema are detected in the velocity difference sequence, and the detected extrema are recorded in chronological order as an extrema sequence.

[0031] For each pair of consecutive extreme points in the extreme point sequence, calculate a two-dimensional mapping point, and collect all the two-dimensional mapping points to construct a transaction return graph;

[0032] Calculate the average radial distance of the transaction return graph as a micro-feature of the transaction.

[0033] As a preferred embodiment of the data analysis-based method for identifying abnormal metering of fuel dispensers according to the present invention, the step of mapping the three extracted features to discrete observation variables, constructing a three-dimensional joint probability distribution within a sliding window, and calculating the marginal entropy and joint entropy includes:

[0034] Collect metering data of oil pumps during normal periods, calculate their historical macroscopic abnormal characteristics, transaction microscopic characteristics, and flow rate fluctuation characteristics, and use them as a normal sample set;

[0035] Calculate the mean vector and standard deviation vector of the normal sample set as benchmark parameters;

[0036] Using benchmark parameters, the macroscopic anomaly characteristics, microscopic transaction characteristics, and flow rate fluctuation characteristics of real-time data are standardized.

[0037] Define a feature sequence buffer to store the normalized feature vectors of the most recent L time steps;

[0038] The three features in each row of the feature sequence buffer are discretized to obtain three-dimensional discrete observation variables;

[0039] Define a three-dimensional joint random vector, where the three discrete random variables correspond to the three feature dimensions.

[0040] Based on three-dimensional discrete observation variables, the joint empirical probability of the three-dimensional joint random vector is estimated, and the joint empirical probability is summed to obtain the empirical marginal probability of each dimension.

[0041] Based on empirical marginal probabilities, the marginal entropy of a single discrete random variable and the joint entropy of the joint probabilities of multiple discrete random variables are calculated separately.

[0042] As a preferred embodiment of the data analysis-based method for identifying abnormal metering of fuel dispensers according to the present invention, the step of calculating symmetric and oblique symmetric metrics based on marginal entropy and joint entropy respectively, and concatenating the two to form a two-dimensional decision vector, includes:

[0043] Based on marginal entropy and joint entropy, the mutual information between two different discrete random variables and the mutual information between three-dimensional discrete random variables are calculated respectively. According to the entropy conjugate theory, the skew symmetry measure is calculated.

[0044] Calculate a symmetry metric based on marginal entropy and joint entropy;

[0045] The features of the oblique symmetry measure and the symmetry measure are concatenated to form a two-dimensional decision vector.

[0046] As a preferred embodiment of the data analysis-based method for identifying abnormal metering in fuel dispensers according to the present invention, the step of identifying abnormal metering in fuel dispensers based on two-dimensional decision vectors includes:

[0047] Based on the symmetry measurement sequence of normal samples, and based on the 3σ principle, a threshold for the intensity of symmetry features is set.

[0048] Based on the absolute value of the oblique symmetry measurement sequence of normal samples, calculate its q-quantile to obtain the oblique symmetry feature balance threshold.

[0049] Calculate the Mahalanobis distance of the two-dimensional decision vectors of all normal samples, and take their q-quantiles as the high threshold and low threshold of the comprehensive distance, respectively;

[0050] The Mahalanobis distance of the two-dimensional decision vector is calculated. A hierarchical decision logic is set by combining the symmetry feature strength threshold, the oblique symmetry feature balance threshold, the high threshold of the comprehensive distance, and the low threshold of the comprehensive distance. Based on the comparison results of the hierarchical decision logic, anomalies in the fuel dispenser metering are identified.

[0051] Secondly, the present invention provides a data analysis-based system for identifying abnormal metering in fuel dispensers, comprising:

[0052] The collection and extraction module is used to collect the flow rate time series and flow rate difference series of oil volume in oil gun transactions, and extract macro-morphological anomaly features and flow rate fluctuation features from the flow rate time series, and extract micro-trading features from the flow rate difference series.

[0053] The mapping module is used to map the three extracted features into discrete observation variables and construct a three-dimensional joint probability distribution within a sliding window;

[0054] The computational splicing module is used to calculate marginal entropy and joint entropy, and based on marginal entropy and joint entropy, calculate symmetric metric and oblique symmetric metric respectively, and splice the two to form a two-dimensional decision vector;

[0055] The anomaly detection module is used to identify anomalies in fuel dispenser metering based on two-dimensional decision vectors.

[0056] The beneficial effects of this invention are as follows: This invention achieves, for the first time, a multi-level and complementary characterization of fuel dispenser metering fraud behavior from overall shape and trend disturbance to micro fluctuations by collaboratively modeling macroscopic morphological anomaly features (capturing overall contour anomalies such as step-by-step abrupt changes and linear drift), flow velocity fluctuation features (quantifying the dispersion under sensor error and being sensitive to platform oscillations), and transaction micro-features (characterizing local structures such as pulse dips and periodic tampering).

[0057] Furthermore, this invention maps the above three features into discrete observation variables and introduces total correlation and O-information to construct a two-dimensional decision space. In this space, symmetry measures quantify the intensity of anomalies, while oblique symmetry measures are used to identify the structural complexity of anomalies (redundancy-dominated or synergistic-dominated). This information theory-based fusion and hierarchical decision-making mechanism enables the system to adaptively adjust decision sensitivity according to the complexity of anomaly patterns, thereby significantly reducing the false alarm rate while maintaining a high detection rate. This is something that cannot be achieved by a single feature or a simple threshold method. Attached Figure Description

[0058] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0059] Fig. 1 This is a flowchart of the abnormal metering identification method for fuel dispensers based on data analysis in Example 1.

[0060] Fig. 2 This is a schematic diagram of the abnormal metering identification system for fuel dispensers based on data analysis in Example 1. Detailed Implementation

[0061] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0062] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0063] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0064] Example 1, referring to Figs. 1-2 This is the first embodiment of the present invention, which provides a method for identifying abnormal metering of fuel dispensers based on data analysis, including the following steps:

[0065] S1. Collect the flow rate time series and flow rate difference series of the oil volume traded by the oil gun;

[0066] Preferably, after a transaction is completed by the fuel dispenser, the fuel dispenser metering system records the original fields of each transaction, including the amount of fuel traded, the refueling duration, and the timestamp of the transaction completion.

[0067] By calculating the flow rate of each transaction time based on the amount of oil traded and the refueling time, and comparing it with adjacent transaction times, a flow rate difference sequence is generated.

[0068] Define two first-in-first-out queues of fixed length W, to store the flow rate time series and the flow rate difference series, respectively.

[0069] The value of W can be in the range of 50 to 500, preferably 100 to 300;

[0070] S2. Extract macroscopic morphological anomaly features and flow velocity fluctuation features from the flow velocity time series, and extract microscopic transaction features from the flow velocity difference series;

[0071] To ensure the alignment of the three features in the time dimension, this invention adopts a synchronous sliding window mechanism: for each transaction completion time, the most recently completed W transactions are taken to form a flow rate time series and a flow rate difference series, and macro-morphological anomaly features (based on the subsequence of length M at the end of the window), flow rate fluctuation features (based on the flow rate fluctuation expansion of the entire window), and transaction micro-features (based on the extreme points of the flow rate difference series within the window) are calculated at one time.

[0072] All three features correspond to the time period covered by the window, thus achieving synchronization of features at the time granularity;

[0073] Preferably, the fuel dispenser metering system pre-stores a set of abnormal pattern templates obtained from the analysis of historical cheating cases, wherein each abnormal pattern template is a vector of length M, which is a typical abnormal flow velocity change pattern, and M≤W;

[0074] The above-mentioned typical abnormal flow velocity change patterns include step-like abrupt changes, linear drift, pulse-like dips, and plateau oscillations.

[0075] Among them, the step-change type refers to the refueling flow rate undergoing one or more obvious, almost vertical step changes in a short period of time, and then remaining relatively stable at a new level, resembling a step.

[0076] During the refueling process at the fuel dispenser, the following occurs: A miniature receiving device is installed on the main board or sensor circuit of the fuel dispenser. Initially, the flow rate is normal (e.g., 45L / min). When the amount of fuel reaches a certain value (e.g., 200 yuan), the miniature receiving device instantly changes the frequency of the pulse signal sent to the meter control main board, causing the flow rate display value to suddenly drop to about 42L / min (the actual flow rate remains unchanged), forming a negative step. Subsequent refueling is calculated based on this low flow rate until the end.

[0077] Among them, the linear drift type refers to the flow rate showing a continuous and approximately linear increase or decrease throughout the entire transaction process, which is significantly proportional or inversely proportional to the amount of fuel or time.

[0078] During the refueling stage of the fuel dispenser, the following occurs: the built-in "oil volume temperature compensation algorithm" of the fuel dispenser is tampered with, and an offset that is proportional to the refueling time or oil volume is injected into the compensation formula. For example, the compensation value starts from 0 and increases linearly with the increase of the refueling volume, which causes the displayed flow rate to decrease linearly relative to the actual flow rate. The longer the refueling time, the greater the cumulative error.

[0079] Among them, the pulse-dip type refers to a brief, sharp drop (dip) that occurs against a background of generally stable flow velocity, followed by a rapid recovery to the original level, resembling a negative pulse.

[0080] During the refueling process at the fuel dispenser, the following is observed: A "pulse stealing and deletion device" is installed on the communication line between the fuel dispenser's control motherboard and display board. This device continuously monitors the flowing pulse signals. Every time a predetermined number of pulses (e.g., corresponding to 0.1 liters of fuel) are detected, it will automatically block or delete 1-2 pulses that follow, and then return to normal.

[0081] Among them, the plateau oscillation type refers to the flow velocity first rising or falling to a plateau value, but during the period of maintaining the plateau, it is not a smooth straight line, but is superimposed with abnormal regularity, periodic or non-periodic high-frequency oscillation;

[0082] During the refueling process at the fuel dispenser, the following behavior occurs: by implanting malicious software, such as setting a switching cycle of 2 seconds, the first second uses a normal pulse equivalent, and the flow rate is displayed normally; the second second uses an increased pulse equivalent (e.g., 1 liter actually flows out, but a pulse corresponding to 1.05 liters is emitted), causing the flow rate display value to be abnormally high.

[0083] The above set of abnormal pattern templates was obtained by classifying confirmed historical fraudulent transaction samples according to their abnormality type.

[0084] From the end of the flow velocity time series, extract the latest subsequence of length M as the real-time subsequence to be matched, and normalize it.

[0085] The value of M can be in the range of 10 to 100, preferably 20 to 50;

[0086] Calculate the similarity between the normalized real-time subsequence and each abnormal morphological template, and take the maximum value among all abnormal template similarities as the macroscopic morphological abnormal feature;

[0087] The similarity mentioned above is calculated using the following formula:

[0088] ;

[0089] in, For, real-time subsequence With the l-th abnormal morphology template similarity, Let M be the index of the subsequence length, and t be the index of the time window. Real-time subsequence The m-th element in Real-time subsequence The arithmetic mean, This is the m-th element in the l-th abnormal morphology template. It is the arithmetic mean of the l-th abnormal morphology template;

[0090] The closer the value of the aforementioned macroscopic anomaly characteristics is to 1, the more closely the current flow velocity change pattern matches a certain predefined cheating template, and the higher the probability of macroscopic anomalies.

[0091] Furthermore, an uncertainty factor is introduced to expand each data point in the real-time subsequence into a number of closed intervals, resulting in a flow velocity fluctuation sequence.

[0092] The expansion of each of the above data points is defined as an interval arithmetic operation, with the following formula:

[0093] ;

[0094] in, for The flow velocity fluctuation value is represented by a closed interval. for The velocity fluctuation range and They are respectively The lower and upper bounds, For real-time subsequence The flow rate value in the window is a known value, which is used as the fixed value. Real-time subsequence Time-series index, and These are the lower and upper bounds of the uncertainty factor, respectively, based on the maximum permissible error setting of the fuel dispenser sensor. For example, if the sensor accuracy is ±1%, then... , ;

[0095] Define the velocity fluctuation column in the velocity fluctuation sequence;

[0096] The aforementioned velocity fluctuation column refers to a line segment with a width of 1 (i.e., one unit time interval) as its base at time i, and an interval... The vertical line segment region at the height of i forms a cylinder at time i.

[0097] The line connecting the geometric center of the velocity fluctuation column i to the geometric center of the velocity fluctuation column j is defined as the line of sight. In a coordinate system with a fixed unit length ratio (i.e., a coordinate system in which the ratio of the unit length of the time axis to the unit length of the velocity axis is a fixed constant), the angle between this line of sight and the horizontal time axis is the velocity fluctuation angle.

[0098] For each time step in the velocity fluctuation sequence, define a time neighborhood centered on it;

[0099] The formula for calculating the velocity fluctuation angle concentration at each time step is:

[0100] ;

[0101] in, For time sequence time The angular concentration of the flow velocity fluctuations is a fixed value. For time-series indexes Temporal neighborhood, For time series moments The angle of velocity fluctuation at point j;

[0102] Calculate the median of the velocity fluctuation angle cluster sequence and use it as the median of the velocity fluctuation sequence;

[0103] Based on the median of the velocity fluctuation sequence, calculate the absolute deviation sequence of velocity fluctuations using the following formula:

[0104] ;

[0105] ;

[0106] in, Let be the absolute deviation vector of the flow velocity fluctuation at time t. For the first The absolute deviation of the flow velocity fluctuation at any given time point. Let be the median of the velocity fluctuation sequence at time t;

[0107] Calculate the median of the absolute deviation sequence of flow velocity fluctuations, and multiply the median by the uncertainty factor range to expand it. Use the expanded upper limit value as the flow velocity fluctuation characteristic to enhance the sensitivity to uncertainty.

[0108] The above-mentioned flow velocity fluctuation characteristics reflect the degree of dispersion of the flow velocity change trend angle when considering sensor error. Cheating behavior (such as platform oscillation) will cause the angle concentration to fluctuate drastically, increasing its value.

[0109] Furthermore, local extrema are detected in the velocity difference sequence, and the detected extrema are recorded in chronological order as an extrema sequence.

[0110] For each pair of consecutive extreme points in the extreme point sequence, calculate a two-dimensional mapping point, and collect all the two-dimensional mapping points to construct a transaction return graph;

[0111] The above two-dimensional mapping points, formula:

[0112] ;

[0113] in, For the k-th extreme point and the... The extreme points, and the resulting two-dimensional mapping points. for The coordinate representation, and They are respectively The extreme point interval and extreme point amplitude difference are calculated by subtracting the timestamps of adjacent extreme points. This is the index value of the k-th consecutive extreme point. For time sequence time Below, the velocity difference value corresponding to the kth extreme point;

[0114] Calculate the average radial distance of the transaction return graph as a micro-feature of the transaction;

[0115] Specifically, the average radial distance of the transaction return graph is calculated as a micro-characteristic indicator of the transaction. The Euclidean distance from all mapping points to the origin of the coordinate system is calculated, and then the arithmetic mean is obtained as the micro-characteristic of the transaction. This characteristic is used to quantify the overall divergence of the velocity difference extreme points in the phase space. Abnormal pulses or periodic tampering will cause the micro-characteristic of the transaction to deviate from the normal distribution range.

[0116] In the scenario of identifying abnormal metering at fuel dispensers, a single feature can usually only reflect one aspect of the abnormal pattern.

[0117] Macroscopic morphological anomaly features are suitable for characterizing overall velocity profile anomalies such as step-change type and linear drift type by matching the similarity between real-time subsequence and anomaly template set, but they are not sensitive enough to microscopic anomaly patterns such as pulse deletion and local high-frequency disturbances.

[0118] The transaction micro-features are constructed by using the extreme points of the flow velocity difference sequence to create a transaction return map, which is more suitable for characterizing local structural anomalies such as pulse-type depressions and periodic tampering, but lacks sufficient ability to identify overall smooth drift anomalies.

[0119] The flow velocity fluctuation characteristics, considering sensor error and uncertainty expansion, can characterize the degree of dispersion of the flow velocity change trend angle and are more sensitive to plateau oscillation and trend disturbance anomalies. However, when used alone, it is difficult to take into account both macroscopic morphology and microscopic structure information.

[0120] Therefore, this invention jointly models three types of features and further constructs a two-dimensional decision space through a three-dimensional joint probability distribution, as well as symmetric and oblique symmetric measures, thereby simultaneously characterizing the intensity of abnormal signals and the abnormal collaborative structure, and realizing hierarchical identification of measurement cheating patterns with different complexities and intensities.

[0121] S3. Map the three extracted features to discrete observation variables, construct a three-dimensional joint probability distribution within a sliding window, and calculate the marginal entropy and joint entropy;

[0122] Preferably, the metering data of the oil pump during normal periods is collected, and its historical macroscopic abnormal characteristics, transaction microscopic characteristics, and flow rate fluctuation characteristics are calculated as a normal sample set.

[0123] Calculate the mean vector and standard deviation vector of the normal sample set as benchmark parameters;

[0124] Using benchmark parameters, the macroscopic anomaly characteristics, microscopic transaction characteristics, and flow rate fluctuation characteristics of real-time data are standardized.

[0125] Define a feature sequence buffer to store the normalized feature vectors of the most recent L time steps;

[0126] The value of L can be 20 to 200, preferably 50 to 100.

[0127] The above-mentioned ranges of W, M, and K are the preferred ranges determined through statistical experiments based on the average daily transaction frequency of fuel dispensers and the duration of abnormal modes. In actual operation, they can be adjusted according to the transaction density of specific fuel stations.

[0128] The aforementioned feature sequence buffer is an L×3 matrix, with each row representing the standardized macroscopic anomaly features, microscopic transaction features, and flow rate fluctuation features, respectively.

[0129] The three features in each row of the feature sequence buffer are discretized to obtain three-dimensional discrete observation variables;

[0130] The above discretization process refers to setting the number of discretization intervals for each feature based on the statistical distribution of the normal sample set. , and ;

[0131] The above , and The value can be selected from the range of 3 to 10;

[0132] Calculate a fixed binning threshold vector based on the quantiles (equal frequency principle) of the normal sample set;

[0133] A fixed binning threshold vector is used to map the three features of each row in the feature sequence buffer to obtain three-dimensional discrete observation variables;

[0134] Define a three-dimensional joint random vector, where the three discrete random variables correspond to the three feature dimensions.

[0135] Based on three-dimensional discrete observation variables, the joint empirical probability of the three-dimensional joint random vector is estimated, and the joint empirical probabilities are summed to obtain the empirical marginal probability of each dimension. The formula is:

[0136] ;

[0137] ;

[0138] ;

[0139] in, A three-dimensional joint random vector The joint probability mass function at point The empirical estimate at that point, i.e., the joint empirical probability. Let be the interval number to which the 'a'-th feature belongs after discretization, i.e., a discrete random variable, where the range of values ​​for 'a' is... , , The number of intervals divided when discretizing the a-th feature. To represent the frequency of this combination within window L, Laplace smoothing was used to avoid the zero probability problem caused by data sparsity. , and Three-dimensional discrete observation variables The three components correspond to macroscopic abnormal features, microscopic features of transactions, and flow velocity fluctuation features, respectively. This is the time index variable within the historical window of the feature sequence buffer, and its value range is... , The historical data window length used to estimate the probability distribution is a preset positive integer parameter. For indicator functions, A three-dimensional joint random vector The empirical marginal probability in the a-th dimension, i.e., in a fixed... Under the condition that, the probability is obtained by summing all possible values ​​of all other dimensions. and All are not equal to The index;

[0140] Based on empirical marginal probabilities, the marginal entropy of a single discrete random variable and the joint entropy of the joint probabilities of multiple discrete random variables are calculated separately.

[0141] S4. Based on marginal entropy and joint entropy, calculate the symmetric metric and the oblique symmetric metric respectively, and concatenate the two to form a two-dimensional decision vector;

[0142] Preferably, based on marginal entropy and joint entropy, the mutual information between two different discrete random variables and the mutual information between three-dimensional discrete random variables are calculated respectively, using the following formula:

[0143] ;

[0144] in, For discrete random variables and Mutual information between them and Discrete random variables and entropy, For discrete random variables and The joint entropy of random vectors;

[0145] ;

[0146] in, For mutual information among the three variables, For joint entropy;

[0147] According to the entropy conjugate theory, the skew symmetry metric is calculated using the following formula:

[0148] ;

[0149] in, For random vectors O-information, random vector Overall, redundancy is dominant, indicating that the abnormal patterns may be relatively simple, leading to simultaneous changes in multiple features; random vector Overall, collaboration is dominant, indicating that the abnormal pattern is complex and requires simultaneous observation of three features for identification, with no obvious pairwise relationships.

[0150] The above formula for calculating the oblique symmetry metric is obtained by simplifying the standard formula for the oblique symmetry metric, the formula for mutual information between two different discrete random variables, and the formula for mutual information between three-dimensional discrete random variables.

[0151] The standard formula for the above oblique symmetry measure is:

[0152] ;

[0153] Based on marginal entropy and joint entropy, the symmetric metric is calculated using the following formula:

[0154] ;

[0155] in, For random vectors The system's symmetry measure The symmetry metric measures the overall dependence of the three features relative to the independent case. The larger the value, the less independent the three features are, and the stronger the anomalous signal in the system.

[0156] The features of the oblique symmetry measure and the symmetry measure are concatenated to form a two-dimensional decision vector.

[0157] S5. Identify anomalies in fuel dispenser metering based on two-dimensional decision vectors;

[0158] Prioritize symmetry measurement sequences based on normal samples, and set symmetry feature strength thresholds based on the 3σ principle;

[0159] Based on the absolute value of the oblique symmetry measurement sequence of normal samples, calculate its q-quantile, such as 95%, as the threshold for oblique symmetry feature balance.

[0160] Calculate the Mahalanobis distance of the two-dimensional decision vectors of all normal samples, and take their q-quantiles respectively. , One is the low threshold q-quantile of the comprehensive distance, and the other is the high threshold of the comprehensive distance, which are used as the high threshold and low threshold of the comprehensive distance, respectively.

[0161] Calculate the Mahalanobis distance of the two-dimensional decision vectors and set the hierarchical decision logic;

[0162] The above-mentioned hierarchical decision-making logic refers to:

[0163] ;

[0164] ;

[0165] ;

[0166] ;

[0167] in, Let be the Mahalanobis distance of the two-dimensional decision vectors at time t. and These are the high threshold and low threshold for comprehensive distance, respectively. and These are the symmetric and oblique symmetric measures at time t, respectively. For symmetrical feature intensity threshold, The threshold for the balance of the oblique symmetry feature;

[0168] like If established, a Level 1 alarm will be triggered;

[0169] like Not valid. If established, a level two alarm will be triggered;

[0170] If neither Level 1 nor Level 2 alarms occur, the transaction is considered normal.

[0171] When the above-mentioned Level 1 alarm is triggered, the fuel nozzle will be automatically locked remotely or locally, the transaction will be stopped, and an alarm message will be sent to the gas station manager.

[0172] When the above-mentioned level 2 alarm is triggered, the system internally marks the transaction of the oil gun and starts a continuous observation window. If the level 2 alarm continues to be triggered in the continuous observation window, it will be automatically upgraded to level 1 alarm; otherwise, it will be judged as normal.

[0173] This embodiment also provides a data analysis-based abnormal metering identification system for fuel dispensers, including:

[0174] The collection and extraction module is used to collect the flow rate time series and flow rate difference series of oil volume in oil gun transactions, and extract macro-morphological anomaly features and flow rate fluctuation features from the flow rate time series, and extract micro-trading features from the flow rate difference series.

[0175] The mapping module is used to map the three extracted features into discrete observation variables and construct a three-dimensional joint probability distribution within a sliding window;

[0176] The computational splicing module is used to calculate marginal entropy and joint entropy, and based on marginal entropy and joint entropy, calculate symmetric metric and oblique symmetric metric respectively, and splice the two to form a two-dimensional decision vector;

[0177] The anomaly detection module is used to identify anomalies in fuel dispenser metering based on two-dimensional decision vectors.

[0178] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for identifying abnormal metering in fuel dispensers based on data analysis, characterized in that, include: Collect the flow rate time series and flow rate difference series of oil volume traded at oil pumps; Macroscopic anomaly features and flow velocity fluctuation features are extracted from the flow velocity time series, and micro-trading features are extracted from the flow velocity difference series. The three extracted features are mapped to discrete observation variables, and a three-dimensional joint probability distribution is constructed within a sliding window to calculate the marginal entropy and joint entropy. Based on marginal entropy and joint entropy, symmetric and oblique symmetric measures are calculated respectively, and the two are concatenated to form a two-dimensional decision vector; Anomalies in fuel dispenser metering are identified based on two-dimensional decision vectors.

2. The data analysis-based method for identifying abnormal metering in fuel dispensers as described in claim 1, characterized in that, The time series and difference series of the flow rate of the oil traded by the oil pump are included: After a transaction is completed by the fuel dispenser, the fuel dispenser metering system records the original fields of each transaction, including the amount of fuel traded, the refueling duration, and the timestamp of the transaction completion. Calculate the flow rate for each transaction time and compare it with adjacent transaction times to generate a flow rate difference sequence; Define two first-in-first-out queues of fixed length W, to store the flow rate time series and the flow rate difference series, respectively.

3. The data analysis-based method for identifying abnormal metering in fuel dispensers as described in claim 2, characterized in that, The extraction of macroscopic morphological anomaly features includes: The fuel dispenser metering system pre-stores a set of abnormal pattern templates obtained from the analysis of historical cheating cases. Each abnormal pattern template is a vector of length M, which is a typical abnormal flow velocity change pattern, where M≤W. From the end of the flow velocity time series, extract the latest subsequence of length M as the real-time subsequence to be matched, and normalize it. Calculate the similarity between the normalized real-time subsequence and each abnormal morphological template, and take the maximum value among all abnormal template similarities as the macroscopic morphological abnormal feature.

4. The data analysis-based method for identifying abnormal metering in fuel dispensers as described in claim 3, characterized in that, The extraction of flow velocity fluctuation features includes: By introducing an uncertainty factor, each data point in the real-time subsequence is expanded into a number of closed intervals to obtain the velocity fluctuation sequence; Define the velocity fluctuation column in the velocity fluctuation sequence; Define the line of sight from the geometric center of the velocity fluctuation column i to the geometric center of the velocity fluctuation column j, and take the angle between the line of sight and the horizontal line as the velocity fluctuation angle. For each time step in the velocity fluctuation sequence, define a time neighborhood centered on it; Calculate the velocity fluctuation angle clustering degree at each time step; Calculate the median of the velocity fluctuation angle cluster sequence and use it as the median of the velocity fluctuation sequence; Calculate the absolute deviation sequence of flow velocity fluctuations based on the median of the flow velocity fluctuation sequence; Calculate the median of the absolute deviation sequence of flow velocity fluctuations, and multiply the median by the range of uncertainty factors to expand it. Use the expanded upper limit value as the characteristic of flow velocity fluctuations. When platform oscillation-type cheating occurs, the flow velocity exhibits high-frequency jitter, causing the local trend angle to change drastically in a short period of time. This results in the median of the calculated angle clustering sequence deviating from the normal range, ultimately manifesting as a significant increase in the flow velocity fluctuation characteristic value. By introducing an uncertainty factor to expand the interval, this feature is robust to sensor noise and can effectively distinguish between real cheating and random fluctuations.

5. The data analysis-based method for identifying abnormal metering in fuel dispensers as described in claim 4, characterized in that, The extraction of transaction micro-features includes: Local extrema are detected in the velocity difference sequence, and the detected extrema are recorded in chronological order as an extrema sequence. For each pair of consecutive extreme points in the extreme point sequence, calculate a two-dimensional mapping point, and collect all the two-dimensional mapping points to construct a transaction return graph; Calculate the average radial distance of the transaction return graph as a micro-feature of the transaction.

6. The method for identifying abnormal metering of fuel dispensers based on data analysis as described in claim 5, characterized in that, The process of mapping the three extracted features to discrete observation variables, constructing a three-dimensional joint probability distribution within a sliding window, and calculating marginal entropy and joint entropy includes: Collect metering data of oil pumps during normal periods, calculate their historical macroscopic abnormal characteristics, transaction microscopic characteristics, and flow rate fluctuation characteristics, and use them as a normal sample set; Calculate the mean vector and standard deviation vector of the normal sample set as benchmark parameters; Using benchmark parameters, the macroscopic anomaly characteristics, microscopic transaction characteristics, and flow rate fluctuation characteristics of real-time data are standardized. Define a feature sequence buffer of length L to store the standardized feature vectors of the most recent L time moments. The feature sequence buffer is an L×3 matrix, and each row represents the standardized historical macro-morphological anomaly features, transaction micro-features, and flow rate fluctuation features, respectively. Based on the statistical distribution of the normal sample set, the three features are discretized respectively, and the number of discretization intervals of each feature is set as B1, B2 and B3 respectively. The three standardized features in each row of the feature sequence buffer are mapped to three discrete observation variables respectively. A three-dimensional joint random vector is constructed based on the three discrete observation variables. The frequency of occurrence of each combination of discrete observation variables is counted within a sliding window of length L in order to estimate the joint empirical probability of the three-dimensional joint random vector. The joint empirical probability is summed over the remaining dimensions to obtain the empirical marginal probability of each feature dimension. The marginal entropy of a single discrete random variable is calculated based on the empirical marginal probability, and the joint entropy of multiple discrete random variables is calculated based on the joint empirical probability.

7. The data analysis-based method for identifying abnormal metering in fuel dispensers as described in claim 6, characterized in that, The symmetric and oblique symmetric metrics, calculated based on marginal entropy and joint entropy respectively, are concatenated to form a two-dimensional decision vector, including: Based on the marginal entropy and joint entropy, calculate the mutual information between any two different discrete random variables and the mutual information between three discrete random variables, respectively. Calculate the skew symmetry measure based on the mutual information among three discrete random variables; The symmetry metric is calculated based on the marginal entropy of each of the three discrete random variables and the joint entropy of the three discrete random variables. The oblique symmetry metric and the symmetry metric are concatenated to form a two-dimensional decision vector.

8. The method for identifying abnormal metering of fuel dispensers based on data analysis as described in claim 7, characterized in that, The method for identifying anomalies in fuel dispenser metering based on two-dimensional decision vectors includes: Based on the symmetry measurement sequence of normal samples and the 3σ principle, a threshold for the intensity of symmetry features is set. Based on the absolute value of the oblique symmetry measurement sequence of normal samples, calculate its q-quantile to obtain the oblique symmetry feature balance threshold. Calculate the Mahalanobis distance of the two-dimensional decision vectors of all normal samples, and take their q-quantiles as the high threshold and low threshold of the comprehensive distance, respectively; The Mahalanobis distance of the two-dimensional decision vector is calculated. A hierarchical decision logic is set by combining the symmetry feature strength threshold, the oblique symmetry feature balance threshold, the high threshold of the comprehensive distance, and the low threshold of the comprehensive distance. Based on the comparison results of the hierarchical decision logic, anomalies in the fuel dispenser metering are identified.

9. A data analysis-based system for identifying abnormal metering in fuel dispensers, based on the data analysis-based method for identifying abnormal metering in fuel dispensers according to any one of claims 1 to 8, characterized in that, include: The collection and extraction module is used to collect the flow rate time series and flow rate difference series of oil volume in oil gun transactions, and extract macro-morphological anomaly features and flow rate fluctuation features from the flow rate time series, and extract micro-trading features from the flow rate difference series. The mapping construction module is used to map the three extracted features into discrete observation variables and construct a three-dimensional joint probability distribution within a sliding window; The computational splicing module is used to calculate marginal entropy and joint entropy, and based on marginal entropy and joint entropy, calculate symmetric metric and oblique symmetric metric respectively, and splice the two to form a two-dimensional decision vector; The anomaly detection module is used to identify anomalies in fuel dispenser metering based on two-dimensional decision vectors.