CN113221006B - Article recommendation method and device, electronic equipment and computer storage medium - Google Patents

Article recommendation method and device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN113221006B
CN113221006B CN202110562080.XA CN202110562080A CN113221006B CN 113221006 B CN113221006 B CN 113221006B CN 202110562080 A CN202110562080 A CN 202110562080A CN 113221006 B CN113221006 B CN 113221006B
Authority
CN
China
Prior art keywords
articles
occurrence
article
items
calculating
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
CN202110562080.XA
Other languages
Chinese (zh)
Other versions
CN113221006A (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.)
Beijing Sohu New Media Information Technology Co Ltd
Original Assignee
Beijing Sohu New Media Information 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 Beijing Sohu New Media Information Technology Co Ltd filed Critical Beijing Sohu New Media Information Technology Co Ltd
Priority to CN202110562080.XA priority Critical patent/CN113221006B/en
Publication of CN113221006A publication Critical patent/CN113221006A/en
Application granted granted Critical
Publication of CN113221006B publication Critical patent/CN113221006B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses an article recommendation method and device, electronic equipment and a computer storage medium, wherein the method comprises the following steps: counting a set of items interacted by each user, a set of users interacted by each item, a set of item attributes contained by each item and a set of items associated with each item attribute; calculating the quantity of the articles interacted by each two common users of each two articles based on the interaction set, and calculating the quantity of the articles which are associated together by each two common article attributes corresponding to each two articles based on the association set, so as to obtain a plurality of first co-occurrence quantity and second co-occurrence quantity corresponding to each two articles; a common user of two items refers to a user that has interaction with both items; the common article attribute corresponding to the two articles refers to the article attribute contained in both articles; calculating the similarity of the first co-occurrence quantity and the second co-occurrence quantity corresponding to each two articles; and selecting the articles to recommend to the user based on the similarity of every two articles.

Description

Article recommendation method and device, electronic equipment and computer storage medium
Technical Field
The present disclosure relates to the field of article recommendation technologies, and in particular, to an article recommendation method and apparatus, an electronic device, and a computer storage medium.
Background
In order to promote and sell articles such as articles, videos and commodities, and better meet the demands of users, the articles are recommended based on a recommendation algorithm nowadays.
The recommendation mode adopted nowadays is mainly based on collaborative filtering algorithm for recommending articles, and the principle is based on mining historical behavior data of users to find preference of the users and predict articles possibly preferred by the users for recommendation. Specifically, the similarity between the articles is calculated according to the co-occurrence times of the articles, namely, the times of the interaction behaviors such as purchasing, collecting or praying and the like of the articles and the user, and then the articles are recommended according to the similarity between the articles.
But since this approach requires historical data that is dependent on the interaction behavior of the user, it is only possible for co-occurring items to be present. When two articles do not have co-occurrence, the similarity between the articles cannot be calculated, and article recommendation cannot be performed based on the similarity between the articles.
Disclosure of Invention
Based on the shortcomings of the prior art, the application provides an article recommending method and device, electronic equipment and a computer storage medium, so as to solve the problem that similarity cannot be calculated for articles without user co-occurrence interaction.
In order to achieve the above object, the present application provides the following technical solutions:
the first aspect of the application provides an item recommendation method, which comprises the following steps:
counting interaction sets between users and articles and counting association sets between the articles and article attributes; wherein the interaction set comprises a set of items for each user interaction and a set of users for each item interaction; the association set comprises a set of article attributes contained by each article and a set of articles associated with each article attribute;
calculating a plurality of first co-occurrence numbers corresponding to each two of the items based on the interaction set, and calculating a plurality of second co-occurrence numbers corresponding to each two of the items based on the association set; the first co-occurrence number of the plurality of articles corresponding to the two articles is the number of articles interacted by each two common users of the two articles; the second co-occurrence number corresponding to the two articles is the number of articles which are commonly associated with each two common article attributes corresponding to the two articles; a common user of two of the items refers to a user having interaction with both of the items; the common article attribute corresponding to the two articles refers to the article attribute contained in the two articles;
performing similarity calculation by using the first co-occurrence numbers corresponding to each two articles and the second co-occurrence numbers corresponding to each two articles to obtain the similarity of each two articles; wherein the smaller the first co-occurrence number and the second co-occurrence number, the greater the similarity;
and selecting the article to recommend to the user based on the similarity of every two articles.
Optionally, in the above method for recommending items, the calculating, based on the interaction set, a plurality of first co-occurrence numbers corresponding to each two items includes:
respectively solving intersection sets of the user sets interacted by each two articles to obtain a common user set of each two articles;
and calculating the number of the articles in the intersection of the sets of the articles interacted by the common users in each two articles according to each two articles respectively to obtain the first co-occurrence number corresponding to each two articles.
Optionally, in the above method for recommending items, the calculating, based on the association set, a plurality of second co-occurrence numbers corresponding to each two items includes:
respectively solving intersection sets of article attributes contained in every two articles to obtain a set of common article attributes of every two articles;
calculating the inner product of word vectors corresponding to the article sets associated with each two article attributes in the article attribute sets of each two articles to obtain the second co-occurrence number corresponding to each two articles; wherein the number of bits of the word vector is equal to the number of all the articles, and each bit of the word vector is used for indicating whether the set of articles associated with the article attribute contains a corresponding article.
Optionally, in the method for recommending an item, the calculating the similarity by using the first co-occurrence numbers corresponding to each of the two items and the second co-occurrence numbers corresponding to each of the two items to obtain the similarity of each of the two items includes:
respectively aiming at each two articles, calculating a first co-occurrence weight corresponding to each first co-occurrence number corresponding to each two articles and a second co-occurrence weight corresponding to each corresponding second co-occurrence number; wherein, the first co-occurrence weight corresponding to the first co-occurrence number is equal to the reciprocal of the sum of the first co-occurrence number and a preset constant; a second co-occurrence weight corresponding to the second co-occurrence number is equal to the inverse of the sum of the second co-occurrence number and the preset constant;
and calculating the sum of the accumulation results of the first co-occurrence weights and the accumulation results of the second co-occurrence weights to obtain the similarity of every two articles.
Optionally, in the method for recommending items, selecting the item to be recommended to the user based on the similarity of every two items includes:
and respectively taking each article as a target article, and recommending the articles with the top N-bit similarity rows with the target articles to users interacting with the target articles according to the sequence from the top to the bottom.
A second aspect of the present application provides an item recommendation device, comprising:
the statistics unit is used for counting interaction sets between users and articles and counting association sets between the articles and the article attributes; wherein the interaction set comprises a set of items for each user interaction and a set of users for each item interaction; the association set comprises a set of article attributes contained by each article and a set of articles associated with each article attribute;
a first calculating unit, configured to calculate a plurality of first co-occurrence numbers corresponding to each two items based on the interaction set; the first co-occurrence number of the plurality of articles corresponding to the two articles is the number of articles interacted by each two common users of the two articles; a common user of two of the items refers to a user having interaction with both of the items;
a second calculating unit, configured to calculate a plurality of second co-occurrence numbers corresponding to each two articles based on the association set; the second co-occurrence number of the plurality of second co-occurrence numbers corresponding to the two articles is the number of articles which are commonly associated with each two common article attributes corresponding to the two articles; the common article attribute corresponding to the two articles refers to the article attribute contained in the two articles;
the third calculation unit is used for calculating the similarity by using the first co-occurrence quantity corresponding to each two articles and the second co-occurrence quantity corresponding to each two articles to obtain the similarity of each two articles; wherein the smaller the first co-occurrence number and the second co-occurrence number, the greater the similarity;
and the recommending unit is used for selecting the articles to recommend to the user based on the similarity of every two articles.
Optionally, in the article recommendation device, the first calculating unit includes:
the first determining unit is used for respectively solving intersection sets of the user sets interacted by each two articles to obtain a common user set of each two articles;
the first calculating subunit is configured to calculate, for each two articles, the number of articles in an intersection of the sets of articles interacted by each two shared users in the sets of shared users of each two articles, so as to obtain each first co-occurrence number corresponding to each two articles.
Optionally, in the article recommendation device, the second calculating unit includes:
the second determining unit is used for respectively solving intersection sets of article attributes contained in each two articles to obtain a set of common article attributes of each two articles;
the second calculating subunit is used for calculating the inner product of the word vector corresponding to the article set associated with each two article attributes in the common article attribute set of each two articles to obtain each second co-occurrence number corresponding to each two articles; wherein the number of bits of the word vector is equal to the number of all the articles, and each bit of the word vector is used for indicating whether the set of articles associated with the article attribute contains a corresponding article.
Optionally, in the article recommendation device described above, the third calculation unit includes:
a third computing subunit, configured to calculate, for each two articles, a first co-occurrence weight corresponding to each first co-occurrence number corresponding to each two articles and a second co-occurrence weight corresponding to each corresponding second co-occurrence number, and calculate a sum of an accumulation result of each first co-occurrence weight and an accumulation result of each second co-occurrence weight, so as to obtain a similarity of each two articles; wherein, the first co-occurrence weight corresponding to the first co-occurrence number is equal to the reciprocal of the sum of the first co-occurrence number and a preset constant; and a second co-occurrence weight corresponding to the second co-occurrence number is equal to the reciprocal of the sum of the second co-occurrence number and the preset constant.
Optionally, in the above apparatus, the recommending unit includes:
and the recommending subunit is used for respectively taking each article as a target article and recommending the articles with the top N-bit similarity ranks with the target articles to users interacting with the target articles according to the sequence from the top to the bottom.
A third aspect of the present application provides an electronic device, comprising:
a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, where the program is executed, and specifically configured to implement the method for recommending an item according to any one of the foregoing.
A fourth aspect of the present application provides a computer storage medium storing a computer program for implementing the item recommendation method according to any one of the preceding claims when executed.
According to the item recommending method, the interaction set between the user and the item and the association set between the item and the item attribute are counted. Wherein the interaction set includes a set of items for each user interaction and a set of users for each item interaction. The association set includes a set of item attributes that each item contains, and a set of items that each item attribute is associated with. And then based on the interaction set, calculating the quantity of the articles interacted by each two common users of each two articles to obtain a plurality of first co-occurrence quantities corresponding to each two articles, and based on the association set, calculating the quantity of the articles commonly associated with each two common article attributes corresponding to each two articles to obtain a plurality of second co-occurrence quantities corresponding to each two articles. Wherein a common user of two items refers to a user that has interaction with both items. The common article attribute corresponding to two articles refers to the article attribute contained in both articles. And finally, calculating the similarity by using the first co-occurrence number and the second co-occurrence number corresponding to each two articles to obtain the similarity of each two articles, so that the similarity is calculated by the co-occurrence times of the articles on the behavior of the user and the co-occurrence times of the articles on the properties of the articles, and the articles have corresponding properties of the articles and can well reflect the similarity among the articles, so that the similarity among the articles can be accurately calculated even if the articles do not have the co-occurrence time on the behavior of the user, and the articles can be recommended to the user based on the similarity of each two articles.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flowchart of an item recommendation method according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for calculating a first co-occurrence number according to another embodiment of the present application;
FIG. 3 is a flow chart of a method for calculating a second co-occurrence number according to another embodiment of the present application;
fig. 4 is a schematic structural diagram of an article recommendation device according to another embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a first computing unit according to another embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a second computing unit according to another embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In this application, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides an article recommending method, as shown in fig. 1, comprising the following steps:
s101, counting interaction sets between users and articles and counting association sets between the articles and the article attributes.
Wherein an item may refer to a commodity, or a video, article, or the like. The interaction between the user and the article refers to the interaction behavior generated by the user for the article, for example, the interaction behavior may refer to purchasing behavior, and of course, the interaction behavior may also refer to other behaviors such as collection or comments, and the interaction behavior may be specifically defined according to requirements.
The item attribute refers to an attribute included in an item, and for example, an item attribute such as a title, a category, a label, a keyword, and the like exists in the item. The categories may include electronic products, food, clothing, etc.; the label may include casual pants, male version, etc.; keywords may include payouts, new products, etc. The association between an item and an item attribute means that the item contains the item attribute or has the item under the item attribute.
Specifically, the interaction set between the user and the article and the association set between the article and the article attribute can be counted in a preset time period. Wherein the interaction set comprises a set of items for each user interaction and a set of users for each item interaction, i.e. the interaction set comprises a plurality of sets. Specifically, for each user, the items interacted by the user can be counted to obtain a set of the items interacted by the user, for example, a set of commodities purchased by the user in a preset time period is counted. Also, for each item, the users of the item interaction may be counted to obtain a set of users of the item interaction, e.g., for one item, the statistics may obtain a set of users who purchased the item within a preset period of time.
The association set includes a set of item attributes that each item contains, and a set of items that each item attribute is associated with. Likewise, for each item, the set of item attributes contained therein is counted, and for each item attribute, the set of items associated therewith is counted, e.g., for one item, all item attributes contained in the item are counted, resulting in the set of item attributes contained in the item, and for one item attribute, all items under the item attribute are counted, resulting in the set of items associated with the item attribute.
S102, calculating a plurality of first co-occurrence numbers corresponding to every two articles based on the interaction set, and calculating a plurality of second co-occurrence numbers corresponding to every two articles based on the association set; the first co-occurrence number of the plurality of corresponding two articles is the number of articles which are interacted by each two common users of the two articles; the second co-occurrence number corresponding to the two items is the number of items that are commonly associated with each two common item attributes corresponding to the two items.
A common user for two items refers to a user that has interaction with both items, and a common user refers to a user that has interaction with both items. For example, for commodity a and commodity B, a common user of both commodities may refer to a user who purchased commodity a, and who purchased commodity B. The common article attribute corresponding to the two articles refers to the article attribute contained in the two articles, for example, for the article a and the article B, both the articles include the article attribute of men's clothing, that is, both the articles belong to men's clothing, and the "men's clothing" is the common article attribute of the article a and the article B.
Specifically, for two items, all common users for the two items may be determined based on the set of users that interacted with by the two items in the interaction set. Then, for any two users in all the shared users of the two articles, based on the set of the articles interacted by the two users in the interaction set, the number of the articles interacted by the two users can be determined, and a first co-occurrence number corresponding to the two articles is obtained, namely, the number of the articles interacted by the two shared users of the two articles is equal to the first co-occurrence number corresponding to the two articles. The number of the first co-occurrence number corresponding to the two articles is calculated and is equal to the number of the pairwise permutation and combination of all the shared users of the two articles. It should be noted that an item with which two users interact together refers to an item with which two users interact respectively.
Similarly, for two items, based on the set of item attributes contained by the two items in the association set, all common item attributes for the two items may be determined. And then, determining the quantity of the articles commonly associated with the two article attributes based on the set of the articles associated with the two article attributes in the set aiming at the two article attributes of all the common articles of the two articles, and obtaining a second co-occurrence quantity corresponding to the two articles, namely, the quantity of the articles commonly associated with the two article attributes of the two articles is equal to the second co-occurrence quantity corresponding to the two articles. The number of the second co-occurrence number corresponding to the two articles is calculated and is equal to the number of the two-pair permutation and combination of all the common article attributes of the two articles.
Optionally, in another embodiment of the present application, based on the interaction set, in step S102, the number of items interacted with by each two common users of each two items is calculated, so as to obtain a plurality of first co-occurrence numbers corresponding to each two items, as shown in fig. 2, including:
s201, respectively solving intersection sets of the user sets interacted with each two articles to obtain a common user set of each two articles.
Specifically, for each two articles, calculating the intersection of the sets of users interacted by the two articles, wherein the intersection is the set of the common users of the two articles.
S202, respectively aiming at each two articles, calculating the number of the articles in the intersection of the sets of the articles interacted by each two shared users in the sets of the articles, and obtaining the corresponding first co-occurrence number of each two articles.
Optionally, in another embodiment of the present application, based on the association set in step S102, the number of articles that are associated with each other in common between each two common article attributes corresponding to each two articles is calculated, so as to obtain a plurality of second co-occurrence numbers corresponding to each two articles, as shown in fig. 3, including:
s301, respectively solving intersection sets of article attributes contained in every two articles to obtain a set of article attributes common to every two articles.
S302, respectively aiming at each two articles, calculating the inner product of word vectors corresponding to the article sets associated with each two article attributes in the common article attribute sets of each two articles, and obtaining the second co-occurrence number corresponding to each two articles.
Alternatively, the respective second co-occurrence numbers for each two items may be calculated based on the bag-of-words model.
Wherein the number of bits of the word vector is equal to the number of all the articles, and each bit of the word vector is used for indicating whether the set of the articles associated with the article attribute contains the corresponding article.
Specifically, the word vector may be a binary vector, where the number of bits is equal to the number of all items, and each bit is used to indicate whether the set of items associated with the item attribute includes a corresponding item. Specifically, the term vector may be represented by 0 and 1, and if a certain bit in the term vector is 1, it indicates that the set of items associated with the item attribute includes the item corresponding to the certain bit.
Specifically, a word vector corresponding to the set of the items associated with each item attribute is constructed. Then, when the number of the articles with the two article attributes being commonly associated is calculated, the inner product of the word vectors corresponding to the set of the articles with the two article attributes is calculated, so that the number of the articles with the two article attributes being commonly associated can be directly obtained, and the second co-occurrence number is obtained. For example, there are 7 kinds of articles in total, one article attribute has a set of articles corresponding to a word vector (1,1,1,1,1,0,0), the other article attribute has a set of articles corresponding to a word vector (0,1,1,1,0,1,1), and the number of articles commonly associated with two article attributes is equal to the inner product of the two word vectors, that is, equal to 1+1+1=3.
And S103, calculating the similarity by using the corresponding first co-occurrence number and the corresponding second co-occurrence number of each two articles to obtain the similarity of each two articles.
Wherein the smaller the first co-occurrence number and the second co-occurrence number, the greater the similarity.
Taking the commodity as an example, if both the user 1 and the user 2 purchase the items i and j, the items i and j are co-present, which means that the two items may have a strong association relationship, so that the user who purchases the item i may purchase the item j. Meanwhile, the more articles are purchased together by the user 1 and the user 2, the more accidental that the two articles are purchased together by the two users, so that the more articles are purchased together, the association relationship between the articles i and j is correspondingly weakened. Similarly, the same is true for the two article management article attributes, and the description thereof is omitted. Thus, the similarity of two items may be calculated based on the respective first co-occurrence numbers and the respective second co-occurrence numbers corresponding to the two items. And, the smaller the respective first co-occurrence numbers and the respective second co-occurrence numbers, the greater the calculated similarity.
Optionally, in another embodiment of the present application, step S103 specifically includes:
and calculating the first co-occurrence weight corresponding to each first co-occurrence number and the second co-occurrence weight corresponding to each second co-occurrence number corresponding to each two articles, and calculating the sum of the accumulation result of each first co-occurrence weight and the accumulation result of each second co-occurrence weight to obtain the similarity of each two articles.
The first co-occurrence weight corresponding to the first co-occurrence number is equal to the reciprocal of the sum of the first co-occurrence number and a preset constant. The second co-occurrence weight corresponding to the second co-occurrence number is equal to the inverse of the sum of the second co-occurrence number and the preset constant. Therefore, in the embodiment of the present application, specifically calculating the similarity between two items may be expressed as:
where i and j represent item i and item j, respectively. u and v represent user u and item user v, respectively. m, n denote item attribute m and item attribute n, respectively.U i A set of users representing item i interactions;U j representing a collection of users with whom item j interacted.I u A collection of items representing user u interactions;I v representing a collection of items interacted with by user v.Representing a first co-occurrence number.
F i A set of item attributes representing items i contain;F j representing a set of item attributes contained by item j.I m A set of items representing item attribute associations m;I n representing a collection of items for which an item attribute is associated with n.Representing a second co-occurrence number. Alpha is a super parameter, which is a preset constant which is considered to be predefined and is mainly used for ensuring that the denominator is not zero. For example, 1 may be set.
S104, selecting the articles to recommend to the user based on the similarity of every two articles.
Optionally, a specific embodiment of step S102 includes: and respectively taking each article as a target article, and recommending the articles with the top N similarity rows with the target articles to the user interacting with the target articles according to the sequence from the top to the bottom.
According to the item recommending method, the interaction set between the user and the item and the association set between the item and the item attribute are counted. Wherein the interaction set includes a set of items for each user interaction and a set of users for each item interaction. The association set includes a set of item attributes that each item contains, and a set of items that each item attribute is associated with. And then based on the interaction set, calculating the quantity of the articles interacted by each two common users of each two articles to obtain a plurality of first co-occurrence quantities corresponding to each two articles, and based on the association set, calculating the quantity of the articles commonly associated with each two common article attributes corresponding to each two articles to obtain a plurality of second co-occurrence quantities corresponding to each two articles. Wherein a common user of two items refers to a user that has interaction with both items. The common article attribute corresponding to two articles refers to the article attribute contained in both articles. And finally, calculating the similarity by using the corresponding first co-occurrence number and the corresponding second co-occurrence number of each two articles to obtain the similarity of each two articles, so that the similarity is calculated by the co-occurrence times of the articles on the behavior of the user and the co-occurrence times of the articles on the properties of the articles, and the similarity among the articles can be well reflected because the properties of the articles are necessarily present, so that the similarity among the articles can be accurately calculated even when the articles do not have the co-occurrence time on the behavior of the user, and the articles can be recommended to the user based on the similarity of each two articles.
Another embodiment of the present application provides an article recommendation device, as shown in fig. 4, specifically including the following units:
a statistics unit 401 is configured to count a set of interactions between a user and an item, and a set of associations between an item and an attribute of the item.
Wherein the interaction set comprises a set of items for each user interaction and a set of users for each item interaction; the association set includes a set of item attributes that each item contains, and a set of items that each item attribute is associated with.
A first calculating unit 402, configured to calculate a plurality of first co-occurrence numbers corresponding to each two items based on the interaction set.
The first co-occurrence number corresponding to the two articles is the number of articles which are interacted by each two common users of the two articles. A common user of two of the items refers to a user having interaction with both of the items;
a second calculating unit 403, configured to calculate a plurality of second co-occurrence numbers corresponding to each two items based on the association set.
The second co-occurrence number corresponding to the two articles is the number of articles which are commonly associated with each two common article attributes corresponding to the two articles. The common article attribute corresponding to the two articles refers to the article attribute contained in both the two articles.
The third calculating unit 404 is configured to perform similarity calculation by using the corresponding first co-occurrence numbers and the corresponding second co-occurrence numbers of each two articles, so as to obtain the similarity of each two articles.
Wherein, the smaller the first co-occurrence number and the second co-occurrence number, the greater the similarity.
And the recommending unit 405 is used for selecting the item to recommend to the user based on the similarity of every two items.
Optionally, in another embodiment of the present application, in an article recommendation device, as shown in fig. 5, a first calculating unit includes:
the first determining unit 501 is configured to respectively intersect the sets of users interacted with each other by each two items, so as to obtain a set of users shared by each two items.
The first calculating subunit 502 is configured to calculate, for each two items, a number of items in an intersection of the sets of items interacted by each two shared users in the sets of shared users of each two items, so as to obtain each first co-occurrence number corresponding to each two items.
Optionally, in an article recommending apparatus provided in another embodiment of the present application, as shown in fig. 6, a second calculating unit includes:
the second determining unit 601 is configured to obtain a set of common object attributes of each two objects by respectively obtaining intersections of the sets of object attributes contained in each two objects.
The second calculating subunit 602 is configured to calculate, for each two articles, an inner product of word vectors corresponding to the set of articles associated with each two article attributes in the set of common article attributes of each two articles, so as to obtain each second co-occurrence number corresponding to each two articles.
Wherein the number of bits of the word vector is equal to the number of all the articles, and each bit is used for indicating whether the set of the articles associated with the article attribute contains the corresponding article.
Optionally, in an article recommendation device provided in another embodiment of the present application, a third computing unit includes:
the third calculation subunit is configured to calculate, for each two articles, a first co-occurrence weight corresponding to each first co-occurrence number corresponding to each two articles and a second co-occurrence weight corresponding to each corresponding second co-occurrence number, and calculate a sum of an accumulation result of each first co-occurrence weight and an accumulation result of each second co-occurrence weight, so as to obtain a similarity of each two articles.
Wherein, the first co-occurrence weight corresponding to the first co-occurrence number is equal to the reciprocal of the sum of the first co-occurrence number and a preset constant; the second co-occurrence weight corresponding to the second co-occurrence number is equal to the inverse of the sum of the second co-occurrence number and the preset constant.
Optionally, in an article recommending apparatus provided in another embodiment of the present application, a recommending unit includes:
and the recommending subunit is used for respectively taking each article as a target article and recommending the articles with the top N-bit similarity ranks with the target articles to users interacting with the target articles according to the sequence from the top to the bottom.
It should be noted that, for the specific working process of each unit provided in the above embodiment of the present application, reference may be made to corresponding steps in the above method embodiment accordingly, which is not described herein again.
Another embodiment of the present application provides an electronic device, as shown in fig. 7, including:
a memory 701 and a processor 702.
The memory 701 is used for storing a program, and the processor 702 is used for executing the program stored in the memory 701. When the program is executed, the program is specifically configured to implement the item recommendation method provided in any one of the above embodiments.
Another embodiment of the present application provides a computer storage medium storing a computer program for implementing the item recommendation method provided in any one of the above embodiments when the computer program is executed.
Computer storage media, including both non-transitory and non-transitory, removable and non-removable media, may be implemented in any method or technology for storage of information. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
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 elements and steps are described above generally in terms of functionality in order to clearly illustrate the 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 solution. 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 application.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. An item recommendation method, comprising:
counting interaction sets between users and articles and counting association sets between the articles and article attributes; wherein the interaction set comprises a set of items for each user interaction and a set of users for each item interaction; the association set comprises a set of article attributes contained by each article and a set of articles associated with each article attribute;
calculating a plurality of first co-occurrence numbers corresponding to each two of the items based on the interaction set, and calculating a plurality of second co-occurrence numbers corresponding to each two of the items based on the association set; the first co-occurrence number of the plurality of articles corresponding to the two articles is the number of articles interacted by each two common users of the two articles; the second co-occurrence number corresponding to the two articles is the number of articles which are commonly associated with each two common article attributes corresponding to the two articles; a common user of two of the items refers to a user having interaction with both of the items; the common article attribute corresponding to the two articles refers to the article attribute contained in the two articles;
and calculating the similarity by using the first co-occurrence number corresponding to each two articles and the second co-occurrence number corresponding to each two articles to obtain the similarity of each two articles, wherein the method comprises the following steps: respectively aiming at each two articles, calculating a first co-occurrence weight corresponding to each first co-occurrence number corresponding to each two articles and a second co-occurrence weight corresponding to each corresponding second co-occurrence number; the first co-occurrence weight corresponding to the first co-occurrence number is equal to the reciprocal of the sum of the first co-occurrence number and a preset constant; a second co-occurrence weight corresponding to the second co-occurrence number is equal to the inverse of the sum of the second co-occurrence number and the preset constant; calculating the sum of the accumulation results of the first co-occurrence weights and the second co-occurrence weights to obtain the similarity of every two articles; wherein the smaller the first co-occurrence number and the second co-occurrence number, the greater the similarity;
and selecting the article to recommend to the user based on the similarity of every two articles.
2. The method of claim 1, wherein the calculating a plurality of first co-occurrence numbers for each two of the items based on the interaction set comprises:
respectively solving intersection sets of the user sets interacted by each two articles to obtain a common user set of each two articles;
and calculating the number of the articles in the intersection of the sets of the articles interacted by the common users in each two articles according to each two articles respectively to obtain the first co-occurrence number corresponding to each two articles.
3. The method of claim 1, wherein calculating a plurality of second co-occurrence numbers for each two of the items based on the association set comprises:
respectively solving intersection sets of article attributes contained in every two articles to obtain a set of common article attributes of every two articles;
calculating the inner product of word vectors corresponding to the article sets associated with each two article attributes in the article attribute sets of each two articles to obtain the second co-occurrence number corresponding to each two articles; wherein the number of bits of the word vector is equal to the number of all the articles, and each bit of the word vector is used for indicating whether the set of articles associated with the article attribute contains a corresponding article.
4. The method of claim 1, wherein selecting the item recommendation to the user based on the similarity of each two items comprises:
and respectively taking each article as a target article, and recommending the articles with the top N-bit similarity rows with the target articles to users interacting with the target articles according to the sequence from the top to the bottom.
5. An article recommendation device, comprising:
the statistics unit is used for counting interaction sets between users and articles and counting association sets between the articles and the article attributes; wherein the interaction set comprises a set of items for each user interaction and a set of users for each item interaction; the association set comprises a set of article attributes contained by each article and a set of articles associated with each article attribute;
a first calculating unit, configured to calculate a plurality of first co-occurrence numbers corresponding to each two items based on the interaction set; the first co-occurrence number of the plurality of articles corresponding to the two articles is the number of articles interacted by each two common users of the two articles; a common user of two of the items refers to a user having interaction with both of the items;
a second calculating unit, configured to calculate a plurality of second co-occurrence numbers corresponding to each two articles based on the association set; the second co-occurrence number of the plurality of second co-occurrence numbers corresponding to the two articles is the number of articles which are commonly associated with each two common article attributes corresponding to the two articles; the common article attribute corresponding to the two articles refers to the article attribute contained in the two articles;
the third calculation unit is used for calculating the similarity by using the first co-occurrence quantity corresponding to each two articles and the second co-occurrence quantity corresponding to each two articles to obtain the similarity of each two articles; wherein the smaller the first co-occurrence number and the second co-occurrence number, the greater the similarity;
the third computing unit includes: a third calculation subunit;
the third computing subunit is configured to calculate, for each two articles, a first co-occurrence weight corresponding to each first co-occurrence number corresponding to each two articles and a second co-occurrence weight corresponding to each corresponding second co-occurrence number, and calculate a sum of an accumulation result of each first co-occurrence weight and an accumulation result of each second co-occurrence weight, so as to obtain similarity of each two articles; wherein, the first co-occurrence weight corresponding to the first co-occurrence number is equal to the reciprocal of the sum of the first co-occurrence number and a preset constant; a second co-occurrence weight corresponding to the second co-occurrence number is equal to the inverse of the sum of the second co-occurrence number and the preset constant;
and the recommending unit is used for selecting the articles to recommend to the user based on the similarity of every two articles.
6. The apparatus of claim 5, wherein the first computing unit comprises:
the first determining unit is used for respectively solving intersection sets of the user sets interacted by each two articles to obtain a common user set of each two articles;
the first calculating subunit is configured to calculate, for each two articles, the number of articles in an intersection of the sets of articles interacted by each two shared users in the sets of shared users of each two articles, so as to obtain each first co-occurrence number corresponding to each two articles.
7. The apparatus of claim 5, wherein the second computing unit comprises:
the second determining unit is used for respectively solving intersection sets of article attributes contained in each two articles to obtain a set of common article attributes of each two articles;
the second calculating subunit is used for calculating the inner product of the word vector corresponding to the article set associated with each two article attributes in the common article attribute set of each two articles to obtain each second co-occurrence number corresponding to each two articles; wherein the number of bits of the word vector is equal to the number of all the articles, and each bit of the word vector is used for indicating whether the set of articles associated with the article attribute contains a corresponding article.
8. An electronic device, comprising:
a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, which when executed is specifically configured to implement the item recommendation method according to any one of claims 1 to 4.
9. A computer storage medium storing a computer program which, when executed, is adapted to carry out the item recommendation method of any one of claims 1 to 4.
CN202110562080.XA 2021-05-24 2021-05-24 Article recommendation method and device, electronic equipment and computer storage medium Active CN113221006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110562080.XA CN113221006B (en) 2021-05-24 2021-05-24 Article recommendation method and device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110562080.XA CN113221006B (en) 2021-05-24 2021-05-24 Article recommendation method and device, electronic equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN113221006A CN113221006A (en) 2021-08-06
CN113221006B true CN113221006B (en) 2023-12-19

Family

ID=77097958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110562080.XA Active CN113221006B (en) 2021-05-24 2021-05-24 Article recommendation method and device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN113221006B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341204A (en) * 2017-06-22 2017-11-10 电子科技大学 A kind of collaborative filtering recommending method and system for merging article label information
US9959563B1 (en) * 2013-12-19 2018-05-01 Amazon Technologies, Inc. Recommendation generation for infrequently accessed items
CN108596712A (en) * 2018-03-29 2018-09-28 深圳大学 Single class collaborative filtering method, storage medium and server based on article sequence
CN109544396A (en) * 2019-01-10 2019-03-29 腾讯科技(深圳)有限公司 Account recommended method, device, server, terminal and storage medium
CN111737558A (en) * 2020-05-21 2020-10-02 苏宁金融科技(南京)有限公司 Information recommendation method and device and computer readable storage medium
CN112750011A (en) * 2021-01-13 2021-05-04 叮当快药科技集团有限公司 Commodity recommendation method and device and electronic equipment
CN112801803A (en) * 2021-02-07 2021-05-14 中国工商银行股份有限公司 Financial product recommendation method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9959563B1 (en) * 2013-12-19 2018-05-01 Amazon Technologies, Inc. Recommendation generation for infrequently accessed items
CN107341204A (en) * 2017-06-22 2017-11-10 电子科技大学 A kind of collaborative filtering recommending method and system for merging article label information
CN108596712A (en) * 2018-03-29 2018-09-28 深圳大学 Single class collaborative filtering method, storage medium and server based on article sequence
CN109544396A (en) * 2019-01-10 2019-03-29 腾讯科技(深圳)有限公司 Account recommended method, device, server, terminal and storage medium
CN111737558A (en) * 2020-05-21 2020-10-02 苏宁金融科技(南京)有限公司 Information recommendation method and device and computer readable storage medium
CN112750011A (en) * 2021-01-13 2021-05-04 叮当快药科技集团有限公司 Commodity recommendation method and device and electronic equipment
CN112801803A (en) * 2021-02-07 2021-05-14 中国工商银行股份有限公司 Financial product recommendation method and device

Also Published As

Publication number Publication date
CN113221006A (en) 2021-08-06

Similar Documents

Publication Publication Date Title
Chinnamgari R Machine Learning Projects: Implement supervised, unsupervised, and reinforcement learning techniques using R 3.5
US20180357703A1 (en) Recommendations Based Upon Explicit User Similarity
CN102446330B (en) Content recommendation system and method
CN108829808A (en) A kind of page personalized ordering method, apparatus and electronic equipment
Kazemi et al. Development of a fuzzy economic order quantity model for imperfect quality items using the learning effect on fuzzy parameters
US20120078681A1 (en) Multi-hierarchical customer and product profiling for enhanced retail offerings
CN111695023A (en) Information recommendation method and device, storage medium and equipment
US20180262417A1 (en) Method and apparatus for associating network item and calculating association information
CN109934684A (en) A kind of Method of Commodity Recommendation, device, terminal and storage medium
CN108550046A (en) A kind of resource and market recommendation method, apparatus and electronic equipment
CN103646341A (en) A method and an apparatus for recommending website-provided objects
CN106980629A (en) A kind of network resource recommended method and computer equipment
US20190205769A1 (en) Data Processing Method, Apparatus, Device and Computer Readable Storage Media
JP6199958B2 (en) User recommended methods and equipment
CN110309410A (en) A kind of information recommended method, platform and computer readable storage medium
Kizielewicz et al. Can mcda methods be useful in e-commerce systems? comparative study case
CN113221006B (en) Article recommendation method and device, electronic equipment and computer storage medium
Zhang et al. The approaches to contextual transaction trust computation in e‐Commerce environments
CN106952111A (en) Personalized recommendation method and device
CN111708945A (en) Product recommendation method and device, electronic equipment and computer storage medium
CN112445909A (en) Commodity retrieval method and device
CN114677176A (en) Method and device for recommending interest content, electronic equipment and storage medium
CN113378071A (en) Advertisement recommendation method and device, electronic equipment and storage medium
CN111143546A (en) Method and device for obtaining recommendation language and electronic equipment
US11392851B2 (en) Social network navigation based on content relationships

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