CN109410001B - Commodity recommendation method and system, electronic equipment and storage medium - Google Patents

Commodity recommendation method and system, electronic equipment and storage medium Download PDF

Info

Publication number
CN109410001B
CN109410001B CN201811240193.2A CN201811240193A CN109410001B CN 109410001 B CN109410001 B CN 109410001B CN 201811240193 A CN201811240193 A CN 201811240193A CN 109410001 B CN109410001 B CN 109410001B
Authority
CN
China
Prior art keywords
commodity
text
commodities
algorithm
clustering
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
Application number
CN201811240193.2A
Other languages
Chinese (zh)
Other versions
CN109410001A (en
Inventor
郑艳涛
袁益梦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dt Dream Technology Co Ltd
Original Assignee
Hangzhou Dt Dream Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dt Dream Technology Co Ltd filed Critical Hangzhou Dt Dream Technology Co Ltd
Priority to CN201811240193.2A priority Critical patent/CN109410001B/en
Publication of CN109410001A publication Critical patent/CN109410001A/en
Application granted granted Critical
Publication of CN109410001B publication Critical patent/CN109410001B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations

Abstract

The embodiment of the invention discloses a commodity recommendation method, a commodity recommendation system, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring the weight of a text phrase of the commodity, and vectorizing the text phrase to obtain a corresponding weighted text word vector; clustering the weighted text word vectors through a preset clustering algorithm; calculating the distance between the weighted text word vectors in the cluster to obtain a preset high-frequency word element approximate result; and generating a corresponding commodity recommendation result according to a preset high-frequency word element approximate result. When the personalized system is used for recommending commodities for users, the text phrases of the commodities are subjected to weighting vectorization, clustering processing is carried out, the distance between the text vectors is calculated, and finally the preset high-frequency word element approximation is obtained, so that the calculation efficiency is improved, the utilization efficiency of calculation resources and storage units is improved, and the commodity recommendation list can be enhanced by utilizing the preset high-frequency word element approximation so as to obtain a more accurate commodity recommendation result for the users.

Description

Commodity recommendation method and system, electronic equipment and storage medium
Technical Field
The invention belongs to the field of big data, particularly relates to the technical field of internet, and particularly relates to a commodity recommendation method, a commodity recommendation system, electronic equipment and a storage medium.
Background
With the development of society, the quantity and the variety of articles become extremely rich, which causes that users need to spend great cost to find the commodities meeting the self-demand. In order to solve the problem, a personalized recommendation system is developed, personalized interests and demands of users are found by analyzing behaviors of the users and characteristics of commodities, and then articles which the users are interested in are recommended to the users, so that the efficiency and quality of service are improved.
In a practical production environment, it is generally possible to have information of two dimensions of a commodity: the method comprises the steps of commodity text description information and behavior data information of interaction between a user and commodities. Based on limited calculation and storage, it is always desirable to fully exploit the association relationship between users and commodities so as to obtain better recommendation effect, and the current recommendation system has many problems: the method is characterized in that firstly, the computation efficiency of top k approximate texts is the problem, so-called top k is to find out elements arranged at the top k, wherein text vectorization representation is usually realized by using a word2vector algorithm, then the distance between vectors is measured, top k approximation is found out, under the condition of large data volume, the computation amount reaches O (n ^2) (n represents the number of texts), and computation and storage resources are extremely consumed; the second problem is that different algorithms are mutually promoted, generally, each algorithm adopts chimney type calculation, each algorithm is mutually independent, and a recommendation list is only simple fusion of a single algorithm result set.
Disclosure of Invention
The invention aims to provide a commodity recommending method, a commodity recommending system, electronic equipment and a storage medium, which can effectively reduce the resources for calculation and storage of recommended commodities when the commodities are recommended to users.
In order to solve the technical problems, the invention provides the following technical scheme:
a method of merchandise recommendation, comprising:
acquiring a weight value of a text phrase of a commodity, and vectorizing the text phrase to obtain a corresponding weighted text word vector;
clustering the weighted text word vectors through a preset clustering algorithm;
calculating the distance between the weighted text word vectors in a cluster to obtain a preset high-frequency word element approximate result;
and generating a corresponding commodity recommendation result according to the preset high-frequency word element approximate result.
Preferably, the obtaining the weight of the text phrase of the commodity and vectorizing the text phrase to obtain a corresponding weighted text word vector includes:
calculating the weight of the text phrase of each target commodity through TF-IDF;
vectorizing the text phrases of the target commodities through a word2vector algorithm, and weighting the word vectors of the text phrases to obtain corresponding weighted text word vectors.
Preferably, the clustering the weighted text word vectors by a preset clustering algorithm includes:
and clustering the weighted text word vectors through a kmeans algorithm.
Preferably, the calculating the distance between the weighted text word vectors in the cluster to obtain a preset high-frequency word element approximation result includes:
calculating distances between the weighted text word vectors within a cluster;
and obtaining a top k approximate result according to the calculation result.
Preferably, generating a corresponding commodity recommendation result according to the preset high-frequency word element approximation result, including:
acquiring a commodity recommendation list through an ALS algorithm;
associating the commodities in the commodity recommendation list with the commodities corresponding to the top k approximate result through a word2vector algorithm to obtain an extended recommendation list;
acquiring the current interaction information of a user on commodities;
generating effective commodity cluster clusters according to the interaction information;
and associating the commodities in the effective commodity cluster with the commodities corresponding to the top k approximate result through a word2vector algorithm to form an updated recommendation list based on user behaviors so as to be displayed to the user and/or perform recommendation iteration according to the updated interaction information of the user on the commodities.
Preferably, the obtaining of the recommended goods list through the ALS algorithm includes:
obtaining the scores of various commodities of a user, and constructing a score matrix according to the scores;
approximately decomposing the scoring matrix into a first matrix and a second matrix, wherein the first matrix represents the score of the user in the self-hiding traits, and the second matrix represents the score of the commodity in the self-hiding traits;
and clustering the first matrix and the second matrix respectively through a kmeans algorithm to obtain corresponding commodity recommendation lists.
A merchandise recommendation system comprising:
the weighting vectorization module is used for acquiring the weight of the text phrase of the commodity and vectorizing the text phrase to obtain a corresponding weighted text word vector;
the clustering module is used for clustering the weighted text word vectors through a preset clustering algorithm;
the measurement module is used for calculating the distance between the weighted text word vectors in the cluster and obtaining a preset high-frequency word element approximate result;
and the result generation module is used for generating a corresponding commodity recommendation result according to the preset high-frequency word element approximation result.
Preferably, the weight vectorization module includes:
the weight calculation unit is used for calculating the weight of the text phrase of each target commodity through TF-IDF;
and the vectorization unit is used for vectorizing the text phrases of the target commodities through a word2vector algorithm and weighting the word vectors of the text phrases to obtain corresponding weighted text word vectors.
Preferably, the clustering module comprises:
and the kmeans algorithm clustering unit is used for clustering the weighted text word vectors through a kmeans algorithm.
Preferably, the metric module comprises:
the word vector distance calculating unit is used for calculating the distance between the weighted text word vectors in the cluster;
and the top k calculating unit is used for acquiring a top k approximate result according to the calculation result.
Preferably, the result generation module comprises:
a recommendation list acquisition unit for acquiring a commodity recommendation list through an ALS algorithm;
the extended recommendation list obtaining unit is used for associating the commodities in the commodity recommendation list corresponding to the top k approximation result through a word2vector algorithm so as to obtain an extended recommendation list;
the interactive information acquisition unit is used for acquiring the current interactive information of the user on the commodity;
the effective commodity cluster production unit is used for generating effective commodity cluster according to the interaction information;
and the update list generation unit is used for associating the commodities in the effective commodity cluster with the commodities corresponding to the top k approximation result through a word2vector algorithm to form an update recommendation list based on user behaviors so as to be displayed to the user and/or perform recommendation iteration according to the update interaction information of the user on the commodities.
Preferably, the recommendation list obtaining unit includes:
the matrix construction subunit is used for acquiring the scores of the users on various commodities and constructing a score matrix according to the scores;
the matrix decomposition subunit is used for approximately decomposing the scoring matrix into a first matrix and a second matrix, wherein the first matrix represents the score of the user in the self-hiding traits, and the second matrix represents the score of the commodity in the self-hiding traits;
and the clustering subunit is used for respectively clustering the first matrix and the second matrix through a kmeans algorithm to obtain corresponding commodity recommendation lists.
An electronic device for merchandise recommendation, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the merchandise recommendation method according to any one of the above when the computer program is executed.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for recommending items according to any of the preceding claims
Compared with the prior art, the technical scheme has the following advantages:
the commodity recommendation method provided by the embodiment of the invention comprises the following steps: acquiring the weight of a text phrase of the commodity, and vectorizing the text phrase to obtain a corresponding weighted text word vector; clustering the weighted text word vectors through a preset clustering algorithm; calculating the distance between the weighted text word vectors in the cluster to obtain a preset high-frequency word element approximate result; and generating a corresponding commodity recommendation result according to a preset high-frequency word element approximate result. When the personalized system is used for recommending commodities for users, the text phrases of the commodities are weighted and vectorized, then the weighted text vectors are clustered, the distance between the text vectors is calculated in the cluster, and finally high-frequency word element approximation is obtained, so that the calculation efficiency is greatly improved, and the utilization efficiency of calculation resources and storage units is improved. Particularly, the commodity recommendation list can be strengthened by utilizing the high-frequency word element approximation based on the user behavior subsequently, so that a more accurate commodity recommendation result is obtained and is provided for the user.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a commodity recommendation method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a recommendation list generation according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a merchandise recommendation system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device for recommending commodities according to an embodiment of the present invention.
Detailed Description
The core of the embodiment of the invention is to provide a commodity recommendation method, a commodity recommendation system, electronic equipment and a storage medium, which can effectively reduce the calculation and storage resources of recommended commodities when the commodities are recommended to users.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
In the following description, specific details are set forth in order to provide a thorough understanding of the present invention. The invention can be implemented in a number of ways different from those described herein and similar generalizations can be made by those skilled in the art without departing from the spirit of the invention. The invention is therefore not limited to the specific implementations disclosed below.
Referring to fig. 1, fig. 1 is a flowchart of a commodity recommendation method according to an embodiment of the present invention.
A specific embodiment of the present invention provides a commodity recommendation method, including:
s11: and acquiring the weight of the text phrase of the commodity, and vectorizing the text phrase to obtain a corresponding weighted text word vector.
In one embodiment of the present invention, obtaining a weight of a text phrase of a commodity, and vectorizing the text phrase to obtain a corresponding weighted text word vector includes: calculating the weight of the text phrase of each target commodity through TF-IDF; vectorizing the text phrases of the target commodities through a word2vector algorithm, and weighting the word vectors of the text phrases to obtain corresponding weighted text word vectors. Initializing a random vector with a fixed dimension, and optimally updating the random vector by a word2vector algorithm according to the sample data set.
Among them, TF-IDF (term frequency-inverse document frequency) is a commonly used weighting technique for information retrieval and data mining.
The word2vector algorithm is an open source algorithm, the vector of the specified dimension is used for representing phrase information, and the vector is used for measuring the relation between words.
In this embodiment, preferably, TF-IDF is adopted to calculate the weight of the text phrase of each target commodity, and then the text phrase of each target commodity is vectorized through word2vector algorithm to realize vectorization representation of the phrase, so as to obtain a weighted text word vector, and make the measured text word vector more accurate.
S12: and clustering the weighted text word vectors through a preset clustering algorithm.
Further, clustering the weighted text word vectors through a preset clustering algorithm, including: and clustering the weighted text word vectors by using a kmeans algorithm.
Clustering is performed based on a kmeans algorithm, so that the high-frequency word element approximate result such as top k is solved subsequently, and the calculation amount can be greatly reduced.
The kmeans algorithm is an unsupervised clustering algorithm, and for a data set of N samples, the data set is clustered into k clusters, so that the variance sum of the clusters is minimum.
S13: and calculating the distance between the weighted text word vectors in the cluster to obtain a high-frequency word element approximate result.
The high-frequency word elements refer to text phrases with the frequency of appearance larger than a preset threshold value. In this embodiment, calculating the distance between the weighted text word vectors in the cluster to obtain the preset high-frequency word element approximation result preferably includes: calculating the distance between the weighted text word vectors in the cluster; and obtaining a top k approximate result according to the calculation result. That is, the embodiment preferably adopts the top k calculation method to obtain the corresponding approximate result.
S14: and generating a corresponding commodity recommendation result according to the high-frequency word element approximation result.
In one embodiment of the present invention, generating a corresponding product recommendation result according to the high-frequency word element approximation result includes: acquiring a commodity recommendation list through an ALS algorithm; associating the commodities in the commodity recommendation list with the commodities corresponding to the top k approximate result through a word2vector algorithm to obtain an extended recommendation list; acquiring the current interaction information of a user on commodities; generating effective commodity cluster according to the interactive information; and associating the commodities in the effective commodity cluster with the commodities corresponding to the top k approximate result through a word2vector algorithm to form an updated recommendation list based on user behaviors so as to be displayed to the user and/or perform recommendation iteration according to the updated interaction information of the user on the commodities.
In the present embodiment, specifically,
(1) firstly, an item recommendation list, namely an ALS recommendation list, namely an initial recommendation list is obtained through an ALS algorithm.
Wherein, the initial recommendation list can be obtained by offline calculation by using historical data. ALS algorithm: (AlternatingLeast Square), alternating least squares.
(2) For the commodities in the ALS recommendation list, the topk approximation of the commodities is associated by using a word2vector algorithm, so that an expanded recommendation list is formed. And associating the corresponding top k approximate commodity with the commodity in the initial recommendation list by using a word2vector algorithm. As shown in fig. 2, it is assumed that the initial recommendation list includes a product w1, a product w2, a product w3, and a product w 4. Then word2vector algorithm is used for the commodities in the initial recommendation list to associate the corresponding top k approximate commodities to obtain an extended recommendation list, the extended recommendation list comprises top k approximate commodities of commodities w1 and w1, top k approximate commodities of commodities w2 and w2, top k approximate commodities of commodities w3 and w3, and top k approximate commodities of commodities w4 and w 4.
At this time, the extended recommendation list is given, and as shown in fig. 2, the extended recommendation list includes a product C2, a product C3, and a product C4.
The user may click to browse the items in the extended recommendation list or may click to browse the items other than the extended recommendation list (e.g., item C1 in fig. 2).
(3) And acquiring the current interaction information of the user on the commodities, namely acquiring all commodities clicked and browsed by the user. And decomposing the ALS matrix to obtain a second matrix which represents the score of the hidden characteristics of the commodity per se, and acquiring the corresponding commodity cluster by using a kmeans algorithm. Deleting commodities which are recommended for many times in the extended recommendation list and are not clicked by the user from the extended recommendation list; and taking the commodity actually clicked by the user as an effective commodity (namely the clicked commodity) in the expanded recommendation list, and expanding the commodity by using the commodity cluster.
In the process, receiving interactive information of a user on the commodities according to a current extended recommendation list, such as click browsing information of the commodities, so as to obtain effective commodity cluster clusters, and if in the updating process of the extended recommendation list, the commodity C3 is recommended for multiple rounds and is not clicked all the time, the commodity C3 is deleted from the extended recommendation list, although the commodity C1 does not belong to the commodities in the extended recommendation list originally, but the commodity C1 is the commodity clicked by the user, the commodities in the updated effective recommendation list finally remain the commodity C1, the commodity C2 and the commodity C4, a second matrix representing the score of the hidden character of the commodity is obtained through ALS matrix decomposition, and then the commodity cluster corresponding to each commodity is obtained through kmeans algorithm, namely the effective commodity cluster: the C1 commercial cluster, the C2 commercial cluster, and the C4 commercial cluster.
(4) For the expanded commodity cluster, the commodity corresponding to the top k approximate result corresponding to the Word2vector algorithm is used for further expansion, an updated recommendation list based on the user behavior is formed, such as the user behavior update recommendation list commodities s1, s2 and s3 in fig. 2, and the next round of recommendation iteration is performed according to the updated recommendation list.
It should be noted that, according to the ALS algorithm, various types of clusters can be obtained, and each commodity set is formed in the cluster; sorting the commodity set according to the frequency of the commodities appearing in the whole data set, thereby forming an ordered commodity list; topk of the own commodity is approximately an ordered list; for the commodities in the ordered commodity quantity list, the approximation of the commodity topk is obtained by using the word2vector, and the final ordered list is formed after the corresponding commodities are directly inserted.
Further, a commodity recommendation list is obtained through an ALS algorithm, and the method comprises the following steps: obtaining the scores of various commodities of a user, and constructing a score matrix according to the scores; approximately decomposing the scoring matrix into a first matrix and a second matrix, wherein the first matrix represents the score of the user in the self-hiding traits, and the second matrix represents the score of the commodity in the self-hiding traits; and clustering the first matrix and the second matrix respectively through a kmeans algorithm to obtain corresponding commodity recommendation lists.
In the present embodiment, an ALS basic calculation process is given. And constructing a scoring matrix according to the scores of the various commodities by the user, and approximately decomposing the scoring matrix into two matrixes, namely the first matrix and the second matrix, so as to respectively represent the score of the user on the self-hiding traits and the score of the commodities on the self-hiding traits. And then, clustering the score of the user in the self-hiding traits and the score of the commodity in the self-hiding traits respectively through a kmeans algorithm to obtain a user cluster and a commodity cluster. According to the clustering result, the following effects can be achieved: for example, for the user a, recommending purchased and clicked goods of users of the same type as the user a (wherein, the same type refers to having some or some of the same characteristics); similarly, for the commodity W, if the user a purchases or clicks on the commodity W, the same kind of commodity of W (wherein, the same kind refers to having some same characteristic or some same characteristics) is also recommended to the user. The list formed by the recommended commodities is the initial recommendation list.
For example, the original user commodity scoring matrix is decomposed into m × n (where m represents the number of users and n represents the number of commodities) and m × k, k × n (where k is the number of hidden features), such as k columns are respectively interpreted as features describing 'personal preference', 'purchasing power', 'background of browsing', and the like of the user.
In the present embodiment, the ALS is used to approximate the decomposition of the user product score matrix. According to the ALS recommendation list, the extension of the recommendation result is realized by using the top k approximation of the commodities in the word2vector association list; after the initial recommendation list is obtained, according to the interaction between the user and the recommendation result, the top k approximation of the commodities in the word2vector association cluster is utilized, and the recommendation list is further promoted.
The method realizes the quick calculation of the weighted text vector top k approximation by using the kmeans algorithm, and improves the utilization efficiency of calculation resources and storage units. By using the algorithms of Word2Vector, ALS, Kmeans, TF-IDF and the like, the ALS recommendation list related to the Word2Vector is realized, the recommendation list is expanded, and the recommendation accuracy is improved.
Referring to fig. 3, fig. 3 is a schematic diagram of a product recommendation system according to an embodiment of the present invention.
Accordingly, an embodiment of the present invention further provides a commodity recommendation system, including: the weighted vectorization module 31 is configured to obtain a weight of a text phrase of the commodity, and perform vectorization on the text phrase to obtain a corresponding weighted text word vector; the clustering module 32 is configured to cluster the weighted text word vectors according to a preset clustering algorithm; the measurement module 33 is configured to calculate distances between the weighted text word vectors in the clusters, and obtain a preset high-frequency word element approximation result; and the result generating module 34 is configured to generate a corresponding commodity recommendation result according to a preset high-frequency word element approximation result.
Further, the weight vectorization module includes: the weight calculation unit is used for calculating the weight of the text phrase of each target commodity through TF-IDF; and the vectorization unit is used for vectorizing the text phrases of the target commodities through a word2vector algorithm and weighting the word vectors of the text phrases to obtain corresponding weighted text word vectors.
Still further, the clustering module includes: and the kmeans algorithm clustering unit is used for clustering the weighted text word vectors through the kmeans algorithm.
The measurement module comprises: the word vector distance calculating unit is used for calculating the distance between the weighted text word vectors in the cluster; and the top k calculating unit is used for acquiring a top k approximate result according to the calculation result.
On the basis of any one of the above embodiments, in an embodiment of the present invention, the result generation module includes: a recommendation list acquisition unit for acquiring a commodity recommendation list through an ALS algorithm; the extended recommendation list obtaining unit is used for associating the commodities in the commodity recommendation list with the commodities corresponding to the top k approximation result through a word2vector algorithm so as to obtain an extended recommendation list; the interactive information acquisition unit is used for acquiring the current interactive information of the user on the commodity; the effective commodity cluster production unit is used for generating effective commodity cluster according to the interactive information; and the update list generation unit is used for associating the commodities in the effective commodity cluster with the commodities corresponding to the top k approximate result through a word2vector algorithm to form an update recommendation list based on user behaviors so as to be displayed to the user and/or perform recommendation iteration according to the update interaction information of the user on the commodities.
Further, the recommendation list acquisition unit includes: the matrix construction subunit is used for acquiring the scores of the users on various commodities and constructing a score matrix according to the scores; the matrix decomposition subunit is used for approximately decomposing the scoring matrix into a first matrix and a second matrix, wherein the first matrix represents the score of the user in the self-hiding traits, and the second matrix represents the score of the commodity in the self-hiding traits; and the clustering subunit is used for respectively clustering the first matrix and the second matrix through a kmeans algorithm to obtain corresponding commodity recommendation lists.
In the embodiment, when the personalized system is used for recommending the commodity for the user, the text phrases of the commodity are weighted and vectorized, then the weighted text vectors are clustered, the distance between the text vectors is calculated in the cluster, and finally the top k approximation is obtained, so that the calculation efficiency is greatly improved, and the utilization efficiency of calculation resources and storage units is improved.
And (4) realizing approximate decomposition representation of a user commodity scoring matrix by using ALS. According to the ALS recommendation list, the extension of the recommendation result is realized by using the top k approximation of the commodities in the word2vector association list; after the initial recommendation list is obtained, according to the interaction between the user and the recommendation result, the top k approximation of the commodities in the word2vector association cluster is utilized, and the recommendation list is further promoted.
The method realizes the quick calculation of the weighted text vector top k approximation by using the kmeans algorithm, and improves the utilization efficiency of calculation resources and storage units. By using the algorithms of Word2Vector, ALS, Kmeans, TF-IDF and the like, the ALS recommendation list related to the Word2Vector is realized, the recommendation list is expanded, and the recommendation accuracy is improved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device for recommending a commodity according to an embodiment of the present invention.
Correspondingly, an embodiment of the present invention further provides an electronic device for recommending a commodity, including: a memory 41 for storing a computer program; a processor 42 for implementing the steps of the method of recommending merchandise, as described in any of the above, when executing a computer program.
Of course, the electronic device for recommending goods may further include various necessary network interfaces, power supplies, other components, and the like, which are not limited herein, as the case may be.
Accordingly, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method for recommending an article according to any one of the above items.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, are not limited herein, and the present embodiment is specific as the case may be.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In summary, according to the commodity recommendation method, system, electronic device and storage medium provided by the embodiments of the present invention, when a personalized system is used to recommend a commodity for a user, the text phrases of the commodity are weighted and vectorized, then the weighted text vectors are clustered, the distance between the text vectors is calculated in the cluster, and finally the high-frequency word element approximation is obtained, so that the calculation efficiency is greatly improved, and the utilization efficiency of the calculation resources and the storage unit is improved. Particularly, the commodity recommendation list can be strengthened by utilizing the high-frequency word element approximation based on the user behavior subsequently, so that a more accurate commodity recommendation result is obtained and is provided for the user.
The above detailed description is provided for a method, a system, an electronic device and a storage medium for recommending a commodity according to the present invention. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (7)

1. A method for recommending an article, comprising:
acquiring a weight value of a text phrase of a commodity, and vectorizing the text phrase to obtain a corresponding weighted text word vector;
clustering the weighted text word vectors through a preset clustering algorithm;
calculating the distance between the weighted text word vectors in a cluster to obtain a preset high-frequency word element approximate result;
generating a corresponding commodity recommendation result according to the preset high-frequency word element approximate result;
the method for obtaining the weight of the text phrase of the commodity and vectorizing the text phrase to obtain the corresponding weighted text word vector comprises the following steps:
calculating the weight of the text phrase of each target commodity through TF-IDF;
vectorizing the text phrases of the target commodities through a word2vector algorithm, and weighting word vectors of the text phrases to obtain corresponding weighted text word vectors;
the calculating the distance between the weighted text word vectors in the cluster to obtain a preset high-frequency word element approximate result comprises the following steps:
calculating distances between the weighted text word vectors within a cluster;
and obtaining a top k approximate result according to the calculation result.
2. The method of claim 1, wherein clustering the weighted text word vectors by a predetermined clustering algorithm comprises:
and clustering the weighted text word vectors through a kmeans algorithm.
3. The method according to claim 1 or 2, wherein generating a corresponding commodity recommendation result according to the preset high-frequency word element approximation result comprises:
acquiring a commodity recommendation list through an ALS algorithm;
associating the commodities in the commodity recommendation list with the commodities corresponding to the top k approximate result through a word2vector algorithm to obtain an extended recommendation list;
acquiring the current interaction information of a user on commodities;
generating effective commodity cluster clusters according to the interaction information;
and associating the commodities in the effective commodity cluster with the commodities corresponding to the top k approximate result through a word2vector algorithm to form an updated recommendation list based on user behaviors so as to be displayed to the user and/or perform recommendation iteration according to the updated interaction information of the user on the commodities.
4. The method of claim 3, wherein said obtaining a recommended list of goods via ALS algorithm comprises:
obtaining the scores of various commodities of a user, and constructing a score matrix according to the scores;
approximately decomposing the scoring matrix into a first matrix and a second matrix, wherein the first matrix represents the score of the user in the self-hiding traits, and the second matrix represents the score of the commodity in the self-hiding traits;
and clustering the first matrix and the second matrix respectively through a kmeans algorithm to obtain corresponding commodity recommendation lists.
5. An article recommendation system, comprising:
the weighting vectorization module is used for acquiring the weight of the text phrase of the commodity and vectorizing the text phrase to obtain a corresponding weighted text word vector;
the clustering module is used for clustering the weighted text word vectors through a preset clustering algorithm;
the measurement module is used for calculating the distance between the weighted text word vectors in the cluster and obtaining a preset high-frequency word element approximate result;
the result generation module is used for generating a corresponding commodity recommendation result according to the preset high-frequency word element approximate result;
the weight vectorization module includes:
the weight calculation unit is used for calculating the weight of the text phrase of each target commodity through TF-IDF;
the vectorization unit is used for vectorizing the text phrases of the target commodities through a word2vector algorithm and weighting the word vectors of the text phrases to obtain corresponding weighted text word vectors;
the clustering module comprises: the kmeans algorithm clustering unit is used for clustering the weighted text word vectors through a kmeans algorithm;
the measurement module comprises: the word vector distance calculating unit is used for calculating the distance between the weighted text word vectors in the cluster; and the top k calculating unit is used for acquiring a top k approximate result according to the calculation result.
6. An electronic device for merchandise recommendation, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the item recommendation method according to any one of claims 1 to 4 when executing said computer program.
7. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the item recommendation method according to any one of claims 1 to 4.
CN201811240193.2A 2018-10-23 2018-10-23 Commodity recommendation method and system, electronic equipment and storage medium Active CN109410001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811240193.2A CN109410001B (en) 2018-10-23 2018-10-23 Commodity recommendation method and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811240193.2A CN109410001B (en) 2018-10-23 2018-10-23 Commodity recommendation method and system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109410001A CN109410001A (en) 2019-03-01
CN109410001B true CN109410001B (en) 2020-09-08

Family

ID=65468871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811240193.2A Active CN109410001B (en) 2018-10-23 2018-10-23 Commodity recommendation method and system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109410001B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110210532B (en) * 2019-05-15 2022-03-01 北京字节跳动网络技术有限公司 Background color generation method and device and electronic equipment
CN110363580B (en) * 2019-06-28 2022-07-19 深圳新度博望科技有限公司 Information recommendation method and device, computer equipment and storage medium
CN110442346B (en) * 2019-07-08 2020-11-03 中国科学院计算技术研究所 Rule extension method for compiler code detection
CN110503483A (en) * 2019-08-23 2019-11-26 深圳市福尔科技有限公司 A method of shop popularization is carried out by sending list out of stock
CN113781116A (en) * 2021-09-13 2021-12-10 支付宝(杭州)信息技术有限公司 Method, system, apparatus and medium for determining impact of article on product or service

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156436A (en) * 2014-08-13 2014-11-19 福州大学 Social association cloud media collaborative filtering and recommending method
CN106548255A (en) * 2016-11-24 2017-03-29 山东浪潮云服务信息科技有限公司 A kind of Method of Commodity Recommendation based on mass users behavior

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831234B (en) * 2012-08-31 2015-04-22 北京邮电大学 Personalized news recommendation device and method based on news content and theme feature
US20140114797A1 (en) * 2012-10-19 2014-04-24 Barnesandnoble.Com, Llc System for generating content recommendations

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156436A (en) * 2014-08-13 2014-11-19 福州大学 Social association cloud media collaborative filtering and recommending method
CN106548255A (en) * 2016-11-24 2017-03-29 山东浪潮云服务信息科技有限公司 A kind of Method of Commodity Recommendation based on mass users behavior

Also Published As

Publication number Publication date
CN109410001A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN109410001B (en) Commodity recommendation method and system, electronic equipment and storage medium
CN108536852B (en) Question-answer interaction method and device, computer equipment and computer readable storage medium
CN108230058B (en) Product recommendation method and system
CN107357793B (en) Information recommendation method and device
CN106294500B (en) Content item pushing method, device and system
CN110717098A (en) Meta-path-based context-aware user modeling method and sequence recommendation method
CN112085565B (en) Deep learning-based information recommendation method, device, equipment and storage medium
CN109710835B (en) Heterogeneous information network recommendation method with time weight
CN105159910A (en) Information recommendation method and device
CN104517216A (en) Enhanced recommender system and method
CN112991017A (en) Accurate recommendation method for label system based on user comment analysis
Malik et al. EPR-ML: E-Commerce Product Recommendation Using NLP and Machine Learning Algorithm
CN113268656A (en) User recommendation method and device, electronic equipment and computer storage medium
CN111428007B (en) Cross-platform based synchronous push feedback method
Fry et al. Can we group similar amazon reviews: a case study with different clustering algorithms
KR102376652B1 (en) Method and system for analazing real-time of product data and updating product information using ai
CN113763031A (en) Commodity recommendation method and device, electronic equipment and storage medium
CN110020918B (en) Recommendation information generation method and system
CN108932248A (en) A kind of search realization method and system
CN115456708A (en) Recommendation model training method and device, electronic equipment and storage medium
CN112328918B (en) Commodity sorting method, computing device and computer-readable storage medium
CN114429384A (en) Intelligent product recommendation method and system based on e-commerce platform
CN113641915A (en) Object recommendation method, device, equipment, storage medium and program product
CN113792952A (en) Method and apparatus for generating a model
CN112131491A (en) Hierarchical ordering method, computing device and computer readable storage medium

Legal Events

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