CN109636529B - Commodity recommendation method and device and computer-readable storage medium - Google Patents

Commodity recommendation method and device and computer-readable storage medium Download PDF

Info

Publication number
CN109636529B
CN109636529B CN201811536326.0A CN201811536326A CN109636529B CN 109636529 B CN109636529 B CN 109636529B CN 201811536326 A CN201811536326 A CN 201811536326A CN 109636529 B CN109636529 B CN 109636529B
Authority
CN
China
Prior art keywords
user
commodity
subspace
target user
users
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
CN201811536326.0A
Other languages
Chinese (zh)
Other versions
CN109636529A (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.)
Suzhou University
Original Assignee
Suzhou University
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 Suzhou University filed Critical Suzhou University
Priority to CN201811536326.0A priority Critical patent/CN109636529B/en
Publication of CN109636529A publication Critical patent/CN109636529A/en
Application granted granted Critical
Publication of CN109636529B publication Critical patent/CN109636529B/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
    • 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/0623Item investigation

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer 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 discloses a commodity recommendation method, a commodity recommendation device and a computer readable storage medium, wherein each element in an obtained scoring matrix is classified according to a set classification rule to construct a plurality of commodity subspaces; each commodity subspace comprises the grading information of the user to the commodities; calculating the grading support degree between the target user and each remaining user in each commodity subspace; and determining a neighbor user set of the target user according to the evaluation support degrees. And screening recommended commodities from the neighboring commodities corresponding to the users in the neighboring user set according to a scoring rule. By means of calculating the evaluation support degree, the neighbor user set of the target user can be quickly determined, and the processing efficiency of commodity recommendation is improved. And recommended commodities are selected from commodities corresponding to the neighbor user set, so that the recommended commodities are more in line with the actual requirements of the users, and the resource recommendation performance is improved.

Description

