Information retrieval method based on tag user model
By constructing a binary graph of user resource tags and calculating similarity, clustering and sorting, the problem of low resource tag retrieval efficiency in the existing technology is solved, and more efficient information retrieval and accurate result acquisition are achieved.
Patent Information
- Application Number
- CN202311716371.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-14
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2043-12-14
AI Technical Summary
In the prior art, users need global traversal when obtaining resource tag data, resulting in low retrieval efficiency and excessive results, making it difficult for users to quickly find the required resources.
By constructing a binary graph of user resource tags and resource tag nodes, calculating user similarity for clustering, obtaining tag usage frequency, calculating category distance and reference values, optimizing resource sorting, and selecting reference users to improve retrieval efficiency.
The sorting and optimization of user search information is realized, the search efficiency is improved, the user's selection time in a large number of results is reduced, and the search accuracy is improved.
Smart Images

Figure CN117708199B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data identification, and in particular to an information retrieval method based on a tag user model. Background Art
[0002] When users search for resources, they often search by the properties of the resource, which is the label corresponding to the resource. Labels are words used by users to describe network resources based on their subjective knowledge and understanding. Label user model refers to the method of representing users by the collection of label data for different resources.
[0003] At present, the common method for users to obtain resource label data is to globally traverse the labels of all resources, which takes a long time and retrieves a large number of resources. Users still need to select from a large number of results, and the retrieval efficiency is low. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of the present invention is to provide an information retrieval method based on a tag user model, and the technical solution adopted is as follows:
[0005] Obtain the labels that each user has added to each resource; based on the resources and the corresponding labels, construct a resource label bipartite graph and resource label nodes corresponding to each user;
[0006] Based on the resource tag nodes, calculate the user similarity of any two users; cluster all users based on the user similarity to obtain multiple user tag categories and corresponding multiple user tag category central users; obtain the usage frequency of each tag of the user; for any tag, cluster all users based on the usage frequency to obtain multiple single tag categories and corresponding multiple single tag category central users;
[0007] Select any user as the target user, select any tag as the target tag, calculate the category distance between the target user and the corresponding user tag category center user; the reciprocal of the category distance is used as the first reference value;
[0008] Based on the target tag, a second reference value is calculated according to the usage frequency within the single tag category to which the target user belongs; when the first reference value corresponding to the target tag of the target user is greater than the second reference value, the corresponding user tag category center user is used as the reference user; when the first reference value corresponding to the target tag of the target user is less than or equal to the second reference value, the corresponding single tag category center user is used as the reference user;
[0009] Sort the resources of the reference users corresponding to the target users by usage frequency.
[0010] Preferably, constructing a resource label bipartite graph and a resource label node corresponding to each user based on the resources and the corresponding labels includes:
[0011] For any user, resources and corresponding labels are connected to construct a bipartite graph of resource labels corresponding to each user; resources and corresponding labels are numbered as resource label nodes.
[0012] Preferably, clustering all users based on the user similarity to obtain multiple user tag categories and corresponding multiple user tag category central users includes:
[0013] Users whose user similarity is greater than a preset similarity threshold are classified into the same user tag category; for any of the user tag categories, the user with the largest sum of user similarities with other users in the category is selected as the user tag category center user; for ungrouped users who are not classified into the user tag category, the user similarity between the ungrouped users and the user tag category center users of each of the user tag categories is calculated, and the ungrouped users are classified into the user tag category corresponding to the maximum user similarity, and the calculation is iterated multiple times until all the ungrouped users are classified into the user tag category, and the user tag category center users of each user tag category are updated accordingly.
[0014] Preferably, for any tag, all users are clustered based on the usage frequency to obtain multiple single-tag categories, including:
[0015] An arbitrary tag is selected as the first tag, and based on the usage frequency of the first tag by each user, multiple categories are obtained by multi-threshold segmentation as single-tag categories.
[0016] Preferably, the selecting any user as the target user, selecting any tag as the target tag, and calculating the category distance between the target user and the corresponding user tag category center user includes:
[0017] Based on the target tag, when the target user and the corresponding user tag category central user belong to the same single-tag category, zero is used as the category distance between the target user and the corresponding user tag category central user; when the target user and the corresponding user tag category central user do not belong to the same single-tag category, the mean of the usage frequency within the single-tag category to which the target user belongs is calculated as the first mean, and the mean of the usage frequency within the single-tag category to which the corresponding user tag category central user belongs is calculated as the second mean; the difference between the first mean and the second mean is used as the category distance between the target user and the corresponding user tag category central user.
[0018] Preferably, the calculating of the second reference value according to the usage frequency within the single-label category to which the target user belongs includes:
[0019] The usage frequency corresponding to the single-label category center user of the single-label category to which the target user belongs is obtained as the first usage frequency; the maximum usage frequency within the single-label category to which the target user belongs is obtained; and the ratio of the first usage frequency to the maximum usage frequency is a second reference value.
[0020] Preferably, the step of sorting the resources of the reference users corresponding to the target user according to the frequency of use includes:
[0021] Based on any resource among all resources of the reference users corresponding to the target user, the sum of the usage frequencies of all the reference users is obtained as the total usage frequency; and the resources of all the reference users are sorted according to the total usage frequency.
[0022] Preferably, the method for calculating the user similarity is: calculating the intersection-and-union ratio of resource tag nodes corresponding to any two users as the user similarity.
[0023] The embodiments of the present invention have at least the following beneficial effects:
[0024] The embodiment of the present invention utilizes data identification technology. The method first obtains the labels that each user puts on each resource; constructs a bipartite graph of resource labels and resource label nodes corresponding to each user; calculates the user similarity of any two users, clusters all users, and obtains multiple user label categories and corresponding multiple user label category center users; the user label category is clustered based on the user's resource label nodes, and serves as a selection guide for subsequent reference users from the user's cognition. The frequency of use of each user's label is obtained; for any label, all users are clustered based on the frequency of use, and multiple single label categories and corresponding multiple single label category center users are obtained; the single label category is clustered based on the frequency of use of the user's label, and serves as a selection guide for subsequent reference users from the frequency of use of the user's label; selects any user as the target user, any label as the target label, and calculates the first reference value of the target user and the corresponding user label category center user; based on the target label, calculates the second reference value according to the frequency of use in the single label category to which the target user belongs; compares the first reference value and the second reference value corresponding to the target label of the target user to obtain the reference user; sorts the resources of the reference user corresponding to the target user according to the frequency of use. The present invention obtains reference users by analyzing resources and corresponding tags, and further uses the retrieval information of the reference users to achieve sorting and optimization of the retrieval information obtained after the retrieval user's retrieval, thereby improving the user's retrieval efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 A method flow chart of an information retrieval method based on a tag user model provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the information retrieval method based on the tag user model proposed by the present invention, its specific implementation method, structure, features and effects are described in detail as follows in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures, or characteristics in one or more embodiments may be combined in any suitable form.
[0028] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0029] The embodiment of the present invention provides a specific implementation method of an information retrieval method based on a label user model, which is applicable to information retrieval scenarios. There are multiple users in this scenario, and each user has multiple corresponding resources that have been retrieved and labels that the user has marked on the resources. In order to solve the problem of low retrieval efficiency of global traversal retrieval. The embodiment of the present invention obtains a reference user by analyzing the resources and the corresponding labels, and further uses the retrieval information of the reference user to sort and optimize the retrieval information obtained after the retrieval user's retrieval, thereby improving the user's retrieval efficiency.
[0030] The specific scheme of the information retrieval method based on the tag user model provided by the present invention is described in detail below with reference to the accompanying drawings.
[0031] See also Figure 1 , which shows a flowchart of a method for information retrieval based on a tag user model provided by an embodiment of the present invention, the method comprising the following steps:
[0032] Step S100, obtaining the labels that each user has added to each resource; based on the resources and the corresponding labels, constructing a resource label bipartite graph and resource label nodes corresponding to each user.
[0033] Each user has different label information for different resources, and the user can be represented by the labels that the user has added to different resources. Based on the resources and the corresponding labels, a bipartite graph of resource labels and resource label nodes corresponding to each user are constructed to represent the information of each user. The bipartite graph of resource labels and resource label nodes corresponding to each user are constructed. Specifically: for any user, connect the resources and the corresponding labels to construct a bipartite graph of resource labels corresponding to each user; label the resources and the corresponding labels as resource label nodes.
[0034] Among them, the first row of nodes in the resource label bipartite graph are the resources corresponding to the user, and the second row of nodes are the label information added by the user. The connection between the two rows of nodes represents the association between resources and labels. For example, for user 1, user 1 has added labels to resources A, B, and C, then the first row of nodes in the resource label bipartite graph corresponding to user 1 are A, B, and C; user 1 has added labels to resources A, B, and C as a, b, c, and d, then the second row of nodes in the resource label bipartite graph corresponding to user 1 are a, b, c, and d; if user 1 has added labels to resource A as a, b, and d, then in the resource label bipartite graph, A and a, A and b, and A and d are connected, and the corresponding resource label nodes are Aa, Ab, and Ad. If resource A can be a book, the corresponding labels a, b, and d can be historical stories, Romance of the Three Kingdoms, and war themes, respectively.
[0035] The resources are analyzed from two aspects, namely, users and tags, and the search results are quickly located through these two aspects, that is, the resources are quickly located through two descriptions. The present invention first analyzes the users and obtains the description of each user through the resource tag bipartite graph.
[0036] Step S200, based on the resource tag nodes, calculate the user similarity between any two users; cluster all users based on the user similarity to obtain multiple user tag categories and corresponding multiple user tag category central users; obtain the usage frequency of each tag of the user; for any tag, cluster all users based on the usage frequency to obtain multiple single tag categories and corresponding multiple single tag category central users.
[0037] When searching for a resource, users often search by the properties of the resource, that is, by tag information. For example, if a user wants to search for a historical story with a war theme similar to the Romance of the Three Kingdoms, the user may search for three tags: Romance of the Three Kingdoms, war theme, and historical story. However, searching with these three tags will result in too much content and it is difficult to directly obtain the resource that satisfies the user.
[0038] Considering that users with similar cognition have similar labels for resources, we search for the three labels of Romance of the Three Kingdoms, historical stories, and war themes among users with similar cognition to the user, that is, we refer to the resources and labels of users with similar cognition to the user. We calculate separately based on labels and users, and then select reference users to quickly obtain search results.
[0039] User tag categories are different user categories obtained by clustering users based on the resource tag nodes corresponding to the users, which are called user tag categories; single tag categories are different user categories obtained by clustering users based on the frequency of use of tags, which are called single tag categories.
[0040] Which resources each user is interested in and what labels they put on the resources, these two pieces of information as user behavior features can be used to represent the user, and then used to find users with similar cognition to the retrieval user. Considering that different users have different cognitions, there may be situations where different users put different labels on the same resource. Therefore, users are first classified based on the resource label nodes corresponding to the users, and users with the same cognition are classified into the same user label category, and users with similar resource label bipartite graphs are also classified into the same user label category.
[0041] Users are divided into multiple user tag categories. Specifically, the intersection-and-union ratio of the resource tag nodes corresponding to any two users is calculated as the user similarity; all users are clustered based on user similarity to obtain multiple user tag categories and corresponding multiple user tag category central users. Among them, the intersection-and-union ratio of the resource tag nodes corresponding to the two users is used as the user similarity, that is, the similarity of the resource tag bipartite graphs corresponding to the two users is compared, and the intersection-and-union ratio of the resource tag nodes is used as the similarity between the two users. The larger the intersection-and-union ratio of the resource tag nodes, the greater the user similarity, and the corresponding two users have more similar cognitions.
[0042] Among them, based on user similarity, all users are clustered to obtain multiple steps for label categories and corresponding multiple user label category center users, specifically: after calculating the user similarity of every two users, users whose user similarity is greater than the preset similarity threshold are classified into the same user label category; for any user label category, the user with the largest sum of user similarities with other users in the category is selected as the user label category center user; for ungrouped users who are not classified into any user label category, the user similarity of the ungrouped users and the user label category center users of each user label category is calculated, and the ungrouped users are classified into the user label category corresponding to the maximum user similarity, and the calculation is iterated multiple times until all ungrouped users are classified into the user label category, and the user label category center users of each user label category are updated accordingly. In the embodiment of the present invention, the preset similarity threshold is 0.9, and in other embodiments, the implementer can adjust the value according to the actual situation. Among them, the resource label bipartite graph corresponding to the user label category center user of each user label category can be used as a representative of the user label analogy.
[0043] The users are divided into multiple single-label categories. Specifically, any label is selected as the first label, and multiple categories are obtained as single-label categories based on the frequency of use of the first label by each user using multi-threshold segmentation. That is, each label corresponds to multiple single-label categories. In an embodiment of the present invention, according to the Fisher criterion, the multiple usage frequencies corresponding to the first label are segmented by multiple thresholds using the principle of maximum inter-class variance and minimum intra-class variance. Among them, the usage frequencies of the first label by users in the multiple single-label categories corresponding to the first label are similar, that is, the multiple single-label categories corresponding to each label respectively reflect the degree of use of the label by the users. The applicability of users belonging to the same single-label category is similar, that is, the frequency of use of the label by users belonging to the same single-label category is similar.
[0044] When searching for the required resources, users give tags. For example, if a user wants to search for a historical story with a war theme similar to the Romance of the Three Kingdoms, the tags given by the user are: Romance of the Three Kingdoms, war theme, and historical story. Therefore, it is necessary to search for resources by tags. Users often give multiple tag information, so the resources required by users can be analyzed by the single tag category of each tag in multiple tags. The single tag category can reflect the purity of the corresponding user for the tag, that is, the higher the frequency of use of the tag among users who use the tag, the higher the tag purity corresponding to the tag of the user, and the higher the degree of research of the user on the resources corresponding to the tag of this type. For example, most of the tags used by a user 2 are historical tags, and the proportion of historical resources in the resources of this user is very large. When another user 3 searches for resources related to history, the resources of user 2 are of great reference significance to the search user 3.
[0045] Step S300, select any user as the target user, select any tag as the target tag, calculate the category distance between the target user and the corresponding user tag category center user; the reciprocal of the category distance is used as the first reference value.
[0046] Multiple users are divided into user label categories and single label categories, wherein each user corresponds to one user label category and multiple single label categories.
[0047] Users belonging to the same user tag category have similar cognition, and users belonging to the same single tag category have similar usage frequencies of the tag. User tag categories correspond to user aspects, and single tag categories correspond to tag aspects. Among them, for two users belonging to the same user tag category, for any tag corresponding to these two users, there are two situations: the two users belong to the same single tag category and the two users do not belong to the same single tag category, so the tag aspects are analyzed in two situations.
[0048] For search users, there are two corresponding central users, one is the user tag category central user, and the other is the single tag category central user. Among them, the user tag category central user reflects the users with similar cognition, and searches for the resources required by the search user from the user's perspective; while the single tag category central user is the category central user of the single tag category, reflecting the classification of users by the tag, and the frequency of use of the tag is similar. The greater the frequency of use, the greater the reference value of the tag.
[0049] Select any user as the target user, select any tag as the target tag, and calculate the category distance between the target user and the corresponding user tag category center user. Calculate the category distance between the target user and the corresponding user tag category center user. Specifically: based on the target tag, when the target user and the corresponding user tag category center user belong to the same single-label category, zero is used as the category distance between the target user and the corresponding user tag category center user; when the target user and the user tag category center user do not belong to the same single-label category, the mean of the usage frequency within the single-label category to which the target user belongs is calculated as the first mean, and the mean of the usage frequency within the single-label category to which the user tag category center user corresponding to the target user belongs is calculated as the second mean, and the difference between the first mean and the second mean is used as the category distance between the target user and the corresponding user tag category center user. The larger the category distance, the less reference the user tag category center user corresponding to the retrieval user has; conversely, the smaller the category distance, the greater the reference the user tag category center user corresponding to the retrieval user has.
[0050] The reciprocal of the category distance is used as the first reference value, and the first reference value is normalized, and the value range of the normalized first reference value is (0,1].
[0051] Step S400, based on the target tag, calculate the second reference value according to the usage frequency within the single tag category to which the target user belongs; when the first reference value corresponding to the target tag of the target user is greater than the second reference value, the corresponding user tag category center user is used as the reference user; when the first reference value corresponding to the target tag of the target user is less than or equal to the second reference value, the corresponding single tag category center user is used as the reference user.
[0052] The ratio of the usage frequency of the single-label category center user of the single-label category in the search tag of the search user to the maximum usage frequency in the single-label category is calculated. The larger the ratio, the greater the reference value of the corresponding single-label category center user.
[0053] Furthermore, based on the target tag, the second reference value is calculated according to the usage frequency of the target user in the single-tag category. Specifically, the usage frequency corresponding to the central user of the single-tag category of the single-tag category to which the target user belongs is obtained as the first usage frequency, and the maximum usage frequency in the single-tag category to which the target user belongs is obtained. The ratio of the first usage frequency to the maximum usage frequency is the second reference value. It can also be said that the second reference value is the normalized first usage frequency.
[0054] The reference user is obtained by combining the first reference value and the second reference value. Specifically: when the first reference value corresponding to the target tag of the target user is greater than the second reference value, the corresponding user tag category center user is used as the reference user; when the first reference value corresponding to the target tag of the target user is less than or equal to the second reference value, the corresponding single tag category center user is used as the reference user. Multiple reference users are obtained, that is, each search user corresponds to multiple reference users.
[0055] Step S500: sort the resources of the reference users corresponding to the target user according to the usage frequency.
[0056] Based on any resource among all the resources of the reference user corresponding to the target user, the sum of the usage frequencies of all reference users is obtained as the total usage frequency, and the total usage frequency of each resource is obtained. The resources of the reference user are prioritized in descending order according to the total usage frequency, so that when the search user searches according to the tag, the resources can appear in the priority order, achieving the purpose of fast and effective information retrieval.
[0057] In summary, the embodiment of the present invention utilizes data identification technology. The method first obtains the labels that each user puts on each resource; constructs a bipartite graph of resource labels and resource label nodes corresponding to each user; calculates the user similarity of any two users, clusters all users, and obtains multiple user label categories and corresponding multiple user label category center users; obtains the usage frequency of each user's label; for any label, clusters all users based on the usage frequency, obtains multiple single label categories and corresponding multiple single label category center users; selects any user as the target user, any label as the target label, and calculates the inverse of the category distance between the target user and the corresponding user label category center user as the first reference value; based on the target label, calculates the second reference value according to the usage frequency within the single label category to which the target user belongs; compares the first reference value and the second reference value corresponding to the target label of the target user to obtain the reference user; and sorts the resources of the reference user corresponding to the target user according to the usage frequency. The present invention obtains the reference user by analyzing the resources and the corresponding labels, and further uses the retrieval information of the reference user to realize the sorting and optimization of the retrieval information obtained after the retrieval user retrieves, thereby improving the user's retrieval efficiency.
[0058] It should be noted that the sequence of the embodiments of the present invention described above is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0059] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0060] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. The information retrieval method based on the tag user model is characterized by: The method comprises the following steps: Obtain the labels that each user has added to each resource; based on the resources and the corresponding labels, construct a resource label bipartite graph and resource label nodes corresponding to each user; Based on the resource tag nodes, calculate the user similarity of any two users; cluster all users based on the user similarity to obtain multiple user tag categories and corresponding multiple user tag category central users; obtain the usage frequency of each tag of the user; for any tag, cluster all users based on the usage frequency to obtain multiple single tag categories and corresponding multiple single tag category central users; Select any user as the target user, select any tag as the target tag, calculate the category distance between the target user and the corresponding user tag category center user; the reciprocal of the category distance is used as the first reference value; Based on the target tag, a second reference value is calculated according to the usage frequency within the single tag category to which the target user belongs; when the first reference value corresponding to the target tag of the target user is greater than the second reference value, the corresponding user tag category center user is used as the reference user; when the first reference value corresponding to the target tag of the target user is less than or equal to the second reference value, the corresponding single tag category center user is used as the reference user; Sort the resources of the reference users corresponding to the target users by usage frequency; The step of constructing a resource label bipartite graph and a resource label node corresponding to each user based on the resource and the corresponding label includes: For any user, resources and corresponding labels are connected to construct a bipartite graph of resource labels corresponding to each user; resources and corresponding labels are numbered as resource label nodes.
2. The information retrieval method based on the tag user model according to claim 1 is characterized in that: The clustering of all users based on the user similarity to obtain a plurality of user tag categories and a plurality of corresponding user tag category central users includes: Users whose user similarity is greater than a preset similarity threshold are classified into the same user tag category; for any of the user tag categories, the user with the largest sum of user similarities with other users in the category is selected as the user tag category center user; for ungrouped users who are not classified into the user tag category, the user similarity between the ungrouped users and the user tag category center users of each of the user tag categories is calculated, and the ungrouped users are classified into the user tag category corresponding to the maximum user similarity, and the calculation is iterated multiple times until all the ungrouped users are classified into the user tag category, and the user tag category center users of each user tag category are updated accordingly.
3. The information retrieval method based on the tag user model according to claim 1 is characterized in that: For any tag, all users are clustered based on the usage frequency to obtain multiple single-tag categories, including: An arbitrary tag is selected as the first tag, and based on the usage frequency of the first tag by each user, multiple categories are obtained by multi-threshold segmentation as single-tag categories.
4. The information retrieval method based on the tag user model according to claim 1 is characterized in that: The selecting any user as the target user, selecting any tag as the target tag, and calculating the category distance between the target user and the corresponding user tag category center user includes: Based on the target tag, when the target user and the corresponding user tag category central user belong to the same single-tag category, zero is used as the category distance between the target user and the corresponding user tag category central user; when the target user and the corresponding user tag category central user do not belong to the same single-tag category, the mean of the usage frequency within the single-tag category to which the target user belongs is calculated as the first mean, and the mean of the usage frequency within the single-tag category to which the corresponding user tag category central user belongs is calculated as the second mean; the difference between the first mean and the second mean is used as the category distance between the target user and the corresponding user tag category central user.
5. The information retrieval method based on the tag user model according to claim 1 is characterized in that: The calculating the second reference value according to the usage frequency within the single-label category to which the target user belongs includes: The usage frequency corresponding to the single-label category center user of the single-label category to which the target user belongs is obtained as the first usage frequency; the maximum usage frequency within the single-label category to which the target user belongs is obtained; and the ratio of the first usage frequency to the maximum usage frequency is a second reference value.
6. The information retrieval method based on the tag user model according to claim 1 is characterized in that: The step of sorting the resources of the reference users corresponding to the target user according to the usage frequency includes: Based on any resource among all resources of the reference users corresponding to the target user, the sum of the usage frequencies of all the reference users is obtained as the total usage frequency; and the resources of all the reference users are sorted according to the total usage frequency.
7. The information retrieval method based on the tag user model according to claim 1 is characterized in that: The method for calculating the user similarity is: calculating the intersection-and-union ratio of resource tag nodes corresponding to any two users as the user similarity.
