Gas station sales volume prediction method and device, electronic equipment and storage medium

By adopting the attention mechanism and time series prediction model in gas station sales forecasting and extracting the time period characteristics of gas station historical sales data, the problem of coarse-grained prediction is solved, the fine-grainedness and accuracy are improved, and precise transportation scheduling support is provided.

CN120689086APending Publication Date: 2025-09-23CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410337602.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-23
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

The existing gas station sales forecasting methods are usually coarse-grained forecasts that cannot provide accurate transportation scheduling basis, resulting in gas stations being out of oil or having too much inventory.

Method used

A feature extraction model based on the attention mechanism and a time series prediction model are used to extract the hourly time features from the historical sales data of gas stations. The data is then processed through a convolutional neural network and a Sigmoid function to predict future sales data.

Benefits of technology

It achieves hourly fine-grained sales forecasts, improves forecast accuracy, and provides accurate decision-making guidance for refined oil distribution plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689086A_ABST
    Figure CN120689086A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a gas station sales volume prediction method and device, electronic equipment and a storage medium, and the method comprises the steps: firstly obtaining historical sales volume data of a target type of oil product of a target gas station; then, on the basis of a feature extraction model, adopting an attention mechanism to extract hour-by-hour target time period sales volume features with time period sales volume characteristics in historical sales volume data; and finally, based on a time sequence prediction model, applying historical sales volume data and sales volume characteristics of the target time period to predict future sales volume data of the target type of oil in the target gas station. According to the method, the hour-by-hour target time period sales volume characteristics with time period sales volume characteristics are extracted, hour-by-hour fine-grained sales volume prediction can be realized, the prediction fine-grained and accuracy are considered, accurate decision guidance is provided for formulating a refined oil product distribution plan, and more accurate and meticulous data guidance is provided for enterprise operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a gas station sales forecasting method, device, electronic equipment and storage medium. Background Art

[0002] Secondary refined oil logistics refers to the transportation of oil products from oil depots to gas stations and is a crucial component of refined oil logistics. Forecasting future gas station sales plays a crucial role in the transportation and scheduling of secondary refined oil logistics.

[0003] Currently, the method for predicting gas station sales is usually coarse-grained prediction, which cannot provide an accurate basis for the transportation scheduling of secondary logistics of refined oil products. It is very likely that gas stations will run out of oil or have too much inventory, which is not conducive to practical application. Summary of the Invention

[0004] The present invention provides a gas station sales forecasting method, device, electronic equipment and storage medium to solve the defects in the prior art.

[0005] The present invention provides a gas station sales forecasting method, comprising:

[0006] Obtain historical sales data of target type of oil products at target gas stations;

[0007] Based on the feature extraction model, an attention mechanism is used to extract the hourly target period sales features with period sales characteristics from the historical sales data;

[0008] Based on the time series forecasting model, the historical sales data and the sales characteristics of the target period are applied to predict the future sales data of the target type of oil product at the target gas station.

[0009] According to a gas station sales forecasting method provided by the present invention, the feature extraction model is based on an attention mechanism to extract hourly target period sales features with period sales characteristics from the historical sales data, including:

[0010] Extracting hourly initial period sales features of the historical sales data based on the convolutional neural network in the feature extraction model;

[0011] Based on the Sigmoid function, the sales characteristics of the initial period are processed to obtain the hourly attention coefficient;

[0012] Based on the attention coefficient and the sales characteristics of the initial time period, the sales characteristics of the target time period are obtained.

[0013] According to a gas station sales prediction method provided by the present invention, obtaining the target period sales characteristics based on the attention coefficient and the initial period sales characteristics includes:

[0014] The attention coefficient is correspondingly multiplied by the sales characteristics of the initial time period, and the multiplication result is superimposed on the sales characteristics of the initial time period to obtain the sales characteristics of the target time period.

[0015] According to a gas station sales forecasting method provided by the present invention, the feature extraction model is based on an attention mechanism to extract hourly target period sales features with period sales characteristics from the historical sales data, including:

[0016] Arranging the historical sales data in a matrix by date and time period to obtain a two-dimensional matrix of the historical sales data; each column of the two-dimensional matrix has the same time period of historical sales data;

[0017] The two-dimensional matrix is ​​input into the feature extraction model, and the feature extraction model uses an attention mechanism to extract the sales features of the target period.

