Vehicle model recommendation system, method, device and storage medium based on time series modeling
By using a bidirectional LSTM network and attention mechanism in the recommendation algorithm, combined with user and product characteristics, the problem of data sparseness and cold start is solved, the accuracy and diversity of the recommendation system are improved, and effective mining of user preferences and personality are achieved. recommendation.
Patent Information
- Application Number
- CN202210190361.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-02-28
AI Technical Summary
Existing recommendation algorithms are difficult to effectively solve the problems of data sparseness and cold start when dealing with large-scale online recommendation systems. Moreover, the expressive power of one-way recurrent networks is limited, and they fail to fully utilize the advantages of cross-combination features and shallow networks. It is difficult to mine user preferences from rich sequence information, especially in the recommendation of special products such as vehicles.
A bidirectional LSTM network is used to capture sequence features from both forward and reverse directions, combined with an attention mechanism, to add user and product features such as age, gender, driving mileage, etc., through a hierarchical structure recommendation system model, including input layer, embedding layer, The multi-layer perceptual network layer, factor decomposition machine layer and attention layer calculate the user's attention to the product, and use linear rectification functions to make ranking recommendations.
It improves the accuracy and diversity of the recommendation system, reduces the time-consuming and cost of feature engineering, can better cope with the data sparse and cold start problems of collaborative filtering, meets the needs of memory and generalization, and realizes thousands of people and thousands of people. personalized recommendations.
Smart Images