Commodity recommendation method and device and computer-readable storage medium
Technical Field
The present invention relates to the field of resource recommendation technologies, and in particular, to a method and an apparatus for recommending a commodity, and a computer-readable storage medium.
Background
With the development of information technology and internet technology, people step into the information overload era from the information deficient era, under the background of the era, people are more and more difficult to find information which is interesting to the people per se from a large amount of information, and the recommendation system is used for connecting users and the information, solving the problem of how to find key points in mass information and pushing interesting information such as music, movies, games, news, books and the like for the users. Each type of information may be considered a commodity, for example, a movie, a book, or a song may be considered a commodity.
When the user does not have an explicit target, the user can only search for the product that may be interested by the user through some preset categories or labels, but the user is difficult to find out the product that is really interested in a short time in the face of such many products. An automated tool is needed to analyze the user's historical behavior record and find and recommend to the user the goods that the user may be interested in, which is the work of the recommendation system.
The conventional recommendation system usually adopts a similarity measurement method such as cosine similarity, Pearson Correlation Coefficient (PCC), and the like, and realizes recommendation of the commodities by calculating the similarity between the commodities. However, as the number of users and commodities is increased continuously, the sparsity of the scoring matrix is more and more obvious, and the commodities evaluated together are less, so that the traditional similarity cannot obtain good recommendation performance.
Therefore, how to recommend the commodities meeting the preference of the terminal user more quickly and accurately so as to improve the resource recommendation performance is a problem to be solved urgently by the technical staff in the field.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for recommending commodities, and a computer-readable storage medium, which can recommend commodities that meet the preference of a terminal user more quickly and accurately, thereby improving the performance of resource recommendation.
In order to solve the above technical problem, an embodiment of the present invention provides a method for recommending a commodity, including:
classifying each element in the obtained scoring matrix according to a set classification rule to construct a plurality of commodity subspaces; each commodity subspace comprises scoring information of the commodities by the user;
calculating the grading support degree between the target user and each remaining user in each commodity subspace; wherein, each remaining user of each commodity subspace is other users except the target user in all users contained in each commodity subspace;
determining a neighbor user set of the target user according to the evaluation support degrees;
and screening recommended commodities from the neighboring commodities corresponding to the users in the neighboring user set according to a grading rule.
Optionally, the calculating the scoring support between the target user and each remaining user in each commodity subspace includes:
according to the following formula, calculating the grading support degree between the target user and each residual user in each commodity subspace,
Figure BDA0001906971320000021
wherein, Sup _ co1(ug,ui) Representing a user u in a first goods subspacegAnd the remaining users uiScore support of (T)g 1Representing user ugA set of scored items in a first item subspace; t isi 1Representing user uiA set of scored items in a first item subspace; t is1A set of scored items representing all users in a first item subspace; the first commodity subspace is any one of the commodity subspaces.
Optionally, the determining, according to each of the rating support degrees, a neighbor user set of the target user includes:
calculating a common score value between the target user and each remaining user according to each rating support degree;
sorting the rest users according to the common score value, and screening out a preset number of users as a direct neighbor user set of the target user;
counting a direct neighbor user set corresponding to each neighbor user in the direct neighbor user set as an indirect neighbor user set of the target user;
and taking the direct neighbor user set and the indirect neighbor user set of the target user as the neighbor user set of the target user.
Optionally, the screening, according to the scoring rule, recommended commodities from neighboring commodities corresponding to each user in the neighboring user set includes:
determining a commodity set to be recommended according to a target commodity set corresponding to the target user and a neighbor commodity set corresponding to each user in the neighbor user set;
calculating the prediction scores of the target user on the commodities in the to-be-recommended commodity set;
and screening out the commodities with the prediction scores higher than the average score from the to-be-recommended commodity set as recommended commodities.
The embodiment of the invention also provides a commodity recommending device, which comprises a classifying unit, a calculating unit, a determining unit and a screening unit;
the classification unit is used for classifying each element in the obtained scoring matrix according to a set classification rule to construct a plurality of commodity subspaces; each commodity subspace comprises scoring information of the commodities by the user;
the computing unit is used for computing the scoring support degree between the target user and each remaining user in each commodity subspace; wherein, each remaining user of each commodity subspace is other users except the target user in all users contained in each commodity subspace;
the determining unit is used for determining a neighbor user set of the target user according to each evaluation support degree;
and the screening unit is used for screening recommended commodities from the adjacent commodities corresponding to the users in the adjacent user set according to a grading rule.
Optionally, the calculating unit is specifically configured to calculate a scoring support degree between the target user and each remaining user in each commodity subspace according to the following formula,
Figure BDA0001906971320000031
wherein, Sup _ co1(ug,ui) Representing a user u in a first goods subspacegAnd the remaining users uiScore support of (T)g 1Representing user ugA set of scored items in a first item subspace; t isi 1Representing user uiA set of scored items in a first item subspace; t is1A set of scored items representing all users in a first item subspace; the first commodity subspace is any one of the commodity subspaces.
Optionally, the determining unit includes a calculating subunit, a screening subunit, a counting subunit, and a serving subunit;
the calculating subunit is configured to calculate, according to each of the rating support degrees, a common rating value between the target user and each of the remaining users;
the screening subunit is configured to sort the remaining users according to the common score value, and screen out a preset number of users as a direct neighbor user set of the target user;
the counting subunit is configured to count, as an indirect neighbor user set of the target user, a direct neighbor user set corresponding to each neighbor user in the direct neighbor user set;
the serving as a subunit, configured to serve a direct neighbor user set and the indirect neighbor user set of the target user as neighbor user sets of the target user.
Optionally, the screening unit includes a determining subunit, a calculating subunit, and a serving subunit;
the determining subunit is configured to determine a to-be-recommended commodity set according to a target commodity set corresponding to the target user and a neighboring commodity set corresponding to each user in the neighboring user set;
the calculation subunit is configured to calculate a prediction score of the target user for each commodity in the to-be-recommended commodity set;
and the serving subunit is used for screening out the commodities with the prediction scores higher than the average score from the to-be-recommended commodity set as recommended commodities.
An embodiment of the present invention further provides a commodity recommendation device, including:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the above-mentioned article recommendation method.
The embodiment of the invention also provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program realizes the steps of the above commodity recommendation method.
According to the technical scheme, the elements in the obtained scoring matrix are classified according to the set classification rule, and a plurality of commodity subspaces are constructed; each commodity subspace comprises the grading information of the user to the commodities; taking any one of all users, namely the target user, as an example, other users except the target user in all users included in each commodity subspace can be called as remaining users, and the scoring support degree between the target user and each remaining user in each commodity subspace is calculated; according to the evaluation support degrees, a neighbor user set of the target user can be determined, and neighbor users having the same or similar interest and hobbies with the target user are contained in the neighbor user set. After the neighbor user set of the target user is determined, the recommended commodities can be screened from neighbor commodities corresponding to each user in the neighbor user set according to the scoring rule. In the technical scheme, the neighbor user set of the target user can be quickly determined by calculating the evaluation support degree, and the processing efficiency of commodity recommendation is improved. Considering that the neighboring user sets all contain users with interests and hobbies close to those of the target user, the recommended commodities are selected from the commodities corresponding to the neighboring user sets, so that the recommended commodities can better meet the actual requirements of the users, and the resource recommendation performance is improved.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a commodity recommendation method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a commodity recommending apparatus according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a hardware structure of a commodity recommendation device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Next, a commodity recommendation method according to an embodiment of the present invention will be described in detail. Fig. 1 is a flowchart of a commodity recommendation method according to an embodiment of the present invention, where the method includes:
s101: and classifying the elements in the obtained scoring matrix according to a set classification rule to construct a plurality of commodity subspaces.
The scoring matrix comprises the scores of the users on the commodities, a user set and a commodity set can be constructed according to the collected user information and commodity information in practical application, and the scoring matrix is constructed according to the scores of each user on each commodity.
For example, U ═ { U ═1,…,ulDenotes a set of users, l denotes the number of users; m ═ M1,...,mnDenotes a commodity set, and n denotes a commodity number.
The user's scores for each item may be crawled directly from the network or may be derived from public data sets.
Taking a movie as an example, an integer value of 10 grades, i.e., 1 to 10 grades, is generally set as a score value, and a user can score the movie according to the like degree of the movie, wherein the higher the score of the user on a commodity is, the higher the like degree of the user on the commodity is. When the user does not rate a certain item or items in the collection of items, the rating value may be set to 0.
The constructed scoring matrix comprises a plurality of elements rijE {0, s } represents user uiFor commodity mjWhen r is a score ofijIf the value is 0, the user does not evaluate the commodity, and if r is the valueijThe value of 1 represents that the user likes the commodity to the lowest extent, and so on, if rijThe value s indicates that the user likes the product to the highest extent.
In the embodiment of the present invention, each product involved in the constructed scoring matrix is a different product in the same category or in a category with a strong correlation. Taking a movie as an example, one movie is a commodity, and the scoring matrix includes scores of different movies by a plurality of users. When a scoring matrix of an e-book is constructed for some movies or television shows possibly adapted from novels, if the corresponding scoring is lacked, the scoring of the movie or television show corresponding to the e-book can be used as the scoring of the e-book.
In the embodiment of the invention, the plurality of commodity subspaces are constructed in order to divide the plurality of commodity subspaces according to the likeness or interest degree of the commodity of the user. In the embodiment of the invention, 3 commodity subspaces can be divided into an interested commodity subspace, a non-interested commodity subspace and a non-interested commodity subspace. And each commodity subspace comprises the scoring information of the user on the commodities. For convenience of introduction, in the embodiments of the present invention, the 3 types of product subspaces are taken as examples for explanation.
In a specific implementation, a scoring threshold value can be set, and when the scoring value of a certain commodity by a user is greater than the scoring threshold value, the commodity is scored into an interested commodity subspace; when the value of the user to the certain commodity is equal to the grading threshold value, the commodity is divided into an insensitive commodity subspace; and when the value of the score of the user on a certain commodity is smaller than the score threshold value, the commodity is classified into a commodity subspace which is not interested.
In the embodiment of the present invention, the commodity subspace is equivalent to one coverage of the commodity set, and is not a mere division of commodities, that is, different commodity subspaces often contain the same commodity, for example, if the score of the user 1 on the commodity a is greater than the score threshold, the user 1, the commodity a and the corresponding scores thereof may be recorded in the interested commodity subspace; if the score of the user 2 on the commodity a is equal to the score threshold value, the user 2, the commodity a and the corresponding scores can be recorded into the non-sensory commodity subspace; if the score of the user 3 on the commodity a is smaller than the score threshold value, the user 3, the commodity a and the corresponding score can be recorded in the uninteresting commodity subspace, and at the moment, the 3 commodity subspaces all contain the commodity a.
S102: and calculating the grading support degree between the target user and each remaining user in each commodity subspace.
In the embodiment of the invention, in order to improve the resource recommendation performance and recommend commodities which better meet the user preference to the terminal user, a corresponding neighbor user set can be constructed for each user.
The determination method of the neighbor user set of each user is similar, and in the embodiment of the present invention, an example of any user of all users, i.e., the target user, is taken as an explanation, and the neighbor user set includes neighbor users having the same or similar interests as the target user.
The scoring support degree is used for representing the scoring relevance of the target user and other users on the same commodity, and the higher the scoring support degree between the two users is, the more similar the interests and hobbies of the two users are. In the implementation of the invention, the scoring support degree is used as the basis for selecting the neighbor users of the target user.
In the same commodity subspace, the scoring values of the users to the commodities are relatively close, so that when the scoring support degree is calculated, the scoring support degree between the target user and the rest users in each commodity subspace can be calculated by taking each commodity subspace as a processing unit. And the remaining users are other users except the target user in all the users contained in the commodity subspace.
In the embodiment of the invention, the grading support degree between the target user and each remaining user can be calculated according to the number of the grading commodities corresponding to the target user and each remaining user.
In a specific implementation, the scoring support degree between the target user and each remaining user in each commodity subspace can be calculated according to the following formula,
Figure BDA0001906971320000081
wherein, Sup _ co1(ug,ui) Representing a user u in a first goods subspacegAnd the remaining users uiScore support of (T)g 1Representing user ugA set of scored items in a first item subspace; t isi 1Representing user uiA set of scored items in a first item subspace; t is1A set of scored items representing all users in a first item subspace; the first commodity subspace is any one of the commodity subspaces.
With 3 goods subspaces introduced in S101 above: taking the interested commodity subspace, the uninteresting commodity subspace and the uninteresting commodity subspace as examples, the symbols INT, NINT and UNT can be used to distinguish the 3 commodity subspaces in turn, and correspondingly, the target user u is determined according to the formula for calculating the evaluation support degreegAnd the remaining users uiThe scoring support degrees in the 3 commodity subspaces can be sequentially used by Sup _ coINT(ug,ui)、Sup_coNINT(ug,ui) And Sup _ coUNT(ug,ui) And (4) showing.
S103: and determining a neighbor user set of the target user according to the evaluation support degrees.
The higher the scoring support degree between the two users is, the more similar the interests and hobbies of the two users are, in the embodiment of the invention, the scoring support degrees of the target user in each commodity subspace can be integrated, so that the neighbor users of the target user can be screened out.
In a specific implementation, a common score value between the target user and each remaining user can be calculated according to each score support degree; and sequencing all the rest users according to the common score value, and screening out a preset number of users as a direct neighbor user set of the target user.
With target user ugAnd the remaining users uiFor example, Sup _ co can be usedINT(ug,ui)、Sup_coNINT(ug,ui) And Sup _ coUNT(ug,ui) Is taken as the target user ugAnd the remaining users uiThe value of the joint credit. Specifically, the target user u may be calculated according to the following formulagAnd the remaining users uiCommon score value Pro _ co (u)g,ui),
Figure BDA0001906971320000091
Reference target user ugAnd the remaining users uiThe common score value between the target user and each of the remaining users can be determined in a manner of determining the common score value.
Taking the target user as an example, in the embodiment of the present invention, the common score values of the remaining users may be sorted in a descending order, and a preset number of remaining users are screened out as a direct neighbor user set of the target user. The value of the preset number can be set according to actual requirements, and is not limited herein.
Referring to the processing manners of S102 and S103, the direct neighbor users of each user can be determined.
Considering that the number of direct neighbor users of a target user is often small, when determining a neighbor user set of the target user, the direct neighbor user set and the indirect neighbor user set corresponding to the target user can be screened, and specifically, the direct neighbor user set corresponding to each neighbor user in the direct neighbor user set can be counted as the indirect neighbor user set of the target user; and taking the direct neighbor user set and the indirect neighbor user set of the target user as the neighbor user set of the target user.
Taking the target user as an example, a direct neighboring user set corresponding to the target user can be determined, each user in the direct neighboring user set has a direct neighboring user set corresponding to each user, and the indirect neighboring user of the target user refers to a direct neighboring user corresponding to a user in the direct neighboring user set of the target user.
In the embodiment of the invention, the direct neighbor user set and the indirect neighbor user set of the target user can be used as the neighbor user set of the target user, so that the number of users in the neighbor user set of the target user is increased, and the purpose of increasing the recommended commodities is achieved.
S104: and screening recommended commodities from the neighboring commodities corresponding to the users in the neighboring user set according to a scoring rule.
Each user in the neighbor user set has a commodity evaluated by the user, when the commodity is recommended to the target user, the commodity evaluated by the target user should be excluded, and in the specific implementation, the commodity set to be recommended can be determined according to the target commodity set corresponding to the target user and the neighbor commodity sets corresponding to the users in the neighbor user set.
The target commodity set is used for expressing commodities which are scored by the target user, and the neighbor commodity set is used for expressing commodities which are scored by each neighbor user.
In practical application, after the commodities contained in the target commodity set are deleted from the neighboring commodity set, only the commodities which are not scored by the target user are contained in the neighboring commodity set at the moment, and the commodities can be used as the commodities to be recommended.
Each commodity contained in the to-be-recommended commodity set may be a commodity with a higher score of a neighboring user or a commodity with a lower score of a neighboring user. In order to recommend commodities which are more in line with the interests and hobbies of a target user, the prediction scores of all commodities in a commodity set to be recommended by the target user can be calculated; and screening out the commodities with the prediction scores higher than the average score from the to-be-recommended commodity set as recommended commodities. And the average value of the scores is the average value of the scores corresponding to the commodities evaluated by the target user.
One to-be-recommended commodity m in the to-be-recommended commodity setaFor example, the target can be calculated according to the following formula (1)User ugTo-be-recommended commodity maPredictive scoring of
Figure BDA0001906971320000101
Figure BDA0001906971320000102
Wherein r isiaRepresenting user uiFor commodity maThe score of (a) is determined,
Figure BDA0001906971320000103
representing user uiThe average of the non-zero scores for the good,
Figure BDA0001906971320000104
representing a target user ugAverage of non-zero scores for goods, NeigRepresenting a target user ugAnd Neig=Ng∪INUg,NgRepresenting a target user ugDirect neighbor user set, INUgRepresenting a target user ugIndirect neighbor user set of (i.e. a)
Figure BDA0001906971320000105
S(ug,ui) Representing a target user ugAnd neighboring user uiThe calculation formula is shown as (1a),
Figure BDA0001906971320000106
wherein the content of the first and second substances,
Figure BDA0001906971320000111
is the target user ugCollections of goods that have been scored, i.e.
Figure BDA0001906971320000112
Figure BDA0001906971320000113
Is user uiCollections of goods that have been scored, i.e.
Figure BDA0001906971320000114
S2(ug,ui) Representing a target user ugAnd neighboring user uiThe degree of asymmetry, calculated as shown in equation (1b),
Figure BDA0001906971320000115
S3(ug,ui) The rating preference of the user is expressed, and the calculation mode is shown as formula (1c),
Figure BDA0001906971320000116
wherein σgIs the target user ugStandard deviation of non-zero score.
Sitem(mj,mq) Is a commodity mjAnd commodity mqThe similarity between the two is calculated in the way shown in the formula (1d),
Figure BDA0001906971320000117
wherein DS(mj,mq) Is the J divergence.
S1(rgj,riq) Representing a target user ugFor commodity mjScoring and user uiFor commodity mqThe similarity of scores is calculated in the way shown in formula (1e),
Figure BDA0001906971320000118
wherein r ismedIs the median of all non-zero scores, μjRepresentative pair item mjThere is an average value of scores.
In order to verify the recommendation effect of the commodity recommendation method provided by the embodiment of the invention, the commodity recommendation method provided by the embodiment of the invention can be compared with algorithms (UCF _ Per, MCF _ Per) based on the Pearson similarity of the user and the Pearson similarity of the commodity and a neighbor tree (UTAOS, NUSCCF) method, and the recommendation effect is evaluated by adopting an absolute value error index (MAE) and a square error index (RMSE) and a Recall rate (Recall).
Wherein, the calculation mode of the absolute value error index is shown as formula (2), the calculation mode of the square error index is shown as formula (3), the calculation mode of the recall ratio is shown as formula (4),
Figure BDA0001906971320000121
Figure BDA0001906971320000122
Figure BDA0001906971320000123
at the time of specific validation, the data set may be randomly divided into 5 training sets and test sets.
Where l 'is the number of users on the test set, n' is the number of goods on the test set, IRgtIs a collection of items preferred by the user on the test set, IRgpIs a favorite collection of items recommended to the user. The recommended results are shown in table 1:
comparison of recommendation results of three algorithms
Recommending MAE RMSE Recall
Commodity recommendation method 0.7399 1.0311 0.6799
UCF_Per 0.9838 1.1174 0.2607
MCF_Per 0.8716 1.0196 0.0571
UTAOS 0.8638 1.0852 0.4393
NUSCCF 0.9808 1.2281 0.1248
TABLE 1
As can be seen from table 1, the commodity recommendation method provided by the present invention has better recommendation performance than other methods.
According to the technical scheme, the elements in the obtained scoring matrix are classified according to the set classification rule, and a plurality of commodity subspaces are constructed; each commodity subspace comprises the grading information of the user to the commodities; taking any one of all users, namely the target user, as an example, other users except the target user in all users included in each commodity subspace can be called as remaining users, and the scoring support degree between the target user and each remaining user in each commodity subspace is calculated; according to the evaluation support degrees, a neighbor user set of the target user can be determined, and neighbor users having the same or similar interest and hobbies with the target user are contained in the neighbor user set. After the neighbor user set of the target user is determined, the recommended commodities can be screened from neighbor commodities corresponding to each user in the neighbor user set according to the scoring rule. In the technical scheme, the neighbor user set of the target user can be quickly determined by calculating the evaluation support degree, and the processing efficiency of commodity recommendation is improved. Considering that the neighboring user sets all contain users with interests and hobbies close to those of the target user, the recommended commodities are selected from the commodities corresponding to the neighboring user sets, so that the recommended commodities can better meet the actual requirements of the users, and the resource recommendation performance is improved.
Fig. 2 is a schematic structural diagram of a commodity recommending apparatus according to an embodiment of the present invention, which includes a classifying unit 21, a calculating unit 22, a determining unit 23, and a screening unit 24;
the classification unit 21 is configured to classify each element in the obtained scoring matrix according to a set classification rule, and construct a plurality of commodity subspaces; each commodity subspace comprises scoring information of the commodities by the user;
the calculating unit 22 is used for calculating the scoring support degree between the target user and each remaining user in each commodity subspace; each remaining user of each commodity subspace is other users except the target user in all the users contained in each commodity subspace;
the determining unit 23 is configured to determine, according to each score support degree, a neighboring user set of the target user;
and the screening unit 24 is configured to screen recommended commodities from the neighboring commodities corresponding to each user in the neighboring user set according to the scoring rule.
Optionally, the calculating unit is specifically configured to calculate a scoring support degree between the target user and each remaining user in each commodity subspace according to the following formula,
Figure BDA0001906971320000131
wherein, Sup _ co1(ug,ui) Representing a user u in a first goods subspacegAnd the remaining users uiScore support of (T)g 1Representing user ugA set of scored items in a first item subspace; t isi 1Representing user uiA set of scored items in a first item subspace; t is1A set of scored items representing all users in a first item subspace; the first commodity subspace is any one of the commodity subspaces.
Optionally, the determining unit includes a calculating subunit, a screening subunit, a counting subunit and a serving subunit;
the calculating subunit is used for calculating a common score value between the target user and each remaining user according to each score support degree;
the screening subunit is used for sorting the remaining users according to the common score value and screening out a direct neighbor user set with a preset number of users as target users;
the counting subunit is used for counting the direct neighbor user set corresponding to each neighbor user in the direct neighbor user set as the indirect neighbor user set of the target user;
and the sub-unit is used for taking the direct neighbor user set and the indirect neighbor user set of the target user as the neighbor user set of the target user.
Optionally, the screening unit includes a determining subunit, a calculating subunit, and a serving subunit;
the determining subunit is used for determining a commodity set to be recommended according to the target commodity set corresponding to the target user and the neighbor commodity sets corresponding to the users in the neighbor user sets;
the calculation subunit is used for calculating the prediction scores of the commodities in the to-be-recommended commodity set of the target user;
and the commodity serving as a subunit is used for screening out commodities with prediction scores higher than the average score from the to-be-recommended commodity set to serve as recommended commodities.
The description of the features in the embodiment corresponding to fig. 2 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, the elements in the obtained scoring matrix are classified according to the set classification rule, and a plurality of commodity subspaces are constructed; each commodity subspace comprises the grading information of the user to the commodities; taking any one of all users, namely the target user, as an example, other users except the target user in all users included in each commodity subspace can be called as remaining users, and the scoring support degree between the target user and each remaining user in each commodity subspace is calculated; according to the evaluation support degrees, a neighbor user set of the target user can be determined, and neighbor users having the same or similar interest and hobbies with the target user are contained in the neighbor user set. After the neighbor user set of the target user is determined, the recommended commodities can be screened from neighbor commodities corresponding to each user in the neighbor user set according to the scoring rule. In the technical scheme, the neighbor user set of the target user can be quickly determined by calculating the evaluation support degree, and the processing efficiency of commodity recommendation is improved. Considering that the neighboring user sets all contain users with interests and hobbies close to those of the target user, the recommended commodities are selected from the commodities corresponding to the neighboring user sets, so that the recommended commodities can better meet the actual requirements of the users, and the resource recommendation performance is improved.
Fig. 3 is a schematic diagram of a hardware structure of a commodity recommendation device 30 according to an embodiment of the present invention, including:
a memory 31 for storing a computer program;
a processor 32 for executing the computer program to implement the steps of the above-mentioned article recommendation method.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the steps of the above commodity recommendation method.
The above description details a commodity recommendation method, a commodity recommendation device, and a computer-readable storage medium provided by the embodiments of the present invention. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. 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.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