[0018] According to a gas station sales forecasting method provided by the present invention, the method is based on a time series forecasting model and applies the historical sales data and the sales characteristics of the target period to forecast future sales data of the target type of oil product at the target gas station, including:

[0019] The historical sales data and the sales characteristics of the target period are spliced ​​together, and the spliced ​​result is input into the time series forecasting model, and the time series forecasting model outputs the future sales data.

[0020] According to a gas station sales forecasting method provided by the present invention, the feature extraction model and the time series forecasting model are jointly trained based on historical sales data samples of different types of oil products at different gas stations;

[0021] Alternatively, the feature extraction model and the time series prediction model are jointly trained based on historical sales data samples of the target type of oil product at the target gas station.

[0022] The present invention also provides a gas station sales forecasting device, comprising:

[0023] A historical sales data acquisition module is used to obtain historical sales data of target type of oil products at target gas stations;

[0024] A time period sales feature extraction module is used to extract hourly target time period sales features with time period sales characteristics from the historical sales data based on a feature extraction model and using an attention mechanism;

[0025] The future sales data prediction module is used to predict the future sales data of the target type of oil at the target gas station based on the time series prediction model and applying the historical sales data and the sales characteristics of the target period.

[0026] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the gas station sales prediction method as described above is implemented.

[0027] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the gas station sales prediction methods described above.

[0028] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for predicting gas station sales as described above is implemented.

[0029] The present invention provides a gas station sales forecasting method, device, electronic device, and storage medium. This method first obtains historical sales data for a target type of oil product at a target gas station. Then, based on a feature extraction model and employing an attention mechanism, it extracts hourly target period sales features from the historical sales data, which exhibit period sales characteristics. Finally, based on a time series forecasting model, it applies the historical sales data and target period sales features to forecast future sales data for the target type of oil product at the target gas station. By extracting hourly target period sales features with period sales characteristics, this method achieves fine-grained hourly sales forecasting, balancing both granularity and accuracy. This method provides accurate decision-making guidance for refined oil distribution planning and more accurate and detailed data guidance for business operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on the drawings in the following description without any creative work.

[0031] Figure 1 This is a graph showing actual gasoline sales at different gas stations over time;

[0032] Figure 2 This is a graph showing the actual diesel sales at different gas stations over time.

[0033] Figure 3 This is one of the flow charts of the gas station sales forecasting method provided by the present invention;

[0034] Figure 4 This is the second flow chart of the gas station sales forecasting method provided by the present invention;

[0035] Figure 5 It is a structural diagram of the gas station sales forecasting device provided by the present invention;

[0036] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0037] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0038] The terms "first" and "second" in the specification and claims of the present invention may explicitly or implicitly refer to one or more of the features. In the description of the invention, unless otherwise specified, "plurality" means two or more. Furthermore, the term "and / or" in the specification and claims refers to at least one of the connected items, and the character " / " generally indicates an "or" relationship between the connected items.

[0039] Collect the actual sales of different gas stations at different times of the day, and analyze the actual sales to draw a graph of the actual sales of gas stations over time. Figure 1 This is a graph showing the actual sales of gasoline at different gas stations over time. Figure 2 This is a graph showing the actual diesel sales at different gas stations changing over time. Figure 1 and Figure 2 Curves 1 to 4 correspond to four different gas stations. The following conclusions are drawn from the analysis:

[0040] 1) There are differences in the actual sales volume of the same oil product at different gas stations and at different times of the day, but the overall trends are similar.

[0041] 2) Sales trends vary between different oil products. The overall trend is: for gasoline, sales are lower in the early morning, and sales can reach the peak of the day during the morning and evening peak periods. For diesel, daytime sales are significantly higher than nighttime sales, and there are more obvious peak times (e.g. Figure 2 7 o'clock, 10 o'clock, etc.).

[0042] Existing gas station sales forecasting methods are typically coarse-grained, with a vague understanding of the time period's impact on sales. This makes it difficult to accurately predict the transportation and scheduling of secondary refined oil logistics. This can lead to gas stations running out of oil or experiencing excessive inventory, hindering practical application. Therefore, the present invention provides a gas station sales forecasting method that considers the impact of different time periods, enabling fine-grained prediction.

[0043] Figure 3 FIG. 1 is a flow chart of a gas station sales forecasting method provided in an embodiment of the present invention. Figure 3 As shown, the method includes:

[0044] S1, obtain the historical sales data of the target type of oil products at the target gas station;

[0045] S2, based on the feature extraction model, adopts the attention mechanism to extract the hourly target period sales features with period sales characteristics from the historical sales data;

[0046] S3, based on the time series forecasting model, applying the historical sales data and the sales characteristics of the target period, predicting the future sales data of the target type of oil product at the target gas station.

[0047] Specifically, the gas station sales prediction method provided in the embodiment of the present invention is executed by a gas station sales prediction device, which can be configured in a computer, which can be a local computer or a cloud computer. The local computer can be a computer, a tablet, etc., which is not specifically limited here.

[0048] First, step S1 is performed to obtain historical sales data for a target type of oil product at a target gas station. The target gas station may be a gas station for which future sales of the oil product need to be predicted. The target type of oil product may be a specific oil product type for which future sales forecast is needed, such as one or more of 92# gasoline, 95# gasoline, and 0# diesel.

[0049] The historical sales data may be hourly sales data within a first preset period of time. The first preset period of time may be set as needed, for example, to 24 hours, 48 ​​hours, etc., and is not specifically limited here.

[0050] Then, step S2 is executed to use the feature extraction model and the attention mechanism to extract the hourly target period sales features of the historical sales data with period sales characteristics.

[0051] The feature extraction model can be a feature extraction model based on the attention mechanism, which is an important component in machine learning and can extract target period sales features that are useful for prediction tasks from historical sales data.

[0052] Introducing the attention mechanism allows the feature extraction model to focus on more important information when extracting sales features for the target time period. The attention mechanism is an algorithm that mimics the human attention allocation mechanism. It allows the feature extraction model to assign more weight to more important components when processing historical sales data. In sales forecasting tasks, introducing the attention mechanism helps the feature extraction model better capture key information related to time-of-day sales characteristics in historical sales data. For example, the feature extraction model can learn that sales may exhibit specific patterns or trends during certain times of the day.

[0053] Finally, step S3 is executed to use the time series forecasting model to apply historical sales data and sales characteristics of the target period to predict the future sales data of the target type of oil at the target gas station.

[0054] The time series prediction model can be a long short-term memory network (Long Short-Term Memory, LSTM) or a Transformer structure, which is not specifically limited in the embodiments of the present invention.

[0055] Because gas station sales data is influenced by complex factors and exhibits significant volatility, the accuracy of future sales data predicted solely based on historical sales data needs to be improved. Therefore, in an embodiment of the present invention, historical sales data and target period sales characteristics are used as inputs to a time series forecasting model. The target period sales characteristics help the time series forecasting model capture sales characteristics across different time periods, enabling it to understand sales trends.

[0056] By processing historical sales data and sales characteristics during a target period using a time series forecasting model, future sales data for a target type of oil product at a target gas station can be output. Here, future sales data can be hourly sales data for a second preset period of time. The second preset period can be set as needed, for example, 24 hours, 12 hours, etc.

[0057] It can be understood that both the feature extraction model and the time series prediction model can be trained through training samples. Both can be applied only to the future sales forecast of the target type of oil products at the target gas station, or to the future sales forecast of all types of oil products in the target gas station, or to the future sales forecast of the target type of oil products in each gas station, depending on the selection of training samples.

[0058] The gas station sales forecasting method provided in an embodiment of the present invention first obtains historical sales data for a target type of oil product at a target gas station. Then, based on a feature extraction model and employing an attention mechanism, it extracts hourly target period sales features from the historical sales data, which exhibit period sales characteristics. Finally, based on a time series forecasting model, it applies the historical sales data and target period sales features to forecast future sales data for the target type of oil product at the target gas station. By extracting hourly target period sales features with period sales characteristics, this method achieves fine-grained hourly sales forecasting, balancing both granularity and accuracy. This provides accurate decision-making guidance for refined oil distribution planning and more accurate and detailed data guidance for business operations.

[0059] Based on the above embodiment, the feature extraction model uses an attention mechanism to extract hourly target period sales features with period sales characteristics from the historical sales data, including:

[0060] Extracting hourly initial period sales features of the historical sales data based on the convolutional neural network in the feature extraction model;

[0061] Based on the Sigmoid function, the sales characteristics of the initial period are processed to obtain the hourly attention coefficient;