Figure CN114565436B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer information processing, and in particular to a recommendation method based on time series modeling. Background Art
[0002] With the rapid development of the Internet and information technology, a huge amount of data has been generated, bringing us into the era of big data. However, not all of this information is of concern to individuals, and it is becoming increasingly difficult for users to find useful information from a large amount of information. This is the so-called information overload. On the other hand, the producers of information are also racking their brains to push information that users are interested in to users. Everyone's interests are different, so a recommendation method that can achieve thousands of faces for thousands of people has emerged. The recommendation algorithm determines the user's interests based on the user's characteristics, behavior and other data, and recommends appropriate information to the user by exploring the user's behavior, meeting the user's personalized needs and helping the user find information or products that are of interest but difficult to find. Therefore, the development of effective recommendation algorithms has always been a hot topic in academia and industry.
[0003] For large-scale online recommendation systems, generalized linear models (GLM, such as LR) are widely used due to their simplicity, scalability, and interpretability. Models are usually trained using sparse features encoded as binary with one-hot encoding. For example, the binary feature "is_has_tbox" uses 1 and 0 to represent the installation and non-installation of tbox devices respectively. In addition, effective memory function is achieved through sparse feature cross-conversion, such as "is_has_tbox" AND "is_has_rmu". If the user has the feature "is_has_tbox" as 1, and the user's feature "is_has_rmu" is also 1, then the value of these two features after AND crossover is also 1. Considering these two features as one feature, this example shows the relationship between feature co-occurrence and target. However, the limitations of this method are that on the one hand, it requires very time-consuming manual features, and on the other hand, it is impossible to generate very useful feature pairs that have not appeared in the training set.
[0004] For embedding-based models, such as FM or deep NN, low-dimensional dense feature vectors are learned to generalize some unseen feature pairs without much artificial feature engineering. However, it is difficult to learn effective low-dimensional vectors when the data is sparse, the user preferences are special, and there is not much room for expansion. In this case, there is no connection between most features, but the dense vectors will be trained to obtain non-zero prediction weights, which will overfit and lead to recommendations of irrelevant content. On the other hand, linear models that cross-product features can remember special rules and require very few parameters.
[0005] Publication number: CN107507054A, Chinese invention patent application named “A recommendation algorithm based on recurrent neural network” adopts LSTM single recurrent neural network to model user behavior and user information respectively, and then combines the two together as the input of the output layer. On the one hand, because it is a unidirectional recurrent network, the expressiveness is limited, and on the other hand, it does not take into account the advantages of cross-combination features and shallow networks. On the one hand, the present invention adds a bidirectional recurrent network to model the sequence from both positive and negative directions, and at the same time adds an attention mechanism, which can give high weights to items or features with high correlation in the sequence. On the other hand, it takes advantage of the shallow network and cross-features to greatly improve its performance.
[0006] The Chinese invention patent application with publication number CN112598462A and the name of "Personalized recommendation method and system based on collaborative filtering and deep learning" provides a personalized recommendation method and system based on collaborative filtering and deep learning, obtains the historical behavior feature data of users purchasing goods, and performs preprocessing, sorts the user's purchase behavior according to time, and the sorted data is called the user's behavior feature sequence; personalized recommendation system modeling includes obtaining the input vectors of users and goods from the interaction matrix, and then generating the embedding vectors of users and goods respectively, and then weighting the embedding vectors through the attention neural network, and then the weighted embedding vectors are linearly and nonlinearly interacted, so as to obtain the explicit and implicit relationship between users and goods, and finally the user's click rate on the goods is estimated; the user behavior feature sequence is used to train and test the model. The present invention fully exploits the collaborative signals of users and goods, provides a basis for capturing the personalized needs of users, and can improve the accuracy and interpretability of the recommendation system. However, on the one hand, the two inherent problems of collaborative filtering, data sparsity and cold start, are still not solved. On the other hand, the sequence items are only sorted, and the sequence is not modeled later.
[0007] The above-mentioned prior art is a unidirectional loop network with limited expressiveness, and does not take into account the advantages of cross-combination features and shallow networks. It does not solve the two inherent problems of collaborative filtering, data sparsity and cold start. On the other hand, it only sorts the items in the sequence, and does not subsequently model the sequence. Especially for special commodities such as vehicles, a lot of information such as user preferences and their own characteristics is very important in choosing the model and brand when purchasing, and the above-mentioned model cannot solve this problem well.
[0008] Based on the above analysis, how to design a recommendation algorithm that not only meets the requirements of memorization and generalization, but also can mine user preferences from rich sequence information and achieve a personalized recommendation method has become a problem that technical personnel in this field need to solve. Summary of the invention
[0009] In view of the above-mentioned problems existing in the prior art, the present invention proposes a recommendation system based on time series modeling, which not only meets the requirements of memory and generalization, but also can mine user preferences from rich sequence information and realize a recommendation method that is tailored to each individual. On the one hand, the present invention incorporates the characteristics of users and products. For example, in addition to the user ID, user characteristics also include age, gender, mileage, etc., and in addition to the product ID, there are also product category, brand and other characteristics. These features can cope with the data sparsity and cold start problems of collaborative filtering; on the other hand, a bidirectional LSTM (Long short-term memory) network is used to capture sequence features from both positive and negative directions.
[0010] The technical solution of the present invention to solve the above technical problems is to propose a recommendation system based on time series modeling, which includes: a log system obtains user and product feature information based on input user features and their contexts, and sorts the sequence information according to time through the sequence information of products purchased by the user to obtain a user behavior feature sequence; a recall module preliminarily selects a predetermined number of related products from a database storing product information; a recommendation system model obtains the user's attention ranking for items based on the user and product feature information and the user behavior feature sequence, calls the linear rectification function ReLU to calculate the recommendation sequence based on the attention ranking, and the recommendation system sorts the recommendations in descending order, and recommends a predetermined number of models before the sorting to the user.
[0011] The recommendation system model is a hierarchical structure, including input layer, embedding layer, multi-layer perception network layer, factor decomposition machine layer, and attention layer. The input layer uniquely encodes the user and product features and user behavior feature sequences to obtain unique hot encoding features; the embedding layer reduces the dimension of the unique hot encoding features to obtain the embedding vectors of users, products and their features; the multi-layer perception network layer, factor decomposition machine layer, and bidirectional LSTM network layer calculate the FM output weights, MLP output weights, and Bi-Lstm weights according to the embedding vectors; the attention layer weights the embedding vectors; the linear rectification function ReLU calculates the user's attention to the product according to the above weights and weighted vectors, and the recommendation system sorts the attention, and recommends a predetermined number of models to the user before sorting.
[0012] The present invention also proposes a recommendation method based on time series modeling, comprising the steps of: obtaining user feature information, vehicle feature information, and sequence information of vehicles purchased by the user, sorting the sequence information according to time, and obtaining a user behavior feature sequence; calculating the user's vehicle attention ranking according to the user and product feature information and the user behavior feature sequence, calling the linear rectification function ReLU to calculate the final result according to the attention ranking, and the recommendation system sorts the final result in descending order, and recommends the first n predetermined number of vehicle models to the user.
[0013] The specific steps of ranking product attention include: the input layer uniquely encodes the user and product features and user behavior feature sequences to obtain uniquely encoded features; the embedding layer reduces the dimension of the uniquely encoded features to obtain embedding vectors of users, products and their features; the multi-layer perception network layer, the factor decomposition machine layer and the bidirectional LSTM network layer calculate the FM output weights, MLP output weights and Bi-Lstm weights according to the embedding vectors; the attention layer weights the embedding vectors; the linear rectification function ReLU calculates the user's attention to the product according to the above weights and weighted vectors, and the recommendation system ranks the attention, and recommends a predetermined number of car models to the user before ranking.
[0014] The embedding layer uses the embedding matrix P∈R mxk The embedding vectors of users, products and their features are obtained, where m represents the number of features and k represents the dimension of the low-dimensional space.
[0015] The embedding vector of user and product features is called by formula: a i =f(W i a i-1 +b i )=f(z i ) Calculate the MLP output weight W of the i-th layer network i , where b i For bias f, the activation function is assumed to be relu, and the input is a i-1 , the output is a iThe factorization layer uses the embedding vectors of user and product features and calls the formula: Calculate the FM output weight, where w∈R d , V i ∈R k , the linear part<w,x> The inner product reflects the importance of the first-order features, and the inner product reflects the importance of the second-order features.
[0016] The bidirectional LSTM network layer processes the user behavior features and models the behavior sequence.
[0017] The attention layer weights the embedding vectors.
[0018] The linear rectification function calculates the final result, and the recommendation system sorts the result in descending order and recommends the top n products to the user.
[0019] On the one hand, the present invention adds a bidirectional recurrent network to model the sequence from both the positive and negative directions, and at the same time adds an attention mechanism to give high weights to items or features with high correlation in the sequence. On the other hand, it takes advantage of the shallow network and cross-features to greatly improve its performance.
[0020] User and product features are also added. For example, in addition to user ID, user features include age, gender, mileage, etc. In addition to product ID, there are product category, brand, etc. These features can deal with data sparsity and cold start problems in collaborative filtering; on the other hand, a bidirectional LSTM (Long short-term memory) network is used to capture sequence features from both positive and negative directions.
[0021] In addition, the present invention also uses shallow neural networks, feature cross layers, attention mechanisms and other technologies to capture the intersection, fusion and weight between features.
[0022] The recommendation method of the present invention has the simplicity, efficiency, memory and interpretability of linear models, and the high generalization and diversity of recommendation results of deep learning models, while reducing time-consuming and labor-intensive feature engineering, adding user IDs to enhance the personalization of recommendations, and making full use of LSTM combined with attention mechanisms to model user behavior sequences, and fully tapping user preferences. The present invention is efficient and practical. By performing bidirectional loop mining on behavior sequences, the accuracy and diversity of recommendation results are improved while reducing time-consuming and labor-intensive feature engineering. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a schematic diagram of the system architecture recommended by the present invention;
[0024] Figure 2 This is a schematic diagram of the structure of the system model recommended by the present invention;
[0025] Figure 3 The figure is a schematic diagram of the recommended method of the present invention. DETAILED DESCRIPTION
[0026] In order to further understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0027] Figure 1 The system architecture is recommended for the present invention. The log system obtains user and product feature information based on the input user features and their context (such as user gender, age, driving experience, driving mileage, behavior habits, vehicle model, product brand, category, etc.), and sorts the sequence information by time through the user's previous purchase of products to obtain the user behavior feature sequence;
[0028] The recall module selects a predetermined number of the most relevant items for the user from the database storing vehicle information based on the above information.
[0029] A personalized recommendation system model is established to obtain the user's attention ranking of items based on the user and product feature information and the user behavior feature sequence, and the recommendation system model recommends items to users. Among them, the personalized recommendation system model includes an input layer, an embedding layer, a multi-layer perception network layer, a factor decomposition machine layer, and an attention layer.
[0030] Figure 2 The structure diagram of the recommendation system model of the present invention is as follows: a hierarchical recommendation system model is established, including: an input layer, an embedding layer, an LSTM network layer, a multi-layer perception network layer MLP layer, a factorization machine FM layer, a connection layer, an attention layer, and an output layer.
[0031] The input layer includes a feature input part and an item sequence input part. The feature input part inputs user and product features, and the item sequence input part inputs user behavior feature sequences. Each input feature is encoded using one-hot encoding to obtain one-hot encoding features.
[0032] The embedding layer reduces the dimension of the unique hot encoding features of the input layer to obtain the embedding vectors of users, products and their features. Specifically, for each feature of the input layer, the embedding matrix is used to reduce its dimension. For example, for any feature, the embedding matrix P∈R mxk , where m represents the number of features and k represents the dimension of the low-dimensional space, and its embedding vector is obtained;
[0033] Multi-layer perception network layer (MLP), which inputs the embedding vectors of user and product features into the MLP network.
[0034] The embedding vectors of user and product features are input into the factorization machine (FM) layer. The bidirectional LSTM network layer processes the user behavior features to model the behavior sequence. The attention layer is used to weight the embedding vectors to obtain the user's attention ranking for the items.
[0035] The linear rectifier function ReLU (Rectified Linear Unit) is called to calculate the recommendation result. The recommendation system sorts the recommendation result in descending order and recommends the top n products to the user.
[0036] A content-based temporal recommendation algorithm specifically includes the following steps:
[0037] Step 1: Obtain user and product feature information, such as user gender, age, vehicle model, mileage, product brand, category, etc., as well as user purchase sequence information, sort the sequence information by time, and the sorted data is called user behavior feature sequence;
[0038] Step 2: Establish a personalized recommendation system model, including the following parts:
[0039] Input layer, which consists of two parts: one is user and product features, and the other is a sequence of user behavior features. Each feature is encoded using unique hot encoding.
[0040] The embedding layer reduces the dimension of the unique hot encoding features of the input layer to obtain the embedding vectors of users, products and their features. For each feature of the input layer, the embedding matrix is used to reduce its dimension. For example, for any feature, the embedding matrix P∈R mxk , where R represents the feature matrix, m represents the number of features, and k represents the dimension, and its embedding vector p is obtained;
[0041] The multi-layer perception network layer (MLP) inputs the embedding vectors of user and product features into the MLP network and calls the formula according to the activation function:
[0042] a i =f(W i a i-1 +b i )=f(z i )
[0043] Among them, for the i-th layer network, the weight obtained by bp in the general neural network is W i , the bias is b i , the activation function is f (assuming it is relu), the weights and biases are initialized with Gaussian distribution and updated by BP (Back Propagation) algorithm, and the input vector is a i-1 , the output vector is ai , where (W i *a i-1 +b i ) is called z i .
[0044] Factorization Machine (FM), input the embedding vectors of user and product features into the FM network, according to the formula:
[0045] Determine the value of the expression y FM , which is the prediction result.
[0046] Among them, the weight w∈R d (user and product feature vectors), latent vector V i ∈R k (User behavior feature vector), linear part<w,x> It reflects the importance of the first-order features, and the inner product reflects the importance of the second-order features. d is the number of user behavior features, j1 is the number of the j1th user behavior features, and x j1 ,x j2 , is the input variable corresponding to the j1th and j2th user behavior features, x is the input variable related to the user and product features determined by the attention mechanism, V i , V j is the i,jth latent vector related to user behavior features.
[0047] The present invention adopts bidirectional LSTM technology to model sequential items in the recommendation algorithm. Bidirectional LSTM network layer, this layer processes the user behavior features and models the behavior sequence. Our goal of using bidirectional LSTM is to more fully explore the relationship between sequential items.
[0048] The attention layer is used to weight the embedding vectors and automatically learn the importance of each input vector to the output result. Calling formula:
[0049] Calculate the weights and C of all inputs
[0050] Among them, a i is the input variable x determined by the attention mechanism i The corresponding weight, T represents the number of input variables, and i represents the variable number.
[0051] The Rectified Linear Unit (ReLU) function calculates the recommended product results. The recommendation system sorts the results in descending order and recommends the top n products to the user.
[0052] like Figure 3The figure shows a schematic diagram of the recommendation method of the present invention. First, data statistics and preprocessing are performed to obtain user and item features and the user's access item sequence. The user and item features are input into the recommendation model MLP network and FM processing is performed. The user's access item sequence is input into the double-layer Lstm network for processing and then enters. The output of the MLP network, FM processing module, and splicing module is used as the input of the attention module. The attention module calculates and outputs the weights of each variable, then calculates the sum of the weights, and finally calculates the result through the Relu activation function. According to this result, the TopN is sorted in descending order and recommended to the user.
[0053] Obtain user characteristics (user ID, gender, age and other demographic attributes), item characteristics and user click item sequence data. The length of the item click sequence can be set according to the actual situation (for example, the size is N, and the sequence less than N is padded with 0 on the left). Arrange them in a column according to the order in which the events occurred. If the list length is greater than N, select the most recent N items for backup.
[0054] Each feature data is uniquely encoded and then converted into an embedding vector.
[0055] The user and its context embedding vector are input into the MLP network on the one hand, and the number of layers and nodes can be dynamically changed as needed, such as 2 layers and 3 nodes per layer.
[0056] The user feature vector and product feature vector are input into the MLP network and FM network respectively, and the item sequence vector is input into the double-layer LSTM network. Finally, the outputs of the three networks are spliced together, and the dimension is kept at 32. Then the attention layer is input to obtain the weight of each feature. Finally, the output result is obtained through the fully connected network, and the final score value is obtained through the Relu function. This value is used as the sorting basis, and the top N products are sorted in descending order to recommend them to users.
Claims
1. A recommendation system based on time series modeling, characterized in that: The system includes: the log system obtains user and product feature information according to the input user features and their context, sorts the sequence information according to time through the sequence information of the products purchased by the user, and obtains the user behavior feature sequence; the recommendation system model calculates the weight of each feature according to the user and product feature information and the user behavior feature sequence, calculates the sum of the weights, obtains the user's attention ranking for the items, calls the linear rectification function to calculate the recommendation sequence according to the attention ranking, and the recommendation system sorts the recommendation sequence in descending order, and recommends the first n reserved models to the user; The recommendation system model is a hierarchical structure, including input layer, embedding layer, multi-layer perception network layer, factor decomposition machine layer, and attention layer. The input layer uniquely encodes the user and product features and user behavior feature sequences to obtain unique hot encoding features; the embedding layer reduces the dimension of the unique hot encoding features to obtain the embedding vectors of users, products and their features; the multi-layer perception network layer, factor decomposition machine layer, and bidirectional LSTM network layer calculate the FM output weights, MLP output weights, and Bi-Lstm weights according to the embedding vectors; the attention layer weights the embedding vectors; the linear rectifier function ReLU calculates the user's attention to the product according to the above weights and weighted vectors, and the recommendation system sorts the attention, and recommends the top n predetermined models to the user; The multi-layer perception network layer uses the embedding vectors of user and product features to call the formula: i =f(W i a i-1 +b i ) Calculate the MLP output weight W of the i-th layer network i , where b i is the bias, f is the activation function, a i-1 is the input vector, a i The output is the output vector; The factorization layer uses the embedding vectors of user and product features to call the formula: Calculate the prediction result FM, where the linear part<w,x> Reflects the importance of the first-order feature, weight w∈R d , hidden vector V i ∈R k , inner product Reflects the importance of the second-order features; where d is the number of user behavior features, R d are the user and product feature vectors, R k is the user behavior feature vector, j1 is the number of the j1th user behavior feature, x j1 ,x j2 , is the input variable corresponding to the j1th and j2th user behavior features, x is the input variable related to the user and product features determined by the attention mechanism, V i , V j is the i,jth latent vector related to user behavior features, and k represents the spatial dimension.
2. The system according to claim 1, characterized in that The embedding layer reduces the dimension of the unique hot encoding features of the input layer for each feature of the input layer, using the embedding matrix P∈R mxk The embedding vector P of users, products and their features is obtained, where R represents the feature matrix, m represents the number of features, and k represents the spatial dimension.
3. A recommendation method based on time series modeling, characterized in that: The method comprises the following steps: obtaining user characteristic information, vehicle characteristic information, and sequence information of vehicles purchased by the user, sorting the sequence information according to time, and obtaining a user behavior characteristic sequence; calculating the user's attention ranking for the vehicle according to the user and vehicle characteristic information and the user behavior characteristic sequence, calling a linear rectification function to calculate a final result according to the attention ranking, and the recommendation system sorting the final result in descending order, and recommending the first n reserved vehicle models to the user; The specific steps of sorting vehicle attention include: the input layer performs one-hot encoding on the user and product features and user behavior feature sequences to obtain one-hot encoding features; the embedding layer performs dimension reduction on the one-hot encoding features to obtain embedding vectors of users, products and their features; the multi-layer perception network layer, factor decomposition machine layer and bidirectional LSTM network layer calculate FM output weights, MLP output weights and Bi-Lstm weights according to the embedding vectors; the attention layer weights the embedding vectors; the linear rectification function ReLU calculates the user's attention to the product according to the above weights and weighted vectors, and the recommendation system sorts the attention, and recommends the top n predetermined number of models to the user; The multi-layer perception network layer uses the embedding vectors of user and product features to call the formula: i =f(W i a i-1 +b i ) Calculate the MLP output weight W of the i-th layer network i , where b i is the bias, f is the activation function, a i-1 is the input vector, a i The output is the output vector; The factorization layer uses the embedding vectors of user and product features to call the formula: Calculate the prediction result FM, where the linear part<w,x> Reflects the importance of the first-order feature, weight w∈R d , hidden vector V i ∈R k , inner product Reflects the importance of the second-order features; where d is the number of user behavior features, R d are the user and product feature vectors, R k is the user behavior feature vector, j1 is the number of the j1th user behavior feature, x j1 ,x j2 , is the input variable corresponding to the j1th and j2th user behavior features, x is the input variable related to the user and product features determined by the attention mechanism, V i , V j is the i,jth latent vector related to user behavior features, and k represents the spatial dimension.
4. The method according to claim 3, characterized in that The embedding layer reduces the dimension of the unique hot encoding features of the input layer for each feature of the input layer, using the embedding matrix P∈R mxk The embedding vector P of users, products and their features is obtained, where R represents the feature matrix, m represents the number of features, and k represents the spatial dimension.
5. An electronic device, characterized in that: Including, including the recommendation system based on time series modeling as described in any one of claims 1-2.
6. A computer-readable storage medium having a computer-readable program stored therein, characterized in that: When the computer-readable program is called by the controller, it can execute the recommendation method based on time series modeling as described in any one of claims 3-4.
Citation Information
Patent Citations
Recommendation algorithm based on recurrent neural network
CN107507054A
Personalized recommendation method and system based on collaborative filtering and deep learning
CN112598462A
Advertisement click rate prediction method and device and computer equipment
CN113888238A