Claims (6)

1. A method for recommending an article, comprising:
classifying each element in the obtained scoring matrix according to a set classification rule to construct a plurality of commodity subspaces; each commodity subspace comprises scoring information of the commodities by the user;
calculating the grading support degree between the target user and each remaining user in each commodity subspace; wherein, each remaining user of each commodity subspace is other users except the target user in all users contained in each commodity subspace;
determining a neighbor user set of the target user according to the evaluation support degrees;
according to a grading rule, screening recommended commodities from the adjacent commodities corresponding to each user in the adjacent user set;
the calculating the scoring support degree between the target user and each remaining user in each commodity subspace comprises the following steps:
according to the following formula, calculating the grading support degree between the target user and each residual user in each commodity subspace,
Figure FDA0003412907000000011
wherein, Sup _ co1(ug,ui) Representing a user u in a first goods subspacegAnd the remaining users uiScore support of (T)g 1Representing user ugA set of scored items in a first item subspace; t isi 1Representing user uiA set of scored items in a first item subspace; t is1Set of scored items representing all users in a first item subspaceCombining; the first commodity subspace is any one of the commodity subspaces;
the determining the neighbor user set of the target user according to each evaluation support degree comprises:
calculating a common score value between the target user and each remaining user according to each rating support degree;
sorting the rest users according to the common score value, and screening out a preset number of users as a direct neighbor user set of the target user;
counting a direct neighbor user set corresponding to each neighbor user in the direct neighbor user set as an indirect neighbor user set of the target user;
taking a direct neighbor user set and an indirect neighbor user set of the target user as neighbor user sets of the target user;
calculating the target user u according to the following formulagAnd the remaining users uiCo-score Pro _ co (u)g,ui),
Figure FDA0003412907000000021
Wherein, Sup _ coINT(ug,ui) Representing a target user ugAnd the remaining users uiScoring support in item of interest subspace, Sup _ coNINT(ug,ui) Representing a target user ugAnd the remaining users uiScoring support in a non-sensory Commodity subspace, Sup _ coUNT(ug,ui) Representing a target user ugAnd the remaining users uiScoring support in a goods subspace of no interest.
2. The method according to claim 1, wherein the screening recommended commodities from the neighboring commodities corresponding to the users in the neighboring user set according to the scoring rule comprises:
determining a commodity set to be recommended according to a target commodity set corresponding to the target user and a neighbor commodity set corresponding to each user in the neighbor user set;
calculating the prediction scores of the target user on the commodities in the to-be-recommended commodity set;
and screening out the commodities with the prediction scores higher than the average score from the to-be-recommended commodity set as recommended commodities.
3. The commodity recommending device is characterized by comprising a classifying unit, a calculating unit, a determining unit and a screening unit;
the classification unit is used for classifying each element in the obtained scoring matrix according to a set classification rule to construct a plurality of commodity subspaces; each commodity subspace comprises scoring information of the commodities by the user;
the computing unit is used for computing the scoring support degree between the target user and each remaining user in each commodity subspace; wherein, each remaining user of each commodity subspace is other users except the target user in all users contained in each commodity subspace;
the determining unit is used for determining a neighbor user set of the target user according to each evaluation support degree;
the screening unit is used for screening recommended commodities from the neighboring commodities corresponding to the users in the neighboring user set according to a grading rule;
the calculating unit is specifically configured to calculate a scoring support degree between the target user and each remaining user in each commodity subspace according to the following formula,
Figure FDA0003412907000000022
wherein, Sup _ co1(ug,ui) Representing a user u in a first goods subspacegAnd the remaining users uiScore support of (T)g 1Representing user ugA set of scored items in a first item subspace; t isi 1Representing user uiA set of scored items in a first item subspace; t is1A set of scored items representing all users in a first item subspace; the first commodity subspace is any one of the commodity subspaces;
the determining unit comprises a calculating subunit, a screening subunit, a counting subunit and a serving subunit;
the calculating subunit is configured to calculate, according to each of the rating support degrees, a common rating value between the target user and each of the remaining users;
the screening subunit is configured to sort the remaining users according to the common score value, and screen out a preset number of users as a direct neighbor user set of the target user;
the counting subunit is configured to count, as an indirect neighbor user set of the target user, a direct neighbor user set corresponding to each neighbor user in the direct neighbor user set;
the acting subunit is configured to use a direct neighbor user set and the indirect neighbor user set of the target user as neighbor user sets of the target user;
calculating the target user u according to the following formulagAnd the remaining users uiCo-score Pro _ co (u)g,ui),
Figure FDA0003412907000000031
Wherein, Sup _ coINT(ug,ui) Representing a target user ugAnd the remaining users uiScoring support in item of interest subspace, Sup _ coNINT(ug,ui) Representing a target user ugAnd the remaining users uiScoring support in a non-sensory Commodity subspace, Sup _ coUNT(ug,ui) Representing a target user ugAnd the remaining users uiScoring support in a goods subspace of no interest.
4. The apparatus of claim 3, wherein the screening unit comprises a determining subunit, a calculating subunit, and a being subunit;
the determining subunit is configured to determine a to-be-recommended commodity set according to a target commodity set corresponding to the target user and a neighboring commodity set corresponding to each user in the neighboring user set;
the calculation subunit is configured to calculate a prediction score of the target user for each commodity in the to-be-recommended commodity set;
and the serving subunit is used for screening out the commodities with the prediction scores higher than the average score from the to-be-recommended commodity set as recommended commodities.
5. An article recommendation device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the item recommendation method according to any one of claims 1 to 2.
6. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for recommending items according to any of claims 1 to 2.
CN201811536326.0A 2018-12-14 2018-12-14 Commodity recommendation method and device and computer-readable storage medium Active CN109636529B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811536326.0A CN109636529B (en) 2018-12-14 2018-12-14 Commodity recommendation method and device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811536326.0A CN109636529B (en) 2018-12-14 2018-12-14 Commodity recommendation method and device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN109636529A CN109636529A (en) 2019-04-16
CN109636529B true CN109636529B (en) 2022-04-12

Family

ID=66074270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811536326.0A Active CN109636529B (en) 2018-12-14 2018-12-14 Commodity recommendation method and device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN109636529B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115359B (en) * 2020-09-16 2023-10-31 苏州大学 Recommendation system and method based on multi-order neighbor prediction
CN112862206B (en) * 2021-03-02 2023-03-24 苏州大学 Recommendation method and system based on subspace division

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944218A (en) * 2010-01-27 2011-01-12 北京大学 Personalized recommended method based on picture under social network and system thereof
CN102609533A (en) * 2012-02-15 2012-07-25 中国科学技术大学 Kernel method-based collaborative filtering recommendation system and method
CN103793476A (en) * 2014-01-08 2014-05-14 西安电子科技大学 Network community based collaborative filtering recommendation method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9256693B2 (en) * 2014-01-08 2016-02-09 Rovi Technologies Corporation Recommendation system with metric transformation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944218A (en) * 2010-01-27 2011-01-12 北京大学 Personalized recommended method based on picture under social network and system thereof
CN102609533A (en) * 2012-02-15 2012-07-25 中国科学技术大学 Kernel method-based collaborative filtering recommendation system and method
CN103793476A (en) * 2014-01-08 2014-05-14 西安电子科技大学 Network community based collaborative filtering recommendation method

