A method and system for intelligent analysis of gas station operation data
By applying symbolized approximation aggregation and dynamic time regularization algorithms in gas station operation data analysis, frequent patterns of high-similar sequence data are extracted and trend predictions are performed, the shortcomings of multi-source heterogeneous data fusion and complex mode mining in the existing technology are solved, and more accurate future demand forecasting and operation management decision support are achieved.
Patent Information
- Application Number
- CN202510053426.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-01-14
AI Technical Summary
The existing gas station operation data analysis methods lack deep fusion of multi-source heterogeneous data and mining complex patterns, making it difficult to effectively predict future demand, and the analysis based on static rules is poor.
The symbolized approximation aggregation SAX algorithm and dynamic time regularization DTW algorithm are used to preprocess and similarity calculations for gas station data, build a cumulative error matrix and backtrack the optimal alignment path, extract the frequent mode of high similarity sequence data, calculate the support value and filter the frequent item set, and segment the symbol sequence based on the time span set, calculate the probability of symbol mode occurrence, generate a time vector and make trend prediction.
By deeply integrating multi-source data, the complex patterns and correlation patterns in time series data are accurately captured, which significantly improves the prediction accuracy of future demand and enhances the scientificity and accuracy of gas station operation and management.
Smart Images

Figure CN119476887B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of operation data analysis, and in particular to an intelligent analysis method and system for gas station operation data. Background Art
[0002] As the number and scale of gas stations continue to expand, the complexity of their operation and management has also increased significantly. Traditional gas station operation data management methods mostly rely on manual records and static monitoring, which is difficult to meet the needs of modern and intelligent management. With the rapid development of the Internet of Things, artificial intelligence and big data technology, data-driven analysis methods have gradually been applied in gas station operations.
[0003] However, existing technologies often focus on single-dimensional data analysis and lack the deep integration of multi-source heterogeneous data and the mining of complex patterns. The nonlinear changes and noise problems in time series data make the analysis methods based on static rules ineffective. On the other hand, the existing systems are relatively limited in mining frequent patterns and association rules and cannot effectively extract the potential laws in highly similar data, resulting in low prediction accuracy for future demand. Summary of the invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides an intelligent analysis method for gas station operation data to solve the problem that the existing technology often focuses on data analysis of a single dimension, lacks deep fusion of multi-source heterogeneous data and mining of complex patterns, and the nonlinear changes and noise problems in time series data make the analysis method based on static rules ineffective; on the other hand, the existing system is relatively limited in mining frequent patterns and association rules, and cannot effectively extract potential laws in high-similarity data, which leads to the problem of low prediction accuracy of future demand.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a method for intelligent analysis of gas station operation data, comprising:
[0008] Collect gas station data for preprocessing, use the symbolic approximate aggregation SAX algorithm to generate symbolic sequence data from the preprocessed data, use the dynamic time warping DTW algorithm to calculate the similarity of the symbolic sequence data, and construct a cumulative error matrix to trace back the optimal alignment path to obtain high-similarity sequence data;
[0009] Use the Apriori algorithm to extract frequent patterns of high-similarity sequence data from high-similarity sequence data sets, calculate support values and filter frequent item sets, and count the time span sets of frequent item set elements;
[0010] Based on the time span set, the high-similarity sequence data is segmented into symbol sequences, the probability of occurrence of symbol patterns is calculated, the time vector of the high-similarity sequence data set is formed, and the next time window is predicted based on the trend prediction model;
[0011] Generate a priority list based on the predictions and build a list of high-probability events for visual display.
[0012] As a preferred solution of the intelligent analysis method of gas station operation data of the present invention, the pre-processing of the collected gas station data includes:
[0013] Collect site data based on gas stations, including fuel quantity, inventory, and equipment status;
[0014] Collect external data based on the gas station environment, including real-time traffic flow data and weather conditions data;
[0015] Compile statistics on user behavior data, including payment methods and refueling preferences;
[0016] Deploy edge devices at sites to collect data in real time, and perform data alignment and standardization based on timestamps.
[0017] As a preferred solution of the intelligent analysis method of gas station operation data of the present invention, the method uses the symbolic approximate aggregation SAX algorithm to generate symbolic sequence data for preprocessed data, uses the dynamic time warping DTW algorithm to calculate the similarity of the symbolic sequence data, and constructs a cumulative error matrix, backtracks the optimal alignment path, and obtains high-similarity sequence data, including:
[0018] Use sliding windows to segment the collected time series including site data, external data, and user behavior data;
[0019] Use the symbolic approximate aggregation algorithm SAX to perform segmented aggregation approximation PAA calculation on each segmented data to obtain the segmented mean vector of the segmented data ;
[0020] Determine the number of quantile intervals according to the number of symbols in the predefined symbol set, use the cumulative distribution function CDF of the Gaussian distribution to calculate the probability interval of each quantile interval, and use the inverse cumulative distribution function of the standard normal distribution to calculate the upper boundary value and the lower boundary value of the corresponding symbol quantile interval of the probability interval according to the upper boundary probability value and the lower boundary probability value of the probability interval;
[0021] Piecewise mean vector The value of is subjected to distribution normalization, each element of the normalized segmented mean vector is mapped to a symbol in the symbol set according to the quantile interval of the Gaussian distribution, and symbolized sequence data is generated;
[0022] Use dynamic time warping (DTW) to calculate the similarity of symbolic sequence data and construct a cumulative error matrix D of size , where m and n are the lengths of the two symbolized sequence data segments X and Y respectively, and each element of the cumulative error matrix represents the cumulative error of the two symbolized sequence data segments X and Y;
[0023] By backtracking the cumulative distance matrix, returning to the starting point along the path with the minimum cumulative distance, the optimal alignment path is obtained, and the cumulative error point pair data of the optimal alignment path is used as the dynamic time warping distance value of the symbolized sequence data of the two segments X and Y;
[0024] Traverse each symbolized sequence data, perform dynamic time warping DTW on each pair, calculate the dynamic time warping distance, form a similarity matrix M, and use the sum of the historical mean and standard deviation of the calculated dynamic time warping distance as the similarity threshold. If the dynamic time warping distance is less than or equal to the similarity threshold, the corresponding two segments of symbolized sequence data are judged to be high-similarity sequence data.
[0025] As a preferred solution of the intelligent analysis method of gas station operation data of the present invention, the method uses the Apriori algorithm to extract frequent patterns of high-similarity sequence data from high-similarity sequence data sets, calculates support values and screens frequent item sets, and counts the time span set of frequent item set elements, including:
[0026] Based on the high similarity sequence data set, the Apriori algorithm is used to extract frequent patterns. The single symbol set in the high similarity sequence data set is used as the candidate set. Based on each single symbol in the candidate set, the ratio of the number of times different symbols appear in all sequences to the total length of all symbolized sequences is calculated as the support value.
[0027] Based on the sum of the mean and standard deviation of the historical support values as the support threshold, if the support value of a single symbol is greater than or equal to the support threshold, the single symbol is judged to belong to the frequent itemset;
[0028] Based on the single symbols of the frequent item set, two-by-two combinations are made as the candidate sets of the two-symbol pattern, the support is repeatedly calculated and the two-symbol frequent item sets are screened, and the expansion is stopped when no new frequent patterns are generated, and the frequent item sets of different numbers of symbol patterns are determined;
[0029] The time spans of the elements of each frequent item set are counted to form a time span set for the frequent item set.
[0030] As a preferred solution of the intelligent analysis method of gas station operation data of the present invention, the method includes: segmenting the high similarity sequence data into symbol sequences based on the time span set, calculating the probability of occurrence of symbol patterns, forming the time vector of the high similarity sequence data set, and predicting the next time window based on the trend prediction model, including:
[0031] Each frequent item set generates a time window length and sliding step length independently, and segments the high-similarity sequence data into symbol sequences based on the time window length and sliding step length, and calculates the probability of occurrence of the symbol pattern of the frequent item set corresponding to the time window length in the segmented sequence symbols;
[0032] Time vectors of high similarity sequence data sets based on probability values as frequent itemsets with the same number of symbolic patterns;
[0033] A trend prediction model is built based on the LSTM network, including an input layer, a hidden layer, and an output layer. The input layer inputs the time vector data of a high-similarity sequence data set, the hidden layer uses LSTM units to process and identify data features, and the output layer outputs the predicted value of the next time window.
[0034] Use the training set data to train the model, select the cross entropy loss function to calculate the computational loss between the category probability of trend prediction and the actual label, use the Adam optimizer for gradient descent optimization, update the parameters of the trend prediction model, and stop iterating and outputting the model parameters if the model loss no longer decreases significantly during continuous iterations;
[0035] Use the newly calculated time vector of the high-similarity sequence data set to input the model and output the probability prediction value of the next time window.
[0036] As a preferred solution of the intelligent analysis method of gas station operation data of the present invention, the generation of a priority list based on prediction and the construction of a high probability event list include:
[0037] According to the predicted probability prediction value of the next time window and the corresponding frequent item sets, they are sorted from high to low to obtain a priority list;
[0038] The sum of the mean and standard deviation of the historical probability prediction values is used as the priority threshold. If the probability prediction value is greater than the priority threshold, the corresponding frequent item set is judged to be a high-probability event, and a high-probability event list is constructed.
[0039] As a preferred solution of the intelligent analysis method of gas station operation data of the present invention, the visual display includes:
[0040] Use secure transmission protocol HTTPS to encrypt high-probability event list data and transmit it securely;
[0041] Data is backed up in the cloud based on wireless transmission technology, and high-probability event list data is transmitted to the visualization terminal, where it is visualized by drawing charts using graphical tools.
[0042] In a second aspect, the present invention provides a system for an intelligent analysis method of gas station operation data, comprising:
[0043] Data collection and processing module, collects gas station related data and pre-processes the collected data;
[0044] The symbolic sequence generation module generates a symbolic sequence for the preprocessed data using the symbolic approximate aggregation SAX algorithm;
[0045] The similarity calculation module uses the dynamic time warping (DTW) algorithm to calculate the similarity between symbolized sequences, construct a cumulative error matrix, and backtrack the optimal alignment path to obtain the dynamic time warping distance.
[0046] The frequent pattern extraction module uses the Apriori algorithm to extract frequent patterns from high-similarity sequence data sets, calculates support values and filters frequent item sets to determine the corresponding time span sets;
[0047] The probability calculation module segments the high-similarity symbol sequence, calculates the probability of occurrence of the symbol pattern, and constructs the time vector of the high-similarity sequence data set for the trend prediction model;
[0048] The event list module calculates the priority threshold based on the historical probability mean and standard deviation to filter out high-probability events;
[0049] Visual display module, which displays the high-probability event list and priority list through graphical tools;
[0050] The data transmission module uses the HTTPS protocol to encrypt the data transmission and backup of the high-probability event list.
[0051] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the intelligent analysis method of gas station operation data as described in the first aspect of the present invention.
[0052] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the intelligent analysis method for gas station operation data as described in the first aspect of the present invention.
[0053] The beneficial effects of the present invention are as follows: by applying the symbolic approximate aggregation algorithm SAX, continuous time series are converted into discrete symbol sequences, which significantly reduces data complexity and retains the trend characteristics of the original data; symbol quantile intervals are generated by the cumulative distribution function CDF of the Gaussian distribution and the inverse cumulative distribution function of the standard normal distribution, so that the symbolization process has a strict statistical basis; frequent patterns are extracted using the Apriori algorithm through high-similarity sequence data sets, and hidden laws and association patterns in time series data can be systematically discovered; frequent pattern extraction and support calculation based on a single symbol can quantify the importance of each symbol; by independently generating a time window length and a sliding step for each frequent item set, a gas station can more accurately capture the dynamic change characteristics of frequent item sets and dynamically adjust the time window length and the sliding step. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0055] Figure 1 This is a flow chart of the intelligent analysis method for gas station operation data in Example 1.
[0056] Figure 2 This is a schematic diagram of the structure of the intelligent analysis system for gas station operation data in Example 1. DETAILED DESCRIPTION
[0057] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0058] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0059] 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 term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0060] Embodiment 1:
[0061] Reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, provides an intelligent analysis method for gas station operation data, including the following steps:
[0062] S1, collect gas station data for preprocessing, use the symbolic approximate aggregation SAX algorithm to generate symbolic sequence data for the preprocessed data, use the dynamic time warping DTW algorithm to calculate the similarity of the symbolic sequence data, and construct a cumulative error matrix, backtrack the optimal alignment path, and obtain high-similarity sequence data;
[0063] Preferably, collecting gas station data for preprocessing includes:
[0064] Collect site data based on gas stations, including fuel quantity, inventory, and equipment status;
[0065] Collect external data based on the gas station environment, including real-time traffic flow data and weather conditions data;
[0066] Compile statistics on user behavior data, including payment methods and refueling preferences;
[0067] Deploy edge devices at sites to collect data in real time, and perform data alignment and standardization based on timestamps.
[0068] By collecting data on fueling volume, inventory, and equipment status in real time, gas stations can accurately grasp the current status of operations and allocate resources more reasonably during peak hours. By collecting data on traffic flow and weather conditions, gas stations can predict future fueling demand. By analyzing user payment methods and fueling preferences, gas stations can identify customer behavior characteristics. By deploying edge devices to process collected data in real time and using timestamp alignment to ensure consistency between data sources, gas stations can grasp operational dynamics in real time and provide support for rapid response to emergencies. In addition, by standardizing multi-dimensional data and eliminating differences in different data units, analysis is more accurate.
[0069] Furthermore, the symbolic approximate aggregation SAX algorithm is used to generate symbolic sequence data for the preprocessed data, the dynamic time warping DTW algorithm is used to calculate the similarity of the symbolic sequence data, and the cumulative error matrix is constructed to trace back the optimal alignment path to obtain high-similarity sequence data, including:
[0070] Use sliding windows to segment the collected time series including site data, external data, and user behavior data;
[0071] Use the symbolic approximate aggregation algorithm SAX to perform segmented aggregation approximation PAA calculation on each segmented data to obtain the segmented mean vector of the segmented data ;
[0072] According to the number of symbols in a predefined symbol set, such as (A, B, C, D...), the number of quantile intervals is determined, the probability interval of each quantile interval is calculated using the cumulative distribution function CDF of the Gaussian distribution, and the upper boundary value and the lower boundary value of the corresponding symbol quantile interval of the probability interval are calculated using the inverse cumulative distribution function of the standard normal distribution according to the upper boundary probability value and the lower boundary probability value of the probability interval;
[0073] Piecewise mean vector The value of is subjected to distribution normalization, each element of the normalized segmented mean vector is mapped to a symbol in the symbol set according to the quantile interval of the Gaussian distribution, and symbolized sequence data is generated;
[0074] Use dynamic time warping (DTW) to calculate the similarity of symbolic sequence data and construct a cumulative error matrix D of size , where m and n are the lengths of the two symbolized sequence data segments X and Y respectively, and each element of the cumulative error matrix represents the cumulative error of the two symbolized sequence data segments X and Y;
[0075] By backtracking the cumulative distance matrix, returning to the starting point along the path with the minimum cumulative distance, the optimal alignment path is obtained, and the cumulative error point pair data of the optimal alignment path is used as the dynamic time warping distance value of the symbolized sequence data of the two segments X and Y;
[0076] Traverse each symbolized sequence data, perform dynamic time warping DTW on each pair, calculate the dynamic time warping distance, form a similarity matrix M, and use the sum of the historical mean and standard deviation of the calculated dynamic time warping distance as the similarity threshold. If the dynamic time warping distance is less than or equal to the similarity threshold, the corresponding two segments of symbolized sequence data are judged to be high-similarity sequence data.
[0077] By using a sliding window to segment site data, external data, and user behavior data into time series, the dynamic changes of data in different time periods can be captured, ensuring that important time characteristics are not missed during the analysis process. The application of the symbolic approximate aggregation algorithm SAX converts continuous time series into discrete symbolic sequences, significantly reducing data complexity and retaining the trend characteristics of the original data. The symbolic quantile intervals are generated by the cumulative distribution function CDF of the Gaussian distribution and the inverse cumulative distribution function of the standard normal distribution, so that the symbolization process has a strict statistical basis. The normalization of the segmented mean vector and the mapping of the quantile intervals ensure the consistency and comparability of different data dimensions. The generation of symbolic sequences further enhances the efficiency of large-scale data analysis. The dynamic time warping DTW method calculates the similarity of symbolic sequences. Through the backtracking of the cumulative error matrix and the optimal alignment path, the algorithm can accurately align the time dynamic changes of two segments of data, effectively solving the problem of different lengths or nonlinear changes in time series, making similarity analysis of complex time series possible. By constructing the similarity matrix, high-similarity sequences can be identified, providing clear guidance for mining potential patterns.
[0078] S2, using the Apriori algorithm to extract frequent patterns of high-similarity sequence data from high-similarity sequence data sets, calculate support values and filter frequent item sets, and count the time span sets of frequent item set elements;
[0079] Preferably, the Apriori algorithm is used to extract frequent patterns of high-similarity sequence data from a high-similarity sequence data set, calculate support values and filter frequent item sets, and count the time span sets of frequent item set elements, including:
[0080] Based on the high similarity sequence data set, the Apriori algorithm is used to extract frequent patterns. The single symbol set in the high similarity sequence data set is used as the candidate set. Based on each single symbol in the candidate set, the ratio of the number of times different symbols appear in all sequences to the total length of all symbolized sequences is calculated as the support value, which is expressed as:
[0081] ;
[0082] in represents the support value of candidate set X, represents the total number of times the candidate set X appears in the entire symbol sequence data set, Represents the total length of all symbolized sequences;
[0083] Based on the sum of the mean and standard deviation of the historical support values as the support threshold, if the support value of a single symbol is greater than or equal to the support threshold, the single symbol is judged to belong to the frequent itemset;
[0084] Based on the single symbols of the frequent item set, two-by-two combinations are made as the candidate sets of the two-symbol pattern, the support is repeatedly calculated and the two-symbol frequent item sets are screened, and the expansion is stopped when no new frequent patterns are generated, and the frequent item sets of different numbers of symbol patterns are determined;
[0085] The time span of each frequent item set element is counted to form a time span set for the frequent item set;
[0086] The interquartile range of the time span set was calculated, and outlier time span values were eliminated using the box plot method;
[0087] The median time span of the time span set is used as the time window length of the corresponding frequent item set, and half of the median time is taken as the sliding step size. The partially overlapping windows can capture the dynamic characteristics of continuous changes and avoid missing short-term changes.
[0088] By using the Apriori algorithm to extract frequent patterns from high-similarity sequence data sets, we can systematically discover hidden laws and association patterns in time series data. Based on the frequent pattern extraction and support calculation of a single symbol, we can quantify the importance of each symbol and screen out patterns that are of significant significance to gas station operations. By constructing thresholds based on the historical mean and standard deviation of support, we can not only effectively avoid the impact of noise data on pattern recognition, but also ensure the stability and statistical significance of the screening results. The pairwise combination expansion and support calculation of frequent item sets can further extract more complex pattern combinations, providing a richer reference dimension for decision-making and the time-based analysis of frequent patterns. The time span set is counted and outliers are eliminated. The median time span and sliding step length calculation are combined to improve the rationality of the time window setting and enhance the ability to capture dynamic characteristics, ensuring sensitivity to short-term abnormal behaviors while not missing the analytical value of long-term trends. The dynamic adjustment of the time window length and sliding step length generated in the end supports accurate prediction and real-time response to future trends, allowing gas stations to optimize inventory replenishment plans, dynamically allocate human resources or adjust promotion time according to the extracted frequent patterns. This process, from data mining to pattern extraction to practical application, comprehensively improves the scientificity, accuracy and efficiency of decision-making.
[0089] The dynamic segmentation of sliding windows and the symbolic approximate aggregation algorithm SAX jointly improve the operability and versatility of time series data. The combination of dynamic time warping DTW and the Apriori algorithm realizes a seamless transition from data similarity analysis to regularity mining. DTW accurately aligns data sequences of different time scales, providing an accurate basis for frequent pattern extraction. The similarity matrix of DTW combined with frequent patterns can capture long-term and short-term trends in different time periods. The combination of high-similarity sequences and frequent patterns not only identifies local similarity characteristics, but also reveals global symbolic associations. The high-similarity data filtered by DTW reduces the computational burden of the Apriori algorithm and optimizes mining efficiency.
[0090] S3, segmenting the high similarity sequence data into symbol sequences based on the time span set, calculating the probability of occurrence of symbol patterns, forming a time vector of the high similarity sequence data set, and predicting the next time window based on the trend prediction model;
[0091] Preferably, the high similarity sequence data is segmented into symbol sequences based on the time span set, the probability of occurrence of symbol patterns is calculated, the time vector of the high similarity sequence data set is formed, and the next time window is predicted based on the trend prediction model, including:
[0092] Each frequent item set generates a time window length and sliding step length independently, and segments the high similarity sequence data into symbol sequences based on the time window length and sliding step length, and calculates the probability of occurrence of the symbol pattern of the frequent item set corresponding to the time window length in the segmented sequence symbol, which is expressed as:
[0093] ;
[0094] in Indicates that in the time window The probability value of the frequent item set X in , Represents the frequent item set X in the time window The number of occurrences of Represented as a time window Length:
[0095] Time vectors of high similarity sequence data sets based on probability values as frequent itemsets with the same number of symbolic patterns;
[0096] A trend prediction model is built based on the LSTM network, including an input layer, a hidden layer, and an output layer. The input layer inputs the time vector data of a high-similarity sequence data set, the hidden layer uses LSTM units to process and identify data features, and the output layer outputs the predicted value of the next time window.
[0097] Use the training set data to train the model, select the cross entropy loss function to calculate the computational loss between the category probability of trend prediction and the actual label, use the Adam optimizer for gradient descent optimization, update the parameters of the trend prediction model, and stop iterating and outputting the model parameters if the model loss no longer decreases significantly during continuous iterations;
[0098] Use the newly calculated time vector of the high-similarity sequence data set to input the model and output the probability prediction value of the next time window.
[0099] By independently generating the time window length and sliding step size for each frequent item set, the gas station can more accurately capture the dynamic change characteristics of the frequent item set. The dynamic adjustment of the time window length and sliding step size avoids the defects of fixed windows that may miss short-term characteristics or fail to capture long-term trends, thereby more accurately reflecting the behavior of different patterns in time series. The calculation of the probability of occurrence of symbolic patterns lays the foundation for generating time vectors for high-similarity sequence data. The performance of the pattern in different time windows is quantified by probability values. Combined with time vectors, the spatiotemporal characteristics of frequent patterns can be more clearly displayed. By building a trend prediction model based on LSTM, the gas station can use time vector input to identify the short-term dynamics and long-term dependencies of the data. The memory capacity of the LSTM unit enables the model to accurately capture the trend of data changes.
[0100] The frequent item set segmentation and symbol pattern probability calculation based on time span not only reveal the regularity of data patterns, but also capture more fine-grained dynamic characteristics through dynamic time windows and sliding steps. Through long-term statistics on the probability of symbol pattern occurrence, a periodic optimization plan can be formulated. The time vector generated by the high-similarity sequence data set provides the probability prediction value of the next time window through the trend prediction model. Combined with priority sorting and the generation of a high-probability event list, the prediction results are directly converted into operational decisions. By inputting the model with time vectors across sites, the linkage effect of refueling demand in the region can be predicted. From data segmentation to symbolization, from similarity calculation to frequent pattern mining, and then to dynamic adjustment of time span, each step optimizes the accuracy and efficiency of data analysis, and can adapt to the complex environment of multi-dimensional, multi-source, and multi-time-varying data. It can play a role in multiple scenarios such as inventory management, user behavior analysis, and equipment status monitoring of gas station operations. The high-quality frequent patterns and time characteristics finally generated provide managers with intuitive data insights and improve the scientificity and accuracy of gas station operation management.
[0101] S4, generates a priority list based on the prediction, and builds a list of high-probability events for visual display;
[0102] Preferably, a priority list is generated based on the predictions, and a list of high probability events is constructed, including:
[0103] According to the predicted probability prediction value of the next time window and the corresponding frequent item sets, they are sorted from high to low to obtain a priority list;
[0104] The sum of the mean and standard deviation of the historical probability prediction values is used as the priority threshold. If the probability prediction value is greater than the priority threshold, the corresponding frequent item set is judged to be a high-probability event, and a high-probability event list is constructed.
[0105] By sorting according to the probability prediction value of the next time window and the corresponding frequent item sets, the priority list intuitively shows the patterns that may occur in the future and their importance. The sorting method of high-probability pattern priority ensures the rational allocation of limited resources (such as inventory, equipment, and personnel), allowing gas stations to prepare in advance for potential high-demand scenarios and improve operational efficiency.
[0106] Further, a visual display is performed, including:
[0107] Use secure transmission protocol HTTPS to encrypt high-probability event list data and transmit it securely;
[0108] Data is backed up in the cloud based on wireless transmission technology, and high-probability event list data is transmitted to the visualization terminal, where it is visualized by drawing charts using graphical tools.
[0109] By using the HTTPS encryption protocol to encrypt and transmit the high-probability event list data, the security of the data during transmission is ensured. Through the secure encryption of HTTPS, managers can safely share data between different terminals to avoid business risks caused by information leakage. Cloud backup based on wireless transmission technology can realize real-time data storage and disaster recovery functions, ensuring that the high-probability event list can still be accessed through the cloud even when local equipment fails. The high-probability event list is visualized through graphical tools, which can intuitively present the prediction results and priorities, helping managers quickly understand the rules and trends behind the data.
[0110] This embodiment also provides a system for an intelligent analysis method of gas station operation data, including:
[0111] Data collection and processing module, collects gas station related data and pre-processes the collected data;
[0112] The symbolic sequence generation module generates a symbolic sequence for the preprocessed data using the symbolic approximate aggregation SAX algorithm;
[0113] The similarity calculation module uses the dynamic time warping (DTW) algorithm to calculate the similarity between symbolized sequences, construct a cumulative error matrix, and backtrack the optimal alignment path to obtain the dynamic time warping distance.
[0114] The frequent pattern extraction module uses the Apriori algorithm to extract frequent patterns from high-similarity sequence data sets, calculates support values and filters frequent item sets to determine the corresponding time span sets;
[0115] The probability calculation module segments the high-similarity symbol sequence, calculates the probability of occurrence of the symbol pattern, and constructs the time vector of the high-similarity sequence data set for the trend prediction model;
[0116] The event list module calculates the priority threshold based on the historical probability mean and standard deviation to filter out high-probability events;
[0117] Visual display module, which displays the high-probability event list and priority list through graphical tools;
[0118] The data transmission module uses the HTTPS protocol to encrypt the data transmission and backup of the high-probability event list.
[0119] This embodiment also provides a computer device suitable for the case of an intelligent analysis method for gas station operation data, including: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the intelligent analysis method for gas station operation data proposed in the above embodiment.
[0120] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0121] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the intelligent analysis method for gas station operation data proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0122] In summary, the present invention converts continuous time series into discrete symbol sequences by applying the symbolic approximate aggregation algorithm (SAX), which significantly reduces data complexity and retains the trend characteristics of the original data. The symbol quantile intervals are generated by the cumulative distribution function (CDF) of the Gaussian distribution and the inverse cumulative distribution function of the standard normal distribution, so that the symbolization process has a strict statistical basis. The Apriori algorithm is used to extract frequent patterns from high-similarity sequence data sets, which can systematically discover hidden laws and association patterns in time series data. Frequent pattern extraction and support calculation based on a single symbol can quantify the importance of each symbol and screen out patterns that are of significant significance to the operation of gas stations. By independently generating a time window length and a sliding step for each frequent item set, the gas station can more accurately capture the dynamic change characteristics of frequent item sets and dynamically adjust the time window length and the sliding step.
[0123] Embodiment 2:
[0124] This is the second embodiment of the present invention. In order to further verify the technical solution of the present invention, experimental simulation data of the intelligent analysis method of gas station operation data is provided.
[0125] Collect the operation data of the gas station, extract the main numerical columns (including fuel quantity, inventory, and traffic flow) from the simulated collected data, segment them according to the sliding window parameters, and calculate the mean of each segment of data, as shown in the following table:
[0126] Table 1. Segment data table
[0127] Window Number Time range (minutes) Average refueling value (liters) Average inventory volume (liters) Average traffic volume (vehicles / minute) 1 01.00-05.00 18.74 1102.86 85.96 2 02.00-07.00 19.12 1098.45 83.32 3 04.00-09.00 20.65 1111.32 79.43 4 06.00-11.00 17.21 1105.87 82.14 5 08.00-13.00 16.84 1096.45 77.85
[0128] Determine the mean vector for each segment of data and determine four equal probability intervals through the cumulative distribution function of the Gaussian distribution, [0, 0.25], [0.25, 0.5], [0.5, 0.75], [0.75, 1], and calculate the mean vector for each segment of data, as shown in the following table:
[0129] Table 2. Mean vector data table
[0130] Window Number Mean vector 1 [0.31, 0.72, 0.55] 2 [0.38, 0.66, 0.51] 3 [0.45, 0.78, 0.49] 4 [0.29, 0.70, 0.52] 5 [0.26, 0.63, 0.48]
[0131] The values of the mean vector are mapped to a symbol set, and the symbol is determined according to the quantile interval, represented as sequence 1: [B, D, C], sequence 2: [B, C, C], sequence 3: [C, D, C], sequence 4: [B, D, C], sequence 5: [A, C, B];
[0132] Taking sequence 1 and sequence 2 as examples, an error matrix is constructed, and the matrix value of the symbol matching is set to 0, and the matrix value of the symbol mismatch is set to 1. The data of the cumulative error is shown in the following table:
[0133] Table 3. Cumulative error data table
[0134] Matrix Indexing Cumulative error D[0,0] 0 D[0,1] 1 D[0,2] 2 D[1,0] 1 D[1,1] 1 D[1,2] 2 D[2,0] 2 D[2,1] 2 D[2,2] 2
[0135] The optimal alignment path along the path with the minimum cumulative error back to the starting point is: [(2,2), (1,1), (0,0)];
[0136] Calculate the DTW distance between each pair, determine the similarity threshold based on historical data, and determine the high-similarity sequence pairs, as shown in the following table:
[0137] Table 4. High similarity sequence list
[0138] Symbol Sequence Dynamic Time Warping Distance Determine whether the similarity is high Sequence 1, Sequence 2 1 yes Sequence 1, Sequence 3 2 yes Sequence 1, Sequence 4 0 yes Sequence 1, Sequence 5 3 no sequence 2, sequence 3 1 yes Sequence 2, Sequence 4 1 yes Sequence 2, Sequence 5 2 yes
[0139] The final high-similarity symbol sequence is 1, 2, 3, and 4. The number of times each symbol appears is counted, including the number of symbol appearances: symbol B: 3 times (1 time in sequence 1, 2, and 4 respectively), symbol C: 6 times (1, 2, 2, and 1 times in sequence 1, 2, 3, and 4 respectively), symbol D: 3 times (1 time in sequence 1, 3, and 4 respectively), and the support is calculated, as shown in the following table:
[0140] Table 5. Single symbol support value table
[0141] symbol Occurrence Support value B 3 0.25 C 6 0.5 D 3 0.25
[0142] Based on the support threshold, filter the symbol C as a frequent single symbol item;
[0143] Construct a candidate set of two-symbol patterns and calculate the support. The selected symbol pairs are [C, C], [C, D], and [C, B]. [C, C] appears once in sequence 2 and sequence 3, [C, D] appears once in sequence 1, and [C, B] appears once in sequence 4. The support values of [C, C], [C, D], and [C, B] are 0.5, 0.25, and 0.25, respectively. Based on the support threshold, the symbol [C, C] is selected as a frequent two-symbol item.
[0144] The statistical symbol pair [C, C] appears in sequence 2, with a time span of 4 minutes, a time window length of 3.5 minutes, and a sliding step length of 1.75 minutes;
[0145] The symbol sequence is segmented based on a time window length of 3.5 minutes and a sliding step of 1.75 minutes. The number of symbols contained in each segment is the time window length rounded up (4 symbols). The segmentation results are shown in the table below:
[0146] Table 6. Segment symbol sequence table
[0147] Sequence number Segment symbol sequence 1 [B,D,C,B] 2 [B,C,C,B] 3 [C,D,C,C] 4 [B,D,C,C]
[0148] Calculate the probability of occurrence of symbolic patterns of frequent itemsets in the segment;
[0149] Symbol item set [C]: Window 1: appears 2 times, probability value 0.5;
[0150] Window 2: appears 3 times, with a probability value of 0.75;
[0151] Window 3: appears 3 times, with a probability value of 0.75;
[0152] Window 4: appears 2 times, with a probability of 0.5;
[0153] Symbolic item set [C,C]: Window 1: appears 0 times, probability value 0.0;
[0154] Window 2: appears once, with a probability of 0.25;
[0155] Window 3: appears once, with a probability of 0.25;
[0156] Window 4: appears 0 times, probability value 0.0;
[0157] The probability value of each time window is used as a feature to generate the corresponding time vector and use the pre-trained LSTM model to predict the next time window;
[0158] Predict the symbol pattern probability value for the next time window:
[0159] The probability prediction value of the symbol item set [C] is 0.65. The probability of the symbol C is high, indicating that the demand for refueling may remain stable in the future without extreme demand growth or decline;
[0160] The probability prediction value of the symbol item set [C, C] is 0.15. The low prediction probability (0.15) further verifies that the persistence of symbol C may be low in the short term, that is, there may be short-term fluctuations;
[0161] The scheme converts complex time series data into symbolic sequences through symbolization, which reduces the computational complexity while retaining the trend characteristics of the data. Combined with the symbolization results of the previously collected data, the predicted values have direct guiding significance for actual scenarios such as inventory management, equipment maintenance, and user service optimization. The scheme provides accurate trend judgment and decision support in gas station operations, and has good practicality and reliability.
[0162] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. An intelligent analysis method for gas station operation data, characterized in that: include: Collect gas station data for preprocessing, use the symbolic approximate aggregation SAX algorithm to generate symbolic sequence data from the preprocessed data, use the dynamic time warping DTW algorithm to calculate the similarity of the symbolic sequence data, and construct a cumulative error matrix to trace back the optimal alignment path to obtain high-similarity sequence data; Use the Apriori algorithm to extract frequent patterns of high-similarity sequence data from high-similarity sequence data sets, calculate support values and filter frequent item sets, and count the time span sets of frequent item set elements; Based on the time span set, the high-similarity sequence data is segmented into symbol sequences, the probability of occurrence of symbol patterns is calculated, the time vector of the high-similarity sequence data set is formed, and the next time window is predicted based on the trend prediction model; Generate a priority list based on the predictions and build a list of high-probability events for visual display; The collecting and preprocessing of gas station data includes: Collect site data based on gas stations, including fuel quantity, inventory, and equipment status; Collect external data based on the gas station environment, including real-time traffic flow data and weather conditions data; Compile statistics on user behavior data, including payment methods and refueling preferences; Deploy edge devices at sites to collect data in real time, and perform data alignment and standardization based on timestamps; The method uses the symbolic approximate aggregation SAX algorithm to generate symbolic sequence data from the preprocessed data, uses the dynamic time warping DTW algorithm to calculate the similarity of the symbolic sequence data, constructs a cumulative error matrix, and traces back the optimal alignment path to obtain high-similarity sequence data, including: Use sliding windows to segment the collected time series including site data, external data, and user behavior data; Use the symbolic approximate aggregation algorithm SAX to perform segmented aggregation approximation PAA calculation on each segmented data to obtain the segmented mean vector of the segmented data ; Determine the number of quantile intervals according to the number of symbols in the predefined symbol set, use the cumulative distribution function CDF of the Gaussian distribution to calculate the probability interval of each quantile interval, and use the inverse cumulative distribution function of the standard normal distribution to calculate the upper boundary value and the lower boundary value of the corresponding symbol quantile interval of the probability interval according to the upper boundary probability value and the lower boundary probability value of the probability interval; Piecewise mean vector The value of is subjected to distribution normalization, each element of the normalized segmented mean vector is mapped to a symbol in the symbol set according to the quantile interval of the Gaussian distribution, and symbolized sequence data is generated; Use dynamic time warping (DTW) to calculate the similarity of symbolic sequence data and construct a cumulative error matrix D of size , where m and n are the lengths of the two symbolized sequence data segments X and Y respectively, and each element of the cumulative error matrix represents the cumulative error of the two symbolized sequence data segments X and Y; By backtracking the cumulative distance matrix, returning to the starting point along the path with the minimum cumulative distance, the optimal alignment path is obtained, and the cumulative error point pair data of the optimal alignment path is used as the dynamic time warping distance value of the symbolized sequence data of the two segments X and Y; Traverse each symbolized sequence data, perform dynamic time warping DTW on each pair, calculate the dynamic time warping distance, form a similarity matrix M, and use the sum of the historical mean and standard deviation of the calculated dynamic time warping distance as the similarity threshold. If the dynamic time warping distance is less than or equal to the similarity threshold, the corresponding two segments of symbolized sequence data are judged to be high-similarity sequence data.
2. The intelligent analysis method for gas station operation data according to claim 1, characterized in that: The method uses the Apriori algorithm to extract frequent patterns of high-similarity sequence data from a high-similarity sequence data set, calculates support values and filters frequent item sets, and counts the time span set of frequent item set elements, including: Based on the high similarity sequence data set, the Apriori algorithm is used to extract frequent patterns. The single symbol set in the high similarity sequence data set is used as the candidate set. Based on each single symbol in the candidate set, the ratio of the number of times different symbols appear in all sequences to the total length of all symbolized sequences is calculated as the support value. Based on the sum of the mean and standard deviation of the historical support values as the support threshold, if the support value of a single symbol is greater than or equal to the support threshold, the single symbol is judged to belong to the frequent itemset; Based on the single symbols of the frequent item set, two-by-two combinations are made as the candidate sets of the two-symbol pattern, the support is repeatedly calculated and the two-symbol frequent item sets are screened, and the expansion is stopped when no new frequent patterns are generated, and the frequent item sets of different numbers of symbol patterns are determined; The time spans of the elements of each frequent item set are counted to form a time span set for the frequent item set.
3. The intelligent analysis method for gas station operation data according to claim 2, characterized in that: The method includes segmenting the high-similarity sequence data into symbol sequences based on the time span set, calculating the probability of occurrence of symbol patterns, forming a time vector of the high-similarity sequence data set, and predicting the next time window based on the trend prediction model, including: Each frequent item set generates a time window length and sliding step length independently, and segments the high-similarity sequence data into symbol sequences based on the time window length and sliding step length, and calculates the probability of occurrence of the symbol pattern of the frequent item set corresponding to the time window length in the segmented sequence symbols; Time vectors of high similarity sequence data sets based on probability values as frequent itemsets with the same number of symbolic patterns; A trend prediction model is built based on the LSTM network, including an input layer, a hidden layer, and an output layer. The input layer inputs the time vector data of a high-similarity sequence data set, the hidden layer uses LSTM units to process and identify data features, and the output layer outputs the predicted value of the next time window. Use the training set data to train the model, select the cross entropy loss function to calculate the computational loss between the category probability of trend prediction and the actual label, use the Adam optimizer for gradient descent optimization, update the parameters of the trend prediction model, and stop iterating and outputting the model parameters if the model loss no longer decreases significantly during continuous iterations; Use the newly calculated time vector of the high-similarity sequence data set to input the model and output the probability prediction value of the next time window.
4. The intelligent analysis method for gas station operation data according to claim 3, characterized in that: The method generates a priority list based on the prediction and constructs a list of high-probability events, including: According to the predicted probability prediction value of the next time window and the corresponding frequent item sets, they are sorted from high to low to obtain a priority list; The sum of the mean and standard deviation of the historical probability prediction values is used as the priority threshold. If the probability prediction value is greater than the priority threshold, the corresponding frequent item set is judged to be a high-probability event, and a high-probability event list is constructed.
5. The intelligent analysis method for gas station operation data according to claim 4, characterized in that: The visual display includes: Use secure transmission protocol HTTPS to encrypt high-probability event list data and transmit it securely; Data is backed up in the cloud based on wireless transmission technology, and high-probability event list data is transmitted to the visualization terminal, where it is visualized by drawing charts using graphical tools.
6. A system for intelligent analysis of gas station operation data, based on the intelligent analysis of gas station operation data according to any one of claims 1 to 5, characterized in that: include: Data collection and processing module, collects gas station related data and pre-processes the collected data; The symbolic sequence generation module generates a symbolic sequence for the preprocessed data using the symbolic approximate aggregation SAX algorithm; The similarity calculation module uses the dynamic time warping (DTW) algorithm to calculate the similarity between symbolized sequences, construct a cumulative error matrix, and backtrack the optimal alignment path to obtain the dynamic time warping distance. The frequent pattern extraction module uses the Apriori algorithm to extract frequent patterns from high-similarity sequence data sets, calculates support values and filters frequent item sets to determine the corresponding time span sets; The probability calculation module segments the high-similarity symbol sequence, calculates the probability of occurrence of the symbol pattern, and constructs the time vector of the high-similarity sequence data set for the trend prediction model; The event list module calculates the priority threshold based on the historical probability mean and standard deviation to filter out high-probability events; Visual display module, which displays the high-probability event list and priority list through graphical tools; The data transmission module uses the HTTPS protocol to encrypt the data transmission and backup of the high-probability event list.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the intelligent analysis method for gas station operation data described in any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the intelligent analysis method for gas station operation data described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method for judging abnormal mode of transformer DGA online monitoring data
CN112800686A
Dynamic generation method for hydrological time series prediction model
CN114819260A
Long time sequence prediction method and system based on sequence decomposition and subsequence attention mechanism
CN116523109A