WO2022126931A1 - 商品推荐方法、装置、计算机设备及介质 - Google Patents

商品推荐方法、装置、计算机设备及介质 Download PDF

Info

Publication number
WO2022126931A1
WO2022126931A1 PCT/CN2021/084301 CN2021084301W WO2022126931A1 WO 2022126931 A1 WO2022126931 A1 WO 2022126931A1 CN 2021084301 W CN2021084301 W CN 2021084301W WO 2022126931 A1 WO2022126931 A1 WO 2022126931A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
users
linear regression
commodity
behavior data
Prior art date
Application number
PCT/CN2021/084301
Other languages
English (en)
French (fr)
Inventor
王健宗
李泽远
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022126931A1 publication Critical patent/WO2022126931A1/zh

Links

Images

Classifications

    • 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/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • G06Q30/0255Targeted advertisements based on user history
    • 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/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • G06Q30/0269Targeted advertisements based on user profile or attribute
    • G06Q30/0271Personalized advertisement

Definitions

  • the present application belongs to the technical field of intelligent recommendation, and in particular relates to a product recommendation method, device, computer equipment and medium.
  • One of the purposes of the embodiments of the present application is to provide a method, device, computer equipment and medium for recommending products, which aims to solve the technical problems of low accuracy and long recommendation time of the existing product recommending methods.
  • a first aspect of the embodiments of the present application provides a method for recommending products, including:
  • the products are recommended to the corresponding users.
  • a second aspect of the embodiments of the present application provides a product recommendation device, including:
  • the data acquisition module is used to acquire user behavior data and commodity attribute data
  • a model building module configured to build a factorization machine model corresponding to each of the users one-to-one according to the behavior data of each of the users and the attribute data of the commodity;
  • a cluster dividing module configured to divide the plurality of users into several clusters according to the behavior data, and the users in the clusters include representative users and non-representative users;
  • a parameter determination module configured to determine the update parameters of each user factorization machine model in the corresponding cluster according to the behavior data of the representative user and/or the behavior data of the non-representative user in each cluster;
  • a model training module for updating the factorization machine model of each user according to the determined update parameter
  • the product recommendation module is used to recommend products to corresponding users based on the trained user factorization machine models.
  • a third aspect of the embodiments of the present application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program When realized:
  • the products are recommended to the corresponding users.
  • a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement:
  • the products are recommended to the corresponding users.
  • a fifth aspect of the embodiments of the present application further provides a computer program product, when the computer program product is executed on a computer device, the computer device is executed to realize:
  • the product recommendation module is used to recommend products to corresponding users based on the trained user factorization machine models.
  • the embodiments of the present application include the following advantages:
  • the behavior data of a plurality of users and the attribute data of commodities are obtained; a factorization machine model corresponding to each of the users one-to-one is established according to the behavior data of each of the users and the attribute data of the commodities;
  • the behavior data divides the plurality of users into several clusters, and the users in the clusters include representative users and non-representative users; according to the behavior data of the representative users and/or the behavior data of the non-representative users in each cluster Determine the update parameters of the factorization machine models of each user in the corresponding cluster; update the factorization machine models of the users according to the determined update parameters; recommend products to the corresponding users based on the trained factorization machine models of each user , so that the user's behavior data and the attribute data of the product can be combined for recommendation when the product is recommended, so as to improve the accuracy of the recommendation and reduce the amount of data calculation during the update.
  • FIG. 1 is a schematic flowchart of a product recommendation method provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of sub-steps of a product recommendation method provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of sub-steps of a method for recommending products provided by an embodiment of the present application
  • FIG. 4 is a schematic flowchart of sub-steps of a product recommendation method provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of sub-steps of a product recommendation method provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural block diagram of an apparatus for recommending products provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural block diagram of a computer device provided by an embodiment of the present application.
  • Embodiments of the present application also provide a commodity recommendation method, apparatus, computer device, and computer-readable storage medium. It is used to recommend products to corresponding users based on the trained user's factorization machine model, so as to improve the accuracy of product recommendation and reduce the amount of computer data calculation.
  • the product recommendation method can be used for a server, of course, also for a terminal, where the terminal can be an electronic device such as a tablet computer, a notebook computer, a desktop computer, etc.; the server can be, for example, a single server or a server cluster.
  • the following embodiments will be described in detail by using a method for recommending commodities applied to a server.
  • FIG. 1 is a schematic flowchart of a product recommendation method provided by an embodiment of the present application.
  • the product recommendation method may include the following steps S110-S160.
  • Step S110 acquiring behavior data of multiple users and attribute data of commodities.
  • the behavior data of the user may be data such as the user's commodity purchasing preference, commodity browsing preference, and online shopping platform usage preference.
  • the user's behavior data may be determined through relevant information such as search words, search fields, etc. in the online shopping platform app of the user terminal.
  • the search term can be a keyword related to the product, or the name of the product or the name of the store, and the search field can be the field of the product. Is "Books” and/or “Educational Supplies”.
  • the user's behavior data may also include the user's personal privacy information, such as the terminal device number used by the user to surf the Internet, the delivery address for online shopping, the mobile phone number, and identity information.
  • the user's personal privacy information such as the terminal device number used by the user to surf the Internet, the delivery address for online shopping, the mobile phone number, and identity information.
  • the attribute information of the product may be information such as the name, category, usage of the product, click-through rate of the product, and shipping address.
  • a product that has been searched and browsed by the user is obtained as a towel, and it is obtained through browsing records that the towel is a household toiletries, the click rate is 13,000 times, and the place of delivery is Zhejiang.
  • the user's preferred source address can be inferred from the place of shipment.
  • Step S120 establishing a factorization machine model corresponding to each user one-to-one according to the behavior data of each user and the attribute data of the commodity.
  • a factorization machine model corresponding to each user is established according to the behavior data of each user and the attribute data of the commodity. It can be understood that each user has its own factorization machine model.
  • a factorization machine model is established based on the correlation information between the user's behavior data and the commodity attribute data, so as to improve the modeling accuracy of the model and reduce the amount of computation for training.
  • FIG. 2 is a flow chart of sub-steps of a method for recommending a product provided by an embodiment of the present application.
  • the establishing a factorization machine model corresponding to each of the users one-to-one according to the behavior data of each of the users and the attribute data of the commodity includes: sub-steps S121-S124.
  • Step S121 Encoding the behavior data of the user to obtain the behavior characteristics of the user, and encoding the attribute data of the commodity to obtain the public characteristics of the commodity.
  • one-hot encoding is performed on the acquired behavior data of the user, the behavior characteristics of the user are determined, and the behavior characteristics of the user are represented by xi .
  • one-hot encoding can be performed according to the user's search term and search field.
  • user A's search field is books
  • user B's search field is audio and video.
  • user A's behavioral feature xi ⁇ 0,0,1 ⁇
  • the behavior characteristic of user B xi ⁇ 0,1,0 ⁇ .
  • the search field may have more fields
  • the encoded behavior feature xi may have a higher dimension.
  • one-hot encoding is performed on the attribute data of the commodity, the public features of the commodity are determined, and the public characteristics of the commodity are represented by x j .
  • the feature table may be determined according to the behavioral features of the user and the public features of the product, as shown below:
  • the label of 1 indicates that the user has a historical browsing record with the product.
  • the products can be screened according to the determined feature table, the products that have a browsing relationship with the user are retained, and the model building operation can be performed.
  • Step S122 establishing a user linear regression model according to the behavior characteristics of the user and establishing a commodity linear regression model according to the public characteristics of the commodity.
  • the user linear regression model and the commodity linear regression model are respectively determined according to the following formula.
  • W is the parameter of the user linear regression model or the product linear regression model
  • X is the user's behavioral feature or the public feature of the product.
  • the corresponding model parameters are extracted from the commodity linear regression model of the determined user linear regression model, so as to perform the modeling of the factorization machine model.
  • Step S123 Based on the user linear regression model and the commodity linear regression model, obtain initialized user linear regression model parameters and initialized commodity linear regression model parameters.
  • an initialization operation is performed.
  • the initialization operation may be random assignment, or assign different values to the acquired model parameters according to different commodity linear regression models.
  • model parameters extracted from the user linear regression model can be
  • model parameters extracted from the commodity linear regression model can be
  • Step S124 establishing a factorization machine model corresponding to the user according to the initialized user linear regression model parameters and the commodity linear regression model parameters.
  • a factorization machine model is established according to the following expression:
  • ⁇ v d ⁇ v d′ > represents the dot product of two vectors v d and v d′ of size k, and ⁇ v d ⁇ v d′ > is calculated by the following formula:
  • v d represents the i-th dimension vector of the feature intersection matrix V
  • v d (v d,1 ,v d,2 ,...,v d,k ), k ⁇ N + is called a hyperparameter.
  • the method further includes: determining a feature intersection model according to the behavioral feature of the user and the public feature of the product.
  • the feature intersection matrix V may be determined according to the feature table of the user's behavior feature and the public feature of the product.
  • the coefficient represents the degree of association between the user and the product, and the above v d can be obtained.
  • the coefficients of the feature intersection model V are obtained.
  • the coefficients may also be initialized.
  • the initialization may be random assignment or weight assignment.
  • the establishment of a factorization machine model corresponding to the user according to the initialized user linear regression model parameters and the commodity linear regression model parameters includes:
  • a factorization machine model corresponding to the user is established according to the coefficients of the initialized feature intersection matrix, the initialized user linear regression model parameters and the commodity linear regression model parameters.
  • the above-mentioned factor classifier model is established according to the coefficients of the initialized feature intersection matrix, the model parameters of the user linear regression model, and the model parameters of the commodity linear regression model.
  • the coefficients of the feature intersection matrix are used to determine v d ; the model parameters of the user linear regression model are used to determine The model parameters of the commodity linear regression model are used to determine
  • Step S130 Divide the plurality of users into several clusters according to the behavior data, and the users in the clusters include representative users and non-representative users.
  • the plurality of users are divided into several clusters according to the behavior data of each user. It is understandable that users in the same cluster may be users with similar product browsing preferences or product purchasing preferences.
  • the users in the cluster are divided into representative users and non-representative users.
  • FIG. 3 is a flow chart of sub-steps of a method for recommending a product provided by an embodiment of the present application.
  • the plurality of users are divided into several clusters according to the behavior data, and the users in the clusters include representative users and non-representative users, including steps S131 to S133.
  • Step S131 performing vectorization processing on the behavior data of each of the users to obtain a parameter vector corresponding to each of the users.
  • vectorization processing is performed on the behavior data of each user, wherein the vectorization processing may be a vectorization processing method such as hash vectorization processing, one-hot encoding vectorization processing, and the like.
  • the behavior data of each user is vectorized to obtain a parameter vector corresponding to each user.
  • multiple users may be divided into several clusters by using the parameter vector of each user.
  • Step S132 Divide the plurality of users into several clusters according to the parameter vector corresponding to the user.
  • each user is divided into different clusters.
  • the multiple users may be divided into k clusters through the k-means clustering algorithm.
  • the user's parameter vector includes the user's behavioral information such as commodity purchasing preference and commodity browsing preference, and the behavioral data of users in the same cluster are relatively close.
  • Step S133 Determine some users in each cluster as representative users, and the rest are non-representative users.
  • s representative users are determined, and s/p representative users are randomly determined from each cluster each time until s representative users are determined, and the selection and determination are stopped.
  • p is the number of random determinations.
  • the accuracy of user clustering can be improved, and users with similar behavior data can be placed in the same cluster to reduce the number of data exchanges and improve the speed of data exchange.
  • FIG. 4 is a flow chart of sub-steps of a product recommendation method provided by an embodiment of the present application.
  • the plurality of users are divided into several clusters according to the parameter vector corresponding to each of the users, including steps S1321-S1323.
  • Step S1321 Determine the parameter inner product of each user and the parameter random value of each user according to the parameter vector of each user.
  • the parameter inner product and the parameter random value of the user may be determined according to a parameter vector obtained by performing vectorization processing on the user's behavior data.
  • the user's parameter inner product and the parameter random value may also be determined according to the model parameters of the user's user linear regression model.
  • parameter inner product can be expressed as:
  • U 1 , U 2 , ... U m are parameter vectors of the user.
  • the parameter random value may be a value determined randomly in the user's parameter vector.
  • Step S1322 Determine the Euclidean distance value of each of the users according to the inner product of the parameters of each of the users and the random value of the parameters of each of the users.
  • the parameter vector of user A is The parameter vector of user B is User A and User B calculate their own parameter inner product in their respective terminals, where the parameter inner product of User A is The inner product of the parameters of user B is
  • the parameter inner product of user A and user B and the random value of the parameter should also satisfy the following relationship:
  • Step S1323 Divide the plurality of users into several clusters according to the Euclidean distance value of each of the users.
  • whether to divide the two users into the same cluster is determined according to the Euclidean distance value of the two users.
  • the multiple users are divided into several clusters according to the Euclidean distance value of the multiple users.
  • the Euclidean distance value of the user terminal is represented by the following formula:
  • the ⁇ A -2u A of user A is obtained from the terminal of user A
  • the ⁇ B -2u B of user B is obtained from the terminal of user B
  • the squared value of the Euclidean distance between user A and user B is obtained by accumulating, according to the Euclidean The squared value of the distance to determine whether user A and user B are in the same cluster.
  • the factorization machine model of the users in the cluster can be updated according to the behavior data of the users in the cluster, so as to improve the prediction accuracy of the factorization machine model, and Reduce the number of updates.
  • Step S140 Determine the update parameters of each user factorization machine model in the corresponding cluster according to the behavior data of the representative user and/or the behavior data of the non-representative user in each cluster.
  • the update parameter of the factorization machine model corresponding to the user in each cluster is determined according to the behavior data of the representative user and/or the behavior data of the non-representative user in each cluster.
  • the update of the factorization machine models corresponding to all the users in the first cluster is determined. parameter.
  • the encrypted user behavior data is obtained from the terminal of each user to determine the update parameter, so as to protect the privacy of the user.
  • the update accuracy of the update parameters can be improved, the number of data exchanges can be reduced, and the model can be shortened. Update time, speed up the speed of product recommendation.
  • Step S150 Update the factorization machine model of each user according to the determined update parameter.
  • the factorization machine models of all users in the cluster are updated according to the behavior data of the representative user and/or the behavior data of the non-representative user in each cluster.
  • the first cluster there are a total of 50 users, including 24 representative users and 26 non-representative users, according to the behavior data of 24 representative users and/or the behavior data of 26 non-representative users, for 50 users
  • the corresponding factorization machine models are updated.
  • the update parameters can be determined in the server, the factorization machine model of each user is stored on the terminal of the corresponding user, and the server sends the update parameters to the terminals of all users in a cluster to update the factorization machine of each user. Model.
  • the prediction result of the factorization machine model can be made more accurate.
  • Step S160 Recommend the product to the corresponding user based on the updated factorization machine model of each user.
  • the product is recommended to the corresponding user.
  • the product may be recommended to the user through a short message reminder of the terminal and an app information reminder.
  • the updated factorization machine model may be stored in the blockchain node.
  • blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of its information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • FIG. 5 is a flow chart of sub-steps of a product recommendation method provided by an embodiment of the present application.
  • the recommending the commodity to the corresponding user based on the updated model of each user has always included: step S161-step S162.
  • Step S161 based on the trained factor decomposition machine model corresponding to the user, predict the user preference value corresponding to the product to be recommended according to the behavior data of the user and the attribute data of the product to be recommended.
  • the user's preference and purchase probability of the recommended product are predicted according to the user's behavior data and the attribute data of the product to be recommended.
  • the user's preference value is used to represent the user's preference for the recommended product and the purchase probability.
  • y is the label value obtained according to the user's behavior data and the attribute data of the product to be recommended (such as the label value in the aforementioned feature table), is the expression of the factorization machine model
  • W is the model parameter of the user linear regression model or the commodity linear regression model
  • V is the coefficient of the feature matrix
  • arg min represents the value of W and V when the formula is at the minimum value
  • O is The set to be calculated
  • represents the step function
  • the specific form is:
  • the user's preference value is obtained through the objective function. It can be understood that the larger the obtained user's preference value, the higher the user's preference for the corresponding product, and the higher the purchase probability.
  • Step S162 Recommend the to-be-recommended product to a corresponding user according to the user preference value.
  • the user preference value it is determined whether to recommend the product to be recommended to the user.
  • the user preference values of multiple commodities are obtained through the objective function of the factor decomposition machine model, such as:
  • the user preference value of the desk lamp is greater than the user preference value of the tutorial book, and the desk lamp is preferentially recommended to the user.
  • the product may be recommended to the corresponding user according to the recommendation threshold and the user preference value.
  • the recommendation threshold may be a preset value, and if the user preference value of the item to be recommended is higher than the recommendation threshold, the item to be recommended is recommended to the corresponding user.
  • the recommendation threshold is set to 0.5.
  • the user preference values corresponding to the desk lamp and the instructional book are higher than the recommended threshold, and the desk lamp and the instructional book are recommended to the corresponding users.
  • the product to be recommended is not recommended to the corresponding user.
  • the recommendation threshold is set to 0.5.
  • the user preference values corresponding to the shelves and the bookshelves are lower than the recommended threshold, and the shelves and the bookshelves are not recommended to the user.
  • the to-be-recommended product is recommended to the corresponding user according to the user preference value, so that the recommended product is more in line with the user's needs and the accuracy of product recommendation is improved.
  • the determining, according to the behavior data of the representative users and/or the behavior data of the non-representative users in each cluster, the update parameters of each user factorization machine model in the corresponding cluster includes: The behavior data of the representative user determines a first update parameter for updating the factorization machine model corresponding to the representative user.
  • the first update parameter is determined according to the behavior data of the representative user in each cluster, and the first update parameter is used to update the factorization machine model corresponding to the representative user.
  • determining the factorization machine model of the first representative user of the first cluster includes obtaining the user linear regression model and the product linear regression model of the first representative user according to the behavior data of the first representative user and the attribute data of the product model; model parameters of the corresponding model obtained according to the user linear regression model and the commodity linear regression model; according to the model parameters of the user linear regression model and the model parameters of the commodity linear regression model to the first representative user
  • the factorization machine model is iteratively calculated, wherein, after each iterative calculation, the model parameters of the user linear regression model and the model parameters of the commodity linear regression model are updated; according to the iteratively calculated model parameters of the factorization machine model are determined. the first update parameter.
  • the number of iterative computations may be set to T, and the iterative computations are stopped until the factorization machine model performs T times of iterative computations.
  • the model parameters of the factorization machine model after t iterations of calculation are obtained as V t
  • the updating the factorization machine model of each user according to the determined update parameter includes: updating the factorization machine model corresponding to the representative user according to the first update parameter corresponding to each representative user.
  • the factorization machine model of the first representative user is updated according to the first update parameter corresponding to the first representative user
  • the factorization machine model of the second representative user is updated according to the first update parameter corresponding to the second representative user.
  • each representative user has its own corresponding first update parameter, and the first update parameter corresponding to each user updates the factorization machine model corresponding to each user.
  • the determining, according to the behavior data of the representative user and/or the behavior data of the non-representative user in each cluster, the update parameters of each user factorization machine model in the corresponding cluster includes: according to the The behavior data of all the representative users in the cluster determines the second update parameter for updating the factorization machine model of the non-representative users in the cluster.
  • the second update parameter used to update the factorization machine model of the non-representative users in the first cluster consists of the behavior data of all the representative users in the first cluster and the corresponding non-representative users' behavior data. Behavioral data OK.
  • the second update parameter of the factorization machine model of the first non-representative user in the first cluster is determined by the behavior data of the entire representative user and the behavior data of the first non-representative user in the first cluster.
  • the server obtains the corresponding factorization machine model from the terminal representing user A and the terminal representing user B when performing iterative calculation.
  • Parameter change get the average value of parameter change
  • the average value of the variation is sent to the terminal of the non-representative user C, so that the terminal of the non-representative user C determines the second update parameter.
  • the terminal that does not represent user C determines the second update parameter according to the parameter average value and the behavior data of non-representative user C, which is represented by the following formula:
  • V t respectively represent the model parameters of the non-representative user linear regression model, the model parameters of the commodity linear regression model, and the coefficients of the feature intersection matrix after t factorization machine model iterations
  • the ⁇ is a hyperparameter, ⁇ [ 0,1].
  • the second update parameter of each non-representative user is determined by the behavior data of the corresponding non-representative user and the behavior data of all representative users in the same cluster as the non-representative user.
  • the updating of the factorization machine model of each user according to the determined update parameter includes: updating the factorization machine model of the non-representative users in the cluster according to the second update parameter.
  • the terminal of the non-representative user determines the second update parameter according to the average parameter value of the representative user obtained from the server and the behavior data of the non-representative user, and performs the factorization machine model according to the second update parameter. renew.
  • the non-representative user determines the second update parameter by obtaining the average parameter value of the representative user from the server, which can reduce the number of interactions between the user terminal and the server, increase the update time of the model, and shorten the time for product recommendation.
  • FIG. 6 is a schematic diagram of a product recommendation device provided by an embodiment of the present application.
  • the product recommendation device may be configured in a server or a terminal to execute the aforementioned product recommendation method.
  • the product recommendation device includes: a data acquisition module 110 , a model establishment module 120 , a cluster division module 130 , a parameter determination module 140 , a model training module 150 , and a product recommendation module 160 .
  • the data acquisition module 110 is configured to acquire behavior data of multiple users and attribute data of commodities.
  • the model establishment module 120 is configured to establish a factorization machine model corresponding to each user one-to-one according to the behavior data of each user and the attribute data of the commodity.
  • the cluster dividing module 130 is configured to divide the plurality of users into several clusters according to the behavior data, and the users in the clusters include representative users and non-representative users.
  • the parameter determination module 140 is configured to determine the update parameters of each user factorization machine model in the corresponding cluster according to the behavior data of the representative user and/or the behavior data of the non-representative user in each cluster.
  • the model update module 150 is configured to update the factorization machine model of each user according to the determined update parameter.
  • the commodity recommendation module 160 is configured to recommend commodities to corresponding users based on the updated user factorization machine models.
  • the model establishment module 120 includes a feature determination submodule, a regression model establishment submodule, and a parameter initialization submodule.
  • the feature determination submodule is used to encode the behavior data of the user to obtain the behavior feature of the user, and encode the attribute data of the product to obtain the public feature of the product.
  • the regression model establishment sub-module is used for establishing a user linear regression model according to the behavior characteristics of the user and establishing a commodity linear regression model according to the public characteristics of the commodity.
  • the parameter initialization sub-module is configured to obtain the initialized user linear regression model parameters and the initialized commodity linear regression model parameters based on the user linear regression model and the commodity linear regression model.
  • the model establishment module 120 is further configured to establish a factor decomposition machine model corresponding to the user according to the initialized user linear regression model parameters and the commodity linear regression model parameters.
  • the product recommendation apparatus further includes: a feature intersection model determination submodule, and a feature intersection model parameter determination submodule.
  • the feature intersection model determination sub-module is configured to determine a feature intersection model according to the user's behavioral feature and the public feature of the product.
  • the feature intersection model parameter determination submodule is used for acquiring and initializing the model parameters of the feature intersection model.
  • the model establishment module 120 is further configured to establish a factor decomposition machine model corresponding to the user according to the model parameters of the initialized feature intersection model, the initialized user linear regression model parameters and the commodity linear regression model parameters.
  • the cluster division module 130 includes a parameter vector determination submodule, a user division submodule, and a user determination submodule.
  • the parameter vector determination sub-module is configured to perform vectorization processing on the behavior data of each user to obtain a parameter vector corresponding to each user.
  • the user division sub-module is configured to divide the plurality of users into several clusters according to the parameter vector corresponding to the user.
  • the user determination submodule is used to determine some users in each cluster as representative users, and the rest are non-representative users.
  • the parameter vector determination submodule further includes a parameter inner product determination submodule and an Euclidean distance determination submodule.
  • the parameter inner product determination submodule is configured to determine the parameter inner product of each user and the parameter random value of each user according to the parameter vector of each user.
  • the Euclidean distance determination sub-module is configured to determine the Euclidean distance value of each user according to the inner product of the parameters of each user and the random value of the parameter of each user.
  • the user division submodule is further configured to divide the users into several clusters according to the Euclidean distance value of each user.
  • the parameter determination module 140 includes a first parameter determination submodule and a second parameter determination submodule.
  • the first parameter determination submodule is configured to determine, according to the behavior data of each representative user, a first update parameter for updating the factorization machine model corresponding to the representative user.
  • the second parameter determination submodule is configured to determine, according to the behavior data of all the representative users in the cluster, a second update parameter for updating the factorization machine model of the non-representative users in the cluster.
  • the model update module 150 is further configured to update the factorization machine model corresponding to the representative user according to the first update parameter corresponding to each representative user, and/or update the factor of the non-representative user in the cluster according to the second update parameter Decomposition machine model.
  • the commodity recommendation module 160 includes a preference value determination submodule and a preference commodity recommendation submodule.
  • the preference value determination module is used for predicting the user preference value corresponding to the to-be-recommended product according to the user's behavior data and the attribute data of the to-be-recommended product based on the trained factor decomposition machine model corresponding to the user.
  • a favorite product recommendation sub-module configured to recommend the to-be-recommended product to a corresponding user according to the user's preference value.
  • the methods and apparatus of the present application may be used in numerous general purpose or special purpose computing system environments or configurations.
  • the above-mentioned method and apparatus can be implemented in the form of a computer program, and the computer program can be executed on a computer device as shown in FIG. 7 .
  • FIG. 7 is a schematic diagram of a computer device provided by an embodiment of the present application.
  • the computer device can be a server or a terminal.
  • the computer device includes a processor, a memory, and a network interface connected by a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
  • the nonvolatile storage medium can store operating systems and computer programs.
  • the computer program includes program instructions that, when executed, can cause the processor to execute any commodity recommendation method.
  • the processor is used to provide computing and control capabilities to support the operation of the entire computer equipment.
  • the internal memory provides an environment for running the computer program in the non-volatile storage medium.
  • the processor can execute any commodity recommendation method.
  • the network interface is used for network communication, such as sending assigned tasks.
  • the structure of the computer device is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. More or fewer components are shown in the figures, either in combination or with different arrangements of components.
  • the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated circuits) Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like.
  • the processor is configured to run a computer program stored in the memory, so as to realize the following steps: acquire behavior data of multiple users and attribute data of commodities;
  • the attribute data of the commodity establishes a factorization machine model corresponding to each of the users; according to the behavior data, the multiple users are divided into several clusters, and the users in the clusters include representative users and non-representative users;
  • the behavior data of the representative user and/or the behavior data of the non-representative user in each cluster determine the update parameters of the factorization machine model of each user in the corresponding cluster;
  • the model is updated; the product is recommended to the corresponding user based on the updated model of each user factorization machine.
  • the processor is configured to: encode and process the behavior data of the user to obtain the behavior characteristics of the user, and encode and process the attribute data of the commodity to obtain the public characteristics of the commodity; establish a method based on the behavior characteristics of the user.
  • the user linear regression model and the commodity linear regression model are established according to the public characteristics of the commodity; based on the user linear regression model and the commodity linear regression model, the initialized user linear regression model parameters and the initialized commodity linear regression model parameters are obtained;
  • the initialized user linear regression model parameters and commodity linear regression model parameters are used to establish a factor decomposition machine model corresponding to the user.
  • the processor is configured to: determine a feature intersection model according to the behavioral characteristics of the user and the public features of the product; acquire and initialize model parameters of the feature intersection model; according to the initialized feature intersection model
  • the model parameters of the user, the initialized user linear regression model parameters and the commodity linear regression model parameters establish a factor decomposition machine model corresponding to the user.
  • the processor is configured to implement: based on the factorization machine model corresponding to the trained user, predict the user preference value corresponding to the product to be recommended according to the behavior data of the user and the attribute data of the product to be recommended; The preference value recommends the product to be recommended to the corresponding user.
  • the processor is configured to implement: performing vectorization processing on the behavior data of each of the users to obtain a parameter vector corresponding to each of the users; dividing the plurality of users into several clusters according to the parameter vector corresponding to the user; Some users in each cluster are determined as representative users, and the rest are non-representative users.
  • the processor is configured to: determine the parameter inner product of each user and the parameter random value of each user according to the parameter vector of each user; according to the parameter inner product of each user and each user The random value of the parameter determines the Euclidean distance value of each user; the users are divided into several clusters according to the Euclidean distance value of each user.
  • the processor is configured to: determine, according to the behavior data of each representative user, a first update parameter for updating the factorization machine model corresponding to the representative user; A second update parameter of the factorization machine model of the non-representative users in the cluster is updated.
  • the processor is configured to: update the factorization machine model corresponding to the representative user according to the first update parameter corresponding to each representative user; update the factorization machine model of the non-representative users in the cluster according to the second update parameter.
  • a computer-readable storage medium where a computer program is stored in the computer-readable storage medium, the computer program includes program instructions, and the processor executes the program instructions to realize any one of the commodities provided in the embodiments of the present application recommended method. Specifically, when the computer program is executed by the processor, it realizes:
  • the product is recommended to the corresponding user.
  • a factor decomposition machine model corresponding to the user is established according to the initialized user linear regression model parameters and the commodity linear regression model parameters.
  • the establishment of a factorization machine model corresponding to the user according to the initialized user linear regression model parameters and the commodity linear regression model parameters includes:
  • a factorization machine model corresponding to the user is established according to the coefficients of the initialized feature intersection matrix, the initialized user linear regression model parameters and the commodity linear regression model parameters.
  • the to-be-recommended product is recommended to a corresponding user according to the user preference value.
  • Some users in each cluster are determined as representative users, and the rest are non-representative users.
  • the plurality of users are divided into several clusters according to the Euclidean distance value of each of the users.
  • the updating of the factorization machine model of each user according to the determined update parameters includes:
  • the factorization machine models of the non-representative users in the cluster are updated according to the second update parameter.
  • the implementation of all or part of the processes in the methods of the above embodiments may be completed by instructing the relevant hardware through computer-readable instructions, and the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable instructions may be stored in a non-volatile computer-readable storage medium, and when executed, the computer-readable instructions may include the processes of the foregoing method embodiments.
  • the computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as a hard disk or a memory of the computer device.
  • the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) ) card, Flash Card, etc.
  • a plug-in hard disk equipped on the computer device such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) ) card, Flash Card, etc.
  • SMC Smart Media Card
  • SD Secure Digital

Landscapes

  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种商品推荐方法、装置、计算机设备及计算机可读存储介质,所述方法包括:获取多个用户的行为数据和商品的属性数据(S110);根据各用户的行为数据和商品的属性数据建立与各用户一一对应的因子分解机模型(S120);根据行为数据将多个用户分成若干簇,簇中的用户包括代表用户和非代表用户(S130);根据各簇中代表用户的行为数据和/或非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数(S140);根据确定的更新参数对各用户的因子分解机模型进行更新(S150);基于更新后的各用户因子分解机模型将商品推荐给对应的用户(S160)。上述方法能够提升商品推荐的精度,缩短推荐的时间。

Description

商品推荐方法、装置、计算机设备及介质
本申请要求于2020年12月18日在中国专利局提交的、申请号为202011511925.4、发明名称为“商品推荐方法、装置、计算机设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于智能推荐技术领域,尤其涉及一种商品推荐方法、装置、计算机设备及介质。
背景技术
目前,主流的推荐方法大多是根据用户的行为或商品的某单一特征进行推荐。发明人发现,将用户的行为和商品的特征分开进行推荐导致推荐的精准度不足,还有一些根据用户保存在本地的数据和服务器的商品特征进行交互,进行商品推荐,若用户数据过多会导致交互次数过高,计算量过大,推荐的时间久。
技术问题
本申请实施例的目的之一在于:提供一种商品推荐方法、装置、计算机设备及介质,旨在解决现有商品推荐方法的精准度低,以及推荐的时间久的技术问题。
技术解决方案
为解决上述技术问题,本申请实施例采用的技术方案是:
本申请实施例的第一方面提供了一种商品推荐方法,包括:
获取多个用户的行为数据和商品的属性数据;
根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型;
根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户;
根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数;
根据确定的更新参数对所述各用户的因子分解机模型进行更新;
基于训练好的各用户因子分解机模型将商品推荐给对应的用户。
本申请实施例的第二方面提供了一种商品推荐的装置,包括:
数据获取模块,用于获取用户的行为数据和商品的属性数据;
模型建立模块,用于根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型;
簇划分模块,用于根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户;
参数确定模块,用于根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数;
模型训练模块,用于根据确定的更新参数对所述各用户的因子分解机模型进行更新;
商品推荐模块,用于基于训练好的各用户因子分解机模型将商品推荐给对应的用户。
本申请实施例的第三方面提供了一种计算机设备,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现:
获取用户的行为数据和商品的属性数据;
根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型;
根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户;
根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中 的各用户因子分解机模型的更新参数;
根据确定的更新参数对所述各用户的因子分解机模型进行更新;
基于训练好的各用户因子分解机模型将商品推荐给对应的用户。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现:
获取用户的行为数据和商品的属性数据;
根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型;
根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户;
根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数;
根据确定的更新参数对所述各用户的因子分解机模型进行更新;
基于训练好的各用户因子分解机模型将商品推荐给对应的用户。
本申请实施例的第五方面还提供了一种计算机程序产品,当所述计算机程序产品在计算机设备上运行时,使得所述计算机设备执行时实现:
获取用户的行为数据和商品的属性数据;
根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型;
根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户;
根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数;
根据确定的更新参数对所述各用户的因子分解机模型进行更新;
商品推荐模块,用于基于训练好的各用户因子分解机模型将商品推荐给对应的用户。
有益效果
与现有技术相比,本申请实施例包括以下优点:
本申请实施例,通过获取多个用户的行为数据和商品的属性数据;根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型;根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户;根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数;根据确定的更新参数对所述各用户的因子分解机模型进行更新;基于训练好的各用户因子分解机模型将商品推荐给对应的用户,以使进行商品推荐的时候可以融合用户的行为数据以及商品的属性数据进行推荐,提升推荐的精准度,还能减少更新时的数据计算量。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或示范性技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1是本申请一实施例提供的一种商品推荐方法的流程示意图;
图2是本申请一实施例提供的一种商品推荐方法的子步骤流程示意图;
图3是本申请一实施例提供的一种商品推荐方法的子步骤流程示意图;
图4是本申请一实施例提供的一种商品推荐方法的子步骤流程示意图;
图5是本申请一实施例提供的一种商品推荐方法的子步骤流程示意图;
图6是本申请一实施例提供的一种商品推荐的装置的结构示意框图;
图7是本申请一实施例提供的一种计算机设备的结构示意框图。
本发明的实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。另外,虽然在装置示意图中进行了功能模块的划分,但是在某些情况下,可以以不同于装置示意图中的模块划分。
本申请的实施例还提供了一种商品推荐方法、装置、计算机设备及计算机可读存储介质。用于基于训练好的用户的因子分解机模型将商品推荐给对应的用户,以提升商品推荐的精准度,减少计算机的数据运算量。
其中,该商品推荐方法可以用于服务器,当然也可以用于终端,其中,终端可以是平板电脑、笔记本电脑、台式电脑等电子设备;服务器例如可以为单独的服务器或服务器集群。但为了便于理解,以下实施例将以应用于服务器的商品推荐方法进行详细介绍。
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
请参阅图1,图1是本申请实施例提供的一种商品推荐方法的示意流程图。
如图1所示,该商品推荐方法可以包括以下步骤S110-步骤S160。
步骤S110、获取多个用户的行为数据和商品的属性数据。
示例性的,用户的行为数据可以是用户的商品购买偏好、商品浏览偏好、以及网购平台使用偏好等数据。
示例性的,可以通过用户终端的网购平台app中的搜索词、搜索领域等相关信息确定用户的行为数据。
例如,搜索词可以是与商品相关的关键词,也可以是商品名称或店铺名字,搜索领域可以是商品的所述领域,如获取到的搜索词为“教育辅导书”,对应的搜索领域可以是“书籍”和/或“教育用品”。
示例性的,用户的行为数据还可以包括用户的个人隐私信息,如用户用于上网的终端设备号、网购送货地址、手机号码、身份信息等。
示例性的,商品的属性信息可以是商品的名称、类别、用途、商品的点击率以及发货地址等信息。
例如,获取到用户的曾经搜索且浏览过的一个商品为毛巾,通过浏览记录得到该毛巾为家用的洗浴用品,点击率为1万3千次,发货地为浙江。
示例性的,可以通过发货地推测用户偏好的货源地址。
步骤S120、根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型。
示例性的,根据各用户的行为数据和商品的属性数据建立与各用户对应的因子分解机模型,可以理解的,每个用户都有属于自己的因子分解机模型。
示例性的,通过用户的行为数据与商品的属性数据的关联信息建立因子分解机模型,以提升模型的建模精度,可以减少训练的计算量。
在一些实施例中,如图2所示,图2为本申请实施例提供的一种商品推荐方法的子步骤流程图。
所述根据各所述用户的行为数据和商品的属性数据建立与各所述用户一一对应的因子分解机模型包括:子步骤S121-S124。
步骤S121、对所述用户的行为数据进行编码处理得到用户的行为特征,和对所述商品 的属性数据进行编码处理得到商品的公开特征。
示例性的,对获取到用户的行为数据进行one-hot编码处理,确定用户的行为特征,以及用x i表征用户的行为特征。
示例性的,可以根据用户的搜索词、搜索领域进行one-hot编码处理,如用户A搜索领域为书籍,用户B搜索领域为音像,进行one-hot编码处理后用户A的行为特征x i={0,0,1},用户B的行为特征x i={0,1,0}。可以理解的,上述进行编码处理的过程只是示例性举例,搜索领域可以有更多的领域,以及编码之后的行为特征x i可以有更高的维度。
示例性的,对所述商品的属性数据进行one-hot编码处理,确定商品的公开特征,以及利用x j表征商品的公开特征。
示例性的,可以根据用户的行为特征和商品的公开特征确定特征表,如下表示:
用户行为特征共m维度 商品公开特征X j共n维 标签
X i X j 1
其中,标签为1表示用户与该商品有过历史浏览记录。
示例性的,可以根据确定的特征表进行商品的筛选,将与用户有过浏览关系的商品保留,以及进行建立模型的操作。
步骤S122、根据所述用户的行为特征建立用户线性回归模型以及根据所述商品的公开特征建立商品线性回归模型。
示例性的,根据下式分别确定用户线性回归模型和商品线性回归模型。
Z=WX
其中,W为用户线性回归模型或商品线性回归模型的参数,X为用户的行为特征或商品的公开特征。
示例性的,在确定的用户线性回归模型的商品线性回归模型中提取对应的模型参数,以进行因子分解机模型的建模。
步骤S123、基于所述用户线性回归模型和商品线性回归模型,获取初始化的用户线性回归模型参数和初始化的商品线性回归模型参数。
示例性的,基于步骤S122确定的用户线性回归模型和商品线性回归模型,获取对应模型的模型参数后,进行初始化操作。
示例性的,初始化操作可以是随机赋值,也可以是根据不同商品线性回归模型对获取的模型参数赋于不同的值。
示例性的,从用户线性回归模型中提取到的模型参数可以为
Figure PCTCN2021084301-appb-000001
从商品线性回归模型中提取到的模型参数可以为
Figure PCTCN2021084301-appb-000002
步骤S124、根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
示例性的,根据提取并初始化后的用户线性回归模型的模型参数和商品线性回归模型的模型参数根据下述表达式建立因子分解机模型:
Figure PCTCN2021084301-appb-000003
其中m表示用户的行为特征的维度;n表示商品的公开特征的维度,
Figure PCTCN2021084301-appb-000004
表示用户线性回归模型的参数;
Figure PCTCN2021084301-appb-000005
表示商品线性回归模型的参数;
Figure PCTCN2021084301-appb-000006
分别表示在用户特征维度或商品维度特征上的取值;
Figure PCTCN2021084301-appb-000007
表示各特征在模型中所占的重要程度。<v d·v d′>表示两个大小为k的向量v d和v d′的点积,<v d·v d′>由下式计算:
Figure PCTCN2021084301-appb-000008
其中,v d表示特征交叉矩阵V的第i维向量,且v d=(v d,1,v d,2,…,v d,k),k∈N +称为超参数。
在一些实施例中,所述方法还包括:根据所述用户的行为特征和所述商品的公开特征确定特征交叉模型。
示例性的,可以根据用户的行为特征和商品的公开特征的特征表确定特征交叉矩阵V。
示例性的,在特征交叉矩阵V中,系数表示用户与商品的关联度,可以得到上述的v d
获取所述特征交叉矩阵的系数。
示例性的,获取特征交叉模型V的系数。
示例性的,还可以对系数进行初始化。
示例性的,初始化可以是随机赋值或按权重赋值。
所述根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型,包括:
根据所述初始化的特征交叉矩阵的系数、所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
示例性的,根据初始化后的特征交叉矩阵的系数、用户线性回归模型的模型参数以及商品线性回归模型的模型参数建立上述的因子分级机模型。
示例性的,特征交叉矩阵的系数用于确定v d;用户线性回归模型的模型参数用于确定
Figure PCTCN2021084301-appb-000009
商品线性回归模型的模型参数用于确定
Figure PCTCN2021084301-appb-000010
步骤S130、根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户。
示例性的,根据各个用户的行为数据将多个用户分成若干簇。可以理解的,同一簇的用户可以是商品浏览偏好或商品购买偏好较为接近的用户。
示例性的,将所述一簇中的用户分成代表用户和非代表用户。
在一些实施例中,如图3所示,图3为本申请实施例提供的一种商品推荐方法的子步骤流程图。
所述根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户包括步骤S131-步骤S133。
步骤S131、对各所述用户的行为数据进行向量化处理得到与各所述用户对应的参数向量。
示例性的,对各用户的行为数据进行向量化处理,其中,向量化处理可以是哈希向量化处理、one-hot编码向量化处理等向量化处理的方法。
示例性的,对各用户的行为数据进行向量化处理得到与各用户对应的参数向量。
示例性的,可以利用各用户的参数向量将多个用户分成若干簇。
步骤S132、根据所述用户对应的参数向量将所述多个用户分成若干簇。
示例性的,根据各用户对应的参数向量,将各个用户分去不同的簇。
示例性的,可以通过k-means聚类算法将多个用户分去k个簇。
可以理解的,用户的参数向量包括用户的商品购买偏好、商品浏览偏好等行为信息,在同簇中的用户的行为数据都是较为接近的。
步骤S133、将各簇中的部分用户确定为代表用户,其余部分为非代表用户。
示例性的,在各簇中,随机确定部分用户为代表用户,其余部分用户为非代表用户。
示例性的,在各簇中,确定代表用户为s个,每次从各簇中随机确定s/p个代表用户,直到确定s个代表用户,停止选取确定。其中,p为随机确定的次数。
例如,在某一簇中,共有用户50个,确定该簇的代表用户为s=24个,以及随机确定的次数为p=8,可以理解的,每次需要从该簇中确定3个代表用户,直到确定的代表用户个数到达24个,停止选取确定。
通过根据用户的参数向量将多个用户分成不同的簇,可以提高用户分簇的精准度,以及将行为数据较为接近的用户置于同一簇,以减少数据的交换次数,提升数据交换速度。
如图4所示,图4为本申请实施例提供的一种商品推荐方法的子步骤流程图。
在一些实施例中,所述根据各所述用户对应的参数向量将所述多个用户分成若干簇,包括步骤S1321-步骤S1323。
步骤S1321、根据各所述用户的参数向量确定各所述用户的参数内积和各所述用户的参数随机值。
示例性的,可以根据用户的行为数据进行向量化处理后得到的参数向量确定用户的参数内积和参数随机值。
示例性的,还可以根据用户的用户线性回归模型的模型参数确定用户的参数内积和参数随机值。
例如,根据用户的行为数据进行向量化处理后得到的参数向量为U=[U 1…U m];用μ表征用户的参数内积,用u'表征用户的参数随机值。
示例性的,参数内积可以用下式表达:
μ=U 1×U 2×…U m
其中,U 1、U 2、…U m为用户的参数向量。
参数随机值可以是在用户的参数向量中随机确定的值。
步骤S1322、根据各所述用户的参数内积和各所述用户的参数随机值确定各所述用户的欧式距离值。
示例性的,用户A的参数向量为
Figure PCTCN2021084301-appb-000011
用户B的参数向量为
Figure PCTCN2021084301-appb-000012
用户A和用户B分别在各自的终端中计算自己的参数内积,其中,用户A的参数内积为
Figure PCTCN2021084301-appb-000013
用户B的参数内积为
Figure PCTCN2021084301-appb-000014
Figure PCTCN2021084301-appb-000015
示例性的,用户A和用户B的参数内积以及参数随机值还应满足下述关系:
u' A+u' B=U A×U B
步骤S1323、根据各所述用户的欧式距离值将所述多个用户分成若干簇。
示例性的,根据两个用户的欧式距离值,确定是否将所述两个用户分成同一簇。
可以理解的,若两个用户的欧式距离值小于阈值,则将对应的两个用户分去同一簇。
示例性的,从用户终端所述用户的欧式距离值,根据多个用户的欧式距离值将所述多个用户分成若干簇。
示例性的,用户终端的欧式距离值用下式表示:
μ-2u
示例性的,从用户A终端获取用户A的μ A-2u A,和从用户B终端获取用户B的μ B-2u B,累加得到用户A和用户B的欧式距离平方值,根据所述欧式距离平方值,确定用户A和用户B是否为同一簇。
通过根据各用户的欧式距离值将多个用户分成若干簇,可以根据簇中的用户的行为数据对所述簇中用户的因子分解机模型进行更新,提升因子分解机模型的预测精准度,以及减少更新的次数。
步骤S140、根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数。
示例性的,在各簇中,根据各簇的代表用户的行为数据和/或非代表用户的行为数据确定对应各簇中用户的因子分解机模型的更新参数。
例如,在第一簇中,根据处于第一簇的代表用户的行为数据和/或处于第一簇的非代表用户的行为数据确定处于第一簇的所有用户各自对应的因子分解机模型的更新参数。
示例性的,从各用户的终端中获取加密后的用户行为数据进行更新参数的确定,以保护用户的隐私。
通过在同一簇内的代表用户的行为数据和/或非代表用户的行为数据确定该簇用户的因子分解机模型的更新参数,可以提高更新参数的更新精准度,减少数据交换的次数,缩短模型更新的时间,加快商品推荐的速度。
步骤S150、根据确定的更新参数对所述各用户的因子分解机模型进行更新。
示例性的,在各簇中,根据每一簇簇中的代表用户的行为数据和/或非代表用户的行为数据对该所述簇中的所有用户的因子分解机模型进行更新。
例如,在第一簇中,共有50个用户,其中有24个代表用户,26个非代表用户,根据24个代表用户的行为数据和/或26个非代表用户的行为数据,对50个用户各自对应的因子分解机模型进行更新。
示例性的,可以在服务器中确定更新参数,各用户的因子分解机模型保存在对应用户的终端上,服务器将更新参数发送给一簇中的全部用户的终端,以更新各用户的因子分解机模型。
示例性的,通过确定的更新参数对所述用户的因子分解机模型进行更新,可以使因子分解机模型的预测结果更精准。
步骤S160、基于更新后的各用户因子分解机模型将商品推荐给对应的用户。
示例性的,基于在用户终端上的更新后的因子分解机模型,将商品推荐给对应的用户。
示例性的,可以通过终端的短信提醒、app信息提醒将商品推荐给用户。
在一些实施方式中,更新后的因子分解机模型可以储存在区块链节点中。其中,区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Block chain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
如图5所示,图5为本申请实施例提供的一种商品推荐方法的子步骤流程图。
在一些实施例中,所述基于更新后的各用户一直分解机模型将商品推荐给对应的用户包括:步骤S161-步骤S162。
步骤S161、基于训练好的用户对应的因子分解机模型,根据所述用户的行为数据和待推荐商品的属性数据预测待推荐商品对应的用户喜好值。
示例性的,基于训练好的因子分解机模型,根据用户的行为数据和待推荐商品的属性数据预测用户对待推荐商品的喜好程度以及购买概率。
示例性的,用用户喜好值表征用户对待推荐商品的喜好程度以及购买概率。
示例性的,利用训练好的因子分解机模型的目标函数来预测用户的喜好值,目标函数由下式表示:
Figure PCTCN2021084301-appb-000016
其中,y为根据用户的行为数据和待推荐商品的属性数据得到的标签值(如前述的特征表中的标签值),
Figure PCTCN2021084301-appb-000017
为因子分解机模型的表达式,W为用户线性回归模型或商品线性回归模型的模型参数,V为特征矩阵的系数,arg min表示当式子处于最小值时W和V的取值,O为待计算的集合,σ表示阶跃函数,具体形式为:
Figure PCTCN2021084301-appb-000018
示例性的,通过目标函数得到用户的喜好值,可以理解的,得到的用户喜好值越大,用户对对应商品的喜好程度越高,购买概率越大。
步骤S162、根据所述用户喜好值将所述待推荐商品推荐给对应的用户。
示例性的,根据所述用户喜好值,决定是否将所述待推荐商品推荐给用户。
可以理解的,用户喜好值越高,将所述待推荐商品推荐给用户的几率越大。
示例性的,通过因子分解机模型的目标函数得到多个商品的用户喜好值,如:
台灯0.68
辅导书籍0.65
置物架0.32
书桌0.16
示例性的,台灯的用户喜好值比辅导书籍的用户喜好值大,优先将台灯推荐给用户。
示例性的,可以根据推荐阈值与所述用户喜好值,将商品推荐给对应的用户。
例如,推荐阈值可以是预设的值,若所述待推荐商品的用户喜好值高于所述推荐阈值,将所述待推荐商品推荐给对应的用户。
示例性的,推荐阈值设置为0.5,在上述商品中,台灯和辅导书籍对应的用户喜好值高于所述推荐阈值,将台灯和辅导书籍推荐给对应的用户。
示例性的,若所述待推荐商品的用户喜好值低于所述推荐阈值,不给对应的用户推荐所述待推荐商品。
示例性的,推荐阈值设置为0.5,在上述商品中,置物架和书架对应的用户喜好值低于所述推荐阈值,不给用户推荐所述置物架和所述书架。
示例性的,通过用户喜好值将所述待推荐商品推荐给对应的用户,以使推荐的商品更符合用户的需求,提升商品推荐的精度。
在一些实施例中,所述根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数,包括:根据各所述代表用户的行为数据确定用于更新对应代表用户的因子分解机模型的第一更新参数。
示例性的,根据每一簇簇中的代表用户的行为数据确定第一更新参数,所述第一更新参数用于更新对应代表用户的因子分解机模型。
例如,第一簇中有若干代表用户,若干代表用户根据自己的行为数据更新自己的因子分解机模型。
例如,第一簇的第一代表用户确定自己的因子分解机模型包括根据所述第一代表用户的行为数据和商品的属性数据,得到所述第一代表用户的用户线性回归模型和商品线性回归模型;根据所述用户线性回归模型以及所述商品线性回归模型得到的对应模型的模型参数;根据所述用户线性回归模型的模型参数和所述商品线性回归模型的模型参数对第一代表用户的因子分解机模型进行迭代计算,其中,每次迭代计算后都对用户线性回归模型的模型参数和商品线性回归模型的模型参数进行更新;根据所述迭代计算后的因子分解机模型的模型参数确定所述第一更新参数。
示例性的,可以设置迭代计算的次数为T,直到因子分解机模型进行T次迭代计算后,停止迭代计算。
示例性的,得到t次迭代计算之后的因子分解机模型的模型参数为
Figure PCTCN2021084301-appb-000019
V t,根据迭代计算之后的因子分解机模型的模型参数确定第一更新参数为
Figure PCTCN2021084301-appb-000020
Figure PCTCN2021084301-appb-000021
V t+1=V t
所述根据确定的更新参数对所述各用户的因子分解机模型进行更新,包括:根据各所述代表用户对应的第一更新参数更新对应代表用户的因子分解机模型。
示例性的,根据第一代表用户对应的第一更新参数更新第一代表用户的因子分解机模型,根据第二代表用户对应的第一更新参数更新第二代表用户的因子分解机模型。
可以理解的,每一个代表用户都有各自对应的第一更新参数,所述各用户对应的第一更新参数对各用户对应的因子分解机模型进行更新。
在一些实施例中,所述根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数,包括:根据所述簇中全体代表用户的行为数据确定用于更新所述簇中非代表用户的因子分解机模型的第二更新参数。
示例性的,在第一簇中,用于更新第一簇中的非代表用户的因子分解机模型的第二更新参数由第一簇中的全体代表用户的行为数据和对应的非代表用户的行为数据确定。
例如,在第一簇中的第一非代表用户的因子分解机模型的第二更新参数由第一簇中的全体代表用户的行为数据和第一非代表用户的行为数据确定。
示例性的,在第一簇中,包括代表用户A和代表用户B,以及非代表用户C,服务器从代表用户A的终端和代表用户B的终端获取对应的因子分解机模型进行迭代计算时的参数变化量,得到参数变化量的平均值
Figure PCTCN2021084301-appb-000022
并将所述变化量平均值发送给非代表用户C终端,以使非代表用户C的终端确定第二更新参数。
示例性的,非代表用户C的终端根据所述参数平均值以及非代表用户C的行为数据确定第二更新参数,由下式表示:
Figure PCTCN2021084301-appb-000023
其中,
Figure PCTCN2021084301-appb-000024
V t分别表示进行t次因子分解机模型迭代之后的非代表用户的用户线性回归模型的模型参数、商品线性回归模型的模型参数、特征交叉矩阵的系数,所述γ为超参数,γ∈[0,1]。
可以理解的,各非代表用户的第二更新参数由对应的非代表用户的行为数据和与所述非代表用户同簇的全体代表用户的行为数据确定。
所述根据确定的更新参数对所述各用户的因子分解机模型进行更新,包括:根据所述第二更新参数更新所述簇中的非代表用户的因子分解机模型。
示例性的,非代表用户的终端根据从服务器获取的代表用户的参数平均值和所述非代表用户的行为数据确定所述第二更新参数,根据所述第二更新参数对因子分解机模型进行更新。
非代表用户通过从服务器获取代表用户的参数平均值确定第二更新参数,可以减少用户终端与服务器的交互次数,增快模型的更新时间,缩短商品推荐的时长。
请参阅图6,图6是本申请一实施例提供的一种商品推荐装置的示意图,该商品推荐装置可以配置于服务器或终端中,用于执行前述的商品推荐方法。
如图6所示,该商品推荐装置,包括:数据获取模块110、模型建立模块120、簇划分模块130、参数确定模块140、模型训练模块150、商品推荐模块160。
数据获取模块110,用于获取多个用户的行为数据和商品的属性数据。
模型建立模块120,用于根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型。
簇划分模块130,用于根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户。
参数确定模块140,用于根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数。
模型更新模块150,用于根据确定的更新参数对所述各用户的因子分解机模型进行更新。
商品推荐模块160,用于基于更新后的各用户因子分解机模型将商品推荐给对应的用户。
示例性的,模型建立模块120包括特征确定子模块、回归模型建立子模块、参数初始化子模块。
特征确定子模块,用于对所述用户的行为数据进行编码处理得到用户的行为特征,和对所述商品的属性数据进行编码处理得到商品的公开特征。
回归模型建立子模块,用于根据所述用户的行为特征建立用户线性回归模型以及根据所述商品的公开特征建立商品线性回归模型。
参数初始化子模块,用于基于所述用户线性回归模型和商品线性回归模型,获取初始化的用户线性回归模型参数和初始化的商品线性回归模型参数。
模型建立模块120还用于根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
示例性的,所述商品推荐装置还包括:特征交叉模型确定子模块、特征交叉模型参数确定子模块。
特征交叉模型确定子模块,用于根据所述用户的行为特征和所述商品的公开特征确定特征交叉模型。
特征交叉模型参数确定子模块,用于获取并对所述特征交叉模型的模型参数进行初始化。
模型建立模块120还用于根据所述初始化的特征交叉模型的模型参数、所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
示例性的,簇划分模块130包括参数向量确定子模块,用户划分子模块,用户确定子模块。
参数向量确定子模块,用于对各所述用户的行为数据进行向量化处理得到与各所述用户对应的参数向量。
用户划分子模块,用于根据所述用户对应的参数向量将所述多个用户分成若干簇。
用户确定子模块,用于将各簇中的部分用户确定为代表用户,其余部分为非代表用户。
示例性的,参数向量确定子模块还包括参数内积确定子模块、欧式距离确定子模块。
参数内积确定子模块,用于根据各所述用户的参数向量确定各所述用户的参数内积和各所述用户的参数随机值。
欧式距离确定子模块,用于根据各所述用户的参数内积和各所述用户的参数随机值确定各所述用户的欧式距离值。
用户划分子模块还用于根据各所述用户的欧式距离值将用户分成若干簇。
示例性的,参数确定模块140包括第一参数确定子模块、第二参数确定子模块。
第一参数确定子模块,用于根据各所述代表用户的行为数据确定用于更新对应代表用户的因子分解机模型的第一更新参数。
第二参数确定子模块,用于根据所述簇中全体代表用户的行为数据确定用于更新所述簇中非代表用户的因子分解机模型的第二更新参数。
模型更新模块150还用于根据各所述代表用户对应的第一更新参数更新对应代表用户的因子分解机模型,和/或根据所述第二更新参数更新所述簇中的非代表用户的因子分解机模型。
示例性的,商品推荐模块160包括喜好值确定子模块、喜好商品推荐子模块。
喜好值确定模块,用于基于训练好的用户对应的因子分解机模型,根据所述用户的行为数据和待推荐商品的属性数据预测与待推荐商品对应的用户喜好值。
喜好商品推荐子模块,用于根据所述用户喜好值将所述待推荐商品推荐给对应的用户。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置和各模块、单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
本申请的方法、装置可用于众多通用或专用的计算***环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器***、基于微处理器的***、机顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何***或设备的分布式计算环境等等。
示例性地,上述的方法、装置可以实现为一种计算机程序的形式,该计算机程序可以在如图7所示的计算机设备上运行。
请参阅图7,图7是本申请实施例提供的一种计算机设备的示意图。该计算机设备可以是服务器或终端。
如图7所示,该计算机设备包括通过***总线连接的处理器、存储器和网络接口,其中,存储器可以包括非易失性存储介质和内存储器。
非易失性存储介质可存储操作***和计算机程序。该计算机程序包括程序指令,该程序指令被执行时,可使得处理器执行任意一种商品推荐方法。
处理器用于提供计算和控制能力,支撑整个计算机设备的运行。
内存储器为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器执行时,可使得处理器执行任意一种商品推荐方法。
该网络接口用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,该计算机设备的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
应当理解的是,处理器可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组 件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
其中,在一些实施方式中,所述处理器用于运行存储在存储器中的计算机程序,以实现如下步骤:获取多个用户的行为数据和商品的属性数据;根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型;根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户;根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数;根据确定的更新参数对所述各用户的因子分解机模型进行更新;基于更新后的各用户因子分解机模型将商品推荐给对应的用户。
示例性地,处理器用于实现:对所述用户的行为数据进行编码处理得到用户的行为特征,和对所述商品的属性数据进行编码处理得到商品的公开特征;根据所述用户的行为特征建立用户线性回归模型以及根据所述商品的公开特征建立商品线性回归模型;基于所述用户线性回归模型和商品线性回归模型,获取初始化的用户线性回归模型参数和初始化的商品线性回归模型参数;根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
示例性地,处理器用于实现:根据所述用户的行为特征和所述商品的公开特征确定特征交叉模型;获取并对所述特征交叉模型的模型参数进行初始化;根据所述初始化的特征交叉模型的模型参数、所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
示例性的,处理器用于实现:基于训练好的用户对应的因子分解机模型,根据所述用户的行为数据和待推荐商品的属性数据预测与待推荐商品对应的用户喜好值;根据所述用户喜好值将所述待推荐商品推荐给对应的用户。
示例性的,处理器用于实现:对各所述用户的行为数据进行向量化处理得到与各所述用户对应的参数向量;根据所述用户对应的参数向量将所述多个用户分成若干簇;将各簇中的部分用户确定为代表用户,其余部分为非代表用户。
示例性的,处理器用于实现:根据各所述用户的参数向量确定各所述用户的参数内积和各所述用户的参数随机值;根据各所述用户的参数内积和各所述用户的参数随机值确定各所述用户的欧式距离值;根据各所述用户的欧式距离值将用户分成若干簇。
示例性的,处理器用于实现:根据各所述代表用户的行为数据确定用于更新对应代表用户的因子分解机模型的第一更新参数;根据所述簇中全体代表用户的行为数据确定用于更新所述簇中非代表用户的因子分解机模型的第二更新参数。
处理器用于实现:根据各所述代表用户对应的第一更新参数更新对应代表用户的因子分解机模型;根据所述第二更新参数更新所述簇中的非代表用户的因子分解机模型。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例或者实施例的某些部分所述的方法,如:
一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序中包括程序指令,所述处理器执行所述程序指令,实现本申请实施例提供的任意一项商品推荐方法。具体的,计算机程序被处理器执行时实现:
获取多个用户的行为数据和商品的属性数据;
根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型;
根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户;
根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数;
根据确定的更新参数对所述各用户的因子分解机模型进行更新;
基于更新后的各用户因子分解机模型将商品推荐给对应的用户。
示例性的,所述计算机程序被处理器执行时还实现:
对所述用户的行为数据进行编码处理得到用户的行为特征,和对所述商品的属性数据进行编码处理得到商品的公开特征;
根据所述用户的行为特征建立用户线性回归模型以及根据所述商品的公开特征建立商品线性回归模型;
基于所述用户线性回归模型和商品线性回归模型,获取初始化的用户线性回归模型参数和初始化的商品线性回归模型参数;
根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
示例性的,所述计算机程序被处理器执行时还实现:
根据所述用户的行为特征和所述商品的公开特征确定特征交叉矩阵;
获取所述特征交叉矩阵的系数;
所述根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型,包括:
根据所述初始化的特征交叉矩阵的系数、所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
示例性的,所述计算机程序被处理器执行时还实现:
基于更新后与用户对应的因子分解机模型,根据所述用户的行为数据和待推荐商品的属性数据,预测与待推荐商品对应的用户喜好值;
根据所述用户喜好值将所述待推荐商品推荐给对应的用户。
示例性的,所述计算机程序被处理器执行时还实现:
对各所述用户的行为数据进行向量化处理得到与各所述用户对应的参数向量;
根据所述用户对应的参数向量将所述多个用户分成若干簇;
将各簇中的部分用户确定为代表用户,其余部分为非代表用户。
示例性的,所述计算机程序被处理器执行时还实现:
根据各所述用户的参数向量确定各所述用户的参数内积和各所述用户的参数随机值;
根据各所述用户的参数内积和各所述用户的参数随机值确定各所述用户的欧式距离值;
根据各所述用户的欧式距离值将所述多个用户分成若干簇。
示例性的,所述计算机程序被处理器执行时还实现:
根据各所述代表用户的行为数据确定用于更新对应代表用户的因子分解机模型的第一更新参数;
根据所述簇中全体代表用户的行为数据确定用于更新所述簇中非代表用户的因子分解机模型的第二更新参数;
所述根据确定的更新参数对所述各用户的因子分解机模型进行更新,包括:
根据各所述代表用户对应的第一更新参数更新对应代表用户的因子分解机模型;
根据所述第二更新参数更新所述簇中的非代表用户的因子分解机模型。
其中,实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述计算机可读存储介质可以是非易失性,也可以是易失性。所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。所述计算机可读存储介质可以是前述实施例所述的计算机设备的内部存储单元,例如所述计算机设备的硬盘或内存。所述计算机可读存 储介质也可以是所述计算机设备的外部存储设备,例如所述计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种商品推荐方法,其中,所述方法包括:
    获取多个用户的行为数据和商品的属性数据;
    根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型;
    根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户;
    根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数;
    根据确定的更新参数对所述各用户的因子分解机模型进行更新;
    基于更新后的各用户因子分解机模型将商品推荐给对应的用户。
  2. 如权利要求1所述的商品推荐方法,其中,所述根据各所述用户的行为数据和商品的属性数据建立与各所述用户一一对应的因子分解机模型包括:
    对所述用户的行为数据进行编码处理得到用户的行为特征,和对所述商品的属性数据进行编码处理得到商品的公开特征;
    根据所述用户的行为特征建立用户线性回归模型以及根据所述商品的公开特征建立商品线性回归模型;
    基于所述用户线性回归模型和商品线性回归模型,获取初始化的用户线性回归模型参数和初始化的商品线性回归模型参数;
    根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
  3. 如权利要求2所述的商品推荐方法,其中,所述方法还包括:
    根据所述用户的行为特征和所述商品的公开特征确定特征交叉矩阵;
    获取所述特征交叉矩阵的系数;
    所述根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型,包括:
    根据所述初始化的特征交叉矩阵的系数、所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
  4. 如权利要求1所述的商品推荐方法,其中,所述基于更新后的各用户因子分解机模型将商品推荐给对应的用户,包括:
    基于更新后与用户对应的因子分解机模型,根据所述用户的行为数据和待推荐商品的属性数据,预测与待推荐商品对应的用户喜好值;
    根据所述用户喜好值将所述待推荐商品推荐给对应的用户。
  5. 如权利要求1-4任一项所述的商品推荐方法,其中,所述根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户,包括:
    对各所述用户的行为数据进行向量化处理得到与各所述用户对应的参数向量;
    根据所述用户对应的参数向量将所述多个用户分成若干簇;
    将各簇中的部分用户确定为代表用户,其余部分为非代表用户。
  6. 如权利要求5所述的商品推荐方法,其中,所述根据各所述用户对应的参数向量将所述多个用户分成若干簇,包括:
    根据各所述用户的参数向量确定各所述用户的参数内积和各所述用户的参数随机值;
    根据各所述用户的参数内积和各所述用户的参数随机值确定各所述用户的欧式距离值;
    根据各所述用户的欧式距离值将所述多个用户分成若干簇。
  7. 如权利要求1-4任一项所述的商品推荐方法,其中,所述根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数,包括:
    根据各所述代表用户的行为数据确定用于更新对应代表用户的因子分解机模型的第一更新参数;
    根据所述簇中全体代表用户的行为数据确定用于更新所述簇中非代表用户的因子分解机模型的第二更新参数;
    所述根据确定的更新参数对所述各用户的因子分解机模型进行更新,包括:
    根据各所述代表用户对应的第一更新参数更新对应代表用户的因子分解机模型;
    根据所述第二更新参数更新所述簇中的非代表用户的因子分解机模型。
  8. 一种商品推荐的装置,其中,所述装置包括:
    数据获取模块,用于获取多个用户的行为数据和商品的属性数据;
    模型建立模块,用于根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型;
    簇划分模块,用于根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户;
    参数确定模块,用于根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数;
    模型更新模块,用于根据确定的更新参数对所述各用户的因子分解机模型进行更新;
    商品推荐模块,用于基于更新后的各用户因子分解机模型将商品推荐给对应的用户。
  9. 如权利要求8所述的商品推荐的装置,其中,模型建立模块包括特征确定子模块、回归模型建立子模块、参数初始化子模块,其中:
    特征确定子模块,用于对所述用户的行为数据进行编码处理得到用户的行为特征,和对所述商品的属性数据进行编码处理得到商品的公开特征;
    回归模型建立子模块,用于根据所述用户的行为特征建立用户线性回归模型以及根据所述商品的公开特征建立商品线性回归模型;
    参数初始化子模块,用于基于所述用户线性回归模型和商品线性回归模型,获取初始化的用户线性回归模型参数和初始化的商品线性回归模型参数;
    模型建立模块,用于根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
  10. 如权利要求9所述的商品推荐的装置,其中,所述商品推荐装置还包括:特征交叉模型确定子模块、特征交叉模型参数确定子模块,其中:
    特征交叉模型确定子模块,用于根据所述用户的行为特征和所述商品的公开特征确定特征交叉模型;
    特征交叉模型参数确定子模块,用于获取并对所述特征交叉模型的模型参数进行初始化;
    模型建立模块,还用于根据所述初始化的特征交叉模型的模型参数、所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
  11. 如权利要求8所述的商品推荐的装置,其中,所述商品推荐模块包括喜好值确定子模块、喜好商品推荐子模块,其中:
    喜好值确定模块,用于基于训练好的用户对应的因子分解机模型,根据所述用户的行为数据和待推荐商品的属性数据预测与待推荐商品对应的用户喜好值;
    喜好商品推荐子模块,用于根据所述用户喜好值将所述待推荐商品推荐给对应的用户。
  12. 如权利要求8-11所述的商品推荐的装置,其中,所述簇划分模块包括参数向量确定子模块,用户划分子模块,用户确定子模块,其中。
    参数向量确定子模块,用于对各所述用户的行为数据进行向量化处理得到与各所述用 户对应的参数向量;
    用户划分子模块,用于根据所述用户对应的参数向量将所述多个用户分成若干簇;
    用户确定子模块,用于将各簇中的部分用户确定为代表用户,其余部分为非代表用户。
  13. 一种计算机设备,其中,所述计算机设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现:
    获取多个用户的行为数据和商品的属性数据;
    根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型;
    根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户;
    根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数;
    根据确定的更新参数对所述各用户的因子分解机模型进行更新;
    基于更新后的各用户因子分解机模型将商品推荐给对应的用户。
  14. 根据权利要求13所述的计算机设备,其中,所述处理器执行所述计算机程序时还实现:
    对所述用户的行为数据进行编码处理得到用户的行为特征,和对所述商品的属性数据进行编码处理得到商品的公开特征;
    根据所述用户的行为特征建立用户线性回归模型以及根据所述商品的公开特征建立商品线性回归模型;
    基于所述用户线性回归模型和商品线性回归模型,获取初始化的用户线性回归模型参数和初始化的商品线性回归模型参数;
    根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
  15. 根据权利要求14所述的计算机设备,其中,所述处理器执行所述计算机程序时还实现:
    根据所述用户的行为特征和所述商品的公开特征确定特征交叉矩阵;
    获取所述特征交叉矩阵的系数;
    所述根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型,包括:
    根据所述初始化的特征交叉矩阵的系数、所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
  16. 根据权利要求13所述的计算机设备,其中,所述处理器执行所述计算机程序时还实现:
    基于更新后与用户对应的因子分解机模型,根据所述用户的行为数据和待推荐商品的属性数据,预测与待推荐商品对应的用户喜好值;
    根据所述用户喜好值将所述待推荐商品推荐给对应的用户。
  17. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现:
    获取多个用户的行为数据和商品的属性数据;
    根据各所述用户的行为数据和所述商品的属性数据建立与各所述用户一一对应的因子分解机模型;
    根据所述行为数据将所述多个用户分成若干簇,所述簇中的用户包括代表用户和非代表用户;
    根据各簇中所述代表用户的行为数据和/或所述非代表用户的行为数据确定对应簇中的各用户因子分解机模型的更新参数;
    根据确定的更新参数对所述各用户的因子分解机模型进行更新;
    基于更新后的各用户因子分解机模型将商品推荐给对应的用户。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现:
    对所述用户的行为数据进行编码处理得到用户的行为特征,和对所述商品的属性数据进行编码处理得到商品的公开特征;
    根据所述用户的行为特征建立用户线性回归模型以及根据所述商品的公开特征建立商品线性回归模型;
    基于所述用户线性回归模型和商品线性回归模型,获取初始化的用户线性回归模型参数和初始化的商品线性回归模型参数;
    根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现:
    根据所述用户的行为特征和所述商品的公开特征确定特征交叉矩阵;
    获取所述特征交叉矩阵的系数;
    所述根据所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型,包括:
    根据所述初始化的特征交叉矩阵的系数、所述初始化的用户线性回归模型参数和商品线性回归模型参数建立与所述用户对应的因子分解机模型。
  20. 根据权利要求17所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现:
    基于更新后与用户对应的因子分解机模型,根据所述用户的行为数据和待推荐商品的属性数据,预测与待推荐商品对应的用户喜好值;
    根据所述用户喜好值将所述待推荐商品推荐给对应的用户。
PCT/CN2021/084301 2020-12-18 2021-03-31 商品推荐方法、装置、计算机设备及介质 WO2022126931A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011511925.4A CN112529636A (zh) 2020-12-18 2020-12-18 商品推荐方法、装置、计算机设备及介质
CN202011511925.4 2020-12-18

Publications (1)

Publication Number Publication Date
WO2022126931A1 true WO2022126931A1 (zh) 2022-06-23

Family

ID=75001696

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/084301 WO2022126931A1 (zh) 2020-12-18 2021-03-31 商品推荐方法、装置、计算机设备及介质

Country Status (2)

Country Link
CN (1) CN112529636A (zh)
WO (1) WO2022126931A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112529636A (zh) * 2020-12-18 2021-03-19 平安科技(深圳)有限公司 商品推荐方法、装置、计算机设备及介质
CN114049166B (zh) * 2021-10-12 2024-04-30 华南理工大学 基于离散因子分解机的物品推荐方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150187024A1 (en) * 2013-12-27 2015-07-02 Telefonica Digital España, S.L.U. System and Method for Socially Aware Recommendations Based on Implicit User Feedback
CN107515909A (zh) * 2017-08-11 2017-12-26 深圳市耐飞科技有限公司 一种视频推荐方法及***
CN107729488A (zh) * 2017-10-17 2018-02-23 北京搜狐新媒体信息技术有限公司 一种信息推荐方法及装置
CN110827063A (zh) * 2019-10-18 2020-02-21 用友网络科技股份有限公司 一种多策略融合的商品推荐方法、装置、终端及存储介质
CN112529636A (zh) * 2020-12-18 2021-03-19 平安科技(深圳)有限公司 商品推荐方法、装置、计算机设备及介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408729B (zh) * 2018-12-05 2022-02-08 广州市百果园信息技术有限公司 推荐物料确定方法、装置、存储介质和计算机设备
CN112070577A (zh) * 2020-08-31 2020-12-11 深圳市卡牛科技有限公司 一种商品推荐方法、***、设备及介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150187024A1 (en) * 2013-12-27 2015-07-02 Telefonica Digital España, S.L.U. System and Method for Socially Aware Recommendations Based on Implicit User Feedback
CN107515909A (zh) * 2017-08-11 2017-12-26 深圳市耐飞科技有限公司 一种视频推荐方法及***
CN107729488A (zh) * 2017-10-17 2018-02-23 北京搜狐新媒体信息技术有限公司 一种信息推荐方法及装置
CN110827063A (zh) * 2019-10-18 2020-02-21 用友网络科技股份有限公司 一种多策略融合的商品推荐方法、装置、终端及存储介质
CN112529636A (zh) * 2020-12-18 2021-03-19 平安科技(深圳)有限公司 商品推荐方法、装置、计算机设备及介质

