CN116880886A - Updating method and device of product recommendation model - Google Patents

Updating method and device of product recommendation model Download PDF

Info

Publication number
CN116880886A
CN116880886A CN202310814165.1A CN202310814165A CN116880886A CN 116880886 A CN116880886 A CN 116880886A CN 202310814165 A CN202310814165 A CN 202310814165A CN 116880886 A CN116880886 A CN 116880886A
Authority
CN
China
Prior art keywords
product
data set
user
interaction data
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310814165.1A
Other languages
Chinese (zh)
Inventor
童楚婕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202310814165.1A priority Critical patent/CN116880886A/en
Publication of CN116880886A publication Critical patent/CN116880886A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Economics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Business, Economics & Management (AREA)
  • Evolutionary Biology (AREA)
  • Computer Security & Cryptography (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a method and a device for updating a product recommendation model, and relates to the technical field of recommendation algorithms. The method comprises the following steps: acquiring an initial interaction data set, wherein the initial interaction data set comprises initial user data and initial product data; acquiring a trained product recommendation model according to the initial interaction data set; acquiring a new interaction data set, wherein the new interaction data set comprises new user data and new product data; and under the condition that any one of the new added user data or the new added product data exists in the initial interaction data set, updating the product recommendation model by adopting an incremental matrix decomposition algorithm. The method can achieve the purpose of rapidly updating the product recommendation model.

Description

Updating method and device of product recommendation model
Technical Field
The application relates to the technical field of recommendation algorithms, in particular to a method and a device for updating a product recommendation model.
Background
With the development of information technology and the internet industry, information overload has become a challenge for people to process information. It is a very important and challenging matter for a user how to quickly and accurately locate the content that he needs in an exponentially growing resource. It is also a difficult matter for merchants to present the proper products to users in time, thereby promoting increases in transaction volume and economy. The advent of the recommender system greatly eases this difficulty. Currently, in a recommendation system, a user's preference is often used to recommend a product to the user, and the user's preference is often changed according to an external environment. In addition, cold start problems often occur when new users arrive and new products, i.e., the system does not have enough information to match the consumer to the product or service. The recommender system may also label incorrectly for user preferences. This requires a varying recommendation system to cope with this variation.
In the conventional art, for a machine learning project, a data scientist trains a model by collecting data, processing the data, and then deploying the model into production. As the performance of the model begins to deteriorate, the data scientist typically repeats this cycle from scratch. When the change occurs, a new data total update model is added, all training samples in a certain time period are utilized for retraining, and the trained new model is used for replacing an outdated model.
However, the full-scale update method is often performed on an offline large data platform, and the sample size required to be trained is large, so that the required training time is long, and the delay of data is also long, which results in that the full-scale update mode is the model update mode with worst "real-time", so that a method is needed to solve the above problem.
Disclosure of Invention
Based on the method and the device, the product recommendation model can be built by utilizing the principle of fast incremental matrix decomposition and the implicit feedback and the principle of incremental random gradient descent, so that the purpose of fast updating the product recommendation model is realized.
In a first aspect, the present application provides a method for updating a product recommendation model. The method comprises the following steps:
Acquiring an initial interaction data set, wherein the initial interaction data set comprises initial user data and initial product data;
acquiring a trained product recommendation model according to the initial interaction data set;
acquiring a new interaction data set, wherein the new interaction data set comprises new user data and new product data;
and under the condition that any one of the new added user data or the new added product data exists in the initial interaction data set, updating the product recommendation model by adopting an incremental matrix decomposition algorithm.
In one embodiment, before obtaining the trained product recommendation model according to the initial interaction data set, the method further includes:
analyzing the initial user data and the initial product data to obtain product interaction behavior moments of the user;
sequencing the product interaction behavior moments, and simulating to obtain user behavior time stream information;
and determining user behavior preference information by adopting an implicit feedback algorithm according to the user behavior time flow information.
In one embodiment, the updating the product recommendation model using an incremental matrix decomposition algorithm includes:
constructing a scoring matrix according to the user behavior preference information, wherein the scoring matrix is used as an input matrix of the product recommendation model;
According to the input matrix, an incremental matrix decomposition algorithm is adopted to obtain an output matrix;
and updating the product recommendation model according to the newly added interaction data set and the output matrix.
In one embodiment, the output matrix includes a user matrix and a product matrix; and updating the product recommendation model according to the newly added interaction data set and the output matrix comprises the following steps:
calculating to obtain a prediction recall rate through the product recommendation model according to the newly-added interaction data set;
if the predicted recall rate is greater than a recall rate threshold, obtaining an updated user matrix through a random gradient descent algorithm according to the newly added interaction data set and the product matrix;
and updating the product recommendation model according to the updated user matrix.
In one embodiment, the type of product recommendation model includes a collaborative filtering model; the obtaining the trained product recommendation model according to the initial interaction data set comprises the following steps:
constructing the collaborative filtering model through the initial interaction data set;
and carrying out iterative training on the collaborative filtering model by taking a preset function as an objective function and a random gradient descent algorithm as an optimization direction, and obtaining a trained product recommendation model.
In one embodiment, the method further comprises:
integrating the newly added interaction data set and the initial interaction data set, and training the full-scale data set of the product recommendation model based on the integrated interaction data set.
In a second aspect, the application further provides a device for updating the product recommendation model. The device comprises:
the data collection module is used for obtaining an initial interaction data set, wherein the initial interaction data set comprises initial user data and initial product data;
the model building module is used for acquiring a trained product recommendation model according to the initial interaction data set;
the data acquisition module is also used for acquiring a new interaction data set, wherein the new interaction data set comprises new user data and new product data;
and the model updating module is used for updating the product recommendation model by adopting an incremental matrix decomposition algorithm under the condition that any one of the new user data or the new product data exists in the initial interaction data set.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Acquiring an initial interaction data set, wherein the initial interaction data set comprises initial user data and initial product data;
acquiring a trained product recommendation model according to the initial interaction data set;
acquiring a new interaction data set, wherein the new interaction data set comprises new user data and new product data;
and under the condition that any one of the new added user data or the new added product data exists in the initial interaction data set, updating the product recommendation model by adopting an incremental matrix decomposition algorithm.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring an initial interaction data set, wherein the initial interaction data set comprises initial user data and initial product data;
acquiring a trained product recommendation model according to the initial interaction data set;
acquiring a new interaction data set, wherein the new interaction data set comprises new user data and new product data;
and under the condition that any one of the new added user data or the new added product data exists in the initial interaction data set, updating the product recommendation model by adopting an incremental matrix decomposition algorithm.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
acquiring an initial interaction data set, wherein the initial interaction data set comprises initial user data and initial product data;
acquiring a trained product recommendation model according to the initial interaction data set;
acquiring a new interaction data set, wherein the new interaction data set comprises new user data and new product data;
and under the condition that any one of the new added user data or the new added product data exists in the initial interaction data set, updating the product recommendation model by adopting an incremental matrix decomposition algorithm.
According to the method, the device, the computer equipment, the storage medium and the computer program product for updating the product recommendation model, the implicit feedback algorithm is utilized to conduct data processing on the initial interaction data set, so that the data are more accurate and effective, and the processed initial interaction data set is utilized to build the product recommendation model. And then, for the newly added interaction data set, carrying out matrix decomposition on the product recommendation model through an incremental matrix decomposition algorithm, and updating the product recommendation model by adopting a random gradient descent algorithm, so that the product recommendation model gradually tends to be accurate. The learning of the incremental sample by the product recommendation model is equivalent to continuously inputting the incremental sample on the basis of the original sample to carry out gradient descent. The system can adapt to the change of external environment and users under ideal conditions, can update the model generally only by inputting some increment data, and reflect the current state, thereby realizing the purpose of quickly updating the product recommendation model.
Drawings
FIG. 1 is an application environment diagram of a method for updating a product recommendation model in one embodiment;
FIG. 2 is a flow chart illustrating a method for updating a product recommendation model according to an embodiment;
FIG. 3 is a schematic diagram of an unfolding process of step S208 in one embodiment;
FIG. 4 is a schematic diagram of model matrix decomposition of a method for updating a product recommendation model in one embodiment;
FIG. 5 is a block diagram of an apparatus for updating a product recommendation model in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The method for updating the product recommendation model provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store an initial interaction data set and a newly added interaction data set that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The server 104 obtains the initial interaction data set; acquiring a trained product recommendation model according to the initial interaction data set; acquiring a newly added interaction data set; and under the condition that any one of the newly added user data or the newly added product data exists in the initial interaction data set, updating the product recommendation model by adopting an incremental matrix decomposition algorithm. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
Explanation of related nouns of the application:
incremental matrix decomposition algorithm: also known as IMF, is a machine learning algorithm used to process large-scale data. The purpose of IMF is to break down a large matrix into two or more smaller matrices for better understanding and analysis of the data. The IMF algorithm adopts an incremental method, and can gradually process new data, thereby avoiding a great amount of calculation time required by recalculating the whole matrix decomposition. The IMF algorithm is widely applied in the fields of recommendation systems, social network analysis, natural language processing and the like.
Implicit feedback algorithm: is a machine learning algorithm for a recommendation system that differs from an explicit feedback algorithm in that the implicit feedback algorithm uses implicit feedback information of the user instead of explicit feedback information. Implicit feedback information refers to behavior data, such as clicking, browsing, purchasing, etc., generated by a user when using a recommendation system, which reflects the user's interest in a product. The basic idea of the implicit feedback algorithm is to infer the interests of the user through analysis of the user behavior data and to give corresponding recommendation results. Common implicit feedback algorithms include matrix factorization-based algorithms such as a latent semantic model (Latent Semantic Model, LSM), a crypto-type (Latent Factor Model, LFM), etc., and neural network-based algorithms such as collaborative filtering neural networks (Collaborative Filtering Neural Network, CFNN), etc. The implicit feedback algorithm has the advantage that a large amount of implicit feedback data can be used for training, so that the recommendation effect is improved, but some challenges exist, such as data sparsity, data noise and the like. Therefore, in practical application, proper algorithms are required to be selected according to specific situations, and reasonable parameter adjustment and model optimization are required to be performed.
Predicting recall rate: the method is an index for evaluating the performance of the recommendation system, and the product proportion which can be covered by the recommendation system when recommending products to users is measured. In particular, the predicted recall refers to how many proportions of the products recommended to the user are the products of actual interest to the user in all user-product pairs. Predictive recall is typically performed by dividing the dataset into a training set and a testing set, using the training set to derive a recommended model, and then calculating the predictive recall on the testing set to evaluate model performance. The calculation method of the predicted recall rate can be adjusted according to specific situations, for example, the Top-N recommendation problem is that the predicted recall rate can be defined as the proportion of products which are actually interested by the user and contained in the recommendation list. The prediction recall rate is one of important performance indexes in the recommendation system, and can reflect recall capability of the recommendation system, namely, capability of the recommendation system to find products interested by a user. Meanwhile, the prediction recall rate can also help a recommendation system developer to optimize and adjust a recommendation algorithm, so that the performance of the recommendation system is improved.
Random gradient descent algorithm: is an iterative optimization algorithm for solving the optimal solution of the objective function. Is a variation of the gradient descent algorithm, unlike conventional gradient descent algorithms, which uses only one sample per iteration to update the model parameters, rather than an average of all samples, making the algorithm more efficient and fast. The basic idea of the random gradient descent algorithm is to update the model parameters iteratively so that the value of the objective function is continuously reduced, thereby achieving the optimal solution. At each iteration, a random gradient descent algorithm randomly selects one sample from all samples, calculates the gradient of that sample, and then updates the model parameters with that gradient. Because one sample is used for updating the parameters each time, the algorithm has good expandability and high efficiency, and is particularly suitable for the conditions of large-scale data sets and high-dimensional characteristics.
Collaborative filtering model: the recommendation system algorithm is a common recommendation system algorithm, and the interest degree of the user on unknown products is predicted by analyzing the similarity between the users or the similarity between the products based on the historical behavior data of the users on the products. Collaborative filtering models can be generally divided into two types: collaborative user-based filtering and collaborative product-based filtering. The interest of the target user in the unknown product is predicted by analyzing the similarity between users based on the collaborative filtering model of the users. The basic idea of this approach is that if two users like similar products in the past, they may also like similar products in the future. User-based collaborative filtering models typically require computation of a similarity matrix between users to make recommendations. The collaborative filtering model based on the products predicts the interest of the target user in the unknown products by analyzing the similarity between the products. The basic idea of this approach is that if two products are liked by the same user, it is stated that there may be a similarity between the two products. Collaborative filtering models based on products typically require computation of similarity matrices between products to make recommendations.
In one embodiment, as shown in fig. 2, a method for updating a product recommendation model is provided, and the method is applied to the server 104 in fig. 1 for illustration, and includes the following steps:
step S202: an initial interaction data set is obtained, the initial interaction data set comprising initial user data and initial product data.
In the embodiment of the application, the method is mainly applied to mobile banking apps, the initial user data comprise user IDs, and the initial product data comprise various mobile banking businesses.
Step S204: and acquiring a trained product recommendation model according to the initial interaction data set.
Wherein in embodiments of the present application, a machine learning algorithm is used to train the product recommendation model. Common algorithms include collaborative filtering, matrix decomposition, deep learning, and the like. In the model training process, proper algorithms and parameters are required to be selected according to specific business requirements and performance requirements so as to achieve the optimal recommendation effect.
Step S206: and acquiring a new interaction data set, wherein the new interaction data set comprises new user data and new product data.
The step of acquiring the newly added interaction data set refers to acquiring newly added user interaction data and product interaction data from a recommendation system for updating and optimizing a recommendation model. Wherein, the newly added user data refers to the interaction data of the newly registered user on the product, such as browsing, purchasing, evaluating and the like; the newly added product data refers to interactive data of products newly added to the recommendation system, such as browsed, purchased, evaluated, etc. by the user. The newly added interaction data can be used for optimizing a recommendation model, and accuracy and effect of a recommendation system are improved.
Step S208: and under the condition that any one of the newly added user data or the newly added product data exists in the initial interaction data set, updating the product recommendation model by adopting an incremental matrix decomposition algorithm.
Under the condition that any one of the newly added user data or the newly added product data exists in the initial interaction data set, an incremental matrix decomposition algorithm is adopted, and when the behavior data of the user or the product changes, updating the product recommendation model means updating model parameters in the incremental matrix decomposition algorithm in an incremental updating mode, so that the accuracy and the effect of the recommendation system are improved. The incremental matrix decomposition algorithm decomposes the interaction matrix of the user and the product into two low-dimensional matrices, so that potential relationships between the user and the product can be inferred. In the incremental matrix decomposition algorithm, model parameters are typically trained by an optimization algorithm such as random gradient descent. When any one of the newly added user data or the newly added product data exists in the initial interaction data set, only model parameters related to the newly added data can be updated in an incremental updating mode, so that retraining of the whole model is avoided, and updating efficiency and model performance are improved.
In the method for updating the product recommendation model, newly added user data or newly added product data are converted into a matrix form, and the matrix form and an initial interaction data set are combined into a new interaction matrix. And updating model parameters by using optimization algorithms such as increment random gradient descent and the like according to the new interaction matrix. And calculating the relation between the user and the product according to the updated model parameters, and generating a new recommendation result. As new user and product data continues to increase, the recommendation model is continually updated and optimized. In a word, by adopting the incremental matrix decomposition algorithm, the recommendation model can be efficiently updated under the condition that any one of the newly added user data or the newly added product data exists in the initial interaction data set, and the accuracy and the effect of the recommendation system are improved.
In one embodiment, the method further comprises the steps of, based on the initial interaction data set, before obtaining the trained product recommendation model: and analyzing the initial user data and the initial product data to obtain the product interaction behavior time of the user. And sequencing the product interaction behavior moments, and obtaining user behavior time stream information through simulation. And determining user behavior preference information by adopting an implicit feedback algorithm according to the user behavior time flow information.
In this embodiment, in the recommendation system, the product interaction behavior of the user may be regarded as time series data, including clicking, browsing, purchasing, evaluating, etc. of the product by the user. By carrying out time sequence analysis on the product interaction behaviors of the user, the behavior habit and the behavior preference of the user can be known, so that personalized recommendation service is better provided for the user. Specifically, the initial user data and the initial product data are analyzed to obtain the product interaction behavior time of the user, and the specific interaction time of the user on the product can be obtained by recording the time stamp of the user and the product interaction data. And sequencing the product interaction behavior moments, simulating to obtain user behavior time stream information, and sequencing the user behavior data according to the interaction time of the user, so as to simulate to obtain the user behavior time stream information. Finally, according to the user behavior time stream information, determining the user behavior preference information by adopting an implicit feedback algorithm, modeling the behavior data of the user by using the implicit feedback algorithm, and determining the behavior preference information of the user by processing the implicit feedback data. In a word, through analyzing the product interaction behavior time sequence data of the user, the behavior habit and the behavior preference of the user can be known, so that more accurate personalized recommendation service is provided for a recommendation system.
In one embodiment, the product recommendation model is evaluated for quality by a recall function.
In the recommendation system, the recall rate is one of common indexes for evaluating the performance of a recommendation model. The recall rate is used to evaluate the performance of the model by calculating the ratio between the number of products in the recommendation list that contain the user's already behaved and the total number of products the user has behaved. The higher the recall rate, the better the description model can recommend the product of interest to the user, so the performance and accuracy of the recommendation system can be improved by optimizing the recall rate. Specifically, the method for evaluating the quality of product recommendation model establishment through the recall function can be realized by the following steps: and training a product recommendation model by using the training data set, and predicting a product list possibly interested by the user according to the model. And calculating the total number of products which the user has behaved according to the historical behavioural data of the user. The statistical model recommendation list contains the number of products that the user has already behaved. And calculating the recall rate according to the data, and taking the recall rate as an index for evaluating the quality of the product recommendation model. The model is continuously optimized and the recall is calculated until a model good for the training data is obtained. In summary, by using the recall function to evaluate the performance and accuracy of the product recommendation model, a model that is good for training data can be obtained and powerful support is provided for optimization and improvement of the recommendation system.
In one embodiment, as shown in FIG. 3, using an incremental matrix decomposition algorithm, updating the product recommendation model includes:
step S302: and constructing a scoring matrix according to the user behavior preference information, wherein the scoring matrix is used as an input matrix of the product recommendation model.
Step S304: and according to the input matrix, obtaining an output matrix by adopting an incremental matrix decomposition algorithm, wherein the output matrix comprises a user matrix and a product matrix.
Step S306: and updating the product recommendation model according to the newly added interaction data set and the output matrix.
The user behavior preference information can be understood as simulating the scoring of the commodity by the user, wherein the scoring possibly represents the actual purchasing behavior, and can also be a quantitative index of different behaviors of the commodity by the user, and the behaviors can all represent the attitudes and the preference degrees of the commodity by the user. First, different behaviors are grouped: generally, they can be classified into "view" and "purchase" and the like; and then weighting operation is carried out: and weighting the user preferences according to the degrees of reflecting the user preferences in different behaviors to obtain the overall preferences of the user for the articles. And then preprocessing the user behavior preference information. The method comprises the following steps of 1, noise reduction: the user behavior preference information is generated by a user in the application process, a large amount of noise and misoperation of the user can exist, and the noise can be filtered through a data mining algorithm. 2. Normalization: the data values of different behaviors can be quite different, and the data of the behaviors are unified in the same value range, so that the overall preference obtained by the weighted summation is more accurate.
Specifically, for the newly added data set, similarity calculation is performed on the behavior preferences of any two users, and the similarity is used for measuring the correlation (linear correlation) degree between two variables X and Y, and the value is between [ -1,1 ]. For example, the terms 0-0.2 are very weakly correlated or uncorrelated, 0.2-0.4 are weakly correlated, 0.4-0.6 are moderately correlated, 0.6-0.8 are strongly correlated, and 0.8-1.0 are very strongly correlated.
According to the preprocessed user behavior preference information, a scoring matrix is constructed, as shown in fig. 4, the left side of the equal sign is the scoring matrix, which is known data, and the scoring matrix is decomposed into products of two matrices on the right side of the equal sign by an incremental matrix decomposition algorithm, wherein one is called a user matrix, and the other is called a product matrix. If the scoring matrix has n rows and m columns (i.e., n users, m products), then the decomposed user matrix will have n rows and k columns, where the vector formed by the ith row is used to represent the ith user. The product matrix has k rows and m columns, wherein the vector formed by the j-th column is used for representing the j-th product. Where k is a positive integer much smaller than n and m. When the predictive score of the ith user on the jth product needs to be calculated, the ith row of the user matrix and the jth column of the product matrix are used as inner products, and the value of the inner products is the predictive score.
And according to the reverse deduction, the matrix decomposition takes the user matrix and the product matrix as unknown quantity, decomposes the unknown quantity into the predictive score of each user for each product, and learns the user matrix and the product matrix by minimizing the difference between the predictive score and the actual score. In other words, only the matrix to the left of the equal sign in fig. 4 is known, and the user matrix and the product matrix to the right of the equal sign are both unknowns, and the scoring matrix can be decomposed by the matrix algorithm into the product of the user matrix and the product matrix as follows. An incremental matrix decomposition algorithm is then utilized. According to the initial interaction data set, a new user matrix is rapidly calculated on the premise of not recalculating all user vectors.
In one embodiment, updating the product recommendation model based on the newly added interaction dataset and the output matrix includes: calculating to obtain a predicted recall rate through a product recommendation model according to the newly added interaction data set; if the predicted recall rate is greater than the recall rate threshold, obtaining an updated user matrix through a random gradient descent algorithm according to the newly added interaction data set and the product matrix; and updating the product recommendation model according to the updated user matrix.
In the gradient descent algorithm, an exemplary user history scoring matrix is R, a product matrix obtained through training a product recommendation model is Q, an updated user matrix to be solved is P1, under the condition that a newly added interaction data set is known, the updated user matrix is P1 through continuously converging the gradient descent algorithm under the condition that the product matrix Q is unchanged, and then predictive scores of users for all products are calculated through a formula r=p1×q, so that the purpose of updating the product recommendation model is achieved.
It should be noted that the product matrix Q may be obtained by matrix decomposition during training of the initial interaction data set, or may be learned in advance by other data and other algorithms, as long as each vector in the product matrix Q can represent a feature of a corresponding product.
In one embodiment, the types of product recommendation models include collaborative filtering models; according to the initial interaction data set, acquiring a trained product recommendation model, which comprises the following steps: constructing a collaborative filtering model through an initial interaction data set; and carrying out iterative training on the collaborative filtering model by taking a preset function as an objective function and a random gradient descent algorithm as an optimization direction, and obtaining a trained product recommendation model.
The preset function can be a lambda function, and the lambda function has the advantages that the lambda function is an anonymous function, can be rapidly defined and called, reduces redundancy of codes, and improves readability and maintainability of the codes.
In one embodiment, the newly added interaction data set and the initial interaction data set are integrated, and the product recommendation model is trained on the full-scale data set based on the integrated interaction data set.
Specifically, by integrating the newly added interaction data set and the initial interaction data set, a more comprehensive and accurate interaction data set can be obtained, and the information including the historical behavior, interest preference, purchasing behavior and the like of the user is included, so that the interests and purchasing behavior of the user are reflected better. The full data set training is carried out based on the integrated data set, so that the understanding capability of the model to the interests and behaviors of the user can be improved, the accuracy and generalization capability of the recommendation model are improved, and the recommendation model can be better adapted to various different users and scenes.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a device for updating the product recommendation model for realizing the method for updating the product recommendation model. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiment of the updating device for one or more product recommendation models provided below may refer to the limitation of the updating method for the product recommendation model hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 5, there is provided an updating apparatus of a product recommendation model, including: a data collection module 602, a model creation module 606, a data acquisition module 608, and a model update module 610, wherein:
a data collection module 602 for obtaining an initial interaction data set, the initial interaction data set comprising initial user data and initial product data;
the model building module 606 is configured to obtain a trained product recommendation model according to the initial interaction data set;
the data acquisition module 608 is further configured to acquire a new interaction data set, where the new interaction data set includes new user data and new product data;
the model updating module 610 is configured to update the product recommendation model using an incremental matrix decomposition algorithm in a case where any one of the newly added user data or the newly added product data exists in the initial interaction data set.
In one embodiment, as shown in FIG. 5, the apparatus further comprises a data processing module 604. The data processing module is used for analyzing the initial user data and the initial product data and obtaining the product interaction behavior moment of the user; sequencing the product interaction behavior moments, and simulating to obtain user behavior time stream information; and determining user behavior preference information by adopting an implicit feedback algorithm according to the user behavior time flow information.
In one embodiment, the model updating module 610 is further configured to construct a scoring matrix according to the user behavior preference information, where the scoring matrix is used as an input matrix of the product recommendation model; according to the input matrix, an incremental matrix decomposition algorithm is adopted to obtain an output matrix; and updating the product recommendation model according to the newly added interaction data set and the output matrix.
In one embodiment, the output matrix includes a user matrix and a product matrix; the model updating module 610 is further configured to calculate, according to the newly added interaction data set, a predicted recall rate through a product recommendation model;
if the predicted recall rate is greater than the recall rate threshold, obtaining an updated user matrix through a random gradient descent algorithm according to the newly added interaction data set and the product matrix; and updating the product recommendation model according to the updated user matrix.
In one embodiment, the types of product recommendation models include collaborative filtering models; the model building module 606 is further configured to build a collaborative filtering model through the initial interaction data set; and carrying out iterative training on the collaborative filtering model by taking a preset function as an objective function and a random gradient descent algorithm as an optimization direction, and obtaining a trained product recommendation model.
In one embodiment, the model update module 610 is further configured to integrate the new interaction data set with the initial interaction data set, and perform full dataset training on the product recommendation model based on the integrated interaction data set.
The above-mentioned various modules in the updating device of the product recommendation model may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program, when executed by a processor, implements a method of updating a product recommendation model. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
step S202: an initial interaction data set is obtained, the initial interaction data set comprising initial user data and initial product data.
Step S204: and acquiring a trained product recommendation model according to the initial interaction data set.
Step S206: and acquiring a new interaction data set, wherein the new interaction data set comprises new user data and new product data.
Step S208: and under the condition that any one of the newly added user data or the newly added product data exists in the initial interaction data set, updating the product recommendation model by adopting an incremental matrix decomposition algorithm.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
Step S202: an initial interaction data set is obtained, the initial interaction data set comprising initial user data and initial product data.
Step S204: and acquiring a trained product recommendation model according to the initial interaction data set.
Step S206: and acquiring a new interaction data set, wherein the new interaction data set comprises new user data and new product data.
Step S208: and under the condition that any one of the newly added user data or the newly added product data exists in the initial interaction data set, updating the product recommendation model by adopting an incremental matrix decomposition algorithm.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
step S202: an initial interaction data set is obtained, the initial interaction data set comprising initial user data and initial product data.
Step S204: and acquiring a trained product recommendation model according to the initial interaction data set.
Step S206: and acquiring a new interaction data set, wherein the new interaction data set comprises new user data and new product data.
Step S208: and under the condition that any one of the newly added user data or the newly added product data exists in the initial interaction data set, updating the product recommendation model by adopting an incremental matrix decomposition algorithm.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method for updating a product recommendation model, the method comprising:
acquiring an initial interaction data set, wherein the initial interaction data set comprises initial user data and initial product data;
acquiring a trained product recommendation model according to the initial interaction data set;
acquiring a new interaction data set, wherein the new interaction data set comprises new user data and new product data;
And under the condition that any one of the new added user data or the new added product data exists in the initial interaction data set, updating the product recommendation model by adopting an incremental matrix decomposition algorithm.
2. The method of claim 1, wherein the acquiring a trained product recommendation model from the initial interaction data set further comprises:
analyzing the initial user data and the initial product data to obtain product interaction behavior moments of the user;
sequencing the product interaction behavior moments, and simulating to obtain user behavior time stream information;
and determining user behavior preference information by adopting an implicit feedback algorithm according to the user behavior time flow information.
3. The method of claim 2, wherein updating the product recommendation model using an incremental matrix decomposition algorithm comprises:
constructing a scoring matrix according to the user behavior preference information, wherein the scoring matrix is used as an input matrix of the product recommendation model;
according to the input matrix, an incremental matrix decomposition algorithm is adopted to obtain an output matrix;
and updating the product recommendation model according to the newly added interaction data set and the output matrix.
4. A method according to claim 3, wherein the output matrix comprises a user matrix and a product matrix; and updating the product recommendation model according to the newly added interaction data set and the output matrix comprises the following steps:
calculating to obtain a prediction recall rate through the product recommendation model according to the newly-added interaction data set;
if the predicted recall rate is greater than a recall rate threshold, obtaining an updated user matrix through a random gradient descent algorithm according to the newly added interaction data set and the product matrix;
and updating the product recommendation model according to the updated user matrix.
5. The method of claim 1, wherein the type of product recommendation model comprises a collaborative filtering model; the obtaining the trained product recommendation model according to the initial interaction data set comprises the following steps:
constructing the collaborative filtering model through the initial interaction data set;
and carrying out iterative training on the collaborative filtering model by taking a preset function as an objective function and a random gradient descent algorithm as an optimization direction, and obtaining a trained product recommendation model.
6. The method according to claim 1, wherein the method further comprises:
Integrating the newly added interaction data set and the initial interaction data set, and training the full-scale data set of the product recommendation model based on the integrated interaction data set.
7. An apparatus for updating a product recommendation model, the apparatus comprising:
the data collection module is used for obtaining an initial interaction data set, wherein the initial interaction data set comprises initial user data and initial product data;
the model building module is used for acquiring a trained product recommendation model according to the initial interaction data set;
the data acquisition module is also used for acquiring a new interaction data set, wherein the new interaction data set comprises new user data and new product data;
and the model updating module is used for updating the product recommendation model by adopting an incremental matrix decomposition algorithm under the condition that any one of the new user data or the new product data exists in the initial interaction data set.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310814165.1A 2023-07-04 2023-07-04 Updating method and device of product recommendation model Pending CN116880886A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310814165.1A CN116880886A (en) 2023-07-04 2023-07-04 Updating method and device of product recommendation model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310814165.1A CN116880886A (en) 2023-07-04 2023-07-04 Updating method and device of product recommendation model

Publications (1)

Publication Number Publication Date
CN116880886A true CN116880886A (en) 2023-10-13

Family

ID=88267229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310814165.1A Pending CN116880886A (en) 2023-07-04 2023-07-04 Updating method and device of product recommendation model

Country Status (1)

Country Link
CN (1) CN116880886A (en)

Similar Documents

Publication Publication Date Title
CN110717098B (en) Meta-path-based context-aware user modeling method and sequence recommendation method
Zhang et al. Enabling kernel-based attribute-aware matrix factorization for rating prediction
CN113626719A (en) Information recommendation method, device, equipment, storage medium and computer program product
Zhang et al. Field-aware neural factorization machine for click-through rate prediction
US20210406761A1 (en) Differentiable user-item co-clustering
CN111949886B (en) Sample data generation method and related device for information recommendation
CN114579584A (en) Data table processing method and device, computer equipment and storage medium
CN112131261A (en) Community query method and device based on community network and computer equipment
Jiang et al. Retweet prediction using social-aware probabilistic matrix factorization
Deng et al. Knowledge-aware sequence modelling with deep learning for online course recommendation
Hou et al. A deep reinforcement learning real-time recommendation model based on long and short-term preference
Salehi Latent feature based recommender system for learning materials using genetic algorithm
Zeng et al. User Personalized Recommendation Algorithm Based on GRU Network Model in Social Networks
Liu POI recommendation model using multi-head attention in location-based social network big data
CN116880886A (en) Updating method and device of product recommendation model
Chen et al. Incomplete data analysis
Lei et al. Exemplar-based large-scale low-rank matrix decomposition for collaborative prediction
Lee Serendipity adjustable application recommendation via joint disentangled recurrent variational auto-encoder
Deng et al. Big Data Model Building Using Dimension Reduction and Sample Selection
CN116501993B (en) House source data recommendation method and device
Curk Relation chaining in binary positive-only recommender systems
CN116932893B (en) Sequence recommendation method, system, equipment and medium based on graph convolution network
Ling et al. TMP: Meta-path based recommendation on time-weighted heterogeneous information networks
Li et al. A Dynamical System Framework for Exploring Consumer Trajectories in Recommender System
CN116861208A (en) Training method and device for coarse-ranking model of music, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination