CN109102127B - Commodity recommendation method and device - Google Patents
Commodity recommendation method and device Download PDFInfo
- Publication number
- CN109102127B CN109102127B CN201811011469.XA CN201811011469A CN109102127B CN 109102127 B CN109102127 B CN 109102127B CN 201811011469 A CN201811011469 A CN 201811011469A CN 109102127 B CN109102127 B CN 109102127B
- Authority
- CN
- China
- Prior art keywords
- user
- commodity
- feature vector
- preference
- commodities
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0631—Item recommendations
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- Marketing (AREA)
- Development Economics (AREA)
- Human Resources & Organizations (AREA)
- General Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- Operations Research (AREA)
- Entrepreneurship & Innovation (AREA)
- Game Theory and Decision Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the invention provides a commodity recommendation method and a commodity recommendation device, which comprise the following steps: acquiring shopping data of a user group, training a prediction model constructed based on an eALS algorithm by using the shopping data, and acquiring a user feature vector of each user and a commodity feature vector of each commodity when the prediction model reaches an optimal solution; the inner product of the user feature vector and the commodity feature vector is used for representing the prediction preference of the user on the commodity; for any user in the user group, the predicted preference of the user for all commodities is obtained according to the inner product of the user feature vector of the user and the feature vectors of all commodities, and the commodity recommendation list of the user is obtained according to the predicted preference of the user for all commodities. According to the embodiment of the invention, the influence of the commodity information concerned by the user is added into the eALS algorithm, so that the constructed prediction model can reflect the preference degree of the user to the commodity more truly, and a better recommendation effect is achieved.
Description
Technical Field
The embodiment of the invention relates to the technical field of hidden feedback recommendation, in particular to a commodity recommendation method and device.
Background
The difficulty of the implicit feedback recommendation system is the handling of unobserved data, and there are generally two methods for handling unobserved data: (1) all unobserved samples are treated as negative feedback based on an overall strategy, which has better convergence but generates a large number of inefficient negative samples; (2) and (3) sampling from an unobserved sample to obtain a negative feedback sample based on a sampling strategy, wherein the strategy can effectively reduce the number of negative samples during training, but the algorithm performance can be influenced.
The point-by-point Alternating Least square (eALS) method is a hidden feedback recommendation algorithm based on Matrix Factorization (MF). Optimization goals for etals are as follows:
wherein u and i represent user number, commodity number, pu、qiFeature vectors corresponding to the user and the commodity; r isuiRepresenting the real preference of a user u to a commodity i, usually marking a positive feedback sample as 1 and a negative sample as 0;representing the prediction score of the model, and optimizing the prediction score to the real score ruiRegression; omegauiRepresenting the weight of the contribution of the commodity i purchased by the user u to the optimization result;the term is used to prevent overfitting, λ controls the degree of overfitting.
In the general MF algorithm, the weight coefficient ωuiFor observationThe positive sample is 1 and all the samples not observed are assigned the same value less than 1, which has the advantage of reducing the complexity of calculation and storage, but has the disadvantage of not performing well on the real data set. eALS proposes a weight coefficient omega related to the popularity of a commodityuiThe method can describe the contribution of the unobserved samples to the optimization target more flexibly and accurately.
The unobserved samples consist of true negative feedback (the user has virtually no interest in purchasing) that should be given a greater weight ω, and missing values (the user may be interested in purchasing)ui. Considering that there is a difference in popularity of products, popular products have a greater likelihood of being known to the user, and if the user is not observed purchasing a popular product, the user has a greater likelihood of actually disliking the popular product than an unpopular product. Therefore, for the commodity with higher popularity, the corresponding unobserved behavior should have a greater weight, and the formula is described as follows:
wherein, ciRepresenting the corresponding weight when the commodity i is an unobserved sample;representing the proportion of the purchased times of the commodity i to the purchased times of all commodities, and measuring the popularity of one commodity; r is purchase data; alpha is used to control the gap between popular and unpopular merchandise, 0<α<1, the difference between the two becomes smooth, α>At 1, the impact of popular goods is increased; c. C0For controlling the ratio of observed behavior to unobserved behavior weights. Restating the optimization objective of etals using the above formula is as follows:
disclosure of Invention
Embodiments of the present invention provide a method and apparatus for recommending a commodity, which overcome the above problems or at least partially solve the above problems.
According to a first aspect of embodiments of the present invention, there is provided a commodity recommendation method including:
the method comprises the steps of obtaining shopping data of a user group, wherein the shopping data comprise the number of each user in the user group, the number of a commodity purchased by the user, the number of a concerned commodity and a label of the real preference of the user to the commodity, and the label is used for representing whether the user purchases the commodity;
training a prediction model constructed based on an eALS algorithm by using the shopping data to obtain a user feature vector of each user and a commodity feature vector of each commodity when the prediction model reaches an optimal solution; the inner product of the user feature vector and the commodity feature vector is used for representing the prediction preference of the user on the commodity;
for any user in the user group, the predicted preference of the user for all commodities is obtained according to the inner product of the user feature vector of the user and the feature vectors of all commodities, and the commodity recommendation list of the user is obtained according to the predicted preference of the user for all commodities.
According to a second aspect of the embodiments of the present invention, there is provided an article recommendation device including:
the shopping data acquisition module is used for acquiring the shopping data of a user group, wherein the shopping data comprises the number of each user in the user group, the number of a commodity purchased by the user, the number of a concerned commodity and a label of the real preference of the user to the commodity, and the label is used for representing whether the user purchases the commodity;
the training module is used for training a prediction model constructed based on an eALS algorithm by using the shopping data to obtain a user feature vector of each user and a commodity feature vector of each commodity when the prediction model reaches an optimal solution; the inner product of the user feature vector and the commodity feature vector is used for representing the prediction preference of the user on the commodity;
and the recommending module is used for acquiring the predicted preference of the user to all the commodities according to the inner product of the user characteristic vector of the user and the characteristic vectors of all the commodities for any user in the user group, and acquiring a commodity recommending list of the user according to the predicted preference of the user to all the commodities.
According to a third aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, and the processor calls the program instructions to perform the merchandise recommendation method provided by any one of the various possible implementations of the first aspect.
According to a fourth aspect of the embodiments of the present invention, there is also provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the merchandise recommendation method provided in any one of the various possible implementations of the first aspect.
According to the commodity recommendation method and device provided by the embodiment of the invention, the influence of commodity information concerned by the user is added into the eALS algorithm, so that the constructed prediction model can reflect the preference degree of the user to the commodity more truly, and a better recommendation effect is achieved.
Drawings
Fig. 1 is a schematic flow chart of a commodity recommendation method according to an embodiment of the present invention;
FIG. 2 is a functional block diagram of a merchandise recommendation device according to an embodiment of the present invention;
fig. 3 is a block diagram of an electronic device provided in accordance with an embodiment of the present invention.
Detailed Description
The following describes embodiments of the present invention in further detail with reference to the drawings and examples. The following examples are intended to illustrate the examples of the present invention, but are not intended to limit the scope of the examples of the present invention.
In the existing hidden feedback prediction model, only behaviors (such as purchasing behaviors in commodity recommendation) which can directly reflect user preferences are considered. But in fact, the user has a great deal of additional attention behaviors in the process of purchasing the commodity, such as clicking, browsing, searching and other behaviors, and compared with purchasing behaviors, the behaviors reflect the preference of the user with lower credibility.
The inventive concept of the embodiment of the invention is as follows: the attention behaviors of the user are embodied in a prediction model based on the eALS algorithm, so that more accurate description of commodities preferred by the user is obtained. Fig. 1 is a schematic flowchart illustrating a product recommendation method according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
s101, acquiring shopping data of a user group, wherein the shopping data comprises the number of each user in the user group, the number of a commodity purchased by the user, the number of a concerned commodity and a label of the real preference of the user to the commodity, and the label is used for representing whether the user purchases the commodity.
It should be noted that, first, shopping data of a user group is obtained through a database, where the shopping data is original data related to shopping, and includes a user number, a user purchase record and an attention record, in the embodiment of the present invention, a commodity in the attention record is a commodity which is only concerned but not purchased by the user by default, and a method for determining the user attention may be a behavior such as clicking, browsing, searching, and the like. The number of the commodity purchased by the user and the number of times are recorded in the purchase record, and the number of the commodity paid attention by the user is recorded in the attention record, for the purpose of convenient statistics, the number in the embodiment of the invention can be numbered from 1 by Arabic numerals, the number of the users in the user group is M, so the number of the users is from 1 to M, the general class of the commodity is N, and the number of the commodity can be from 1 to N.
It should be noted that the implicit feedback recommendation system regards the unobserved data and the observed data as negative feedback and positive feedback, respectively. In the embodiment of the invention, if the commodity is purchased by the user, the commodity is regarded as positive feedback, and the real preference of the user to the commodity is marked as 1; taking the commodity which is not concerned or purchased by the user as negative feedback, wherein the real preference of the user to the commodity is 0; compared with the concerned goods, the purchased goods suggest stronger user preference, and meanwhile, the user preference for the concerned goods should exceed the goods which are not concerned yet (the goods purchased by default in the embodiment of the present invention are certainly the concerned goods), so the user preference for the concerned goods should be between 0 and 1, and in the embodiment of the present invention, the true preference for the concerned goods is not determined.
S102, training a prediction model constructed based on an eALS algorithm by using shopping data, and obtaining a user feature vector of each user and a commodity feature vector of each commodity when the prediction model reaches an optimal solution; the inner product of the user feature vector and the commodity feature vector is used for representing the prediction preference of the user on the commodity.
It should be noted that the performance of the etals algorithm is better than that of BPR (Bayesian Personalized Ranking model, Bayesian Personalized Ranking, sampling-based strategy), the prediction model constructed based on the etals algorithm uses the user feature vector representing the inherent attribute of the user and the commodity feature vector representing the inherent attribute of the commodity as arguments, the inner product of the user feature vector and the commodity feature vector is used for representing the preference degree of the user to the commodity as a dependent variable, the real preference of the user to partial commodities (purchased commodities and commodities which are not concerned and not purchased) and the real preference of the user to the concerned commodities are between the real preference of the purchased commodities and the real preference of the commodities which are not concerned and not purchased are taken as constraint conditions to be optimized, the concerned information of the user to the commodities is merged into the eALS algorithm, and the preference of the user to the commodities can be reflected more truly.
S103, for any user in the user group, the predicted preference of the user to all the commodities is obtained according to the inner product of the user feature vector of the user and the feature vectors of all the commodities, and the commodity recommendation list of the user is obtained according to the predicted preference of the user to all the commodities.
It should be noted that after the prediction model of the embodiment of the present invention is trained, a user feature vector representing the inherent attribute of each user and a commodity feature vector representing the inherent attribute of each commodity are actually obtained as much as possible, so that when the preference of any user in the user group needs to be predicted, the predicted preference of the user for all commodities can be obtained only by performing an inner product operation on the user feature vector of the user and all commodity feature vectors. After the predicted preference of the user for all the commodities is obtained, it is obvious that a certain number of recommended commodities can be obtained by sorting the predicted preference values.
According to the commodity recommendation method provided by the embodiment of the invention, the influence of commodity information concerned by the user is added into the eALS algorithm, so that the constructed prediction model can reflect the preference degree of the user to the commodity more truly, and a better recommendation effect is achieved.
The most intuitive idea to add the impact of the behavior of interest to the etals algorithm is to set the commodity of interest to the same regression value (between 0-1), but the same regression value oversimplifies the problem, making it difficult to determine the value size, and potentially negatively optimizing the algorithm performance. Therefore, embodiments of the present invention allow for the incorporation of the relative relationship between the purchased samples and the samples of interest (or the samples not of interest) in the predictive model, and the incorporation of such a relative relationship into the conventional etals algorithm can result in significant performance gains. Therefore, on the basis of the above embodiment, as an alternative embodiment, the expression of the prediction model J is:
r, V respectively represents a purchase commodity set and a focus commodity set; omegauiRepresenting the weight of the commodity i purchased by the user u in the optimization result; r isuiRepresenting the actual preference of the user u for the purchased goods i;indicating the predicted preference of user u for purchased item i;indicating that item j is neither purchased nor attended to by user u; lambda meterShowing regularization parameters that prevent overfitting; p is a radical ofuA feature vector representing user u; q. q.siA feature vector representing item i; m and N represent the total number of users and the total number of commodities, respectively; c. CjA weight coefficient indicating a popularity of the commodity j; svA weight coefficient indicating a popularity of the commodity v;representing the predicted preferences of user u for item v;representing the predicted preference of user u for item j; gamma ray1To representThe expected value of (d); gamma ray2To representIs calculated from the expected value of (c).
It should be noted that in the prediction model Partially regarded as JeALSItem, willPartially regarded as JRegItem, will Partially regarded as JviewAn item. Comparing the predictive models of the embodiments of the present invention with the prior art, JeALSItem and JRegItems are the same as in the predictive models of the prior art, and are used to control the predictive scores and scores of purchased goods, respectivelyControlling overfitting to increase JviewThe terms are used to control the prediction score of the commodity of interest.
In the prediction model J, ωui、λ、γ1And gamma2Lambda is used to control the degree of overfitting for the pre-determined parameters prior to training, as can be seen from the above embodiment, the predicted preference of the predicted user u for the commodity of interest vShould be between the purchased goods i and other goods j that have not been purchased and are not of interest, specifically, considered to beAndwith a phase difference of gamma1At the same timeAndwith a phase difference of gamma2Respectively usingAnda formal cost function indicates that, when the two equations take 0,and the preference precedence relationship of the assumed purchasing behavior, the attention behavior and other unobserved interactive behaviors of the user is met.The influence of all users and the commodities (u, V) epsilon V) concerned by the users in the user-commodity preference characterization is considered.
Parameter svOf (1) containsMeaning and cj(weight corresponding to the case where the product is neither purchased nor paid attention to, formula for calculation, and c in the background artiThe same formula) are similar, and represent the weight corresponding to the concerned commodity, the parameter svThe expression of (a) is:
s0for controlling the ratio of the weight of the goods of interest to that of the goods of no interest, 0<b<1, the difference between the two becomes smooth, b>At 1, the impact of the popular goods will be enhanced,indicating the ratio of the number of times of interest of the product v to the number of times of interest of all the products. Obviously, in the prediction model J, cjAnd svAre all known parameters.
As can be seen from the conventional algorithm for eALS,representing the prediction score of the model, and optimizing the prediction score to the real score ruiIt is to be understood that the embodiments of the present invention are illustrative onlyThat is, when the predicted preference of the product v concerned by the user u is calculated, the user feature vector p of the user u is useduThe commodity feature vector q associated with the commodity vvWhen the predicted preference of the commodity j which is neither concerned nor purchased by the user u is calculated as a result of the inner product of (a), the user feature vector p of the user u is useduThe commodity feature vector q with commodity jjThe inner product of (d) is the result.
Based on the content of the foregoing embodiment, as an optional embodiment, the obtaining of the product recommendation list of the user according to the predicted preference of the user for all products specifically includes:
sorting all commodities according to the predicted preference of the user from big to small to obtain a first commodity list; deleting the commodities purchased by the user from the first commodity list to obtain a second commodity list; and sequentially selecting a preset number of commodities from the second commodity list from front to back to form a commodity recommendation list of the user.
It should be noted that, in the embodiment of the present invention, the predicted preferences of all the commodities are sorted from large to small, and then the commodities purchased by the user are deleted from the first commodity list, so that a second commodity list sorted according to the predicted preferences and the commodities not purchased by the user at present can be obtained, and then the preset number is set to screen from front to back from the second commodity list, so that the commodity recommendation list finally facing the user can be obtained.
Based on the content of the foregoing embodiment, as an optional embodiment, the shopping data is used to train a prediction model constructed based on the eALS algorithm, and a user feature vector of each user and a commodity feature vector of each commodity when the prediction model reaches an optimal solution are obtained, which specifically includes:
for the currently optimized user feature vector puComponent p of the f-th dimensionufWith the component pufFor the derivation of the prediction model, the component p when the derivation result is 0 is setufAs an optimized component pufFrom the optimized component pufUpdate the prediction model and continue on component puf+1Optimizing until the user characteristic vector puAll the components are optimized;
when the user feature vector puAfter all the components are optimized, continuing to perform pu+1Optimizing until all the user feature vectors are optimized, and optimizing the commodity vectors after all the user feature vectors are optimized;
for the currently optimized commodity vector qiComponent q of the f-th dimensionifWith a component qifDerivation of the prediction model, a component q when the derivation result is 0ifAs a result of the optimization of the component qifFrom the optimized component qifUpdate the prediction model and continue on component qif+1Optimizing until the commodity vector qiOfFinishing component optimization;
when the user feature vector qiAfter all the components are optimized, continuing to pair qi+1And optimizing until all commodity vectors are optimized.
It should be noted that, in the embodiment of the present invention, when the prediction model is trained, the feature vectors of the users are optimized first, and after all the feature vectors of the users are optimized, the feature vectors of the commodities are optimized.
The time complexity of the conventional eALS method is O ((M + N) K)2+ | R | K), M, N, K represents total number of users, total number of goods, feature vector dimensions, respectively, | R | represents the size of the purchase set; after the action influence item is added, the traditional eALS method still needs extra O (| V | NK) time cost, and the extra time cost is far larger than the original cost. This section, however, contains a large number of duplicate calculations and can be accelerated in the following manner.
With the user feature vector puComponent p of (1)ufFor example, derivation of the prediction model is obtained;
in the above formulaIndicating the prediction score after the f-th dimension of the feature vector is removed. For a complete iteration (updating the user feature vectors and commodity feature vectors of all users once), the complexity of the direct computational formula is O (MNK)2)。
Will be provided withThe transformation is:due to the fact thatThe items are the same for all users, andterms need only be calculated once for different dimensions, and therefore can be pre-calculated before derivationThe term, so that the result of the term can be reused in the derivation, K terms are calculated before each iterationThe corresponding temporal complexity is: o (nk), substantially reduced computational complexity.
WhileThe time complexity required for the direct computation of the term for one user is O (NK)2) Will beThe transformation is:p between different dimensionsu*qi TOnly need to calculate once, only RuThe term can be different from that of O (K)2+|RuI K) the term is calculated over time. Therefore, the temperature of the molten metal is controlled,the time complexity of the term can be represented by O (MNK)2) Reduced to O ((M + N) K)2+|R|K)。
obviously, the regularization term does not pose a challenge to the temporal complexity of the algorithm, only yielding a total temporal overhead of O ((M + N) K).
in the above formula, the term (e) is(f) The item is Since the terms (b), (d) and (f) all relate to the pairsThe range calculation requires traversal of (V, j), thus resulting in a time overhead of O (| V | N).
Item (d) is first split into the following forms,
that is, the original (d) term is split from traversal (v, j) into the product of two independent traversal v and traversal j terms. Wherein the time complexity of traversing V is O (| V)uAnd traversing j is equivalent to traversing all items (because purchase and click behavior is sparse), the time complexity is o (n), and further, traversing j can do the following:
attention is drawn from the above equationAndthe two terms are irrelevant to the user, and only need to be calculated once before all the users are updated, so that the term (d) only needs O (K + | RV) finallyu|), and further,term time overhead is reduced from O (| V | N) to O ((M + N) K)2+|V|K)。
According to another aspect of the embodiment of the present invention, there is also provided an article recommendation device, referring to fig. 2, fig. 2 shows a functional block diagram of the article recommendation device provided according to the embodiment of the present invention; the device is used for the method for recommending the commodities according to the commodities purchased and concerned by the user in the embodiments. Therefore, the description and definition in the commodity recommendation method in the foregoing embodiments may be used for understanding each execution module in the embodiments of the present invention.
As shown in fig. 2, the apparatus includes:
the shopping data acquisition module 201 is configured to acquire shopping data of a user group, where the shopping data includes a number of each user in the user group, a number of a commodity purchased by the user, a number of a commodity concerned, and a tag of a real preference of the user to the commodity, and the tag is used to represent whether the user has purchased the commodity;
a training module 202, configured to train a prediction model constructed based on the etals algorithm using the shopping data, and obtain a user feature vector of each user and a commodity feature vector of each commodity when the prediction model reaches an optimal solution; the inner product of the user feature vector and the commodity feature vector is used for representing the prediction preference of the user on the commodity;
the recommending module 203 is configured to, for any one user in the user group, obtain the predicted preference of the user for all the commodities according to the inner product of the user feature vector of the user and the feature vectors of the commodities, and obtain a commodity recommendation list of the user according to the predicted preference of the user for all the commodities.
According to the commodity recommendation device provided by the embodiment of the invention, the influence of commodity information concerned by the user is added into the eALS algorithm, so that the constructed prediction model can reflect the preference degree of the user to the commodity more truly, and a better recommendation effect is achieved.
FIG. 3 illustrates a block diagram of an electronic device provided in accordance with an embodiment of the invention, such as the processor (processor)301, the memory (memory)302, and the bus 303 shown in FIG. 3;
the processor 301 and the memory 302 respectively complete communication with each other through a bus 303; the processor 301 is configured to call the program instructions in the memory 302 to execute the control method provided by the above embodiment, for example, including: the method comprises the steps of obtaining shopping data of a user group, wherein the shopping data comprise the number of each user in the user group, the number of a commodity purchased by the user, the number of a concerned commodity and a label of the real preference of the user to the commodity, and the label is used for representing whether the user purchases the commodity; training a prediction model constructed based on an eALS algorithm by using shopping data to obtain a user feature vector of each user and a commodity feature vector of each commodity when the prediction model reaches an optimal solution; the inner product of the user feature vector and the commodity feature vector is used for representing the prediction preference of the user on the commodity; for any user in the user group, the predicted preference of the user for all commodities is obtained according to the inner product of the user feature vector of the user and the feature vectors of all commodities, and the commodity recommendation list of the user is obtained according to the predicted preference of the user for all commodities.
An embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, where the computer instructions cause a computer to execute the control method provided in the foregoing embodiment, for example, including: the method comprises the steps of obtaining shopping data of a user group, wherein the shopping data comprise the number of each user in the user group, the number of a commodity purchased by the user, the number of a concerned commodity and a label of the real preference of the user to the commodity, and the label is used for representing whether the user purchases the commodity; training a prediction model constructed based on an eALS algorithm by using shopping data to obtain a user feature vector of each user and a commodity feature vector of each commodity when the prediction model reaches an optimal solution; the inner product of the user feature vector and the commodity feature vector is used for representing the prediction preference of the user on the commodity; for any user in the user group, the predicted preference of the user for all commodities is obtained according to the inner product of the user feature vector of the user and the feature vectors of all commodities, and the commodity recommendation list of the user is obtained according to the predicted preference of the user for all commodities.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and not to limit the same; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (6)
1. A method for recommending an article, comprising:
the method comprises the steps of obtaining shopping data of a user group, wherein the shopping data comprise the number of each user in the user group, the number of a commodity purchased by the user, the number of a concerned commodity and a label of the real preference of the user to the commodity, and the label is used for representing whether the user purchases the commodity;
training a prediction model constructed based on an eALS algorithm by using the shopping data to obtain a user feature vector of each user and a commodity feature vector of each commodity when the prediction model reaches an optimal solution; the inner product of the user feature vector and the commodity feature vector is used for representing the prediction preference of the user on the commodity;
for any user in the user group, obtaining the prediction preference of the user to all commodities according to the inner product of the user characteristic vector of the user and the characteristic vectors of all commodities, and obtaining a commodity recommendation list of the user according to the prediction preference of the user to all commodities;
wherein the expression of the prediction model is:
wherein i, v and j represent the commodity purchased by the user u, the concerned commodity and the unfocused commodity respectively; r and V respectively represent a set of purchased commodities and a set of concerned commodities; omegauiRepresenting the weight of the commodity i purchased by the user u in the optimization result; r isuiAndrespectively representing the real preference and the predicted preference of the user u to the purchased commodity i; λ represents a regularization parameter that prevents overfitting; p is a radical ofuA feature vector representing user u; q. q.siA feature vector representing item i; m and N represent the total number of users and the total number of commodities, respectively; c. CjA weight coefficient indicating a popularity of the commodity j; svA weight coefficient indicating a popularity of the commodity v;representing the predicted preferences of user u for item v;representing the predicted preference of user u for item j; gamma ray1To representThe expected value of (d); gamma ray2To representIs calculated from the expected value of (c).
2. The method according to claim 1, wherein said obtaining a recommended list of goods for the user based on the predicted preferences of the user for all goods comprises:
sorting all commodities according to the predicted preference of the user from big to small to obtain a first commodity list;
deleting the commodities purchased by the user from the first commodity list to obtain a second commodity list;
and sequentially selecting a preset number of commodities from the second commodity list from front to back to form a commodity recommendation list of the user.
3. The method as claimed in claim 1, wherein the training of the prediction model constructed based on the etas algorithm by using the shopping data to obtain the user feature vector of each user and the commodity feature vector of each commodity when the prediction model reaches the optimal solution is specifically as follows:
for the currently optimized user feature vector puComponent p of the f-th dimensionufWith the component pufFor the derivation of the prediction model, the component p when the derivation result is 0 is setufAs an optimized component pufFrom the optimized component pufUpdate the prediction model and continue on component puf+1Optimizing until the user characteristic vector puAll the components are optimized;
when the user feature vector puAfter all the components are optimized, continuing to perform pu+1Optimizing until all the user feature vectors are optimized, and optimizing the commodity vectors after all the user feature vectors are optimized;
for the currently optimized commodity vector qiComponent q of the f-th dimensionifWith a component qifDerivation of the prediction model, a component q when the derivation result is 0ifAs a result of the optimization of the component qifFrom the optimized component qifUpdate the prediction model and continue on component qif+1Optimizing until the commodity vector qiAll the components are optimized;
when the user feature vector qiAfter all the components are optimized, continuing to pair qi+1And optimizing until all commodity vectors are optimized.
4. An article recommendation device, comprising:
the shopping data acquisition module is used for acquiring the shopping data of a user group, wherein the shopping data comprises the number of each user in the user group, the number of a commodity purchased by the user, the number of a concerned commodity and a label of the real preference of the user to the commodity, and the label is used for representing whether the user purchases the commodity;
the training module is used for training a prediction model constructed based on an eALS algorithm by using the shopping data to obtain a user feature vector of each user and a commodity feature vector of each commodity when the prediction model reaches an optimal solution; the inner product of the user feature vector and the commodity feature vector is used for representing the prediction preference of the user on the commodity;
the recommendation module is used for acquiring the prediction preference of the user on all commodities according to the inner product of the user characteristic vector of the user and each commodity characteristic vector for any user in the user group, and acquiring a commodity recommendation list of the user according to the prediction preference of the user on all commodities;
wherein the expression of the prediction model is:
wherein i, v and j represent the commodity purchased by the user u, the concerned commodity and the unfocused commodity respectively; r and V respectively represent a set of purchased commodities and a set of concerned commodities; omegauiRepresenting the weight of the commodity i purchased by the user u in the optimization result; r isuiAndrespectively representing the real preference and the predicted preference of the user u to the purchased commodity i; λ represents a regularization parameter that prevents overfitting; p is a radical ofuA feature vector representing user u; q. q.siA feature vector representing item i; m and N represent the total number of users and the total number of commodities, respectively;cja weight coefficient indicating a popularity of the commodity j; svA weight coefficient indicating a popularity of the commodity v;representing the predicted preferences of user u for item v;representing the predicted preference of user u for item j; gamma ray1To representThe expected value of (d); gamma ray2To representIs calculated from the expected value of (c).
5. An electronic device, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 3.
6. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811011469.XA CN109102127B (en) | 2018-08-31 | 2018-08-31 | Commodity recommendation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811011469.XA CN109102127B (en) | 2018-08-31 | 2018-08-31 | Commodity recommendation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109102127A CN109102127A (en) | 2018-12-28 |
CN109102127B true CN109102127B (en) | 2021-10-26 |
Family
ID=64864578
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811011469.XA Active CN109102127B (en) | 2018-08-31 | 2018-08-31 | Commodity recommendation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109102127B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110111183A (en) * | 2019-05-06 | 2019-08-09 | 北京车薄荷科技有限公司 | A kind of Products Show method and device |
CN110246011B (en) * | 2019-06-13 | 2022-07-15 | 中国科学技术大学 | Individuation recommendation method capable of explaining fashion clothes |
CN110533504A (en) * | 2019-08-14 | 2019-12-03 | 维沃移动通信有限公司 | A kind of information-pushing method and terminal |
CN111767458A (en) * | 2019-09-11 | 2020-10-13 | 北京京东尚科信息技术有限公司 | Information pushing method, device, system and storage medium |
CN110889748B (en) * | 2019-12-02 | 2023-08-15 | 广州伊的家网络科技有限公司 | Store platform product recommendation method, store platform product recommendation device, computer equipment and storage medium |
CN110889747B (en) * | 2019-12-02 | 2023-05-09 | 腾讯科技(深圳)有限公司 | Commodity recommendation method, device, system, computer equipment and storage medium |
CN111178951B (en) * | 2019-12-20 | 2023-05-16 | 深圳大学 | Commodity recommendation method and device |
CN110969516B (en) * | 2019-12-25 | 2024-04-26 | 清华大学 | Commodity recommendation method and device |
CN111369322A (en) * | 2020-03-06 | 2020-07-03 | 深圳市苍泓科技有限公司 | Online cake recommendation method based on Internet |
CN111652674B (en) * | 2020-05-15 | 2023-09-19 | 拉扎斯网络科技(上海)有限公司 | Resource recommendation method and device |
CN113744017A (en) * | 2020-11-13 | 2021-12-03 | 北京沃东天骏信息技术有限公司 | E-commerce search recommendation method and device, equipment and storage medium |
CN116805023B (en) * | 2023-08-25 | 2023-11-03 | 量子数科科技有限公司 | Takeaway recommendation method based on large language model |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102722842A (en) * | 2012-06-11 | 2012-10-10 | 姚明东 | Commodity recommendation optimizing method based on customer behavior |
CN103136694A (en) * | 2013-03-20 | 2013-06-05 | 焦点科技股份有限公司 | Collaborative filtering recommendation method based on search behavior perception |
CN103377296A (en) * | 2012-04-19 | 2013-10-30 | 中国科学院声学研究所 | Data mining method for multi-index evaluation information |
CN103870972A (en) * | 2012-12-07 | 2014-06-18 | 盛乐信息技术(上海)有限公司 | Data recommendation method and data recommendation system |
CN105955975A (en) * | 2016-04-15 | 2016-09-21 | 北京大学 | Knowledge recommendation method for academic literature |
CN106126549A (en) * | 2016-06-16 | 2016-11-16 | 传化公路港物流有限公司 | A kind of community's trust recommendation method decomposed based on probability matrix and system thereof |
CN106296305A (en) * | 2016-08-23 | 2017-01-04 | 上海海事大学 | Electric business website real-time recommendation System and method under big data environment |
CN106651542A (en) * | 2016-12-31 | 2017-05-10 | 珠海市魅族科技有限公司 | Goods recommendation method and apparatus |
CN107239524A (en) * | 2017-05-26 | 2017-10-10 | 四川九洲电器集团有限责任公司 | A kind of object recommendation method and apparatus |
CN107944035A (en) * | 2017-12-13 | 2018-04-20 | 合肥工业大学 | A kind of image recommendation method for merging visual signature and user's scoring |
CN108280217A (en) * | 2018-02-06 | 2018-07-13 | 南京理工大学 | A kind of matrix decomposition recommendation method based on difference secret protection |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150052003A1 (en) * | 2013-08-19 | 2015-02-19 | Wal-Mart Stores, Inc. | Providing Personalized Item Recommendations Using Scalable Matrix Factorization With Randomness |
CN105975440A (en) * | 2016-05-05 | 2016-09-28 | 浙江理工大学 | Matrix decomposition parallelization method based on graph calculation model |
CN107562875A (en) * | 2017-08-31 | 2018-01-09 | 北京麒麟合盛网络技术有限公司 | A kind of update method of model, apparatus and system |
-
2018
- 2018-08-31 CN CN201811011469.XA patent/CN109102127B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103377296A (en) * | 2012-04-19 | 2013-10-30 | 中国科学院声学研究所 | Data mining method for multi-index evaluation information |
CN102722842A (en) * | 2012-06-11 | 2012-10-10 | 姚明东 | Commodity recommendation optimizing method based on customer behavior |
CN103870972A (en) * | 2012-12-07 | 2014-06-18 | 盛乐信息技术(上海)有限公司 | Data recommendation method and data recommendation system |
CN103136694A (en) * | 2013-03-20 | 2013-06-05 | 焦点科技股份有限公司 | Collaborative filtering recommendation method based on search behavior perception |
CN105955975A (en) * | 2016-04-15 | 2016-09-21 | 北京大学 | Knowledge recommendation method for academic literature |
CN106126549A (en) * | 2016-06-16 | 2016-11-16 | 传化公路港物流有限公司 | A kind of community's trust recommendation method decomposed based on probability matrix and system thereof |
CN106296305A (en) * | 2016-08-23 | 2017-01-04 | 上海海事大学 | Electric business website real-time recommendation System and method under big data environment |
CN106651542A (en) * | 2016-12-31 | 2017-05-10 | 珠海市魅族科技有限公司 | Goods recommendation method and apparatus |
CN107239524A (en) * | 2017-05-26 | 2017-10-10 | 四川九洲电器集团有限责任公司 | A kind of object recommendation method and apparatus |
CN107944035A (en) * | 2017-12-13 | 2018-04-20 | 合肥工业大学 | A kind of image recommendation method for merging visual signature and user's scoring |
CN108280217A (en) * | 2018-02-06 | 2018-07-13 | 南京理工大学 | A kind of matrix decomposition recommendation method based on difference secret protection |
Non-Patent Citations (3)
Title |
---|
Fast matrix factorization for online recommendation with implicit feedback;Xiangnan He et al.;《Proceedings of the 39th International ACM SIGIR Conference on Research and Development in Information Retrieval》;20160721;第549-558页 * |
Incremental learning for matrix factorization in recommender systems;Tong Yu et al.;《2016 IEEE International Conference on Big Data (Big Data)》;20161208;全文 * |
Matrix Factorization Techniques for Recommender Systems;Bell Robert et al.;《Computer》;20091231;第42卷(第8期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN109102127A (en) | 2018-12-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109102127B (en) | Commodity recommendation method and device | |
CN110969516B (en) | Commodity recommendation method and device | |
CN107563841B (en) | Recommendation system based on user score decomposition | |
EP4181026A1 (en) | Recommendation model training method and apparatus, recommendation method and apparatus, and computer-readable medium | |
Luo et al. | Applying the learning rate adaptation to the matrix factorization based collaborative filtering | |
CN112487278A (en) | Training method of recommendation model, and method and device for predicting selection probability | |
CN108230009B (en) | User preference prediction method and device and electronic equipment | |
CN110889747B (en) | Commodity recommendation method, device, system, computer equipment and storage medium | |
CN110135951B (en) | Game commodity recommendation method and device and readable storage medium | |
CN113158024B (en) | Causal reasoning method for correcting popularity deviation of recommendation system | |
US11770407B2 (en) | Methods and apparatuses for defending against data poisoning attacks in recommender systems | |
CN112396492A (en) | Conversation recommendation method based on graph attention network and bidirectional long-short term memory network | |
CN114861783B (en) | Recommendation model training method and device, electronic equipment and storage medium | |
Ahamed et al. | A recommender system based on deep neural network and matrix factorization for collaborative filtering | |
KR20210144330A (en) | Method and apparatus for recommending item based on collaborative filtering neural network | |
CN113988951A (en) | Commodity recommendation learning model construction method based on tensor decomposition and collaborative filtering | |
CN113761388A (en) | Recommendation method and device, electronic equipment and storage medium | |
CN113850654A (en) | Training method of item recommendation model, item screening method, device and equipment | |
CN111815410B (en) | Commodity recommendation method based on selective neighborhood information | |
CN115809374B (en) | Method, system, device and storage medium for correcting mainstream deviation of recommendation system | |
CN112785390A (en) | Recommendation processing method and device, terminal device and storage medium | |
JP7441270B2 (en) | Machine learning methods, training methods, prediction systems, and non-transitory computer-readable media | |
JP7423694B2 (en) | Machine learning methods, training methods, prediction systems, and non-transitory computer-readable media | |
CN117056595A (en) | Interactive project recommendation method and device and computer readable storage medium | |
CN111738787A (en) | Information pushing method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |