Mapping content to interests for items provided via a network resource
Techniques described herein relate to mapping content to interests for items provided via a network document. In an example, a computer system includes, in code of a first network document that presents media content, a link to a second network document that presents information about an interest. The first link is included in the code based on an association between the media content and the interest. The computer system sends, to a user device, the code causing the user device to present the first network document and the first link. The computer system receives, from the user device, a request for the second network document and sends, to the user device, code of the second network document including a second link to a third network document that presents information about an item. The second link is included in the code based on an association between the item and the interest.
1 . A system comprising:
one or more processors; and
one or more memory storing instructions that, upon execution by the one or more processors, configure the system to:
receive an image and metadata associated with the image, the image showing a plurality of items available from a website, the metadata including item identifiers each corresponding to one of the plurality of items;
determine, based at least in part on a first query to a first database that stores first associations between items and interests, a first association between a first item of the plurality of items and a first interest, the first query using a first item identifier from the metadata;
determine, based at least in part on a second query to a second database that stores interest and item category relevancy scores, a first relevancy score associated with the first interest and a first item category to which the first item belongs;
generate a second association between the image and the first interest based at least in part on the first association and the first relevancy score;
store the second association in a third database;
receive, from a user device, a first request to present a first webpage that shows the image, the first webpage being part of the website;
send, to the user device, first code for the first webpage, the first code generated based at least in part on the second association stored in the third database and including a first link to a second webpage that presents first information about the first interest, the first link presentable as a selectable graphical user interface (GUI) element over a portion of the image, the second webpage being part of the website;
receive, from the user device, a second request to present the second webpage, the second request received based at least in part on a selection of the selectable GUI element; and
send, to the user device, second code for the second webpage, the second code generated based at least in part on the first association stored in the first database and including a second link to a third webpage that presents second information about the first item, the third webpage being part of the website.
2 . The system of claim 1 , wherein the one or more memory store further instructions that, upon execution by the one or more processors, configure the system to:
determine, for each one of the plurality of items and based at least in part on the first database, a corresponding interest to generate a set of candidate interests;
determine, for each candidate interest and based at least in part on the second database, a corresponding relevancy score;
generate a ranking of the candidate interests based at least in part on relevancy scores; and
select the first interest based at least in part on the ranking, wherein the second association is generated based at least in part on the first interest being selected.
3 . The system of claim 2 , wherein the one or more memory store additional instructions that, upon execution by the one or more processors, configure the system to:
generate a normalized score for the first interest based on relevancy scores associated with the first interest, a number of items identified in the metadata and associated with the first interest, and a total number of items identified in the metadata, wherein the ranking is based at least in part on the normalized score.
4 . The system of claim 1 , wherein the one or more memory store further instructions that, upon execution by the one or more processors, configure the system to:
determine that the first item is of a particular item type;
determine that the particular item type can be associated with only a particular interest type;
determine that the first interest is of the particular interest type; and
remove a second interest associated with the first item and being of a different interest type.
5 . A computer-implemented method comprising:
including, in first code of a first network document, a first link to a second network document, the first network document presenting first media content and being part of a network resource that includes a plurality of network documents, the second network document presenting first information about a first interest and being part of the network resource, the first link included in the first code based at least in part on an automated process indicating a first association between the first media content and the first interest;
sending, to a user device, the first code causing the user device to present the first network document and a selectable option corresponding to the first link;
receiving, from the user device, a request for the second network document based at least in part on a selection of the selectable option; and
sending, to the user device, second code of the second network document, the second code including a second link to a third network document, the third network document presenting second information about a first item and being part of the network resource, the second link included in the second code based at least in part on a second association between the first item and the first interest, wherein the automated process includes determining the first association between the first media content and the first interest based at least in part on (i) the second association between the first item and the first interest and (ii) a first relevancy score associated with the first interest and a first item category to which the first item belongs.
6 . The computer-implemented method of claim 5 further comprising:
determining a user account associated with the user device;
determining a number of times the first interest has been linked to media content presentations associated with the user account; and
generating a third association between the first interest and the user account based at least in part on the number of times.
7 . The computer-implemented method of claim 6 further comprising:
receiving, from the user device, a request for information about a second item;
determining the first interest at least in part on the third association;
determining a third item that is associated with the first interest; and
sending, to the user device, third code of a fourth network document in response to the request for information, the fourth network document presenting third information about the second item and a recommendation about the third item and being part of the network resource.
8 . The computer-implemented method of claim 5 further comprising:
receiving, from the user device, a request for information about a second item;
determining that the second item is associated with the first interest;
determining a plurality of media contents associated with the first interest; and
sending, to the user device, third code of a fourth network document in response to the request for information, the fourth network document presenting third information about the second item and at least one of the plurality of media contents and being part of the network resource.
9 . The computer-implemented method of claim 5 further comprising prior to including the first link in the first code:
receiving the first media content and metadata associated with the first media content, the metadata identifying the first item and a second item as being associated with the first media content;
determining, based at least in part on a first query to a first database that stores associations between items and interests, the second association between the first item and the first interest, the first query using a first item identifier from the metadata;
determining, based at least in part on a second query to a second database that stores interest and item category relevancy scores, the first relevancy score;
generating the first association between the first media content and the first interest based at least in part on the second association and the first relevancy score; and
storing the second association in a third database.
10 . The computer-implemented method of claim 9 further comprising prior to including the first link in the first code:
determining that the first item is unassociated with a particular item type; and
including the first item identifier and the first relevancy score in a set of items and relevancy scores associated with the first interest.
11 . The computer-implemented method of claim 10 further comprising prior to including the first link in the first code:
determining that no interest has been determined based at least in part on the second item;
determining, based at least in part on a third query to the first database, a third association between the second item and the first interest, the third query using a second item identifier from the metadata;
determining, based at least in part on a fourth query to the second database, a second relevancy score associated with the first interest and a second item category to which the second item belongs; and
including the second item identifier and the second relevancy score in the set of items and relevancy scores associated with the first interest.
12 . The computer-implemented method of claim 11 , further comprising prior to including the first link in the first code:
generating a first normalized score for the first interest based at least in part on the first relevancy score, the second relevancy score, and a total number of items identified in the metadata;
generating, based at least in part on the first normalized score of the first interest and a second normalized score of a second interest, a ranking of the first interest and the second interest, wherein the second interest is associated with at least one of a plurality of items identified in the metadata; and
selecting the first interest over the second interest based at least in part on the ranking, wherein the first association is generated based at least in part on the first interest being selected.
13 . One or more non-transitory computer-readable storage media storing instructions that, upon execution on a system, cause the system to perform operations comprising:
including, in first code of a first network document, a first link to a second network document, the first network document presenting first media content and being part of a network resource that includes a plurality of network documents, the second network document presenting first information about a first interest and being part of the network resource, the first link included in the first code based at least in part on an automated process indicating a first association between the first media content and the first interest;
sending, to a user device, the first code causing the user device to present the first network document and a selectable option corresponding to the first link;
receiving, from the user device, a request for the second network document based at least in part on a selection of the selectable option; and
sending, to the user device, second code of the second network document, the second code including a second link to a third network document, the third network document presenting second information about a first item and being part of the network resource, the second link included in the second code based at least in part on a second association between the first item and the first interest, wherein the automated process includes determining the first association between the first media content and the first interest based at least in part on (i) the second association between the first item and the first interest and (ii) a first relevancy score associated with the first interest and a first item category to which the first item belongs.
14 . The one or more non-transitory computer-readable storage media of claim 13 , wherein the operations further comprise:
receiving the first media content, wherein the first media content indicates the first item and a second item;
determining, based at least in part on a first query to a first database that stores associations between items and interests, the second association between the first item and the first interest;
determining, based at least in part on a second query to a second database that stores interest and item category relevancy scores, the first relevancy score;
generating the first association between the first media content and the first interest based at least in part on the second association and the first relevancy score; and
storing the first association in a third database.
15 . The one or more non-transitory computer-readable storage media of claim 14 , wherein the operations further comprise:
receiving metadata associated with the first media content, the metadata including keywords describing the first media content, wherein the first query uses at least one of the keywords.
16 . The one or more non-transitory computer-readable storage media of claim 14 , wherein the operations further comprise:
generating an input to a machine learning model based at least in part on the first media content or metadata associated with the first media content; and
determining an output of the machine learning model based at least in part on the input, wherein the output indicates features of the first media content, wherein the first query uses at least one of the features.
17 . The one or more non-transitory computer-readable storage media of claim 14 , wherein the operations further comprise:
determining that, for each item identified by metadata of the first media content, a corresponding interest has been identified;
determine a number of items that are identified by the metadata and associated with the first interest;
determining a ratio of the number and a total number of all items identified by the metadata;
selecting the first interest from among candidate interests based at least in part on the ratio; and
generating the first association based at least in part on the first interest being selected.
18 . The one or more non-transitory computer-readable storage media of claim 13 , wherein the second network document includes additional media content associated with the first interest and showing a second item or is linked to a second interest.
19 . The one or more non-transitory computer-readable storage media of claim 14 , wherein the operations further comprise:
determining a classification of the first media content by applying computer vision to the first media content;
determining, based at least in part on a third query to a fourth database that stores second associations between classifications and interests, the first association between the first item and the first interest; and
generating the first association between the first media content and the first interest based at least in part on the third query to the fourth database.
20 . The one or more non-transitory computer-readable storage media of claim 14 , wherein the operations further comprise:
determining, based at least in part on the first query to the first database, the first association between the first item and the first interest and a third association between the first media content and a second interest;
determining, based at least in part on a third query to a fourth database that stores second associations between interests, a positive relationship between the first interest and the second interest; and
boosting the first interest and the second interest based at least in part on the positive relationship.