Also Published As

Publication number Publication date
CN109636529A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
CN105224699B (en) News recommendation method and device
US10423648B2 (en) Method, system, and computer readable medium for interest tag recommendation
Alshamsi et al. Sentiment analysis in English texts
CN107341268B (en) Hot searching ranking method and system
WO2017101389A1 (en) Information recommendation method and device of mobile terminal
US8903822B2 (en) Apparatus and method for measuring contents similarity based on feedback information of ranked user and computer readable recording medium storing program thereof
CN109409928A (en) A kind of material recommended method, device, storage medium, terminal
CN109241451B (en) Content combination recommendation method and device and readable storage medium
CN110197404B (en) Personalized long-tail commodity recommendation method and system capable of reducing popularity deviation
CN104850537B (en) The method and device screened to content of text
CN106874503B (en) Method and device for acquiring recommended data
Lim et al. Interest classification of Twitter users using Wikipedia
JP2019508756A5 (en)
US20090144226A1 (en) Information processing device and method, and program
CN109902823B (en) Model training method and device based on generation countermeasure network
US10380209B2 (en) Systems and methods of providing recommendations of content items
CN107273391A (en) Document recommends method and apparatus
CN109636529B (en) Commodity recommendation method and device and computer-readable storage medium
CN108132964A (en) A kind of collaborative filtering method to be scored based on user item class
Aliannejadi et al. User model enrichment for venue recommendation
CN104008193A (en) Information recommending method based on typical user group finding technique
CN104572623B (en) A kind of efficient data analysis and summary method of online LDA models
CN106997340B (en) Word stock generation method and device and document classification method and device using word stock
JP5416063B2 (en) Content recommendation device, content recommendation program and recording medium thereof
CN113821727A (en) Item recommendation method, computer 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