Also Published As

Publication number Publication date
CN112529636A (zh) 2021-03-19

Similar Documents

Publication Publication Date Title
US10430464B1 (en) Scalable graph propagation for knowledge expansion
US20180060696A1 (en) Probabilistic recommendation of an item
WO2017080170A1 (zh) 群体用户画像方法及***
WO2019169756A1 (zh) 产品推荐方法、装置及存储介质
US9852193B2 (en) Probabilistic clustering of an item
US10354184B1 (en) Joint modeling of user behavior
Kumar et al. Social popularity based SVD++ recommender system
US8781916B1 (en) Providing nuanced product recommendations based on similarity channels
US8935263B1 (en) Generating rankings of reputation scores in reputation systems
US10157351B1 (en) Persona based data mining system
US20150242750A1 (en) Asymmetric Rankers for Vector-Based Recommendation
WO2022126931A1 (zh) 商品推荐方法、装置、计算机设备及介质
CN107545471B (zh) 一种基于高斯混合的大数据智能推荐方法
US20140006166A1 (en) System and method for determining offers based on predictions of user interest
WO2021159894A1 (en) Recommender system using bayesian graph convolution networks
JP2019113943A (ja) 情報提供装置、情報提供方法、およびプログラム
US10089675B1 (en) Probabilistic matrix factorization system based on personas
US10937070B2 (en) Collaborative filtering to generate recommendations
JPWO2017159403A1 (ja) 予測システム、方法およびプログラム
US20130204738A1 (en) Systems and methods for recommending entities to online customers
WO2020221022A1 (zh) 业务对象推荐方法
WO2017159402A1 (ja) 共クラスタリングシステム、方法およびプログラム
US20230025641A1 (en) Training a machine learning model to determine a predicted time distribution related to electronic communications
US20230222561A1 (en) Systems and methods for executing search queries based on dynamic tagging
KR101639656B1 (ko) 광고 제공 방법 및 서버 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21904870

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21904870

Country of ref document: EP

Kind code of ref document: A1