CN-121980079-A - Resource recommendation method and system based on large model
Abstract
The invention provides a resource recommendation method and system based on a large model, wherein the method comprises the steps of S1, obtaining user historical behavior information and current query information, then converting the user historical behavior information and the current query information into user preference vectors and user demand vectors respectively, S2, extracting keyword set vectors by using the large language model based on the user preference vectors and the user demand vectors, S3, extracting candidate resource sets from a resource library by using a vector similarity retrieval method according to the user preference vectors, the keyword set vectors and the user demand vectors, S4, reordering the candidate resource sets by using a bootstrap strategy to obtain a candidate resource sequence, S5, updating the user preference vectors according to N items in front of the candidate resource sequence, then repeating the steps S2-S5 until the maximum iteration times are reached, and then recommending the front N items of resources. The invention solves the problems of poor generalization capability and insufficient adaptation in the prior art.
Inventors
- WANG JIANTAO
- HAN JIXIN
- LIU KAI
- GE TAO
Assignees
- 重庆大学
Dates
- Publication Date
- 20260505
- Application Date
- 20260115
Claims (10)
- 1. A resource recommendation method based on a large model is characterized by comprising the following steps: s1, acquiring user historical behavior information and current query information, and then converting the user historical behavior information and the current query information into a user preference vector and a user demand vector respectively; S2, extracting a keyword set vector by using a language big model based on the user preference vector and the user demand vector; S3, extracting a candidate resource set from a resource library by using a vector similarity retrieval method according to the user preference vector, the keyword set vector and the user demand vector; S4, reordering the candidate resource set by adopting a bootstrap strategy to obtain a candidate resource sequence; And S5, updating the user preference vector according to the first N items of the candidate resource sequence, repeating the steps S2-S5 until the maximum iteration times, and recommending the first N items of resources.
- 2. The large model-based resource recommendation method as claimed in claim 1, wherein: The method for converting the user history behavior information into the user preference vector comprises the following steps: According to the time sequence, all the browsing logs in the historical behavior information of the user are arranged in an ascending order to obtain a browsing log sequence; Converting topics of all resources in a resource library into topic vectors, clustering topics in the topic vectors by using a k-means algorithm, and calculating the duty ratio of the resources in each category to all the resources; a user preference vector is generated based on the duty cycle and the topic vector.
- 3. The large model-based resource recommendation method as claimed in claim 1, wherein: the user preference vector comprises a theme type, a resource type trend and a feedback mode; The resource information comprises a resource type and a score, the clustering type and the corresponding duty ratio are written into the topic type, the resource type and the corresponding duty ratio are written into the resource type trend, and the mean value and the variance of the scores of all the resources are written into the feedback mode.
- 4. A large model based resource recommendation method as claimed in claim 3, wherein: The method for converting the current query information into the user demand vector comprises the following steps: the cosine similarity between the query information and each browsing log is calculated, and all the browsing logs are arranged in a descending order according to the cosine similarity; and combining the first K browsing logs with the current query information to obtain a query sequence, and then generating a user demand vector by using a language big model.
- 5. The large model-based resource recommendation method as claimed in claim 4, wherein: If the historical behavior information of the user is empty, generating a user demand vector by using a language big model based on the current query information, and extracting a keyword set by using the language big model based on the user demand vector.
- 6. The large model-based resource recommendation method as claimed in claim 1, wherein: The method for extracting the candidate resource set from the resource library by using the vector similarity retrieval method according to the user preference vector, the keyword set vector and the user demand vector comprises the following steps: Splicing the user preference vector and the keyword set vector, and converting the user preference vector and the keyword set vector into a query vector; calculating first resource similarity between the query vector and all resources in the resource library; Combining the resources with the first resource similarity and the score average value larger than the preset value into a primary screening resource set; calculating second resource similarity between the user query vector and all resources in the primary screening resource set; and combining the resources with the second resource similarity and the score average value larger than the preset value into a candidate resource set.
- 7. The large model-based resource recommendation method as claimed in claim 6, wherein: The calculation formula of the first resource similarity is as follows: Wherein: in order to query the vector of the vector, The vector that is the subject of the ith resource, 、 Are all the coefficients of the two-dimensional space, The prize value is matched for the resource type of the ith resource.
- 8. The large model-based resource recommendation method as claimed in claim 1, wherein: the method for reordering the candidate resource set by adopting the bootstrapping strategy to obtain the candidate resource sequence comprises the following steps: copying all resources in the candidate resource sets for multiple copies, and randomly sequencing the resources in each candidate resource set to obtain multiple groups of reordered resource sets; calculating a correlation coefficient between each resource in each set of reordered resources and the user demand vector by using a single tower cross scoring model; And calculating the average value of the corresponding correlation coefficients of each resource in the candidate resource sets in all the reordered resource sets, and ordering the resources in the candidate resource sets in a descending order according to the average value to obtain a candidate resource sequence.
- 9. The large model-based resource recommendation method as claimed in claim 8, wherein: The resource library comprises a local resource library and a network resource library, and in S5, for each resource in the candidate resource sequence, if the local resource library does not exist, the resource is written into the local resource library, the topic type, the resource type tendency and the feedback mode of the user preference vector are updated, and if the local resource library exists, the feedback mode of the user preference vector is only updated.
- 10. A large model-based resource recommendation system, characterized in that the system uses a large model-based resource recommendation method as set forth in any one of claims 1 to 9, comprising: the data processing module is used for acquiring historical behavior information and current query information of a user, and then converting the historical behavior information and the current query information of the user into a user preference vector and a user demand vector respectively; the keyword extraction module is used for extracting a keyword set vector by using a language big model based on the user preference vector and the user demand vector; the resource retrieval module is used for extracting a candidate resource set from the resource library by using a vector similarity retrieval method according to the user preference vector, the keyword set vector and the user demand vector; The reordering module is used for reordering the candidate resource set by adopting a bootstrapping strategy to obtain a candidate resource sequence and recommending the first N resources; and the feedback updating module is used for updating the user preference vector according to the candidate resource sequence.
Description
Resource recommendation method and system based on large model Technical Field The invention relates to the technical field of resource recommendation, in particular to a resource recommendation method and system based on a large model. Background Existing resource recommendation systems rely primarily on traditional machine learning models or simple large language models for resource retrieval and ranking, e.g., by keyword matching or collaborative filtering to generate candidate sets, and ranking based on static rules. However, these methods often ignore deep preprocessing and personalized fusion of user history behaviors, resulting in inaccurate extraction of user preference characteristics, and especially in a cold start scene without history records, poor generalization capability of recommendation results, and incapability of capturing core demands of users effectively. Disclosure of Invention Aiming at the defects existing in the prior art, the invention provides a resource recommendation method based on a large model, which solves the problems of poor generalization capability and insufficient adaptation existing in the prior art. According to an embodiment of the present invention, a large model-based resource recommendation method includes: s1, acquiring user historical behavior information and current query information, and then converting the user historical behavior information and the current query information into a user preference vector and a user demand vector respectively; S2, extracting a keyword set vector by using a language big model based on the user preference vector and the user demand vector; S3, extracting a candidate resource set from a resource library by using a vector similarity retrieval method according to the user preference vector, the keyword set vector and the user demand vector; S4, reordering the candidate resource set by adopting a bootstrap strategy to obtain a candidate resource sequence; And S5, updating the user preference vector according to the first N items of the candidate resource sequence, repeating the steps S2-S5 until the maximum iteration times, and recommending the first N items of resources. Preferably, the method for converting the user history behavior information into the user preference vector comprises the following steps: According to the time sequence, all the browsing logs in the historical behavior information of the user are arranged in an ascending order to obtain a browsing log sequence; Converting topics of all resources in a resource library into topic vectors, clustering topics in the topic vectors by using a k-means algorithm, and calculating the duty ratio of the resources in each category to all the resources; a user preference vector is generated based on the duty cycle and the topic vector. Preferably, the user preference vector includes a topic type, a resource type trend, and a feedback mode; The resource information comprises a resource type and a score, the clustering type and the corresponding duty ratio are written into the topic type, the resource type and the corresponding duty ratio are written into the resource type trend, and the mean value and the variance of the scores of all the resources are written into the feedback mode. Preferably, the method for converting the current query information into the user demand vector comprises the following steps: the cosine similarity between the query information and each browsing log is calculated, and all the browsing logs are arranged in a descending order according to the cosine similarity; and combining the first K browsing logs with the current query information to obtain a query sequence, and then generating a user demand vector by using a language big model. Preferably, if the user history behavior information is empty, generating a user demand vector using a language big model based on the current query information, and extracting a keyword set using the language big model based on the user demand vector. Preferably, the method for extracting the candidate resource set from the resource library by using the vector similarity retrieval method according to the user preference vector, the keyword set vector and the user demand vector comprises the following steps: Splicing the user preference vector and the keyword set vector, and converting the user preference vector and the keyword set vector into a query vector; calculating first resource similarity between the query vector and all resources in the resource library; Combining the resources with the first resource similarity and the score average value larger than the preset value into a primary screening resource set; calculating second resource similarity between the user query vector and all resources in the primary screening resource set; and combining the resources with the second resource similarity and the score average value larger than the preset value into a candidate resource set. Preferably, the calculation form