[0062] Based on the attention coefficient and the sales characteristics of the initial time period, the sales characteristics of the target time period are obtained.

[0063] Specifically, the feature extraction model may include a convolutional neural network (CNN), and the convolution kernel used in the CNN may be a 3×3 convolution kernel, or a convolution kernel of other sizes.

[0064] When extracting sales characteristics for a target period, the feature extraction model can first use a convolutional neural network to extract the hourly initial period sales characteristics from historical sales data. This initial period sales characteristics are then processed using a sigmoid function to obtain hourly attention coefficients. This attention coefficient can be used as a numerical representation of the sales characteristics for that period.

[0065] Then, the sales characteristics of the target period can be obtained by using the hourly attention coefficient and the sales characteristics of the initial period. For example, the attention characteristics can be calculated using the hourly attention coefficient and the sales characteristics of the initial period, and then the sales characteristics of the target period can be obtained based on the attention characteristics and the sales characteristics of the initial period.

[0066] In the embodiment of the present invention, the Sigmoid function is used to implement the attention coefficient in the attention mechanism, which can fully mine the time period sales characteristics in the historical sales data, and thus make the sales characteristics of the target time period have the time period sales characteristics.

[0067] On the basis of the above embodiment, the target period sales characteristics are obtained based on the attention coefficient and the initial period sales characteristics, including:

[0068] The attention coefficient is correspondingly multiplied by the sales characteristics of the initial time period, and the multiplication result is superimposed on the sales characteristics of the initial time period to obtain the sales characteristics of the target time period.

[0069] Specifically, after obtaining the hourly attention coefficient through the Sigmoid function, the attention coefficient can be multiplied hourly by the initial period sales characteristics obtained by the convolutional neural network, which can be obtained through the operator After that, the multiplication result is superimposed on the sales characteristics of the initial period, which can be achieved through the operator The target period sales feature is achieved by obtaining the target period sales feature, which is a period sales feature with period sales characteristics.

[0070] Based on the above embodiment, the feature extraction model uses an attention mechanism to extract hourly target period sales features with period sales characteristics from the historical sales data, including:

[0071] Arranging the historical sales data in a matrix by date and time period to obtain a two-dimensional matrix of the historical sales data; each column of the two-dimensional matrix has the same time period of historical sales data;

[0072] The two-dimensional matrix is ​​input into the feature extraction model, and the feature extraction model uses an attention mechanism to extract the sales features of the target period.

[0073] Specifically, before using the feature extraction model to extract sales features for the target time period, the historical sales data can be normalized. Furthermore, to accommodate the input data format requirements of the convolutional neural network in the feature extraction model, the historical sales data is arranged in a matrix by date and time period, resulting in a two-dimensional matrix of historical sales data. Each column of this two-dimensional matrix represents the same time period, and each row of this two-dimensional matrix represents the same date. The number of rows in this two-dimensional matrix is ​​the same as the number of dates in the historical sales data, and the number of columns in this two-dimensional matrix is ​​the same as the number of time periods in the historical sales data.

[0074] It's understandable that dates are arranged by day, and time periods can be arranged as 24-hour periods, that is, from 0:00 to 23:00 each day. To ensure that the sales features for the target period output by the subsequent feature extraction model can be matched and spliced ​​with historical sales data, and to facilitate sales forecasts for the next 24 hours, the convolution kernel size used in the feature extraction model can be used to splice several adjacent time periods from the previous day before 0:00 each day, and several adjacent time periods from the next day after 23:00 each day.

[0075] For example, if the convolution kernel size is 3×3, the time before 0:00 of each day can be concatenated with the time at 23:00 of the previous day, and the time after 23:00 of each day can be concatenated with the time at 0:00 of the next day. In this case, the two-dimensional matrix has 26 columns.

[0076] Afterwards, the two-dimensional matrix can be input into the feature extraction model, which uses the attention mechanism to extract the sales features for the target period. The sales features for the target period can be n×24 in dimension, where n is the dimension of the sales features for each period.

[0077] In the embodiment of the present invention, by obtaining a two-dimensional matrix of historical sales data, it is possible to facilitate feature extraction by a feature extraction model, and to achieve the extraction of sales features for the target period on an hourly basis.

[0078] Based on the above embodiment, the time series forecasting model is used to apply the historical sales data and the sales characteristics of the target period to predict the future sales data of the target type of oil product at the target gas station, including:

