A tag-based cross-modal resource recommendation method and system
By constructing the internal product operation of user and resource feature vectors and resource and label feature vectors, the user and label preference matrix is obtained, which solves the problem that multiple types of resources cannot be recommended in the existing technology, and realizes efficient recommendation of multimodal resources and simplify calculations.
Patent Information
- Application Number
- CN202210303093.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2042-03-25
AI Technical Summary
The existing technology cannot efficiently recommend multiple types of Internet resources, and the computing resources of deep learning models are expensive, making it difficult to meet the needs of users to obtain the required information.
By constructing user and resource feature vectors and resource and label feature vectors, performing internal product operations to obtain the user and label preference matrix, predicting the user's preference for labels, and recommending multimodal resources based on the preference vector.
It implements recommendations for multiple types of resources, simplifies the computing process, facilitates users to obtain various types of resources of interest, and reduces the overhead of computing resources.
Smart Images

Figure CN114722275B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data resource recommendation, and more specifically, to a tag-based cross-modal resource recommendation method and system. Background Art
[0002] The Internet has greatly facilitated information and cultural exchanges among human beings. However, with the development of technology, especially the explosion of graphic, text and video self-media in recent years, a huge amount of data of various types is stored on the Internet, and the amount of data is still rapidly expanding and updating. Therefore, how to efficiently obtain the information you need is an important issue facing people.
[0003] A music recommendation method, device and readable storage medium in the prior art can only recommend music resources based on tags, but cannot recommend multiple types of resources. In addition, this method uses a deep learning model to analyze and process data, which has a large computing resource overhead. Summary of the invention
[0004] In order to overcome the above technical problems, the present invention provides a tag-based cross-modal resource recommendation method which is simple in calculation and can recommend multiple types of resources.
[0005] The technical solution of the present invention is as follows:
[0006] A tag-based cross-modal resource recommendation method comprises the following steps:
[0007] S1. Construct user and resource feature vectors to represent user interest features;
[0008] S2, construct resource and label feature vectors to establish the corresponding relationship between resources and labels;
[0009] S3, perform inner product operation on the user and resource feature vector and the resource and label feature vector to obtain the user and label preference matrix;
[0010] S4. The elements in the user and tag preference matrix are predicted preference values. The predicted preference values represent the preference of a certain user for a certain tag. The predicted preference values in the same row represent the preference of the same user for different tags. The predicted preference vector is constructed using the predicted preference values in the same row.
[0011] S5. Obtain a predicted preference vector from the user and tag preference matrix, and recommend resources to the user according to the predicted preference vector.
[0012] This technical solution proposes a tag-based cross-modal resource recommendation method, which uses user and resource feature vectors to represent user interest features, uses resource and tag feature vectors to establish a correspondence between multimodal resources and tags, and then performs inner product operations on the user and resource feature vectors and the resource and tag feature vectors to obtain a user and tag preference matrix, thereby obtaining the user's preference for tags and realizing resource recommendation; the entire process is simple in calculation and can recommend multimodal resources, making it convenient for users to obtain various types of resources of interest.
[0013] Furthermore, the calculation formula for constructing the user and resource feature vector in step S1 is:
[0014]
[0015] Among them, n iju Indicates the use of resource i j The number of users, M represents the total number of users, Indicates that user u uses resource i j The number of times, n ui Indicates the amount of resources used by user u, Indicates the frequency of resource usage by user u, Indicates the importance of the resource among all the user's resources. Indicates the importance of the resource to the user u.
[0016] Furthermore, the calculation formula parameters of the user and resource feature vectors in step S1 also include the user's stay time, and the formula is:
[0017]
[0018] in, Indicates the length of time that user u stays on resource i. Indicates the use of resource i j The number of users, M represents the total number of users, Indicates that user u uses resource i j The number of times, n ui Indicates the amount of resources used by user u, Indicates the frequency of resource usage by user u, Indicates the importance of the resource among all the user's resources. Indicates the importance of the resource to the user u, Indicates the user's preference for resources after adding time information.
[0019] Furthermore, the calculation formula for constructing the resource and label feature vector in step S2 is:
[0020]
[0021] in, Indicates that the label t j The number of marked resources, N represents the total number of resources, Indicates the number of tags that resource i is marked with, Represents the label t j How often the resource is marked, Indicates tag t among all tags of resource i j The importance of Indicates the importance of each tag to the resource i.
[0022] Furthermore, the user and tag preference matrix in step S3 is:
[0023]
[0024] Among them, u j ∈U,j=1,2,…,M;t k ∈T, k=1, 2, ..., L; is the predicted preference value for user u j For label t k The matrix records the user's predicted preference value for the label, which can reflect the degree of preference of different users for each label.
[0025] Furthermore, the calculation formula of the predicted preference value in step S4 is:
[0026]
[0027] The predicted preference vector in step S4 is:
[0028]
[0029] Represents user u j The predicted preference vector for each label.
[0030] Furthermore, the method for recommending resources to the user according to the predicted preference vector in step S5 is:
[0031] The first n largest predicted preference values in the predicted preference vector are combined into a recommendation set, labels corresponding to the predicted preference values in the recommendation set are obtained, corresponding resources are determined according to the labels, and the resources are pushed to the user corresponding to the predicted preference vector.
[0032] Furthermore, the types of resources include: video, text, audio, and image.
[0033] Furthermore, it also includes: constructing a user-resource matrix and a resource-label matrix, and then reading data in the user-resource matrix and the resource-label matrix, so as to obtain calculation parameters of the user-resource feature vector described in step S1 and the resource-label feature vector described in step S2;
[0034] The method for constructing the user-resource matrix and the resource-label matrix is as follows:
[0035] S101, obtaining user browsing history data;
[0036] S102, reading the following fields from the user browsing record data: user number, resource type, tag type;
[0037] S103: Add the user number and resource type to the user and resource matrix, and add the tag type and resource type to the tag resource matrix, to obtain a constructed user and resource matrix and a resource and tag matrix.
[0038] A tag-based cross-modal resource recommendation system, comprising: a vector construction module, a matrix operation module, a preference vector construction module, and a resource recommendation module;
[0039] The vector construction module constructs user and resource feature vectors and resource and tag feature vectors, which are used to represent the user's interest features and the tag's popular features respectively; the matrix operation module performs inner product operations on the user and resource feature vectors and the resource and tag feature vectors to obtain the user and tag preference matrix; the elements in the user and tag preference matrix are predicted preference values, which represent the degree of preference of a certain user for a certain tag. The same row of predicted preference values represents the degree of preference of the same user for different tags. The preference vector construction module uses the same row of predicted preference values to construct the predicted preference vector; the resource recommendation module obtains the predicted preference vector from the user and tag preference matrix and recommends resources to the user according to the predicted preference vector.
[0040] The present technical solution proposes a tag-based cross-modal resource recommendation method. Compared with the prior art, the present technical solution has the following beneficial effects: using user and resource feature vectors to represent user interest features, using resource and tag feature vectors to establish a correspondence between multimodal resources and tags, and then performing inner product operations on the user and resource feature vectors and the resource and tag feature vectors to obtain a user and tag preference matrix, thereby obtaining the user's preference for tags and realizing resource recommendation; the entire process is simple in calculation and can recommend multimodal resources, making it convenient for users to obtain various types of resources of interest. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of the steps of a tag-based cross-modal resource recommendation method;
[0042] Figure 2 Implement a flowchart for the tag-based cross-modal resource recommendation method;
[0043] Figure 3 Schematic diagram of a tag-based cross-modal resource recommendation system. DETAILED DESCRIPTION
[0044] In order to clearly illustrate the tag-based cross-modal resource recommendation method of the present invention, the present invention is further described in conjunction with embodiments and drawings, but this should not limit the protection scope of the present invention.
[0045] Example 1
[0046] A tag-based cross-modal resource recommendation method, such as Figure 1 As shown, the steps include:
[0047] S1. Construct user and resource feature vectors to represent user interest features;
[0048] S2, construct resource and label feature vectors to establish the corresponding relationship between resources and labels;
[0049] S3, perform inner product operation on the user and resource feature vector and the resource and label feature vector to obtain the user and label preference matrix;
[0050] S4. The elements in the user and tag preference matrix are predicted preference values. The predicted preference values represent the preference of a certain user for a certain tag. The predicted preference values in the same row represent the preference of the same user for different tags. The predicted preference vector is constructed using the predicted preference values in the same row.
[0051] S5. Obtain a predicted preference vector from the user and tag preference matrix, and recommend resources to the user according to the predicted preference vector.
[0052] This embodiment proposes a tag-based cross-modal resource recommendation method, which uses user and resource feature vectors to represent user interest features, uses resource and tag feature vectors to establish a correspondence between multimodal resources and tags, and then performs inner product operations on the user and resource feature vectors and the resource and tag feature vectors to obtain a user and tag preference matrix, thereby obtaining the user's preference for tags and realizing resource recommendation; the entire process is simple in calculation and can recommend multimodal resources, making it convenient for users to obtain various types of resources of interest.
[0053] Example 2
[0054] Based on Example 1, five user types are constructed in this example: GUserA, GUserB, GUserC, GUserD, and GUserE, and each user type has 20-30 specific users. In this example, resource types include text, pictures, videos, and audio. Text resources include the following tags: scientific and technological information, weather information, geographic location information, infrastructure, global news, etc.; picture resources include the following tags: buildings, vehicles, ships, ports, stations, airports, etc.; video resources include the following tags: training and education, flood prevention and disaster relief, entertainment news, sports events, etc.; audio resources include the following tags: classic music, training recordings, audio books, etc.
[0055] This embodiment implements information classification through tags, constructs feature vectors of user-resource and resource-tag, and further constructs a user-tag association matrix to achieve the effect of constructing a preference relationship between users and tags. Defining the user-resource-tag relationship matrix includes the following steps:
[0056] Define the user set U = {u1, u2, ...u j ,…,u M}, where M is the total number of users, j = 1, 2, ..., M; the set of all resources is I = {i1, i2, ..., i j ,…,i N}, where N is the total number of resources, j = 1, 2, ..., N; the tag set used by the user is T = {t1, t2, ..., t j ,…,t L}, where L is the total number of tags, j = 1, 2, …, L.
[0057] The calculation formula for constructing the user and resource feature vector in step S1 is:
[0058]
[0059] in, Indicates the use of resource i j The number of users, M represents the total number of users, Indicates that user u uses resource i j The number of times, n ui Indicates the amount of resources used by user u, Indicates the frequency of resource usage by user u, Indicates the importance of the resource among all the user's resources. Indicates the importance of the resource to the user u.
[0060] In this embodiment, the calculation formula parameters of the user and resource feature vector in step S1 also include the user's stay time, and the formula is:
[0061]
[0062] in, Indicates the length of time that user u stays on resource i. Indicates the use of resource i j The number of users, M represents the total number of users, Indicates that user u uses resource i j The number of times, n ui Indicates the amount of resources used by user u, Indicates the frequency of resource usage by user u, Indicates the importance of the resource among all the user's resources. Indicates the importance of the resource to the user u, Indicates the user's preference for resources after adding time information.
[0063] In this embodiment, the calculation formula for constructing the resource and label feature vector in step S2 is:
[0064]
[0065] in, Indicates that the label t j The number of marked resources, N represents the total number of resources, Indicates the number of tags that resource i is marked with, Represents the label t j How often the resource is marked, Indicates tag t among all tags of resource i j The importance of Indicates the importance of each tag to the resource i.
[0066] In this embodiment, the user and tag preference matrix in step S3 is:
[0067]
[0068] Among them, u j ∈U,j=1,2,…,M;t k ∈T, k=1, 2, ..., L; is the predicted preference value for user u j For label t k The matrix records the user's predicted preference value for the label, which can reflect the degree of preference of different users for each label.
[0069] In this embodiment, the calculation formula of the predicted preference value in step S4 is:
[0070]
[0071] The predicted preference vector in step S4 is:
[0072]
[0073] Represents user u j The predicted preference vector for each label.
[0074] In this embodiment, the method of recommending resources to the user according to the predicted preference vector in step S5 is:
[0075] The first n largest predicted preference values in the predicted preference vector are combined into a recommendation set, labels corresponding to the predicted preference values in the recommendation set are obtained, corresponding resources are determined according to the labels, and the resources are pushed to the user corresponding to the predicted preference vector.
[0076] This embodiment analyzes the potential demand for various types of multimodal resources based on the user's historical behavior characteristics such as the number of times the user uses a certain resource, the number of resources used by the user, the frequency of the user's use of resources, the length of time the user stays at a certain resource, and then makes resource distribution and push intelligent. The result of the user behavior analysis automatically generates a push resource list containing multimodal content data of various tags, and based on this list, multimodal resources are intelligently pushed to potential users.
[0077] User behavior analysis is to collect historical data or online data from the client, establish a user model, and calculate the user's preference for multi-source content data by constructing feature vectors of users and resources, thereby outputting a user publication and subscription list based on content data topic tags.
[0078] When multi-source content data is pushed to users, multimodal resources are published to users based on the media tags in the media resource buffer, and interested users are searched for, and media data is pushed to these users in real time.
[0079] Example 3
[0080] The execution flow chart of the tag-based cross-modal resource recommendation method is as follows: Figure 2 As shown in the figure, the input of this method is the user ID for which recommended information is required, and the output is the tag set recommended to the user. The specific process is as follows:
[0081] Construct an initial user-resource matrix and a resource-tag matrix with empty content;
[0082] For each tag number t, perform the following steps:
[0083] Obtain the user ID, resource type, tag type and stay duration fields under the current tag ID from the user browsing record data;
[0084] Add the user number and resource type to the user and resource matrix, and add 1 to the current matrix weight; in other embodiments, the user and resource matrix also includes the length of time the user stays under the resource;
[0085] Add resource type and tag type to the resource and tag matrix, and increase the current matrix weight by 1;
[0086] Until each tag number t completes the above steps, the user-resource matrix and the resource-tag matrix are constructed; where t is the tag number and len is the total number of tags;
[0087] For each tag number t, perform the following steps:
[0088] Read data from the user and resource matrix and calculate the feature vectors of users and resources; the calculation formula is:
[0089]
[0090] in, Indicates the length of time that user u stays on resource i. Indicates the use of resource i j The number of users, M represents the total number of users, Indicates that user u uses resource i j The number of times, n ui Indicates the amount of resources used by user u, Indicates the frequency of resource usage by user u, Indicates the importance of the resource among all the user's resources. Indicates the importance of the resource to the user u, Indicates the user's preference for resources after adding time information.
[0091] Read data from the resource and label matrix and calculate the feature vectors of resources and labels; the calculation formula is:
[0092]
[0093] in, Indicates that the label t j The number of marked resources, N represents the total number of resources, Indicates the number of tags that resource i is marked with, Represents the label t j How often the resource is marked, Indicates tag t among all tags of resource i j The importance of Indicates the importance of each tag to the resource i.
[0094] Until each tag number t completes the above steps, the feature vectors of users and resources and the feature vectors of resources and tags are constructed;
[0095] Calculate the user preference vector and construct the user-label preference matrix P M×N , the elements in the user and tag preference matrix are the predicted preference values;
[0096] Sort the predicted preference values of the current user from large to small, obtain the tag sets corresponding to the first n predicted preference values, and push the information of the tag sets to the user.
[0097] Example 4
[0098] A tag-based cross-modal resource recommendation system, such as Figure 3 As shown, it includes: vector construction module, matrix operation module, preference vector construction module, resource recommendation module;
[0099] The vector construction module constructs user and resource feature vectors and resource and tag feature vectors, which are used to represent the user's interest features and the tag's popular features respectively; the matrix operation module performs inner product operations on the user and resource feature vectors and the resource and tag feature vectors to obtain the user and tag preference matrix; the elements in the user and tag preference matrix are predicted preference values, which represent the degree of preference of a certain user for a certain tag. The same row of predicted preference values represents the degree of preference of the same user for different tags. The preference vector construction module uses the same row of predicted preference values to construct the predicted preference vector; the resource recommendation module obtains the predicted preference vector from the user and tag preference matrix and recommends resources to the user according to the predicted preference vector.
[0100] Example 5
[0101] On the basis of Example 3, in this embodiment, the calculation formula for constructing the user and resource feature vector is:
[0102]
[0103] in, Indicates the length of time that user u stays on resource i. Indicates the use of resource i j The number of users, M represents the total number of users, Indicates that user u uses resource i j The number of times, n ui Indicates the amount of resources used by user u, Indicates the frequency of resource usage by user u, Indicates the importance of the resource among all the user's resources. Indicates the importance of the resource to the user u, Indicates the user's preference for resources after adding time information;
[0104] The calculation formula for constructing the resource and label feature vector is:
[0105]
[0106] in, Indicates that the label t j The number of marked resources, N represents the total number of resources, Indicates the number of tags that resource i is marked with, Represents the label t j How often the resource is marked, Indicates tag t among all tags of resource i j The importance of Indicates the importance of each tag to the resource i.
[0107] This embodiment proposes a tag-based cross-modal resource recommendation system, which uses user and resource feature vectors to represent user interest features, uses resource and tag feature vectors to establish a correspondence between multimodal resources and tags, and then performs inner product operations on the user and resource feature vectors and the resource and tag feature vectors to obtain a user and tag preference matrix, thereby obtaining the user's preference for tags and realizing resource recommendation; the entire process is simple in calculation and can recommend multimodal resources, making it convenient for users to obtain various types of resources of interest.
[0108] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A tag-based cross-modal resource recommendation method, It is characterized in that Includes steps: S1. Construct user and resource feature vectors to represent user interest characteristics; wherein the calculation formula for constructing the user and resource feature vectors in step S1 is: in, Indicates the use of resource i j The number of users, M represents the total number of users, Indicates that user u uses resource i j The number of times, n ui Indicates the amount of resources used by user u, Indicates the frequency of resource usage by user u, Indicates the importance of the resource among all the user's resources. Indicates the importance of the resource to the user u; S2. Construct resource and label feature vectors to establish a corresponding relationship between multimodal resources and labels; wherein the calculation formula for constructing the resource and label feature vectors in step S2 is: in, Indicates that the label t j The number of marked resources, N represents the total number of resources, Indicates the number of tags that resource i is marked with, Represents the label t j How often the resource is marked, Indicates tag t among all tags of resource i j The importance of Indicates the importance of each tag to resource i; S3, perform inner product operation on the user and resource feature vector and the resource and label feature vector to obtain the user and label preference matrix; S4. The elements in the user and tag preference matrix are predicted preference values. The predicted preference values represent the preference of a certain user for a certain tag. The predicted preference values in the same row represent the preference of the same user for different tags. The predicted preference vector is constructed using the predicted preference values in the same row. S5. Obtain a predicted preference vector from the user and tag preference matrix, and recommend resources to the user according to the predicted preference vector.
2. According to claim 1, a tag-based cross-modal resource recommendation method, It is characterized in that The calculation formula parameters of the user and resource feature vector in step S1 also include the user's stay time, and the formula is: in, Indicates the length of time that user u stays on resource i. Indicates the use of resource i j The number of users, M represents the total number of users, n uij Indicates that user u uses resource i j The number of times, n ui Indicates the amount of resources used by user u, Indicates the frequency of resource usage by user u, Indicates the importance of the resource among all the user's resources. Indicates the importance of the resource to the user u, Indicates the user's preference for resources after adding time information.
3. According to the tag-based cross-modal resource recommendation method of claim 2, It is characterized in that The user and tag preference matrix in step S3 is: Among them, u j ∈U, j=1, 2,…,M; t k ∈T, k=1, 2, ..., L; is the predicted preference value for user u j For label t k The matrix records the user's predicted preference value for the label, which can reflect the degree of preference of different users for each label.
4. According to claim 3, a tag-based cross-modal resource recommendation method, It is characterized in that The calculation formula of the predicted preference value in step S4 is: The predicted preference vector in step S4 is: Represents user u j The predicted preference vector for each label.
5. The tag-based cross-modal resource recommendation method according to claim 1, It is characterized in that The method of recommending resources to the user according to the predicted preference vector in step S5 is: The first n largest predicted preference values in the predicted preference vector are combined into a recommendation set, labels corresponding to the predicted preference values in the recommendation set are obtained, corresponding resources are determined according to the labels, and the resources are pushed to the user corresponding to the predicted preference vector.
6. The tag-based cross-modal resource recommendation method according to claim 1, It is characterized in that The types of resources include: video, text, audio, and image.
7. The tag-based cross-modal resource recommendation method according to claim 1, It is characterized in that Also includes: Constructing a user-resource matrix and a resource-label matrix, and then reading the data in the user-resource matrix and the resource-label matrix, thereby obtaining calculation parameters of the user-resource feature vector described in step S1 and the resource-label feature vector described in step S2; The method for constructing the user-resource matrix and the resource-label matrix is as follows: S101, obtaining user browsing history data; S102, reading the following fields from the user browsing record data: user number, resource type, tag type; S103: Add the user number and resource type to the user and resource matrix, and add the tag type and resource type to the tag resource matrix, to obtain a constructed user and resource matrix and a resource and tag matrix.
8. The tag-based cross-modal resource recommendation system according to claim 1, It is characterized in that include: Vector construction module, matrix operation module, preference vector construction module, resource recommendation module; The vector construction module constructs user and resource feature vectors and resource and tag feature vectors, which are used to represent the user's interest features and the tag's popular features respectively; the matrix operation module performs inner product operations on the user and resource feature vectors and the resource and tag feature vectors to obtain the user and tag preference matrix; the elements in the user and tag preference matrix are predicted preference values, which represent the degree of preference of a certain user for a certain tag. The same row of predicted preference values represents the degree of preference of the same user for different tags. The preference vector construction module uses the same row of predicted preference values to construct the predicted preference vector; the resource recommendation module obtains the predicted preference vector from the user and tag preference matrix and recommends resources to the user according to the predicted preference vector.
Citation Information
Patent Citations
Personalized video recommendation method and system
CN107368584A
Short video data label recommendation method and device, computer equipment and storage medium
CN110866184A
Cross-domain recommendation method fusing label and attention mechanism and implementation system thereof
CN111291261A
Multi-modal label recommendation method based on unidirectional supervision attention
CN113704547A
Video recommendation method and device
US20160212494A1
