Prediction method for repeated consumption behavior of user
By using Gaussian mixed model and time decay algorithm, combined with the timestamps in user consumption behavior data, long-term interest and collaborative preference characteristics are constructed, the problem of ignoring the time dimension in the existing technology is solved, and the accuracy of user repeated consumption behavior prediction is improved Sexual and personalized recommendation effects.
Patent Information
- Application Number
- CN202411099443.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-24
AI Technical Summary
The prior art ignores the time dimension in the prediction of user repeated consumption behavior, resulting in low accuracy of prediction results and failing to effectively consider the long-term and short-term interests of users.
By obtaining the timestamps in user consumption behavior data, using Gaussian mixed model for clustering, transforming it into long-term interest characteristics, and building a product recommendation prediction model with the collaborative preference characteristics, considering the time decay algorithm to calculate the long-term interest characteristics and collaborative preference characteristics of users. , output product recommendation prediction vector.
Taking into account the time dimension, the accuracy of users' repeated consumption behavior prediction is improved, personalized product recommendations are realized, and user experience and merchant efficiency are improved.
Smart Images

Figure CN119180692A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of commodity recommendation, and more specifically, to a method for predicting user repeated consumption behavior. Background Art
[0002] In recent years, with the development of social economy, online shopping behavior has a significant growth trend, showing the characteristics of continuous expansion of the scale of users and merchants, diversification of consumption patterns, and complexity of consumption choices. Personalized product recommendations for users are widely present in people's shopping behaviors. Mining repeated consumption behaviors from a large number of user behaviors with characteristics such as sparse data, lack of effective information, and large behavioral differences can effectively improve users' consumption experience, and can also promote merchants to carry out targeted advertising and publicity, improve the quality of platform services, and enhance merchant benefits.
[0003] The technology of personalized product recommendation for users includes two tasks: one is to predict the list of products that users are interested in, and the other is to predict the time when users become interested in the products of interest; in other words, personalized product recommendation for users is to recommend these products to users when they are interested in them. The existing technology is based on the prior Bayesian model, which uses probability distribution to fit the number of times users purchase each product and predicts the probability of purchasing the product at the next moment. However, the existing technology method ignores the significance of the time dimension in repeated consumption behavior, that is, it ignores the impact of time on users' long-term interests, and the accuracy of the prediction results is low. Summary of the invention
[0004] In order to overcome the defect of the above-mentioned prior art that the influence of time on the long-term and short-term interests of users is ignored, the present invention provides a prediction method for user repeated consumption behavior that takes the influence of time into consideration.
[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0006] Acquire user consumption behavior data of the target user, wherein the user consumption behavior data includes the user consumption behavior, the commodity corresponding to the user consumption behavior, and the timestamp when the user consumption behavior acts on the commodity;
[0007] Based on the timestamp of the user's consumption behavior data, the Gaussian mixture model is used to cluster the commodities in the user's consumption behavior data to obtain several cluster groups;
[0008] Based on a time decay algorithm, the cluster grouping is converted into long-term interest features of the target user;
[0009] Acquire the long-term interest characteristics of the consumer user, calculate the similarity between the long-term interest characteristics of the consumer user and the target user, select the nearest neighbor user group of the target user from the consumer users based on the similarity, and calculate the collaborative preference characteristics of the target user based on the nearest neighbor user group;
[0010] A product recommendation prediction model is constructed, wherein the product recommendation prediction model obtains a product recommendation prediction vector of the target user by integrating the long-term interest characteristics and collaborative preference characteristics of the target user.
[0011] The present invention also proposes a method for predicting the time of repeated consumption behavior of a user. The method for predicting repeated consumption behavior of a user includes the following steps:
[0012] Constructing a time prediction model, wherein the time prediction model calculates the frequency of the target user's user consumption behavior based on the timestamp of the user consumption behavior data, and uses the frequency to calculate the predicted time of the target user's next user consumption behavior;
[0013] Push the target user's product recommendation prediction vector to the target user at the predicted time of the target user's next consumption behavior;
[0014] The expression of the time prediction model includes:
[0015] t pred =βt pu +(1-β)t pv
[0016]
[0017] t ui =t pu(i+1) -t pui
[0018]
[0019] t vi =t pv(i+1) -t pvi
[0020] In the formula, t pred Indicates the predicted time of the target user's next consumption behavior; t pu Indicates the frequency of consumer behavior imposed on the target user by the product, t pv represents the frequency of target users' consumption behavior; β represents t pu and t pv The balance factor; N represents the total number of products in the product recommendation prediction vector of the target user; t pv(i+1) and t puiThey represent the timestamps of the target user’s consumption behavior for the product for the i+1th and ith times respectively; M represents the total number of times the target user has consumed the product; t pv(i+1) and t pvi represents the timestamps of the target user's i+1th and ith consumption behaviors; where c, β, and d all represent learnable parameters.
[0021] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0022] Based on the timestamp and time decay algorithm of the target user's user consumption behavior data, the long-term interest characteristics of the target user are calculated, and based on consumer users with similar interests to the target user, the collaborative preference characteristics of the target user are calculated; the product recommendation prediction model combines the target user's long-term interest characteristics and collaborative preference characteristics to output the target user's product recommendation prediction vector, thereby achieving the purpose of personalized product recommendations for the target user while considering the time dimension. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a flow chart of the method for predicting user repeated consumption behavior proposed in Example 1;
[0024] Figure 2 This is a schematic diagram of the clustering operation process proposed in Example 1;
[0025] Figure 3 This is a schematic diagram of the collaborative preference feature calculation process proposed in Example 1. DETAILED DESCRIPTION
[0026] The accompanying drawings are only used for illustrative purposes and should not be construed as limiting the present embodiment;
[0027] In order to better illustrate the present embodiment, some parts in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product;
[0028] It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0029] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0030] Example 1
[0031] This embodiment proposes a method for predicting user repeated consumption behavior. Figure 1 is a flow chart of a method for predicting user repeated consumption behavior according to this embodiment;
[0032] A method for predicting user repeated consumption behavior proposed in this embodiment includes the following steps:
[0033] S1: Obtaining the user consumption behavior data of the target user, wherein the user consumption behavior data includes the user consumption behavior, the commodity corresponding to the user consumption behavior, and the timestamp when the user consumption behavior acts on the commodity;
[0034] S2: Based on the timestamp of the user's consumption behavior data, a Gaussian mixture model is used to cluster the commodities in the user's consumption behavior data to obtain several cluster groups;
[0035] S3: Based on a time decay algorithm, the cluster grouping is converted into long-term interest features of the target user;
[0036] S4: Obtaining the long-term interest characteristics of the consumer user, calculating the similarity between the long-term interest characteristics of the consumer user and the target user, selecting the nearest neighbor user group of the target user from the consumer users based on the similarity, and calculating the collaborative preference characteristics of the target user based on the nearest neighbor user group;
[0037] S5: Construct a product recommendation prediction model, which obtains a product recommendation prediction vector for the target user by integrating the long-term interest characteristics and collaborative preference characteristics of the target user.
[0038] During the specific implementation process, the long-term interest characteristics of the target user are calculated based on the timestamp and time decay algorithm of the target user's user consumption behavior data, and the collaborative preference characteristics of the target user are calculated based on consumer users with similar interests to the target user; the product recommendation prediction model combines the long-term interest characteristics and collaborative preference characteristics of the target user to output the target user's product recommendation prediction vector, thereby achieving the purpose of making personalized product recommendations for the target user while considering the time dimension.
[0039] As an exemplary illustration, the user consumption behavior data of the target user is obtained from an e-commerce platform (such as JD.com and Taobao). After acquisition, the products with less than 5 interactions and outliers are eliminated, and each user sample data is divided into 80% training data and 20% test data and normalized; when extracting test data, the reproducibility of the results is ensured by fixing the random number seed.
[0040] As an exemplary explanation, the long-term interest characteristics of the consumer user can be obtained by replacing the operation object in steps S1 to S3 with the consumer user.
[0041] In an optional embodiment, before clustering the commodities in the user consumption behavior data using a Gaussian mixture model based on the timestamp of the user consumption behavior data, the attention weights of the commodities in the user consumption behavior data are calculated using a Transfomer model with a self-attention mechanism, and the commodities are weighted based on the attention weights to obtain the attention-weighted commodities. When performing the clustering operation, the operation object is the attention-weighted commodities.
[0042] The calculation expression of the attention weight includes:
[0043]
[0044]
[0045] In the formula, Represents the product vector corresponding to the user consumption behavior b of the target user u; express The fth item of express The normalized weight of The relative importance of each commodity in the context; f Display products The normalized weight of express The corresponding query vector matrix; express The corresponding key vector matrix; express The corresponding value vector matrix; d k represents the dimension of the key vector, also represented by Dimensions; and Respectively and The corresponding learnable linear transformation matrix.
[0046] As an example, the product vector Each product in is represented as a one-hot encoded vector.
[0047] As an example, take commodity For example, for products When performing weighted operations, Multiply by z f That's it.
[0048] In an optional embodiment, based on the timestamp of the user consumption behavior data, the steps of clustering the commodities in the user consumption behavior data using a Gaussian mixture model to obtain a plurality of cluster groups include:
[0049] The number of cluster groups n is calculated using a cluster number determination algorithm, and the number of cluster groups n is regarded as the number of Gaussian distributions of a Gaussian mixture model. Based on the timestamp of the user consumption behavior data, the Gaussian mixture model is used to calculate the corresponding probabilities of the commodities in the user consumption behavior data in each Gaussian distribution, and the commodities are divided into cluster groups corresponding to the Gaussian distribution with the largest probability, to obtain n cluster groups;
[0050] Among them, the i-th product v in the user consumption behavior data i The corresponding probability p(t i ) include:
[0051]
[0052] Where, t i Indicates product v i The corresponding timestamp, φ i represents the weight of the i-th Gaussian distribution, μ i and σ i denote the mean and variance of the i-th Gaussian distribution, and φ i , μ i and σ i The solution is obtained through an expectation-maximization iterative algorithm.
[0053] As an example, Figure 2 This is a schematic diagram of the clustering operation process proposed in this embodiment. Figure 2 The steps of the clustering operation of this optional embodiment are shown.
[0054] As an exemplary illustration, the cluster number determination algorithm is the Bayesian Information Criterion or the K-Means algorithm.
[0055] As an exemplary illustration, the user consumption behavior includes several seed behaviors; the sub-behaviors include adding items to a shopping cart, adding items to favorites, and / or purchasing items; taking the case where the user consumption behavior has only one sub-behavior, and the sub-behavior is purchasing items, in this optional embodiment, clustering is performed based on the purchase time interval to achieve automatic grouping of user items and short-term interest division, and the clustering method is used to model the correlation of user repurchase behaviors, which can make up for the sparse repurchase behavior of a single user and improve the accuracy of the prediction.
[0056] In an optional embodiment, for the plurality of cluster groups, the commodities in each cluster group are sorted in order of timestamp from old to new;
[0057] Based on the time decay algorithm, the calculation expression for converting the cluster grouping into the long-term interest characteristics of the target user includes:
[0058]
[0059] Where U t represents the long-term interest characteristics of the target user u; n represents the number of cluster groups; g represents the corresponding inter-group attenuation coefficient of the cluster group; V groupj represents the short-term interest feature corresponding to the j-th cluster group; m represents the total number of commodities contained in the j-th cluster group; represents the i-th product of the j-th cluster grouping of target user u; a represents the intra-group attenuation coefficient of the cluster grouping.
[0060] In this optional embodiment, the intra-group decay mainly realizes the short-term interest modeling after user clustering, and the inter-group decay mainly realizes the overall interest modeling of users. The intra-group decay coefficient and the inter-group decay coefficient are both time decay coefficients. By using these two coefficients, the weight of the goods with earlier interaction time can be made smaller, and the impact on the user's current interest can be made smaller. By assigning decay weights to characterize the dynamic changes of user interests, the user's consumption behavior can be predicted more accurately.
[0061] In an optional embodiment, the steps of obtaining the long-term interest characteristics of the consumer user, calculating the similarity between the long-term interest characteristics of the consumer user and the target user, selecting the nearest neighbor user group of the target user from the consumer users based on the similarity, and calculating the collaborative preference characteristics of the target user based on the nearest neighbor user group include:
[0062] Obtain the long-term interest characteristics of consumer users, and use the Euclidean distance to calculate the similarity between the long-term interest characteristics of consumer users and target users. The smaller the Euclidean distance, the greater the similarity between the two. According to the size of the similarity, the consumer users are sorted in descending order, and the first k consumer users are taken as the nearest neighbor user group U of the target user. The long-term interest characteristics of the nearest neighbor user group U are used to calculate the target user's collaborative preference characteristics U n , the collaborative preference feature U n The expressions include:
[0063]
[0064]
[0065] Where U neighbori Represents the i-th consumer user in the nearest neighbor user group U.
[0066] In an optional embodiment, the expression of the commodity recommendation prediction model includes:
[0067]
[0068] In the formula, represents the product recommendation prediction vector of target user u; α represents the long-term interest feature U of the target user t and the collaborative preference characteristic U n The balance factor; a represents the intra-group attenuation coefficient of cluster grouping;
[0069] The product recommendation prediction model obtains the product recommendation prediction vector of the target user by integrating the long-term interest characteristics and collaborative preference characteristics of the target user, and then iteratively optimizes the product recommendation prediction vector of the target user using a first loss function. When the loss value of the first loss function reaches a minimum or the number of iterations reaches a preset value, the iteration is stopped to obtain the optimized product recommendation prediction vector of the target user;
[0070] The expression of the first loss function includes:
[0071]
[0072] In the formula, represents the first loss function; Represents the target user's product recommendation prediction vector The label of the i-th recommended product; Represents the label of the i-th recommended item in the target user’s item recommendation true vector.
[0073] In this optional embodiment, Figure 3 This is a schematic diagram of the collaborative preference feature calculation process of this embodiment. Figure 3 A schematic diagram of the steps of selecting a nearest neighbor user group of a target user from consumer users and calculating the collaborative preference features of the target user based on the nearest neighbor user group is shown.
[0074] In an optional embodiment, the user consumption behavior includes several seed behaviors;
[0075] The sub-actions include adding products to a shopping cart, adding products to favorites, and / or purchasing products;
[0076] When the user consumption behavior includes at least two sub-behaviors, the user consumption behavior data is divided into Cop component data according to the type of the sub-behavior;
[0077] Where Cop is equal to the number of sub-action types, and each sub-data includes a sub-action, the product corresponding to the sub-action, and the timestamp when the sub-action acts on the product;
[0078] Each sub-data corresponds to a product recommendation prediction vector for a target user And the predicted time t of the next consumption behavior of a target user pred ;
[0079] The product recommendation prediction model corresponds to each sub-data Weighted fusion is the final target user's product recommendation prediction vector Said That is, the output of the product recommendation prediction model; wherein, one sub-data corresponds to one product recommendation preset weight, and the sum of the product recommendation preset weights corresponding to all sub-data is 1.
[0080] As an exemplary explanation, the product recommendation preset weight and time prediction weight are set according to actual needs. When the user consumption behavior includes three sub-behaviors: adding products to the shopping cart, collecting products, and purchasing products, the product recommendation preset weights corresponding to these three sub-behaviors can be set to: 0.2, 0.1, and 0.7.
[0081] As an exemplary description, this optional embodiment obtains the most likely product to be consumed from a large number of products by analyzing information on multiple user behaviors (such as favorites, adding to shopping carts, purchases, etc.), and obtains the time when the user interacts with the product again based on the frequency of interaction between the user and the product, thereby optimizing the user experience and improving the merchant's push efficiency.
[0082] Example 2
[0083] This embodiment is based on the prediction method for user repeated consumption behavior proposed in Embodiment 1, and proposes the following performance evaluation example:
[0084] MAE and NDCG were used as performance indicators of the method proposed in Example 1 to evaluate the prediction effect.
[0085] MAE: Mean absolute error, which represents the average value of the absolute error between the predicted value and the observed value. In the experiment, it is to calculate the average value of the absolute error between the predicted event time and the actual event time.
[0086] NDCG: NDCG is the result of DCG normalization, and IDCG is the cumulative value of the loss under ideal sorting, that is, the DCG value after ideal sorting according to the relevance score of the real label in the recommendation list. The calculation formulas of DCG and NDCG are:
[0087]
[0088] Among them, kg is the first kg ranked products in the recommendation list set, rel i Indicates the relevance of the product. If the predicted product is in the real product of the test set, then rel i Assign a value of 1, otherwise 0, to evaluate the accuracy of the method's product recommendation list order.
[0089] Example 3
[0090] This embodiment proposes a time prediction method for user's repeated consumption behavior, and applies the prediction method for user's repeated consumption behavior proposed in Embodiment 1.
[0091] The time prediction method for user repeated consumption behavior comprises the following steps:
[0092] Constructing a time prediction model, wherein the time prediction model calculates the frequency of the target user's user consumption behavior based on the timestamp of the user consumption behavior data, and uses the frequency to calculate the predicted time of the target user's next user consumption behavior;
[0093] Push the target user's product recommendation prediction vector to the target user at the predicted time of the target user's next consumption behavior;
[0094] The expression of the time prediction model includes:
[0095] t pred =βt pu +(1-β)t pv
[0096]
[0097] t ui =t pu(i+1) -t pui
[0098]
[0099] t vi =t pv(i+1) -t pvi
[0100] In the formula, t pred Indicates the predicted time of the target user's next consumption behavior; t pu Indicates the frequency of consumer behavior imposed on the target user by the product, t pv represents the frequency of target users' consumption behavior; β represents t pu and t pv The balance factor; N represents the total number of products in the product recommendation prediction vector of the target user; t pv(i+1) and t pui They represent the timestamps of the target user’s consumption behavior for the product for the i+1th and ith times respectively; M represents the total number of times the target user has consumed the product; t pv(i+1) and t pvi represents the timestamps of the target user's i+1th and ith consumption behaviors; where c, β, and d all represent learnable parameters.
[0101] As an exemplary illustration, the user consumption behavior includes several seed behaviors; the sub-behaviors include adding items to a shopping cart, collecting items and / or purchasing items; taking the case where the user consumption behavior has only one sub-behavior, and the sub-behavior is purchasing items, as an example, in this optional embodiment, a neural network parameter learner is set for each sequence to capture the user's personalized shopping frequency, a sliding window is used to obtain sequence samples, and a learnable time attenuation coefficient c is set to capture the target user's purchase frequency; in this optional embodiment, by designing a neural network module, the user's personalized repurchase cycle and item purchase cycle are obtained, thereby realizing information fusion in two dimensions of time and items, making the prediction more comprehensive.
[0102] In this optional embodiment, the long-term interest characteristics of the target user are calculated based on the timestamp and time decay algorithm of the target user's user consumption behavior data, and the collaborative preference characteristics of the target user are calculated based on consumer users with similar interests to the target user; the product recommendation prediction model combines the long-term interest characteristics and collaborative preference characteristics of the target user to output the target user's product recommendation prediction vector, thereby achieving the purpose of making personalized product recommendations for the target user; the time prediction model calculates the predicted time of the next user consumption behavior of the target user by calculating the frequency of the target user's user consumption behavior, and recommends the products in the product recommendation prediction vector to the target user at the predicted time, thereby achieving the purpose of recommending products that the user is interested in at the time when the user is interested in the products.
[0103] In an optional embodiment, the time prediction model calculates the frequency of the target user's user consumption behavior based on the timestamp of the user consumption behavior data, and uses the frequency to calculate the predicted time of the next user consumption behavior of the target user, and then uses the second loss function to iteratively optimize the predicted time of the next user consumption behavior of the target user. When the loss value of the second loss function reaches the minimum or the number of iterations reaches a preset value, the iteration is stopped to obtain the optimized predicted time of the next user consumption behavior of the target user;
[0104] The expression of the second loss function includes:
[0105]
[0106] In the formula, LOSS represents the second loss function, U represents the nearest neighbor user group of the target user, and t pred Indicates the predicted time of the next consumption behavior of the target user. Indicates the actual time when the target user will have the next consumption behavior.
[0107] In an optional embodiment, the user consumption behavior includes several seed behaviors;
[0108] The sub-actions include adding products to a shopping cart, adding products to favorites, and / or purchasing products;
[0109] When the user consumption behavior includes at least two sub-behaviors, the user consumption behavior data is divided into Cop component data according to the type of the sub-behavior;
[0110] Where Cop is equal to the number of sub-action types, and each sub-data includes a sub-action, the product corresponding to the sub-action, and the timestamp when the sub-action acts on the product;
[0111] Each piece of sub-data corresponds to the predicted time t of the next consumption behavior of a target user pred ;
[0112] The time prediction model calculates the t corresponding to each sub-data pred Weighted fusion is the final prediction time of the next consumption behavior of the target user Said That is the output of the time prediction model; wherein, one sub-data corresponds to one time prediction weight, and the sum of the time prediction weights corresponding to all sub-data is 1.
[0113] This embodiment proposes a prediction system for user repeated consumption behavior, which is used to implement a prediction method for user repeated consumption behavior proposed in Example 1 and a time prediction method for user repeated consumption behavior proposed in Example 3.
[0114] The prediction system for user repeated consumption behavior includes:
[0115] A data acquisition module is used to acquire user consumption behavior data of a target user, wherein the user consumption behavior data includes user consumption behavior, the commodity corresponding to the user consumption behavior, and the timestamp when the user consumption behavior acts on the commodity;
[0116] A clustering module is used to cluster the commodities in the user consumption behavior data based on the timestamp of the user consumption behavior data using a Gaussian mixture model to obtain a number of cluster groups;
[0117] A long-term interest feature generation module, used for converting the cluster grouping into the long-term interest features of the target user based on a time decay algorithm;
[0118] A collaborative preference feature generation module is used to obtain the long-term interest features of the consumer user, calculate the similarity between the long-term interest features of the consumer user and the target user, select the nearest neighbor user group of the target user from the consumer users based on the similarity, and calculate the collaborative preference features of the target user based on the nearest neighbor user group;
[0119] A recommended product prediction module is used to construct a product recommendation prediction model, wherein the product recommendation prediction model obtains a product recommendation prediction vector of the target user by integrating the long-term interest characteristics and collaborative preference characteristics of the target user;
[0120] The recommended time prediction module is used to construct a time prediction model. The time prediction model calculates the frequency of user consumption behavior of the target user based on the timestamp of the user consumption behavior data, and uses the frequency to calculate the predicted time of the next user consumption behavior of the target user.
[0121] In this optional embodiment, the dynamic attenuation characteristics of user multi-behavior preferences and their collaborative similarities are used to model and capture the temporal patterns of individual behavior events, so that the server of the repeat consumption system can realize the joint prediction of the timing and possibility of repeat consumption through the user interaction history, and solve the sparsity problem of single user behavior. The present application not only predicts the occurrence time of repeat purchase behavior, but also predicts the list of items, realizes the joint prediction of repeat purchase possibility and repeat purchase timing, and provides more accurate prediction results; this has certain reference value for understanding user behavior, improving product user experience, and optimizing product sales strategies.
[0122] This embodiment proposes a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the method for predicting user repeated consumption behavior described in Example 1 or the steps of the method for predicting the time of user repeated consumption behavior described in Example 3.
[0123] It can be understood that the time prediction method and computer device for user repeated consumption behavior of this embodiment improves the method of Example 1. The optional items in the above-mentioned Example 1 are also applicable to this embodiment, so they will not be repeated here.
[0124] The same or similar reference numerals correspond to the same or similar components;
[0125] The terms used to describe the positional relationship in the drawings are only used for illustrative purposes and should not be construed as limiting the present embodiment;
[0126] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A method for predicting user repeated consumption behavior, characterized in that: The following steps are involved: Acquire user consumption behavior data of the target user, wherein the user consumption behavior data includes the user consumption behavior, the commodity corresponding to the user consumption behavior, and the timestamp when the user consumption behavior acts on the commodity; Based on the timestamp of the user's consumption behavior data, the Gaussian mixture model is used to cluster the commodities in the user's consumption behavior data to obtain several cluster groups; Based on a time decay algorithm, the cluster grouping is converted into long-term interest features of the target user; Acquire the long-term interest characteristics of the consumer user, calculate the similarity between the long-term interest characteristics of the consumer user and the target user, select the nearest neighbor user group of the target user from the consumer users based on the similarity, and calculate the collaborative preference characteristics of the target user based on the nearest neighbor user group; A product recommendation prediction model is constructed, wherein the product recommendation prediction model obtains a product recommendation prediction vector of the target user by integrating the long-term interest characteristics and collaborative preference characteristics of the target user.
2. The method for predicting user repeated consumption behavior according to claim 1, characterized in that: Before clustering the commodities in the user consumption behavior data using the Gaussian mixture model based on the timestamp of the user consumption behavior data, the attention weights of the commodities in the user consumption behavior data are calculated using the Transfomer model with a self-attention mechanism, and the commodities are weighted based on the attention weights to obtain the attention-weighted commodities. When performing the clustering operation, the operation object is the attention-weighted commodities. The calculation expression of the attention weight includes: In the formula, Represents the product vector corresponding to the user consumption behavior b of the target user u; express The fth item of express The normalized weight of The relative importance of each commodity in the context; f Display products The normalized weight of express The corresponding query vector matrix; express The corresponding key vector matrix; express The corresponding value vector matrix; d k represents the dimension of the key vector, also represented by Dimensions; and Respectively and The corresponding learnable linear transformation matrix.
3. The method for predicting user repeated consumption behavior according to claim 1, characterized in that: Based on the timestamp of the user consumption behavior data, the Gaussian mixture model is used to cluster the commodities in the user consumption behavior data to obtain several cluster grouping steps, including: The number of cluster groups n is calculated using a cluster number determination algorithm, and the number of cluster groups n is regarded as the number of Gaussian distributions of a Gaussian mixture model. Based on the timestamp of the user consumption behavior data, the Gaussian mixture model is used to calculate the corresponding probabilities of the commodities in the user consumption behavior data in each Gaussian distribution, and the commodities are divided into cluster groups corresponding to the Gaussian distribution with the largest probability, to obtain n cluster groups; Among them, the i-th product v in the user consumption behavior data i The corresponding probability p(t i ) include: In the formula, t i Indicates product v i The corresponding timestamp, φ i represents the weight of the i-th Gaussian distribution, μ i and σ i denote the mean and variance of the i-th Gaussian distribution, and φ i , μ i and σ i The solution is obtained through an expectation-maximization iterative algorithm.
4. The method for predicting user repeated consumption behavior according to claim 1, characterized in that: For the plurality of cluster groups, the commodities in each cluster group are sorted in order of timestamp from old to new; Based on the time decay algorithm, the calculation expression for converting the cluster grouping into the long-term interest characteristics of the target user includes: Where U t represents the long-term interest characteristics of the target user u; n represents the number of cluster groups; g represents the corresponding inter-group attenuation coefficient of the cluster group; V groupj represents the short-term interest feature corresponding to the j-th cluster group; m represents the total number of commodities contained in the j-th cluster group; represents the i-th product of the j-th cluster grouping of target user u; a represents the intra-group attenuation coefficient of the cluster grouping.
5. The method for predicting user repeated consumption behavior according to claim 1, characterized in that: The steps of obtaining the long-term interest characteristics of the consumer user, calculating the similarity between the long-term interest characteristics of the consumer user and the target user, selecting the nearest neighbor user group of the target user from the consumer users based on the similarity, and calculating the collaborative preference characteristics of the target user based on the nearest neighbor user group include: Obtain the long-term interest characteristics of consumer users, and use the Euclidean distance to calculate the similarity between the long-term interest characteristics of consumer users and target users. The smaller the Euclidean distance, the greater the similarity between the two. According to the size of the similarity, the consumer users are sorted in descending order, and the first k consumer users are taken as the nearest neighbor user group U of the target user. The long-term interest characteristics of the nearest neighbor user group U are used to calculate the target user's collaborative preference characteristics U n , the collaborative preference feature U n The expressions include: Where U neighbori Represents the i-th consumer user in the nearest neighbor user group U.
6. The method for predicting user repeated consumption behavior according to claim 1, characterized in that: The expression of the product recommendation prediction model includes: In the formula, represents the product recommendation prediction vector of target user u; α represents the long-term interest feature U of the target user t and the collaborative preference characteristic U n The balance factor; a represents the intra-group attenuation coefficient of cluster grouping; The product recommendation prediction model obtains the product recommendation prediction vector of the target user by integrating the long-term interest characteristics and collaborative preference characteristics of the target user, and then iteratively optimizes the product recommendation prediction vector of the target user using a first loss function. When the loss value of the first loss function reaches a minimum or the number of iterations reaches a preset value, the iteration is stopped to obtain the optimized product recommendation prediction vector of the target user; The expression of the first loss function includes: In the formula, represents the first loss function; Represents the target user's product recommendation prediction vector The label of the i-th recommended product; Represents the label of the i-th recommended item in the target user’s item recommendation true vector.
7. The method for predicting user repeated consumption behavior according to any one of claims 1 to 6, characterized in that: The user consumption behavior includes several seed behaviors; The sub-actions include adding products to a shopping cart, adding products to favorites, and / or purchasing products; When the user consumption behavior includes at least two sub-behaviors, the user consumption behavior data is divided into Cop component data according to the type of the sub-behavior; Where Cop is equal to the number of sub-action types, and each sub-data includes a sub-action, the product corresponding to the sub-action, and the timestamp when the sub-action acts on the product; Each sub-data corresponds to a product recommendation prediction vector for a target user And the predicted time t of the next consumption behavior of a target user pred ; The product recommendation prediction model corresponds to each sub-data Weighted fusion is the final target user's product recommendation prediction vector Said That is, the output of the product recommendation prediction model; wherein, one sub-data corresponds to one product recommendation preset weight, and the sum of the product recommendation preset weights corresponding to all sub-data is 1.
8. A method for predicting the time of a user's repeated consumption behavior, applying the method for predicting the user's repeated consumption behavior according to any one of claims 1 to 7, characterized in that: The following steps are involved: Constructing a time prediction model, wherein the time prediction model calculates the frequency of the target user's user consumption behavior based on the timestamp of the user consumption behavior data, and uses the frequency to calculate the predicted time of the target user's next user consumption behavior; Push the target user's product recommendation prediction vector to the target user at the predicted time of the target user's next consumption behavior; The expression of the time prediction model includes: t pred =βt pu +(1-β)t pv t ui =t pu(i+1) -t pui t vi =t pv(i+1) -t pvi In the formula, t pred Indicates the predicted time of the target user's next consumption behavior; t pu Indicates the frequency of consumer behavior imposed on the target user by the product, t pv represents the frequency of target users' consumption behavior; β represents t pu and t pv The balance factor; N represents the total number of products in the product recommendation prediction vector of the target user; t pv(i+1) and t pui They represent the timestamps of the target user’s consumption behavior for the product for the i+1th and ith times respectively; M represents the total number of times the target user has consumed the product; t pv(i+1) and t pvi represents the timestamps of the target user's i+1th and ith consumption behaviors; where c, β, and d all represent learnable parameters.
9. The method for predicting the time of user's repeated consumption behavior according to claim 8, characterized in that: The time prediction model calculates the frequency of the target user's user consumption behavior based on the timestamp of the user consumption behavior data, and uses the frequency to calculate the predicted time of the next user consumption behavior of the target user, and then uses the second loss function to iteratively optimize the predicted time of the next user consumption behavior of the target user. When the loss value of the second loss function reaches the minimum or the number of iterations reaches a preset value, the iteration is stopped to obtain the optimized predicted time of the next user consumption behavior of the target user; The expression of the second loss function includes: In the formula, LOSS represents the second loss function, U represents the nearest neighbor user group of the target user, and t pred Indicates the predicted time of the next consumption behavior of the target user. Indicates the actual time when the target user will have the next consumption behavior.
10. The time prediction method for user repeated consumption behavior according to claim 8 or 9, characterized in that: The user consumption behavior includes several seed behaviors; The sub-actions include adding products to a shopping cart, adding products to favorites, and / or purchasing products; When the user consumption behavior includes at least two sub-behaviors, the user consumption behavior data is divided into Cop component data according to the type of the sub-behavior; Where Cop is equal to the number of sub-action types, and each sub-data includes a sub-action, the product corresponding to the sub-action, and the timestamp when the sub-action acts on the product; Each piece of sub-data corresponds to the predicted time t of the next consumption behavior of a target user pred ; The time prediction model calculates the t corresponding to each sub-data pred Weighted fusion is the final prediction time of the next consumption behavior of the target user Said That is the output of the time prediction model; wherein, one sub-data corresponds to one time prediction weight, and the sum of the time prediction weights corresponding to all sub-data is 1.
Citation Information
Cited By
Consumption pattern recognition method and system
CN120804423A
