Oil station recommendation method and system based on customer refueling cycle and storage medium
By constructing customer behavior sequences and cycle matrix, combined with long -term preference models, a more accurate oil station recommendation solution is generated, which solves the problem of neglecting customer refueling cyclical factors, and realizes the intelligent recommendation and intelligent operation of oil station customers.
Patent Information
- Application Number
- CN202410952899.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2025-01-28
AI Technical Summary
Traditional customer recommendation methods ignore the periodic factors of customer refueling, resulting in inaccurate recommendations and affecting gas station operations.
By obtaining customers' historical behavior records, build customer behavior sequences and map them into a sequence embedded matrix, determine the customer's refueling cycle information and build the customer cycle matrix, integrate into the sequence embedded matrix, enter long -term and short -term preference model learning, and generate the recommendation results of oil stations.
Consider the periodic factors of the customer's refueling to form a more accurate fuel station recommendation solution to realize the intelligent recommendation of the oil station customers and support the intelligentization of the fuel station operation and the customer operation.
Smart Images

Figure CN119379380A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of customer recommendation, and in particular to a method, system and storage medium for recommending a gas station based on a customer's refueling cycle. Background Art
[0002] This section is intended to provide a background or context to the embodiments recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] With the popularity of cars, whether it is a new energy car or a gasoline car, after driving for a period of time, it is necessary to go to a gas station or charging station to replenish energy before continuing to use it. For the operation of gas stations and charging stations (hereinafter collectively referred to as gas stations), the customer's historical behavior is usually recorded, and then after analyzing the recorded data, suitable gas stations are regularly recommended to customers for selection. Traditional customer recommendations can be divided into customer-based collaborative filtering recommendations and item-based collaborative filtering recommendations. These methods have been widely studied and applied in the field of recommendation systems, but this type of algorithm ignores that customer interest preferences are a dynamic process, and customer refueling has a certain periodicity. This periodicity cannot be reflected in the algorithm, resulting in inaccurate recommendations and affecting the operation of gas stations. Summary of the invention
[0004] In response to the above technical problems, the present invention proposes a gas station recommendation method, system and storage medium based on the customer's refueling cycle, which can take the customer's refueling periodicity factors into consideration, consider customer behavior more comprehensively, form a comprehensive gas station recommendation plan, and more accurately realize intelligent recommendations for gas station customers, thereby realizing the intelligence of gas station operations and customer operations.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention includes four aspects.
[0006] In a first aspect, a method for recommending a gas station based on a customer's refueling cycle is provided, comprising the following steps:
[0007] Obtain the customer's historical behavior records, construct the customer behavior sequence, and map it into a sequence embedding matrix through the embedding layer;
[0008] Determine the customer's refueling cycle information based on the customer's historical behavior records, and build a customer cycle matrix based on the customer's refueling cycle information;
[0009] Integrate the customer cycle matrix into the sequence embedding matrix to obtain a sequence embedding matrix with customer refueling cycle information;
[0010] The sequence embedding matrix with customer refueling cycle information is input into the long-term preference model and the short-term preference model to learn the customer's long-term preference and short-term preference;
[0011] The short-term preference and the long-term preference are input into the fully connected layer of the model to predict the probability distribution of the customer's selection of a gas station through an activation function and generate a gas station recommendation result.
[0012] In some embodiments, determining the customer's refueling cycle information according to the customer's historical behavior record and constructing a customer cycle matrix based on the customer's refueling cycle information includes:
[0013] The time interval coding method is used to extract the customer's refueling cycle information from the customer's historical behavior records;
[0014] The customer refueling cycle information is decoded by a time position decoder to obtain a customer cycle matrix.
[0015] In some embodiments, extracting customer refueling cycle information from customer historical behavior records by using time interval coding includes:
[0016] Define the customer behavior sequence interaction time as T_u=(t_1, t_2, …, t_n), and calculate the interval between the refueling time and the current time at time t;
[0017] The formula of the time interval function is as follows: g(t,t_i,(T_u)ˉ)=exp(-(t-t_i) / (T_u)ˉ);
[0018] Where t represents the current time, t_i represents the refueling time of the i-th gas station; (T_u)ˉ represents the average time interval between customers’ refueling behaviors.
[0019] The customer cycle matrix is denoted as T. The customer refueling cycle information is decoded by a time position decoder to obtain the formula of the customer cycle matrix as follows:
[0020] T=(e_1^t,e_2^t,…,e_i^t)
[0021] Among them, e_i^t=MLP_dec(f(t,t_i,(T_u)ˉ))
[0022] Where e_i^t represents the period information of the i-th gas station in the sequence; MLP_dec(·) represents the decoder of the time position information, which can map the period information into d dimensions.
[0023] In some embodiments, the long-term preference model is constructed using an attention mechanism and a multi-core temporal convolutional network; and the short-term preference model is constructed using an LSTM network.
[0024] In some embodiments, the sequence embedding matrix with customer refueling cycle information is input into the long-term preference model and the short-term preference model for learning respectively to obtain the customer's long-term preference and short-term preference, including:
[0025] The sequence embedding matrix with the customer refueling cycle information is input into the multi-core temporal convolutional network convolution to capture the long and short features in the sequence embedding matrix respectively;
[0026] Splicing the long and short features to obtain a spliced feature;
[0027] The attention mechanism is used to learn the concatenated features to obtain the short-term preferred gas stations of customers who focus on gas stations with high importance.
[0028] In some embodiments, the multi-core temporal convolutional network includes three temporal convolutional networks; wherein the convolution kernels of the three temporal convolutional networks have different sizes, and different expansion coefficients are added to increase the receptive field of the convolution operation.
[0029] In some embodiments, the sequence embedding matrix with customer refueling cycle information is input into the long-term preference model and the short-term preference model for learning respectively to obtain the customer's long-term preference and short-term preference, including:
[0030] The sequence embedding matrix with customer refueling cycle information is used to learn the customer's long-term preferred gas stations through the LSTM network to obtain the customer's long-term preferred gas stations.
[0031] In some embodiments, in a multi-core temporal convolutional network, the l-layer dilated causal convolution at time t is expressed as:
[0032] E_(u,j)^(t,(l))=σ(E_(u,j)^(t,(l-1))+[〖(k-1)×ε,E〗
[0033] _(u,j)^(t,(l-1))]*w_j^((l))+b_j^((l)));
[0034] Where u is the client, j is the convolution sequence, t is the time, l is the convolution layer, k is the convolution kernel size, ε is the dilation coefficient, (k-1)×ε is the padding value, w_j^((l)) represents the weight parameter of the j-th convolution in layer l, b_j^((l)) represents the bias of the j-th convolution in layer l, σ(·) represents the activation function, * represents the dilated causal convolution operation, and the operation process can be expressed as y=x*w=∑_(i=i+ε)x_i×w_i;
[0035] The long and short features are spliced to obtain a spliced feature, which is denoted as F, and the formula is as follows:
[0036] F = [s_2^c, s_4^c, s_6^c];
[0037] Where, s_2^c is the customer's short-term preference for gas stations convolved by the first temporal convolutional network, s_4^c is the customer's short-term preference for gas stations convolved by the second temporal convolutional network, and s_6^c is the customer's short-term preference for gas stations convolved by the third temporal convolutional network;
[0038] The formula for focusing attention is as follows:
[0039] f_c(F)=softmax(AP(F)+MP(F));
[0040] Where AP(F) represents global average pooling, and MP(F) represents global maximum pooling;
[0041] The splicing features are learned to obtain customers' short-term preferred gas stations that focus on gas stations with high importance. s_u^c represents customers' short-term preferred gas stations, and the formula is as follows:
[0042] s_u^c=f_c(F)ˉF.
[0043] In some embodiments, the formula for inputting the short-term preference and the long-term preference into the fully connected layer of the model and predicting the probability distribution of the target customer selecting a gas station through an activation function is as follows:
[0044] y=p(i│u,s_u)=sigmoid([y_u,x_i,s_u^s,s_u^l]w_o+b_o);
[0045] Where w_o represents the parameter matrix of the output layer, b_o represents the bias value of the output layer, sigmoid(·) represents the activation function, i represents the gas station, u represents the customer, s_u represents the customer behavior sequence, y_u represents the embedding vector of customer u, and x_i represents the embedding vector of gas station i.
[0046] In the second aspect, a gas station recommendation system based on a customer's refueling cycle is provided, comprising:
[0047] The acquisition unit is used to obtain the customer's historical behavior records, construct the customer behavior sequence, and map it into a sequence embedding matrix through the embedding layer;
[0048] A first processing unit, configured to determine customer refueling cycle information according to the customer's historical behavior records, and to construct a customer cycle matrix based on the customer refueling cycle information;
[0049] A second processing unit is used to integrate the customer cycle matrix into the sequence embedding matrix to obtain a sequence embedding matrix with customer refueling cycle information;
[0050] A feature analysis unit is used to input the sequence embedding matrix with customer refueling cycle information into the long-term preference model and the short-term preference model for learning, so as to obtain the customer's long-term preference and short-term preference;
[0051] The gas station recommendation unit is used to input the short-term preference and the long-term preference into the fully connected layer of the model to predict the probability distribution of the customer's selection of a gas station through an activation function and generate a gas station recommendation result.
[0052] According to a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the aforementioned customer recommendation method when executing the computer program.
[0053] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program stored in the storage medium can be executed by one or more processors, and the computer program can be used to implement the steps of the aforementioned customer recommendation method.
[0054] Compared with the prior art, one or more embodiments of the above scheme may have the following advantages or beneficial effects:
[0055] The present application provides a method, system and storage medium for recommending gas stations based on customer refueling cycles. The recommendation method includes: obtaining the customer's historical behavior records, constructing a customer behavior sequence, and mapping it into a sequence embedding matrix through an embedding layer; determining the customer's refueling cycle information according to the customer's historical behavior records, and constructing a customer cycle matrix based on the customer's refueling cycle information; integrating the customer cycle matrix into the sequence embedding matrix to obtain a sequence embedding matrix with the customer's refueling cycle information; inputting the sequence embedding matrix with the customer's refueling cycle information into a long-term preference model and a short-term preference model for learning respectively to obtain the customer's long-term preference and short-term preference; inputting the short-term preference and long-term preference into the fully connected layer of the model to predict the probability distribution of the customer's choice of gas stations through an activation function, and generate a gas station recommendation result. Through this recommendation method, the periodicity of customer refueling can be taken into account, and a multi-core time series convolutional network is designed based on the time series convolutional network to determine the customer's short-term preferred gas station. At the same time, the LSTM model is used to explore the long-term preference between the target gas station and the customer, and then the fully connected network is used to merge the customer's short-term preferred gas station with the long-term preferred gas station, realize global feature fusion and provide recommendations, comprehensively consider customer behavior, form a comprehensive gas station recommendation plan, and more accurately realize intelligent recommendation for gas station customers. It provides key data support for gas station operation planning, plan formulation and population selection, and realizes the intelligence of gas station operation and customer operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Hereinafter, the present application will be described in more detail based on embodiments and with reference to the accompanying drawings;
[0057] Figure 1 is an exemplary flow chart of a method for recommending a gas station based on a customer's refueling cycle in an embodiment of the present invention;
[0058] Figure 2 In the embodiment of the present invention, Figure 1 An exemplary flow chart of step S2 shown in;
[0059] Figure 3 In the embodiment of the present invention, Figure 1 An exemplary flow chart of step S4 shown in;
[0060] Figure 4 A schematic block diagram of a gas station recommendation system based on a customer's refueling cycle provided in an embodiment of the present invention;
[0061] Figure 5 A schematic block diagram of an electronic device provided in an embodiment of the present invention;
[0062] Figure 6 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present invention.
[0063] In the drawings, the same reference numerals are used for the same components, and the drawings are not drawn to scale. DETAILED DESCRIPTION
[0064] The present disclosure is further described below in conjunction with the embodiments shown in the accompanying drawings.
[0065] Embodiment 1:
[0066] The present application embodiment discloses a method for recommending a gas station based on a customer's refueling cycle, such as Figure 1As shown, it includes the following steps: obtaining the customer's historical behavior records, constructing the customer behavior sequence, and mapping it into a sequence embedding matrix through the embedding layer; determining the customer's refueling cycle information according to the customer's historical behavior records, and constructing the customer cycle matrix based on the customer's refueling cycle information; integrating the customer cycle matrix into the sequence embedding matrix to obtain a sequence embedding matrix with the customer's refueling cycle information; inputting the sequence embedding matrix with the customer's refueling cycle information into the long-term preference model and the short-term preference model for learning respectively to obtain the customer's long-term preference and short-term preference; inputting the short-term preference and the long-term preference into the fully connected layer of the model to predict the probability distribution of the customer's choice of gas station through the activation function, and generating a gas station recommendation result. Through this gas station recommendation method, the customer's refueling periodicity factor can be taken into account, the customer behavior can be considered more comprehensively, a comprehensive gas station recommendation plan can be formed, and the intelligent recommendation of gas station customers can be realized more accurately, providing key data support for the operation planning, plan formulation and population selection of the gas station, and realizing the intelligence of gas station operation and customer operation.
[0067] At least one embodiment of the present disclosure provides a gas station recommendation method based on customer refueling cycles. The gas station recommendation method can be implemented in the form of software, hardware, firmware or any combination thereof, and loaded and executed by a processor in a device such as a mobile phone, tablet computer, laptop computer, desktop computer, network server, etc., so as to achieve accurate and intelligent recommendations for gas station customers, take customer refueling periodicity factors into consideration, consider customer behavior more comprehensively, and realize the intelligence of gas station operations and customer operations.
[0068] Reference below Figure 1 As shown, a gas station recommendation method based on a customer's refueling cycle provided by at least one embodiment of the present disclosure is described, and the gas station recommendation method includes steps S1 to S6.
[0069] S1. Obtain the customer’s historical behavior records, construct the customer behavior sequence, and map it into a sequence embedding matrix through the embedding layer.
[0070] In some embodiments, the customer's historical behavior record includes customer collection data, gas station collection data, and the customer's behavior record of selecting a gas station to refuel, wherein the customer's refueling time is recorded in the customer's behavior record of selecting a gas station to refuel.
[0071] Furthermore, in the model embedding layer, the customer set data is recorded as X, and the gas station set data is recorded as Y, which are mapped into embedding matrices X_u and Y_I through the embedding layer, respectively, where the u-th row x_u of the embedding matrix X_u represents the embedding vector of customer u; the i-th row y_i of the embedding matrix Y_I represents the embedding vector of gas station i. When constructing the customer behavior sequence, the target customer is recorded as u, and s_u=(i_1,i_2,…,i_n) is used to represent it, so that the mapped sequence embedding matrix is recorded as E_u=(e_1,e_2,…,e_n), where n represents the length of the customer behavior sequence, and e_n represents the embedding vector of the n-th item in the customer behavior sequence, so as to facilitate the subsequent follow-up of the embedding matrix to learn the customer's long-term and short-term preference gas stations.
[0072] S2. Determine the customer's refueling cycle information according to the customer's historical behavior records, and construct a customer cycle matrix based on the customer's refueling cycle information.
[0073] In some embodiments, step S2, such as Figure 2 As shown, including:
[0074] S21, extracting customer refueling cycle information from customer historical behavior records by using time interval coding;
[0075] S22. Decode the customer refueling cycle information through a time position decoder to obtain a customer cycle matrix.
[0076] In some specific embodiments, for the customer's historical behavior record of selecting a gas station to refuel, a time coding method is used to obtain the customer's refueling cycle information. In this way, the interaction time of the customer behavior sequence is defined as: T_u = (t_1, t_2, ..., t_n), so that the interval between the refueling time and the current time can be calculated at time t.
[0077] Furthermore, in order to indicate that the gas stations farther away from time t have less influence, the time interval function is expressed by the following formula: g(t,t_i,(T_u)ˉ)=exp(-(t-t_i) / (T_u)ˉ), where t represents the current time, t_i represents the refueling time of the i-th gas station; (T_u)ˉ represents the average time interval between customers' refueling behaviors, i.e., the customer's refueling cycle. This time interval function can give smaller weights to gas stations that have been refueling for a long time, thus reducing the influence of gas stations that are farther away from time t.
[0078] After obtaining the customer refueling cycle information, it is decoded by the time position decoder to obtain the customer cycle matrix. The formula of the customer cycle matrix is as follows: T = (e_1^t, e_2^t,…, e_i^t); where e_i^t = MLP_dec(f(t,t_i,(T_u)ˉ)); where e_i^t represents the cycle information of the i-th gas station in the sequence; MLP_dec(·) represents the decoder of the time position information, which can map the cycle information into d dimensions.
[0079] S3. Integrate the customer cycle matrix into the sequence embedding matrix to obtain a sequence embedding matrix with customer refueling cycle information.
[0080] In some embodiments, after obtaining the customer cycle matrix T, it is integrated into the sequence embedding matrix E_u to obtain the sequence embedding matrix with customer refueling cycle information, which is recorded as E_u^t=E_u+T.
[0081] S4. Input the sequence embedding matrix with customer refueling cycle information into the long-term preference model and the short-term preference model for learning respectively to obtain the customer's long-term preference and short-term preference.
[0082] In some embodiments, the long-term preference model is constructed using an attention mechanism and a multi-core temporal convolutional network; the short-term preference model is constructed using an LSTM network.
[0083] The essence of Temporal Convolutional Network (TCN) is a process of dilated causal convolution. Unlike RNN, TCN can perform convolution in parallel due to its structure, so TCN can use parallelism. In addition, the entire receptive field can be adjusted through parameters such as the number of layers, dilation factor, and filter size, which can more conveniently adjust the memory size occupied by the control model.
[0084] LSTM belongs to the recurrent neural network (RNN), which is an improved RNN. Compared with RNN, LSTM adds three gate units to the original RNN: input gate, forget gate and output gate, which mainly solves the inherent problems of RNN. The structure of LSTM is different from that of RNN. It adds a special hidden layer structure. By adding hidden layer units, it can more effectively establish long-term dependence with long-term information. It is currently the most widely used recurrent neural network model.
[0085] In some embodiments, step S4, such as Figure 3 As shown, including:
[0086] S41, inputting the sequence embedding matrix with the customer refueling cycle information into the multi-core temporal convolutional network convolution to capture the long and short features in the sequence embedding matrix respectively;
[0087] S42, splicing the long and short features to obtain a splicing feature;
[0088] S43, using the attention mechanism to learn the spliced features to obtain customers' short-term preferred gas stations that focus on gas stations with high importance;
[0089] S44. The sequence embedding matrix with the customer's refueling cycle information is used to learn the customer's long-term preferred gas stations through the LSTM network to obtain the customer's long-term preferred gas stations.
[0090] In some embodiments, in step S41, the multi-core temporal convolutional network includes three temporal convolutional networks; wherein, the convolution kernel sizes of the three temporal convolutional networks are different, and different expansion coefficients are added respectively to increase the receptive field of the convolution operation to enhance the representation of features.
[0091] Specifically, the convolution kernels of the three temporal convolutional networks are: k_1=2, k_2=4, k_3=6, and the expansion coefficients are ε_1=1, ε_2=2, ε_3=5 respectively. The different sizes of the convolution kernels can capture the long and short features in the sequence respectively.
[0092] After inputting the sequence embedding matrix E_u^t with customer refueling cycle information into the multi-core temporal convolutional network, the l-layer dilated causal convolution at time t is expressed as:
[0093] E_(u,j)^(t,(l))=σ(E_(u,j)^(t,(l-1))+[(k-1)×
[0094] ε,E_(u,j)^(t,(l-1))]*w_j^((l))+b_j^((l)))
[0095] Where u is the client, j is the convolution sequence, t is the time, l is the convolution layer, k is the convolution kernel size, ε is the dilation coefficient, (k-1)×ε is the padding value, w_j^((l)) represents the weight parameter of the j-th convolution of the l-th layer, b_j^((l)) represents the bias of the j-th convolution of the l-th layer, σ(·) represents the activation function, * represents the dilated causal convolution operation, and the operation process can be expressed as y=x*w=∑_(i=i+ε)x_i×w_i.
[0096] In some embodiments, after the long and short features in the sequence are captured in step S41, the long and short features are spliced to obtain a spliced feature in step S42. The spliced feature is represented as:
[0097] F = [s_2^c, s_4^c, s_6^c];
[0098] Where s_2^c is the customer's short-term preference for gas stations convolved by the first temporal convolutional network, s_4^c is the customer's short-term preference for gas stations convolved by the second temporal convolutional network, and s_6^c is the customer's short-term preference for gas stations convolved by the third temporal convolutional network.
[0099] In some embodiments, the attention formula of the attention mechanism in step S43 is:
[0100] f_c(F)=softmax(AP(F)+MP(F))
[0101] In the formula, AP(·) represents global average pooling, and MP(·) represents global maximum pooling;
[0102] Therefore, the customer's short-term preferred gas station is represented by s_u^c, and the formula for the customer's short-term preferred gas station is as follows, combining the multi-core temporal convolutional network and the attention mechanism:
[0103] s_u^c=f_c(F)ˉF;
[0104] Where f_c(F) is the attention formula and F is the concatenation feature.
[0105] Through this formula, the concatenated features are used with an attention mechanism to distinguish the degree of influence of different gas stations on refueling, so that the results are more focused on gas stations with high importance, and the customer's accurate short-term preferred gas stations are obtained.
[0106] In some embodiments, in step S44, LSTM learns sequence data by repeating the chain form of neural network modules like RNN. At the same time, in order to avoid the gradient explosion and gradient diffusion problems of RNN, LSTM increases the memory problem of long sequences by adding forget gates, input gates and output gates in the repeated modules of RNN. Through the control of the three control gates, LSTM can continuously absorb input information, update its own state, and control output. The forward propagation formula of LSTM is as follows:
[0107] Input Gate:I_t=σ(W_i·[h_(t-1),x_t]+b_i)
[0108] Forget Gate:F_t=σ(W_f·[h_(t-1),x_t]+b_f)
[0109] Output Gate:O_t=σ(W_o·[h_(t-1),x_t]+b_o)
[0110] Kept State:C_t^'=tanh(W_c·[h_(t-1),x_t]+b_c)
[0111] Cell State:C_t=C_(t-1)*F_t+C_t^'*I_t)
[0112] Output: H_t=C_t*O_t
[0113] Among them, i is used to control whether to update the current input information, f is used to control whether to forget the information in memory, o is used to control whether to output the information in memory, σ represents the sigmoid function, W represents the weight in the neural network, b represents the bias term, h_(t-1) represents the output at the previous moment, x_t represents the input at the current moment, C_(t-1) represents the intermediate value in the process of calculating h_(t-1), and tanh is the output activation function.
[0114] The customer's long-term preference for gas stations is learned through the LSTM network, and finally the customer's long-term preference is obtained. The customer's long-term preference for gas stations is represented by s_u^l.
[0115] S5. Input the short-term preference and the long-term preference into the fully connected layer of the model for fusion, so as to predict the probability distribution of the target customer's selection of a gas station through an activation function, and generate a gas station recommendation result.
[0116] In some embodiments, the formula for predicting the probability distribution of the target customer selecting a gas station through the activation function is as follows:
[0117] y=p(i│u,s_u)=sigmoid([y_u,x_i,s_u^s,s_u^l]w_o+b_o)
[0118] Where w_o represents the parameter matrix of the output layer, b_o represents the bias value of the output layer, sigmoid(·) represents the activation function, i represents the gas station, u represents the customer, s_u represents the customer behavior sequence, y_u represents the embedding vector of customer u, and x_i represents the embedding vector of gas station i.
[0119] The gas station recommendation method based on the customer's refueling cycle provided by the embodiment of the present disclosure can take the customer's refueling periodicity factors into consideration, and design a multi-core temporal convolutional network based on the temporal convolutional network to determine the customer's short-term preferred gas station, and at the same time use the LSTM model to mine the long-term preference between the target gas station and the customer, and then use the fully connected network to realize the fusion of the customer's short-term preferred gas station with the long-term preferred gas station, realize global feature fusion and provide recommendations, comprehensively consider customer behavior, form a comprehensive gas station recommendation plan, and more accurately realize intelligent recommendations for gas station customers, provide key data support for gas station operation planning, plan formulation and population selection, and realize the intelligence of gas station operation and customer operation.
[0120] Embodiment 2:
[0121] At least one embodiment of the present disclosure also provides a gas station recommendation system based on a customer's refueling cycle, such as Figure 4 As shown, including:
[0122] An acquisition unit 11 is used to acquire the historical behavior records of the customer, construct a customer behavior sequence, and map it into a sequence embedding matrix through an embedding layer;
[0123] The first processing unit 12 is used to determine the customer's refueling cycle information according to the customer's historical behavior record, and to construct a customer cycle matrix based on the customer's refueling cycle information;
[0124] The second processing unit 13 is used to integrate the customer cycle matrix into the sequence embedding matrix to obtain a sequence embedding matrix with customer refueling cycle information;
[0125] The feature analysis unit 14 is used to input the sequence embedding matrix with the customer's refueling cycle information into the long-term preference model and the short-term preference model for learning, so as to obtain the customer's long-term preference and short-term preference;
[0126] The gas station recommendation unit 15 is used to input the short-term preference and the long-term preference into the fully connected layer of the model to predict the probability distribution of the customer's selection of a gas station through an activation function and generate a gas station recommendation result.
[0127] Among them, the output end of the acquisition unit 11 is connected to the input end of the first processing unit 12, the output end of the first processing unit 12 is connected to the input end of the second processing unit 13, the output end of the third processing unit 13 is connected to the input end of the feature analysis unit 14, and the output end of the feature analysis unit 14 is connected to the input end of the gas station recommendation unit 15.
[0128] In some embodiments, the output end of the gas station recommendation unit 15 can be connected to a display screen to display the gas station recommendation results on the display screen for easy viewing by gas station operating staff.
[0129] Embodiment three:
[0130] At least some embodiments of the present disclosure also provide an electronic device, such as Figure 5 As shown, the electronic device includes a memory 21 and a processor 22, wherein the memory 21 stores a computer program, and when the computer program is executed by the processor, the steps of the gas station recommendation method provided in any embodiment of the present disclosure are executed.
[0131] In some embodiments, the processor 22 is used to execute all or part of the steps in the gas station recommendation method of any embodiment of the present disclosure. The memory 21 is used to store various types of data, which may include instructions of any application or method in the electronic device, and data related to the application.
[0132] The processor 22 may be an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components, and is used to execute the gas station recommendation method in the first embodiment.
[0133] The memory 21 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0134] Embodiment 4:
[0135] At least some embodiments of the present disclosure also provide a computer-readable storage medium, such as Figure 6 As shown, a computer program 31 is stored on the readable storage medium, and when the computer program 31 is executed by a processor, the steps of the gas station recommendation method provided by any embodiment of the present disclosure are implemented.
[0136] In some embodiments, the storage medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0137] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0138] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0139] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0140] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the gas station recommendation method provided in any embodiment of the present disclosure.
[0141] In summary, the present application provides a gas station recommendation method, system and storage medium based on the customer's refueling cycle, which can take the customer's refueling periodicity factors into consideration, and design a multi-core time series convolutional network based on the time series convolutional network to determine the customer's short-term preferred gas station. At the same time, the LSTM model is used to explore the long-term preferences between the target gas station and the customer, and then the fully connected network is used to integrate the customer's short-term preferred gas station with the long-term preferred gas station, realize global feature fusion and provide recommendations, comprehensively consider customer behavior, form a comprehensive gas station recommendation plan, and more accurately realize intelligent recommendations for gas station customers, provide key data support for gas station operation planning, plan formulation and population selection, and realize the intelligence of gas station operation and customer operation.
[0142] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0143] The protection scope of the present disclosure is not limited to the above-mentioned embodiments. Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and modifications fall within the scope of the claims of the present disclosure and their equivalents, the intention of the present disclosure also includes these changes and modifications.
Claims
1. A method for recommending gas stations based on a customer's refueling cycle, characterized in that: The following steps are involved: Obtain the customer's historical behavior records, construct the customer behavior sequence, and map it into a sequence embedding matrix through the embedding layer; Determine the customer's refueling cycle information based on the customer's historical behavior records, and build a customer cycle matrix based on the customer's refueling cycle information; Integrate the customer cycle matrix into the sequence embedding matrix to obtain a sequence embedding matrix with customer refueling cycle information; The sequence embedding matrix with customer refueling cycle information is input into the long-term preference model and the short-term preference model to learn the customer's long-term preference and short-term preference; The short-term preference and the long-term preference are input into the fully connected layer of the model to predict the probability distribution of the customer's selection of a gas station through an activation function and generate a gas station recommendation result.
2. A method for recommending gas stations based on a customer's refueling cycle according to claim 1, characterized in that: Determining the customer's refueling cycle information according to the customer's historical behavior record, and constructing a customer cycle matrix based on the customer's refueling cycle information, includes: The time interval coding method is used to extract the customer's refueling cycle information from the customer's historical behavior records; The customer refueling cycle information is decoded by a time position decoder to obtain a customer cycle matrix.
3. A method for recommending gas stations based on a customer's refueling cycle according to claim 2, characterized in that: The method of extracting customer refueling cycle information from customer historical behavior records by using time interval coding includes: Define the customer behavior sequence interaction time as T_u=(t_1, t_2, …, t_n), and calculate the interval between the refueling time and the current time at time t; The formula of the time interval function is as follows: g(t,t_i,(T_u)ˉ)=exp(-(t-t_i) / (T_u)ˉ); Where t represents the current time, t_i represents the refueling time of the i-th gas station; (T_u)ˉ represents the average time interval between customers’ refueling behaviors. The customer cycle matrix is denoted as T. The customer refueling cycle information is decoded by a time position decoder to obtain the formula of the customer cycle matrix as follows: T=(e_1^t,e_2^t,…,e_i^t) Among them, e_i^t=MLP_dec(f(t,t_i,(T_u)ˉ)) Where e_i^t represents the period information of the i-th gas station in the sequence; MLP_dec(·) represents the decoder of the time position information, which maps the period information into d dimensions.
4. A method for recommending gas stations based on a customer's refueling cycle according to claim 1, characterized in that: The long-term preference model is constructed using an attention mechanism and a multi-core temporal convolutional network; the short-term preference model is constructed using an LSTM network.
5. A method for recommending gas stations based on a customer's refueling cycle according to claim 4, characterized in that: The sequence embedding matrix with customer refueling cycle information is input into the long-term preference model and the short-term preference model for learning, and the long-term preference and short-term preference of the customer are obtained, including: The sequence embedding matrix with the customer refueling cycle information is input into the multi-core temporal convolutional network convolution to capture the long and short features in the sequence embedding matrix respectively; Splicing the long and short features to obtain a spliced feature; The attention mechanism is used to learn the concatenated features to obtain the short-term preferred gas stations of customers who focus on gas stations with high importance.
6. A method for recommending gas stations based on a customer's refueling cycle according to claim 5, characterized in that: The multi-core temporal convolutional network includes three temporal convolutional networks; wherein the convolution kernels of the three temporal convolutional networks have different sizes, and different expansion coefficients are added respectively to increase the receptive field of the convolution operation.
7. A method for recommending gas stations based on a customer's refueling cycle according to claim 4, characterized in that: The sequence embedding matrix with customer refueling cycle information is input into the long-term preference model and the short-term preference model for learning, and the long-term preference and short-term preference of the customer are obtained, including: The sequence embedding matrix with customer refueling cycle information is used to learn the customer's long-term preferred gas stations through the LSTM network to obtain the customer's long-term preferred gas stations.
8. The method for recommending a gas station based on a customer's refueling cycle according to claim 5, characterized in that: In a multi-core temporal convolutional network, the l-layer dilated causal convolution at time t is expressed as: E_(u,j)^(t,(l))=σ(E_(u,j)^(t,(l-1))+[(k-1)× ε,E_(u,j)^(t,(l-1))]*w_j^((l))+b_j^((l))) Where u is the client, j is the convolution sequence, t is the time, l is the convolution layer, k is the convolution kernel size, ε is the dilation coefficient, (k-1)×ε is the padding value, w_j^((l)) represents the weight parameter of the j-th convolution in layer l, b_j^((l)) represents the bias of the j-th convolution in layer l, σ(·) represents the activation function, and * represents the dilated causal convolution operation; The long and short features are spliced to obtain a spliced feature, which is denoted as F, and the formula is as follows: F = [s_2^c, s_4^c, s_6^c]; Where, s_2^c is the customer's short-term preference for gas stations convolved by the first temporal convolutional network, s_4^c is the customer's short-term preference for gas stations convolved by the second temporal convolutional network, and s_6^c is the customer's short-term preference for gas stations convolved by the third temporal convolutional network; The formula for focusing attention is as follows: f_c(F)=softmax(AP(F)+MP(F)) Where AP(F) represents global average pooling, and MP(F) represents global maximum pooling; The splicing features are learned to obtain customers' short-term preferred gas stations that focus on gas stations with high importance. s_u^c represents customers' short-term preferred gas stations, and the formula is as follows: s_u^c=f_c(F)ˉF.
9. The method for recommending a gas station based on a customer's refueling cycle according to claim 1, characterized in that: The formula for inputting the short-term preference and the long-term preference into the fully connected layer of the model and predicting the probability distribution of the target customer's choice of a gas station through the activation function is as follows: y=p(i│u,s_u)=sigmoid([y_u,x_i,s_u^s,s_u^l]w_o+b_o) Where w_o represents the parameter matrix of the output layer, b_o represents the bias value of the output layer, sigmoid(·) represents the activation function, i represents the gas station, u represents the customer, s_u represents the customer behavior sequence, y_u represents the embedding vector of customer u, and x_i represents the embedding vector of gas station i.
10. A gas station recommendation system based on customer refueling cycles, characterized in that: include: The acquisition unit is used to obtain the customer's historical behavior records, construct the customer behavior sequence, and map it into a sequence embedding matrix through the embedding layer; A first processing unit, configured to determine customer refueling cycle information according to the customer's historical behavior records, and to construct a customer cycle matrix based on the customer refueling cycle information; A second processing unit is used to integrate the customer cycle matrix into the sequence embedding matrix to obtain a sequence embedding matrix with customer refueling cycle information; A feature analysis unit is used to input the sequence embedding matrix with customer refueling cycle information into the long-term preference model and the short-term preference model for learning, so as to obtain the customer's long-term preference and short-term preference; A gas station recommendation unit is used to input the short-term preference and the long-term preference into the fully connected layer of the model to predict the probability distribution of the target customer's selection of a gas station through an activation function and generate a gas station recommendation result.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the gas station recommendation method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium, characterized in that: When the computer program is executed by a processor, the steps of the gas station recommendation method according to any one of claims 1 to 9 are implemented.
Citation Information
Cited By
Intelligent recommendation algorithm based on machine learning
CN122021967A