[0079] The historical sales data and the sales characteristics of the target period are spliced ​​together, and the spliced ​​result is input into the time series forecasting model, and the time series forecasting model outputs the future sales data.

[0080] Specifically, in order to improve the prediction efficiency of the time series prediction model and reduce the difficulty of the time series prediction model in processing input data, the historical sales data and the sales characteristics of the target period can be concatenated (concat), which can achieve the correspondence between the period characteristics and the sales data, and help the time series prediction model better learn the changing trend of sales.

[0081] Afterwards, the spliced ​​results are input into the time series forecasting model, which can output future sales data.

[0082] On the basis of the above embodiment, the feature extraction model and the time series prediction model are jointly trained based on historical sales data samples of different types of oil products at different gas stations;

[0083] Alternatively, the feature extraction model and the time series prediction model are jointly trained based on historical sales data samples of the target type of oil product at the target gas station.

[0084] Specifically, the feature extraction model and time series prediction model used in the embodiments of the present invention can be jointly trained using historical sales data samples of different types of oil products at different gas stations. In this case, the feature extraction model and time series prediction model can be applied to predict future sales data of different types of oil products at different gas stations, making them more universal and applicable to a wider range of situations.

[0085] Furthermore, the feature extraction model and time series prediction model can be jointly trained using historical sales data samples of the target gas station's target oil type. In this case, the feature extraction model and time series prediction model can be applied to predict future sales data of the target oil type at the target gas station, achieving higher accuracy.

[0086] like Figure 4 As shown in the figure, the historical sales data of the target type of oil at the target gas station is first processed by a convolutional neural network to obtain the sales features of the initial period. The sales features of the initial period are then processed by the Sigmoid function to obtain the hourly attention coefficient.

[0087] Multiply the attention coefficient by the sales characteristics of the initial period hour by hour, such as Figure 4 Operators in Then, the multiplication result is superimposed with the sales characteristics of the initial period, such as Figure 4 Operators in Get the sales characteristics of the target period.

[0088] The historical sales data and the sales characteristics of the target period are concatenated, and the concatenated results are input into the time series forecasting model, which then outputs the future sales data.

[0089] like Figure 5 As shown, based on the above embodiment, an embodiment of the present invention provides a gas station sales forecasting device, including:

[0090] The historical sales data acquisition module 51 is used to acquire the historical sales data of the target type of oil products at the target gas station;

[0091] The time period sales feature extraction module 52 is configured to extract hourly target time period sales features having time period sales characteristics from the historical sales data using an attention mechanism based on a feature extraction model;

[0092] The future sales data prediction module 53 is used to predict the future sales data of the target type of oil product at the target gas station based on the time series prediction model and applying the historical sales data and the sales characteristics of the target period.

[0093] Based on the above embodiment, in the gas station sales forecasting device provided in the embodiment of the present invention, the time period sales feature extraction module is specifically used to:

[0094] Extracting hourly initial period sales features of the historical sales data based on the convolutional neural network in the feature extraction model;

[0095] Based on the Sigmoid function, the sales characteristics of the initial period are processed to obtain the hourly attention coefficient;

[0096] Based on the attention coefficient and the sales characteristics of the initial time period, the sales characteristics of the target time period are obtained.

[0097] Based on the above embodiment, in the gas station sales forecasting device provided in the embodiment of the present invention, the time period sales feature extraction module is specifically used to:

[0098] The attention coefficient is correspondingly multiplied by the sales characteristics of the initial time period, and the multiplication result is superimposed on the sales characteristics of the initial time period to obtain the sales characteristics of the target time period.

[0099] Based on the above embodiment, in the gas station sales forecasting device provided in the embodiment of the present invention, the time period sales feature extraction module is specifically used to:

[0100] Arranging the historical sales data in a matrix by date and time period to obtain a two-dimensional matrix of the historical sales data; each column of the two-dimensional matrix has the same time period of historical sales data;

[0101] The two-dimensional matrix is ​​input into the feature extraction model, and the feature extraction model uses an attention mechanism to extract the sales features of the target period.

[0102] Based on the above embodiment, in the gas station sales forecasting device provided in the embodiment of the present invention, the future sales data forecasting module is specifically used to:

[0103] The historical sales data and the sales characteristics of the target period are spliced ​​together, and the spliced ​​result is input into the time series forecasting model, and the time series forecasting model outputs the future sales data.

[0104] On the basis of the above-mentioned embodiment, in the gas station sales prediction device provided in the embodiment of the present invention, the feature extraction model and the time series prediction model are jointly trained based on historical sales data samples of different types of oil products at different gas stations;

[0105] Alternatively, the feature extraction model and the time series prediction model are jointly trained based on historical sales data samples of the target type of oil product at the target gas station.

[0106] Specifically, the functions of each module in the gas station sales forecasting device provided in the embodiment of the present invention correspond one-to-one to the operating procedures of each step in the above-mentioned method embodiment, and the effects achieved are also consistent. Please refer to the above-mentioned embodiment for details, and no further details will be given in the embodiment of the present invention.

[0107] Figure 6 An example of a physical structure diagram of an electronic device is shown below. Figure 6 As shown, the electronic device may include: a processor (Processor) 610, a communication interface (Communications Interface) 620, a memory (Memory) 630, and a communication bus 640. The processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the gas station sales prediction method provided in the above embodiments.

[0108] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0109] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the gas station sales prediction method provided in the above embodiments.

[0110] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the gas station sales prediction method provided in the above embodiments.

[0111] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0112] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0113] Finally, 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A gas station sales forecasting method, characterized in that: include: Obtain historical sales data of target type of oil products at target gas stations; Based on the feature extraction model, an attention mechanism is used to extract the hourly target period sales features with period sales characteristics from the historical sales data; Based on the time series forecasting model, the historical sales data and the sales characteristics of the target period are applied to predict the future sales data of the target type of oil product at the target gas station.

2. The gas station sales forecasting method according to claim 1, characterized in that: The feature extraction model uses an attention mechanism to extract hourly target period sales features with period sales characteristics from the historical sales data, including: Extracting hourly initial period sales features of the historical sales data based on the convolutional neural network in the feature extraction model; Based on the Sigmoid function, the sales characteristics of the initial period are processed to obtain the hourly attention coefficient; Based on the attention coefficient and the sales characteristics of the initial time period, the sales characteristics of the target time period are obtained.

3. The gas station sales forecasting method according to claim 2, characterized in that: The obtaining of the target period sales characteristics based on the attention coefficient and the initial period sales characteristics includes: The attention coefficient is correspondingly multiplied by the sales characteristics of the initial time period, and the multiplication result is superimposed on the sales characteristics of the initial time period to obtain the sales characteristics of the target time period.

4. The gas station sales forecasting method according to any one of claims 1 to 3, characterized in that: The feature extraction model uses an attention mechanism to extract hourly target period sales features with period sales characteristics from the historical sales data, including: Arranging the historical sales data in a matrix by date and time period to obtain a two-dimensional matrix of the historical sales data; each column of the two-dimensional matrix has the same time period of historical sales data; The two-dimensional matrix is ​​input into the feature extraction model, and the feature extraction model uses an attention mechanism to extract the sales features of the target period.

5. The gas station sales forecasting method according to any one of claims 1 to 3, characterized in that: The method of predicting future sales data of the target type of oil product at the target gas station by applying the historical sales data and the sales characteristics of the target period based on the time series forecasting model includes: The historical sales data and the sales characteristics of the target period are spliced ​​together, and the spliced ​​result is input into the time series forecasting model, and the time series forecasting model outputs the future sales data.

6. The gas station sales forecasting method according to any one of claims 1 to 3, characterized in that: The feature extraction model and the time series prediction model are jointly trained based on historical sales data samples of different types of oil products at different gas stations; Alternatively, the feature extraction model and the time series prediction model are jointly trained based on historical sales data samples of the target type of oil product at the target gas station.

7. A gas station sales forecasting device, characterized in that: include: A historical sales data acquisition module is used to obtain historical sales data of target type of oil products at target gas stations; A time period sales feature extraction module is used to extract hourly target time period sales features with time period sales characteristics from the historical sales data based on a feature extraction model and using an attention mechanism; The future sales data prediction module is used to predict the future sales data of the target type of oil at the target gas station based on the time series prediction model and applying the historical sales data and the sales characteristics of the target period.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the gas station sales prediction method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the gas station sales prediction method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the gas station sales prediction method according to any one of claims 1 to 6 is implemented.