Resource recommendation method and apparatus, and computer device and storage medium
By using a large language model to process positive behavior information in the resource recommendation scenarios of small and medium-sized customers, generating resource text and calculating correlation, the problem of inaccurate recommendation in traditional recommendation models with few resource information and sparse user behavior is solved, and efficient and accurate resource recommendation is achieved.
Patent Information
- Application Number
- PCT/CN2024/114790
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-21
- Filing Date
- 2024-08-27
- Publication Date
- 2025-03-27
AI Technical Summary
In the resource recommendation scenarios for small and medium-sized customers, there is little resource information and sparse user behavior. The traditional resource recommendation model cannot be fully learned, resulting in inaccurate recommendation results.
Using machine learning technology based on artificial intelligence, a large language model is trained, resource prompt information is constructed through the forward behavior information of the target object, and this information is processed using the large language model to generate resource text, calculate the correlation between the resource text and the resources to be recommended in the resource library, and then recommend resources to the target object.
It realizes that when there is little resource information and sparse user behavior, resources are recommended for target objects accurately, improving the accuracy and efficiency of resource recommendations.
Smart Images

Figure CN2024114790_27032025_PF_FP_ABST
Abstract
Description
Resource recommendation method, device, computer equipment and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 21, 2023, with application number 2023112211642 and entitled “Resource Recommendation Method, Device, Computer Equipment and Storage Medium,” the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a resource recommendation method, apparatus, computer equipment, and storage medium.
[0003] background
[0004] With the development of internet technology, resource recommendation scenarios have become commonplace. For example, food delivery platforms recommend dishes, multimedia platforms recommend videos, and shopping platforms recommend clothing. Accurately recommending resources to users is a key research topic in this field.
[0005] At present, the commonly used approach is to use machine learning technology to mine massive amounts of user behavior, gain insights into user interests and preferences, and then automatically generate personalized content recommendations for users based on their interests and preferences.
[0006] Technical content
[0007] The embodiments of the present application provide a resource recommendation method, apparatus, computer device, and storage medium that can accurately recommend resources to a target object. The technical solution is as follows.
[0008] An embodiment of the present application provides a resource recommendation method, which is executed by a computer device and includes: constructing resource prompt information based on positive behavior information of a target object with respect to resources, wherein the positive behavior information is used to represent the positive behavior of the target object with respect to resource preferences, and the resource prompt information is used to represent the resources preferred by the target object; processing the resource prompt information through a large language model to obtain resource text, wherein the resource text is used to describe the resource preferences of the target object in the form of natural language; for any resource to be recommended in a resource library, determining the correlation between the resource to be recommended and the resource text, wherein the correlation is used to represent the correlation between the resource preference of the target object and the resource to be recommended; and recommending resources to the target object based on the corresponding correlations of multiple resources to be recommended in the resource library.
[0009] An embodiment of the present application also provides a resource recommendation device, which includes: a construction module for constructing resource prompt information based on the positive behavior information of the target object with respect to resources, wherein the positive behavior information is used to represent the positive behavior of the target object with respect to resource preferences, and the resource prompt information is used to represent the resources preferred by the target object; a first processing module for processing the resource prompt information through a large language model to obtain a resource text, wherein the resource text is used to describe the resource preferences of the target object in the form of natural language; a determination module for determining, for any resource to be recommended in a resource library, the correlation between the resource to be recommended and the resource text, wherein the correlation is used to represent the correlation between the resource preferences of the target object and the resource to be recommended; a recommendation module for recommending resources to the target object based on the corresponding correlations of multiple resources to be recommended in the resource library.
[0010] An embodiment of the present application further provides a computer device, comprising a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the resource recommendation method in the embodiment of the present application.
[0011] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the resource recommendation method in the embodiment of the present application.
[0012] An embodiment of the present application further provides a computer program product, including a computer program, which is stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the resource recommendation method provided in the above-mentioned various aspects or various optional implementations of each aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0014] FIG1 is a schematic diagram of an implementation environment of a resource recommendation method provided according to an embodiment of the present application.
[0015] FIG2 is a flowchart of a resource recommendation method provided according to an embodiment of the present application.
[0016] FIG3 is a flowchart of another resource recommendation method provided according to an embodiment of the present application.
[0017] FIG4 is a block diagram of a resource recommendation device provided according to an embodiment of the present application.
[0018] FIG5 is a block diagram of another resource recommendation device provided according to an embodiment of the present application.
[0019] FIG6 is a structural block diagram of a terminal provided according to an embodiment of the present application.
[0020] FIG7 is a schematic diagram of the structure of a server provided according to an embodiment of the present application.
[0021] Implementation Method
[0022] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0023] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on the quantity and execution order.
[0024] In the present application, the term "at least one" means one or more, and the term "plurality" means two or more.
[0025] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the resources and positive behavior information involved in this application are obtained with full authorization.
[0026] When recommending resources, traditional resource recommendation models cannot fully learn due to the lack of resource information and sparse user behavior in the recommendation scenarios of many small and medium-sized customers (for example, stores in mini-programs, which can only recommend a few thousand resources and have only about 100,000 users). This leads to inaccurate recommendation results.
[0027] The solution provided in the embodiment of the present application is based on artificial intelligence machine learning technology, which can train a large language model, and then use the trained large language model to implement a resource recommendation method, which can accurately recommend resources to the target object.
[0028] The resource recommendation method provided in the embodiment of the present application can be executed by a computer device. In some embodiments, the computer device is a terminal or a server. First, taking the computer device as a server as an example, the implementation environment of the resource recommendation method provided in the embodiment of the present application is introduced. Figure 1 is a schematic diagram of the implementation environment of a resource recommendation method provided according to the embodiment of the present application. Referring to Figure 1, the implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.
[0029] In some embodiments, terminal 101 is a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, intelligent voice interaction device, smart home appliance, car terminal, etc., but is not limited to this. Terminal 101 installs and runs an application that supports resource display. The application can be a shopping application, a multimedia application, an instant messaging application, or a news information application, etc., and the embodiments of the present application are not limited to this. Illustratively, terminal 101 is the terminal used by the target object. The target object can use terminal 101 to purchase resources such as food, clothing, and daily necessities, or can use terminal 101 to watch multimedia resources such as videos and pictures, and the embodiments of the present application are not limited to this.
[0030] Those skilled in the art will appreciate that the number of the above-mentioned terminals may be more or less. For example, the above-mentioned terminal may be only one, or the above-mentioned terminals may be dozens or hundreds, or a larger number. The embodiments of the present application do not limit the number of terminals and device types.
[0031] In some embodiments, server 102 is a standalone physical server, but it can also be a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), big data, and artificial intelligence platforms. Server 102 is used to provide backend services for applications that support resource display. Server 102 can recommend resources to target users based on their resource preferences. Specifically, server 102 can send information about recommended resources to terminal 101 based on the target user's resource preferences, enabling the target user to access the resources of interest through terminal 101. In some embodiments, server 102 performs primary computing tasks, while terminal 101 performs secondary computing tasks; alternatively, server 102 performs secondary computing tasks, while terminal 101 performs primary computing tasks; alternatively, server 102 and terminal 101 utilize a distributed computing architecture for collaborative computing.
[0032] FIG2 is a flow chart of a resource recommendation method according to an embodiment of the present application. Referring to FIG2 , the resource recommendation method is described in the embodiment of the present application by taking the server as an example. The resource recommendation method includes the following steps.
[0033] 201. The server constructs resource prompt information based on the positive behavior information of the target object with respect to the resource. The positive behavior information is used to indicate the positive behavior of the target object with respect to the resource preference, and the resource prompt information is used to indicate the resource preferred by the target object.
[0034] In the embodiment of the present application, the target object refers to the user. Resources can be commodity resources such as food, clothing, and daily necessities, or multimedia resources such as videos, articles, pictures, or audio, which are limited in this embodiment of the present application. Resources can also be called materials. The target object's preference for a resource can indicate that the target object is interested in the resource. Correspondingly, positive behavior refers to behavior that can reflect the target object's interest in the resource. The server obtains the target object's positive behavior information for the resource. The positive behavior information includes at least one positive behavior. Then, the server constructs resource prompt information based on the positive behavior information. The resource prompt information is used to guide the large language model to understand the target object's resource preference. Among them, the target object's positive behavior information for the resource can be provided by the target object or by the supplier of the resource, which is not limited in this embodiment of the present application.
[0035] 202. The server processes the resource prompt information through a large language model to obtain resource text, which is used to describe the resource preference of the target object in the form of natural language.
[0036] In the embodiment of the present application, the large language model can be ChatGLM (Chat General Language Model) or LLaMa (Large Language Model Meta Artificial Intelligence), which is not limited in the embodiment of the present application. The server inputs the resource prompt information into the large language model, processes the resource prompt information through the large language model, and obtains the resource text. That is, the server understands the resource preferences of the target object through the large language model and describes it in the form of natural language.
[0037] 203. For any resource to be recommended in the resource library, the server determines the relevance between the resource to be recommended and the resource text. The relevance is used to represent the correlation between the resource preference of the target object and the resource to be recommended.
[0038] In an embodiment of the present application, a resource library includes multiple resources to be recommended. The resource library can be deployed in the current server or in another server, and this embodiment of the present application does not limit this. The server calculates the relevance between each resource to be recommended and the resource text in the resource library through a large language model. In other words, the server compares each resource to be recommended in the resource library with the resource preferences of the target object to determine whether the resource to be recommended meets the resource preferences of the target object.
[0039] 204. The server recommends resources to the target object based on the relevance of the multiple resources to be recommended in the resource library.
[0040] In an embodiment of the present application, the server may recommend multiple resources with relatively high relevance in the resource library to the target object. "High relevance" means that the relevance reaches a certain threshold, or a preset number of relevances that are ranked high in a descending order, and this embodiment of the present application does not limit this.
[0041] An embodiment of the present application provides a resource recommendation method. Since the positive behavior information of the target object with respect to resources can reflect the resources preferred by the target object, resource prompt information is constructed through the positive behavior information, so that the resource prompt information can accurately reflect the resource preferences of the target object; then, the resource prompt information is processed through a large language model. Since the large language model has rich corpus knowledge, the resource text obtained through the large language model can more accurately describe the resource preferences of the target object; then, the correlation between the resource text and the resources to be recommended in the resource library is calculated, and based on the correlation between the resources to be recommended and the resource preferences of the target object, the resources are recommended to the target object, so that the recommended resources meet the resource preferences of the target object, thereby improving the accuracy of resource recommendation.
[0042] FIG3 is a flow chart of another resource recommendation method according to an embodiment of the present application. Referring to FIG3 , the resource recommendation method is described by taking the server as an example in the embodiment of the present application. The resource recommendation method includes the following steps.
[0043] 301. The server determines at least one reference resource based on the positive behavior information of the target object with respect to resources. The at least one reference resource is a resource that triggers positive behavior of the target object. The positive behavior information is used to indicate the positive behavior of the target object with respect to resources.
[0044] In an embodiment of the present application, the positive behavior of the target object with respect to a resource is used to indicate that the target object is interested in the resource. The resource meets the resource preference of the target object. The resource may be commodity resources such as food, clothing, and daily necessities. Accordingly, the positive behavior may be a click behavior, a purchase behavior, a collection behavior, or a sharing behavior, etc. The resource may also be a multimedia resource such as a video, an article, a picture, or an audio. Accordingly, the positive behavior may be a click behavior, a like behavior, a collection behavior, a positive comment behavior, or a sharing behavior, etc., which is not limited in the embodiment of the present application. The server obtains the positive behavior information of the target object with respect to the resource. The positive behavior information includes at least one positive behavior of the target object. The positive behavior in the positive behavior information may be triggered by the target object within a preset time period, which is not limited in the embodiment of the present application.
[0045] For example, let's say the resource is food. In the past week, the target user's positive behavior for the resource includes two purchases and one click (no purchase). Specifically, the target user purchased Chaoshan beef rice noodles and shrimp rice rolls, and only clicked on and viewed egg beef noodles. Based on this positive behavior information, the server then determines the three reference resources to be Chaoshan beef rice noodles, shrimp rice rolls, and egg beef noodles.
[0046] Alternatively, the resource is a video. In the past week, the target object's positive behavior information for the resource includes 100 click behaviors (click only) and 25 like behaviors (click + like). Then, based on the above positive behavior information, the server can determine the 100 resources with click behaviors as reference resources, or determine the 25 resources with like behaviors as reference resources. This embodiment of the application does not limit this.
[0047] Among them, the server can determine the reference resource based on the recommendation index of the resource. The recommendation index is used to indicate the standard to be achieved by the reference resource for recommendation. The embodiment of the present application does not limit the recommendation index. For example, the recommendation index includes a first-level index, a second-level index and a third-level index. The first-level index is the existence of click behavior, the second-level index is the existence of collection behavior (click + collection), or the existence of like behavior (click + like); the third-level index is the existence of purchase behavior (click + collection + purchase).
[0048] 302. The server constructs resource prompt information based on at least one reference resource and a recommendation requirement. The recommendation requirement is used to guide the large language model to understand the resource preference of the target object based on the current recommendation scenario. The resource prompt information is used to indicate the resource preferred by the target object.
[0049] In an embodiment of the present application, a server obtains a recommendation requirement. A recommendation requirement refers to the requirements that a recommended resource must meet in the current recommendation scenario and can guide the large language model in understanding the recommended task to be performed. The recommendation requirement can include the resource recommendation scenario, the number of resources required for resource recommendation, or the resource type required for resource recommendation, among other things, though this embodiment of the present application does not limit this. The server constructs resource prompt information based on at least one reference resource and the recommendation requirement. The at least one reference resource can be considered as user behavior information injection, while the recommendation requirement can be considered as role injection. The recommendation requirement allows the large language model to understand the recommended task description and generate corresponding text information based on the current recommendation scenario. In some embodiments, the resource prompt information can be constructed by concatenating the recommendation requirement and at least one reference resource. In the solution provided by the embodiment of the present application, since the target object's positive behavior with respect to the reference resource can reflect the target object's resource preference, and the recommendation requirement can reflect the requirements that the recommended resource must meet in the current recommendation scenario, constructing resource prompt information by combining the reference resource and the recommendation requirement allows the resource prompt information to not only accurately represent the target object's resource preference but also guide the large language model in accurately understanding the target object's resource preference in subsequent processes, thereby facilitating more accurate resource recommendations for the target object.
[0050] For example, a resource prompt might read, "You are a recommendation system targeting small or medium-sized scenarios. I will tell you the target user's consumption behavior information. Please mine the target user's potential preferences and generate a language description. Focus on the accuracy and diversity of the recommendation results. The target user's recently clicked resource sequence is Chaoshan beef rice noodle soup, shrimp rice noodle rolls, and egg beef noodles. Please generate a description of the target user's preferences at the next moment." The phrase "You are a recommendation system targeting small or medium-sized scenarios. I will tell you the target user's consumption behavior information. Please mine the target user's potential preferences and generate a language description" refers to the recommendation requirement, which can subsequently guide the large language model to understand the recommendation task and generate text information based on the requirement. The phrase "The target user's recently clicked resource sequence is Chaoshan beef rice noodle soup, shrimp rice noodle rolls, and egg beef noodles. Please generate a description of the target user's preferences at the next moment" refers to at least one reference resource, which can subsequently guide the large language model to summarize and mine the target user's resource preferences and generate a natural language description of these preferences. "Small or medium-sized scenarios" refer to recommendation scenarios with small scale, limited resource information, and sparse user behavior. For example, a store in a mini program may only have a few thousand recommended resources and only around 100,000 users.
[0051] 303. The server processes the resource prompt information through a large language model to obtain resource text. The resource text is used to describe the resource preference of the target object in the form of natural language.
[0052] In this embodiment of the present application, the server inputs resource prompt information into a large language model. The server then analyzes the resource prompt information using the large language model to obtain resource text. In other words, the server uses the large language model to understand the target object's resource preferences and describe them in natural language.
[0053] In some embodiments, the server analyzes the resource type preferred by the target object based on the resource prompt information, so as to subsequently recommend resources based on the resource type preferred by the target object. Accordingly, the server processes the resource prompt information through a large language model to obtain a resource text, which includes: the server analyzes the resource prompt information through a large language model to determine the target resource type preferred by the target object. Then, the server obtains at least one resource type related to the target resource type. Then, the server generates a resource text based on the target resource type and at least one resource type. When generating a resource text based on the target resource type and at least one related resource type, a first resource text corresponding to the target resource type is generated based on the target resource type; in addition, a second resource text corresponding to at least one related resource type is generated based on at least one related resource type; and the first resource text and the second resource text are spliced to obtain the resource text. The solution provided by the embodiment of the present application, since the large language model has rich corpus knowledge, can accurately determine the resource type preferred by the target object by analyzing the resource prompt information through the large language model, so that the subsequently recommended resources meet the resource preferences of the target object, thereby improving the accuracy of resource recommendations; and, by generating resource text through at least one resource type related to the target resource type, it is beneficial to recommend multiple types of resources to the target object on the basis of ensuring the accuracy of the recommendation, thereby improving the diversity of resource recommendations.
[0054] In the process of acquiring at least one resource type related to the target resource type, the server may adopt at least one of the following methods to acquire the resource type related to the target resource type.
[0055] In the first method, the server obtains at least one resource type related to the target resource type from the current recommendation scenario based on the correlation between resource types. The current recommendation scenario can be a food recommendation scenario, a clothing recommendation scenario, or a multimedia resource recommendation scenario, and the embodiment of the present application does not limit this. This method is equivalent to recommending resources to the target object in the current resource platform based on the resource preferences of the target object in the current resource platform. The solution provided by the embodiment of the present application can recommend resources of various resource types in the current recommendation scenario to the target object, and improves the diversity of resource recommendations in the current recommendation scenario on the basis of ensuring the accuracy of the recommendation.
[0056] The embodiments of the present application do not limit the correlation between resource types. The correlation between resource types can be determined based on the resources. The following uses different resources as an example to exemplify the correlation between resource types, but is by no means limited to this.
[0057] First, the resource is food. The resource type can be Sichuan cuisine, Hunan cuisine or pasta. Accordingly, the correlation between resource types can be a taste relationship or a regional relationship, which is not limited in the embodiments of the present application. If the target resource type preferred by the target object is Sichuan cuisine, the server can analyze the target object's preferred food as generally spicy through the large language model. Then, based on the taste relationship between the resource types, the server obtains Hunan cuisine, which is generally spicy, as a resource type related to the target resource type. If the target resource type preferred by the target object is Cantonese cuisine, the server can analyze the geographical location of the target object's preferred food through the large language model. Then, based on the positional relationship between the resource types, the server obtains Fujian cuisine with a similar geographical location as a resource type related to the target resource type.
[0058] For example, the resource prompt information input to the large language model by the server is: "You are a recommendation system for small and medium-sized scenarios. I will tell you the target user's consumption behavior information. Please explore the target user's potential preferences and generate a language description. Please focus on the accuracy and diversity of the recommendation results. The target user recently clicked on the resource sequence of Chaoshan beef rice noodles, shrimp rice noodle rolls, and egg beef noodles. Please generate a description of the target user's preferences at the next moment." The server analyzes this resource prompt information using the large language model and obtains the resource text: "Based on the target user's recent click behavior, it can be seen that the target user is interested in Cantonese cuisine and noodles. In other words, the target user may like Chaoshan cuisine and noodles within Cantonese cuisine, such as Guangdong specialty snacks, Cantonese delicacies, and various noodles. In addition, the target user may also be interested in cuisines from other regions, such as Sichuan cuisine, Hunan cuisine, and Northeastern cuisine." "Chaoshan cuisine and noodles" refers to the target user's preferred resource types. "Sichuan cuisine, Hunan cuisine, and Northeastern cuisine" refers to resource types related to the target resource type. "Based on the target object's recent click behavior, it can be seen that the target object is more interested in Cantonese cuisine and pasta. That is, the target object may like Chaoshan cuisine and pasta in Cantonese cuisine, such as Guangdong specialty snacks, Cantonese delicacies, various pasta, etc." is the first resource text corresponding to the target resource type; "In addition, the target object may also be interested in food from other places, such as Sichuan cuisine, Hunan cuisine, Northeast cuisine, etc." is the second resource text corresponding to at least one related resource type.
[0059] Second, the resource is clothing. The resource type can be a top, pants, skirt or hat, etc. Correspondingly, the correlation between resource types can be a color relationship, a season relationship or a material relationship, etc., and the embodiments of the present application do not limit this. If the target resource type preferred by the target object is a top, the server can analyze the color preferred by the target object through the large language model, and then the server obtains pants or hats that match the color of the top according to the color relationship between the resource types as the resource type related to the target resource type. If the target resource type preferred by the target object is shorts, the server can analyze that the clothing preferred by the target object belongs to summer according to the large language model, and then the server obtains short-sleeved tops such as tops that match the season corresponding to the shorts according to the season relationship between the resource types as the resource type related to the target resource type.
[0060] For example, the resource prompt information input to the large language model by the server is as follows: "You are a recommendation system for small and medium-sized scenarios. I will tell you the target user's consumption behavior information. Please explore the target user's potential preferences and generate a language description. Please focus on the accuracy and diversity of the recommendation results. The target user's recent purchase sequence of resources is short-sleeved shirts, sun-protective clothing, and shirts. Please generate a description of the target user's preferences at the next moment." The server analyzes this resource prompt information using the large language model and obtains the resource text: "Based on the target user's recent click behavior, it can be seen that the target user is interested in tops. In other words, the target user may like tops suitable for summer wear. In addition, the target user may also be interested in other summer-appropriate clothing, such as shorts or skirts." Here, "tops" refers to the target user's preferred resource type. "Shorts or skirts" refers to resource types related to the target resource type. "Based on the target object's recent click behavior, it can be seen that the target object is more interested in tops. That is, the target object may like tops suitable for summer wear" is the first resource text corresponding to the target resource type, and "In addition, the target object may also be interested in other clothes suitable for summer wear, such as shorts or short skirts, etc." is the second resource text corresponding to at least one related resource type.
[0061] Third, the resource is a multimedia resource such as a video. The resource type can be a variety of genres, such as explanations, comedies, or documentaries, and this embodiment of the application does not limit this. If the target resource type preferred by the target object is explanations, the server can analyze the target object's preferred explanation content using a large language model. Based on the content relationship between resource types, the server can retrieve documentary resources with the same explanation content as resource types related to the target resource type.
[0062] For example, the server inputs the resource prompt information into the large language model as follows: "You are a recommendation system for small and medium-sized scenarios. I will tell you the target user's click behavior information. Please explore the target user's potential preferences and generate a language description. Please focus on the accuracy and diversity of the recommendation results. The target user recently clicked on the following resource sequence: explanation videos for Movie 1, Movie 2, and Movie 3. Please generate a description of the target user's preferences at the next moment." The server analyzes this resource prompt information using the large language model and obtains the resource text: "Based on the target user's recent click behavior, it can be seen that the target user is interested in explanation videos. In other words, the target user may like movie explanation videos. In addition, the target user may also be interested in other movie-related videos, such as documentary videos about movies." Here, "explanation videos" refers to the target user's preferred resource type. "Documentary videos about movies" refers to resource types related to the target resource type. "Based on the target object's recent click behavior, it can be seen that the target object is more interested in explanations. That is, the target object may like videos that explain movies" is the first resource text corresponding to the target resource type, and "In addition, the target object may also be interested in other movie-related videos, such as documentary videos of movies, etc." is the second resource text corresponding to at least one related resource type.
[0063] In the second method, the server determines the resource preferences of the target objects in other recommendation scenarios based on other recommendation scenarios related to the current recommendation scenario. Then, based on the resource preferences of the target objects in other recommendation scenarios, the server obtains at least one resource type related to the target resource type from the current recommendation scenario. The types of resources recommended by other recommendation scenarios and the current recommendation scenario may be the same or different, and the embodiment of the present application does not limit this. The supplier of resources in other recommendation scenarios may be the same or different from the supplier of resources in the current recommendation scenario. The solution provided by the embodiment of the present application enables multiple recommendation scenarios to share a large language model to realize resource recommendation, which greatly saves the cost of resource recommendation; and it can recommend resources of multiple resource types to the target object across scenarios, which not only ensures the accuracy of the recommendation, but also improves the diversity of resource recommendations.
[0064] For example, the other recommendation scenarios and the current recommendation scenario recommend the same type of resources. Both the other recommendation scenarios and the current recommendation scenario are used to recommend food. Accordingly, based on the food type preferred by the target subject in the other recommendation scenarios, the server retrieves at least one food type related to that food type from the current recommendation scenario, so as to subsequently recommend foods of that food type and at least one food type related to that food type to the target subject. This method is equivalent to recommending resources to the target subject on the current resource platform based on the target subject's resource preferences for the same type in other resource platforms.
[0065] Alternatively, the types of resources recommended by other recommendation scenarios and the current recommendation scenario are different. Other recommendation scenarios are used to recommend daily necessities, and the current recommendation scenario is used to recommend food. Accordingly, based on the types of daily necessities preferred by the target object in other recommendation scenarios, the server obtains at least one type of food related to the type of daily necessities from the current recommendation scenario, so as to subsequently recommend videos of at least one type of food related to the type of daily necessities to the target object. For example, the type of daily necessities preferred by the target object in other recommendation scenarios is baby products. Accordingly, the server obtains at least one type of food suitable for babies from the current recommendation scenario, so as to subsequently recommend food suitable for babies to the target object. This method is equivalent to recommending resources to the target object in the current resource platform based on the target object's resource preferences in other resource platforms of different types.
[0066] 304. For any resource to be recommended in the resource library, the server determines the relevance between the resource to be recommended and the resource text. The relevance is used to represent the correlation between the resource preference of the target object and the resource to be recommended.
[0067] In an embodiment of the present application, the large language model includes a recommendation task layer. Using the recommendation task layer within the large language model, the server compares each resource to be recommended in the resource library with the target user's resource preferences to determine whether the resource meets the target user's resource preferences. In other words, the server uses the large language model to calculate the correlation between each resource to be recommended and the resource text in the resource library to determine whether the resource meets the target user's resource preferences.
[0068] In some embodiments, the relevance between the resource to be recommended and the resource text refers to the similarity between the resource to be recommended and the resource text. Accordingly, the process by which the server determines the relevance between the resource to be recommended and the resource text includes: for any resource to be recommended in the resource library, the server extracts features of the resource to be recommended based on a large language model to obtain resource features of the resource to be recommended. Resource features are used to represent detailed information of the resource to be recommended. Then, the server extracts features of the resource text based on the large language model to obtain resource text features. Then, the server determines the similarity between the resource features of the resource to be recommended and the resource text features. Similarity refers to the relevance between the resource preference of the target object and the resource to be recommended. The higher the similarity, the more the corresponding resource to be recommended conforms to the resource preference of the target object. The solution provided in the embodiment of the present application can more accurately determine whether the resource to be recommended conforms to the resource preference of the target object by calculating the similarity between the resource features of the resource to be recommended and the features of the resource text, thereby facilitating subsequent more accurate resource recommendations.
[0069] In some embodiments, the resource features and resource text features of the resource to be recommended may be d-dimensional feature vectors. The server may calculate the similarity between the resource features and resource text features of the resource to be recommended using the following formula 1.
[0070] Formula 1:
[0071] Among them, i is used to represent the number of the resource to be recommended in the resource library; m i Used to represent the resource characteristics of the i-th resource to be recommended, m i ∈ R 1×d , d is used to represent the dimension of the feature; T is used to represent the transposition; v p Used to represent resource text features, v p ∈R 1×d , d is used to represent the dimension of the feature; r i,t It is used to represent the similarity between the resource features of the i-th resource to be recommended and the resource text features, and is used to recommend the i-th resource to be recommended to the target object at the t-th moment (the next moment), so as to prompt the target object to trigger positive behavior for the i-th resource to be recommended.
[0072] In the process of obtaining the resource characteristics of the resource to be recommended, for any resource to be recommended in the resource library, the server obtains the text information of the resource to be recommended. Then, based on the large language model, the server performs feature extraction on the text information to obtain the resource characteristics of the resource to be recommended. That is, the server encodes the text information of the resource to be recommended based on the large language model to obtain the resource characteristics of the resource to be recommended. Among them, the text information is the detailed information of the resource to be recommended. The text information may include at least one information such as the resource name, resource type, resource content and resource tag, wherein the resource tag can be used to indicate the consumption method or resource type carried by the resource, etc., and the embodiment of the present application does not limit this. The solution provided in the embodiment of the present application utilizes the rich corpus knowledge possessed by the large language model to perform feature processing on the text information of the resource to be recommended, which can improve the accuracy of the resource text, that is, it can accurately describe the resource preferences of the target object, which is conducive to more accurate recommendation of resources for the target object in the future.
[0073] The server can store the resource features of the resource to be recommended in a resource library. The resource library can be Faiss, which is not limited in this embodiment of the present application. The server can then create an index of the resource to be recommended in the resource library so that the resource can be searched from the resource library based on the index.
[0074] 305. The server recommends resources to the target object based on the relevance of the multiple resources to be recommended in the resource library.
[0075] In an embodiment of the present application, the server can recommend a plurality of resources to be recommended with a relatively large corresponding relevance in the resource library to the target object. That is, the server can recommend a plurality of resources to be recommended with a relevance reaching a preset value to the target object. Alternatively, the server can also recommend a preset number of resources to be recommended that are ranked at the top in the order of relevance from high to low to the target object. In other words, the server can use the resource text features of the target object as query information to retrieve a preset number of resource features that are most similar to the resource text features in the resource library (such as Faiss). Then, the server outputs the indexes and relevance corresponding to the preset number of resource features through the large language model. Then, the server recommends the resources to be recommended indicated by the index to the target object. The embodiment of the present application does not impose any restrictions on this. Compared with traditional recommendation systems, this solution implements end-to-end recommendation based on a large language model. It only requires the positive behavior information of the target object on the large language model input to achieve accurate resource recommendation without the need for complex embedded point design, which optimizes the design process of the model and saves the deployment cost of resource recommendation.
[0076] In some embodiments, the server recommends a preset number of resources to be recommended that are ranked top in a descending order of relevance to the target object. Accordingly, the process of the server recommending resources to the target object based on the relevance corresponding to a plurality of resources to be recommended in the resource library includes: the server sorts the plurality of resources to be recommended in the resource library in a descending order of relevance. Then, the server recommends a preset number of resources to be recommended that are ranked top to the target object. The solution provided in the embodiment of the present application ensures that the recommended resources meet the resource preferences of the target object and improves the accuracy of resource recommendations by recommending a plurality of resources to be recommended that have greater relevance to the target object.
[0077] Due to the disparity between the training tasks and recommendation tasks of large language models, and the fact that large language models are not specifically trained using datasets for recommendation tasks, directly using large language models for recommendations may limit their recommendation performance. The "training task" refers to training the large language model based on a large amount of common language text to enable it to understand the semantics of the text. The "recommendation task" refers to training the large language model based on resource information and object behavior information to enable it to recommend resources to objects. In some embodiments, before making resource recommendations, the server may train the large language model based on the recommendation task. Accordingly, the large language model training process includes: the server constructing sample prompt information based on the sample object's positive behavior information regarding resources. The positive behavior information represents the sample object's positive behavior preference for resources. The sample prompt information represents the sample object's preferred resource. The server then processes the sample prompt information using the large language model to obtain sample resource text. The sample resource text describes the sample object's resource preference in natural language. The server then determines a predicted recommendation result based on the sample resource text. The predicted recommendation results represent the resources predicted by the large language model to be recommended to the sample subject. The server then trains the large language model based on the predicted recommendation results and the reference recommendation results, with the reference recommendation results representing the resources actually recommended to the sample subject. The solution provided in the embodiments of the present application trains the large language model using resources actually recommended to the sample subject and resources predicted by the large language model. This effectively improves the generalization ability of the large language model in recommendation tasks and helps improve the accuracy of resource recommendations made by the large language model.
[0078] The server can first obtain a large language model trained on language text. This large language model, trained on language text, has rich corpus knowledge. The server then maintains the parameters of the large language model unchanged and adds adjustable parameters to it. The server then adjusts the adjustable parameters of the large language model with the goal of minimizing the difference between the predicted recommendation results and the reference recommendation results.
[0079] In some embodiments, the server can determine the parameters of the large language model through the following formula two.
[0080] Formula two: W0 + ΔW = W0 + BA, B ∈ R d×r ; A ∈ R r×k .
[0081] Where, d, r, and k are used to represent dimensions, and r << min(d, k). W0 is used to represent the original parameters of the large language model, that is, the model parameters after training based on language text; ΔW is used to represent the adjustable parameters of the large language model, ΔW = BA; A and B are used to represent parameter matrices; during the model training process, the server keeps the original parameters W0 of the large language model frozen and does not need to be updated. Only the parameter matrices A and B need to be trained. Before model training, the server can initialize the parameter matrix A using a random Gaussian distribution and set the parameter matrix B as a full-zero matrix to ensure that the matrix BA is a full-zero matrix before training. Initially, the output of the large language model is h = W0x. x is used to represent the model input. When the parameters are updated, the model output is h = W0x + ΔWx = W0x + BAx.
[0082] The above training method can be regarded as a fine-tuning method of LoRA (Low-Rank Adaptation). The LoRA fine-tuning method means freezing the original parameters in the pre-trained model and introducing trainable low-rank decomposition matrices (also known as bypass matrices) in each layer of the Transformer architecture. During fine-tuning, only the bypass matrix (BA) needs to be updated. By optimizing the low-rank decomposition matrix, this method can effectively supplement the information of downstream recommendation tasks into the large language model while freezing the original model structure parameters. The model parameters updated during the training process are only about one-thousandth of the original large language model parameters. Compared with updating all the original model parameters of the large language model, the above training method adjusts fewer parameters and is a lightweight fine-tuning training method, which can improve the training efficiency. Through LoRA fine-tuning, the generalization ability of the large language model in recommendation tasks can be effectively improved. In this solution, multiple small and medium-sized customers can share the same large-scale language model, which can effectively save costs. As the number of connected customers increases, the material knowledge of the large language model can be effectively reused, and the better the effect of model fine-tuning, and the recommendation ability of the model also increases accordingly.
[0083] In some embodiments, before performing the above-mentioned model fine-tuning, the server inputs the sample prompt information into the large language model to obtain the sample resource text. Then, the server corrects the sample resource text. Then, the server uses the sample prompt information and the corrected sample resource text as a training sample. That is, the server regards the sample prompt information and the corrected sample resource text as a round of dialogue with the large language model. Then, the server trains with multiple training samples so that the large language model can accurately describe the resource preferences of the sample object. That is, the server trains the large language model with multiple training data with prompt information. The prompt information in this application can also be referred to as prompt words.
[0084] An embodiment of the present application provides a resource recommendation method. Since the positive behavior information of the target object with respect to resources can reflect the resources preferred by the target object, resource prompt information is constructed through the positive behavior information, so that the resource prompt information can accurately reflect the resource preferences of the target object; then, the resource prompt information is processed through a large language model. Since the large language model has rich corpus knowledge, the resource text obtained through the large language model can more accurately describe the resource preferences of the target object; then, the correlation between the resource text and the to-be-recommended resources in the resource library is calculated, and based on the correlation between the to-be-recommended resources and the resource preferences of the target object, the resources are recommended to the target object, so that the recommended resources meet the resource preferences of the target object, thereby improving the accuracy of resource recommendation; and, compared with the "recall-rough sorting-fine sorting-rearrangement" model chain in the design of traditional recommendation systems, this solution uses the positive behavior information of the target object to achieve recommendation, which can effectively shorten the recommendation chain and improve the efficiency of resource recommendation.
[0085] FIG4 is a block diagram of a resource recommendation device according to an embodiment of the present application. The resource recommendation device is used to execute the steps of the resource recommendation method described above. Referring to FIG4 , the resource recommendation device includes: a construction module 401, a first processing module 402, a determination module 403, and a recommendation module 404.
[0086] The construction module 401 is used to construct resource prompt information based on the positive behavior information of the target object with respect to resources. The positive behavior information is used to indicate the positive behavior of the target object with respect to resources, and the resource prompt information is used to indicate the resources preferred by the target object.
[0087] The first processing module 402 is used to process the resource prompt information through a large language model to obtain resource text, which is used to describe the resource preference of the target object in the form of natural language.
[0088] The determination module 403 is used to determine the relevance between any resource to be recommended in the resource library and the resource text. The relevance is used to indicate the relevance between the resource preference of the target object and the resource to be recommended.
[0089] The recommendation module 404 is configured to recommend resources to a target object based on the relevance of a plurality of resources to be recommended in the resource library.
[0090] In some embodiments, Figure 5 is a block diagram of another resource recommendation apparatus provided according to an embodiment of the present application. Referring to Figure 5 , construction module 401 is configured to determine at least one reference resource based on the target object's positive behavior information regarding resources, where the at least one reference resource is a resource that triggers positive behavior for the target object; and construct resource prompt information based on the at least one reference resource and recommendation requirements, where the recommendation requirements are requirements that must be met for the recommended resource in the current recommendation scenario.
[0091] In some embodiments, referring to FIG. 5 , the first processing module 402 includes an analyzing unit 4021 , an acquiring unit 4022 , and a generating unit 4023 .
[0092] The analyzing unit 4021 is configured to analyze the resource prompt information using a large language model to determine the target resource type preferred by the target object.
[0093] The acquisition unit 4022 is configured to acquire at least one resource type related to the target resource type.
[0094] The generating unit 4023 is configured to generate a resource text based on the target resource type and at least one resource type.
[0095] In some embodiments, referring to FIG. 5 , the acquiring unit 4022 is configured to acquire at least one resource type related to the target resource type from the current recommendation scenario based on the correlation between the resource types.
[0096] The acquisition unit 4022 is further used to determine the resource preferences of the target objects in other recommended scenarios based on other recommended scenarios related to the current recommended scenario; and based on the resource preferences of the target objects in other recommended scenarios, acquire at least one resource type related to the target resource type from the current recommended scenario.
[0097] In some embodiments, referring to FIG. 5 , the determination module 403 includes: a first processing unit 4031 , a second processing unit 4032 , and a determination unit 4033 .
[0098] The first processing unit 4031 is configured to extract features of any resource to be recommended in the resource library based on the large language model to obtain resource features of the resource to be recommended, where the resource features are used to represent detailed information of the resource to be recommended.
[0099] The second processing unit 4032 is configured to extract features from the resource text based on the large language model to obtain resource text features.
[0100] The determining unit 4033 is configured to determine the similarity between the resource feature of the resource to be recommended and the resource text feature. The similarity refers to the correlation between the resource preference of the target object and the resource to be recommended.
[0101] In some embodiments, referring to FIG5 , the first processing unit 4031 is used to obtain text information of any resource to be recommended in the resource library, where the text information is detailed information of the resource to be recommended; and based on the large language model, feature extraction is performed on the text information to obtain resource features of the resource to be recommended.
[0102] In some embodiments, referring to FIG5 , the recommendation module 404 is configured to sort the plurality of resources to be recommended in the resource library in descending order of relevance, and recommend a preset number of resources to be recommended that are ranked high to the target object.
[0103] In some embodiments, referring to FIG5 , the construction module 401 is further used to construct sample prompt information based on the positive behavior information of the sample object with respect to resources. The positive behavior information is used to represent the positive behavior of the sample object with respect to resource preferences. The sample prompt information is used to represent the resources preferred by the sample object.
[0104] The first processing module 402 is further configured to process the sample prompt information through a large language model to obtain a sample resource text, where the sample resource text is used to describe the resource preference of the sample object in a natural language form.
[0105] The recommendation module 404 is further configured to determine a predicted recommendation result based on the sample resource text, where the predicted recommendation result is used to represent the resource recommended to the sample object as predicted by the large language model.
[0106] The apparatus further includes a training module 405 for training the large language model based on the predicted recommendation results and the reference recommendation results, where the reference recommendation results are used to represent resources recommended to the sample object in a real situation.
[0107] In some embodiments, referring to FIG. 5 , the apparatus further includes: an acquisition module 406 and a second processing module 407 .
[0108] The acquisition module 406 is used to acquire a large language model trained based on the language text.
[0109] The second processing module 407 is used to keep the parameters of the large language model unchanged and add adjustable parameters to the large language model.
[0110] The training module 405 is configured to adjust the adjustable parameters of the large language model with the goal of minimizing the difference between the predicted recommendation result and the reference recommendation result.
[0111] An embodiment of the present application provides a resource recommendation device. Since the positive behavior information of the target object with respect to resources can reflect the resources preferred by the target object, resource prompt information is constructed through the positive behavior information, so that the resource prompt information can accurately reflect the resource preferences of the target object; then, the resource prompt information is processed through a large language model. Since the large language model has rich corpus knowledge, the resource text obtained through the large language model can more accurately describe the resource preferences of the target object; then, the correlation between the resource text and the resource to be recommended in the resource library is calculated, and based on the correlation between the resource to be recommended and the resource preference of the target object, the resource is recommended to the target object, so that the recommended resource meets the resource preference of the target object, thereby improving the accuracy of resource recommendation.
[0112] It should be noted that the resource recommendation device provided in the above embodiment is only illustrated by the division of the above functional modules when running an application. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the resource recommendation device provided in the above embodiment and the resource recommendation method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0113] In the embodiments of the present application, the computer device can be configured as a terminal or a server. When the computer device is configured as a terminal, the terminal can be used as the execution subject to implement the technical solution provided in the embodiments of the present application. When the computer device is configured as a server, the server can be used as the execution subject to implement the technical solution provided in the embodiments of the present application. The technical solution provided in the present application can also be implemented through interaction between the terminal and the server. The embodiments of the present application do not limit this.
[0114] FIG6 shows a block diagram of a terminal 600 according to an exemplary embodiment of the present application. The terminal 600 includes a processor 601 and a memory 602 .
[0115] The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 601 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 601 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0116] The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 602 is used to store at least one computer program, which is executed by the processor 601 to implement the resource screening method provided in the method embodiment of the present application.
[0117] In some embodiments, terminal 600 may optionally include a peripheral device interface 603 and at least one peripheral device. Processor 601, memory 602, and peripheral device interface 603 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 603 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 604, a display screen 605, a camera assembly 606, an audio circuit 607, and a power supply 608.
[0118] Those skilled in the art will appreciate that the structure shown in FIG6 does not limit the terminal 600 and may include more or fewer components than shown, or combine certain components, or adopt a different component arrangement.
[0119] FIG7 is a schematic diagram of the structure of a server provided according to an embodiment of the present application. The server 700 may vary significantly due to different configurations or performances, and may include one or more processors (Central Processing Units, CPUs) 701 and one or more memories 702, wherein the memories 702 store at least one computer program, which is loaded and executed by the processor 701 to implement the resource recommendation methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input and output. The server may also include other components for implementing device functions, which will not be described in detail here.
[0120] The present application also provides a computer-readable storage medium that stores at least one computer program. The at least one computer program is loaded and executed by a processor of a computer device to implement the operations performed by the computer device in the resource recommendation method of the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0121] The present application also provides a computer program product, including a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the resource recommendation method provided in the various optional implementations described above.
[0122] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0123] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A resource recommendation method, executed by a computer device, comprising: Based on the positive behavior information of the target object with respect to the resource, constructing resource prompt information, wherein the positive behavior information is used to indicate the positive behavior of the target object with respect to the resource preference, and the resource prompt information is used to indicate the resource preferred by the target object; The resource prompt information is processed by a large language model to obtain a resource text, where the resource text is used to describe the resource preference of the target object in a natural language form; For any resource to be recommended in the resource library, determining the relevance between the resource to be recommended and the resource text, wherein the relevance is used to represent the correlation between the resource preference of the target object and the resource to be recommended; Based on the relevance of a plurality of resources to be recommended in the resource library, recommend resources to the target object.
2. The method according to claim 1, wherein: The constructing of resource prompt information based on the positive behavior information of the target object with respect to the resource includes: Based on the positive behavior information of the target object with respect to the resource, determining at least one reference resource, wherein the at least one reference resource is a resource for which the target object triggers a positive behavior; The resource prompt information is constructed based on the at least one reference resource and the recommendation requirement, where the recommendation requirement is a requirement to be met by the recommended resource in the current recommendation scenario.
3. The method according to claim 1 or 2, wherein: The resource prompt information is processed by the large language model to obtain the resource text, including: Analyzing the resource prompt information through the large language model to determine the target resource type preferred by the target object; Acquire at least one resource type related to the target resource type; The resource text is generated based on the target resource type and the at least one resource type.
4. The method according to any one of claims 1 to 3, wherein: The acquiring of at least one resource type related to the target resource type includes at least one of the following: Based on the correlation between resource types, obtaining at least one resource type related to the target resource type from the current recommendation scenario; or, Based on other recommended scenarios related to the current recommended scenario, determine the resource preferences of the target object in the other recommended scenarios; based on the resource preferences of the target object in the other recommended scenarios, obtain at least one resource type related to the target resource type from the current recommended scenario.
5. The method according to any one of claims 1 to 4, wherein: The step of determining the relevance between any resource to be recommended in the resource library and the resource text includes: For any resource to be recommended in the resource library, based on the large language model, feature extraction is performed on the resource to be recommended to obtain resource features of the resource to be recommended, where the resource features are used to represent detailed information of the resource to be recommended; Based on the large language model, feature extraction is performed on the resource text to obtain resource text features; The similarity between the resource feature of the resource to be recommended and the resource text feature is determined, wherein the similarity refers to the relevance between the resource preference of the target object and the resource to be recommended.
6. The method according to any one of claims 1 to 5, wherein: For any resource to be recommended in the resource library, extracting features of the resource to be recommended based on the large language model to obtain resource features of the resource to be recommended includes: For any resource to be recommended in the resource library, obtain text information of the resource to be recommended, where the text information is detailed information of the resource to be recommended; Based on the large language model, feature extraction is performed on the text information to obtain resource features of the resource to be recommended.
7. The method according to any one of claims 1 to 6, wherein: The recommending resources to the target object based on the relevances of the plurality of resources to be recommended in the resource library includes: Sorting the multiple resources to be recommended in the resource library in descending order of relevance; A preset number of recommended resources with a high ranking are recommended to the target object.
8. The method according to any one of claims 1 to 7, wherein: The training process of the large language model includes: Based on the positive behavior information of the sample object with respect to the resource, constructing sample prompt information, wherein the positive behavior information is used to indicate the positive behavior of the sample object with respect to the resource preference, and the sample prompt information is used to indicate the resource preferred by the sample object; Processing the sample prompt information through the large language model to obtain a sample resource text, where the sample resource text is used to describe the resource preference of the sample object in a natural language form; Based on the sample resource text, a prediction recommendation result is determined, and the prediction recommendation result is used to represent the prediction of the large language model. The recommended resources for the sample object; The large language model is trained based on the predicted recommendation result and the reference recommendation result, and the reference recommendation result is used to represent the resources recommended to the sample object in a real situation.
9. The method according to any one of claims 1 to 8, wherein: The method further comprises: Obtaining the large language model trained based on the language text; Keeping the parameters of the large language model unchanged, adding adjustable parameters to the large language model; The training of the large language model based on the predicted recommendation result and the reference recommendation result includes: The adjustable parameters of the large language model are adjusted with the goal of minimizing the difference between the predicted recommendation result and the reference recommendation result.
10. A resource recommendation device, comprising: A construction module, configured to construct resource prompt information based on the positive behavior information of the target object with respect to the resource, wherein the positive behavior information is used to indicate the positive behavior of the target object with respect to the resource preference, and the resource prompt information is used to indicate the resource preferred by the target object; A first processing module is used to process the resource prompt information through a large language model to obtain a resource text, wherein the resource text is used to describe the resource preference of the target object in a natural language form; A determination module, used for determining, for any resource to be recommended in the resource library, a relevance between the resource to be recommended and the resource text, wherein the relevance is used to represent the correlation between the resource preference of the target object and the resource to be recommended; The recommendation module is used to recommend resources to the target object based on the relevance corresponding to the multiple resources to be recommended in the resource library.
11. The device according to claim 10, wherein: The construction module is used to determine at least one reference resource based on the positive behavior information of the target object with respect to the resource, wherein the at least one reference resource is a resource for triggering a positive behavior of the target object; The resource prompt information is constructed based on the at least one reference resource and the recommendation requirement, where the recommendation requirement is a requirement to be met by the recommended resource in the current recommendation scenario.
12. The device according to claim 10 or 11, wherein: The first processing module includes: an analyzing unit, an acquiring unit and a generating unit; The analyzing unit is used to analyze the resource prompt information through the large language model to determine the target resource type preferred by the target object; The acquisition unit is used to acquire at least one resource type related to the target resource type; The generating unit is used to generate the resource text based on the target resource type and the at least one resource type.
13. The device according to any one of claims 10 to 12, wherein the acquisition unit is configured to acquire at least one resource type related to the target resource type from the current recommendation scenario based on the correlation between resource types; or The acquisition unit is used to determine the resource preferences of the target object in other recommended scenarios based on other recommended scenarios related to the current recommended scenario; and based on the resource preferences of the target object in the other recommended scenarios, acquire at least one resource type related to the target resource type from the current recommended scenario.
14. The device according to any one of claims 10 to 13, wherein: The determination module includes: a first processing unit, a second processing unit and a determination unit; The first processing unit is used to extract features of any resource to be recommended in the resource library based on the large language model to obtain resource features of the resource to be recommended, where the resource features are used to represent detailed information of the resource to be recommended; The second processing unit is used to extract features from the resource text based on the large language model to obtain resource text features; The determining unit is used to determine the similarity between the resource feature of the resource to be recommended and the resource text feature, where the similarity refers to the correlation between the resource preference of the target object and the resource to be recommended.
15. The device according to any one of claims 10 to 14, wherein: The first processing unit is used to obtain text information of any resource to be recommended in the resource library, where the text information is detailed information of the resource to be recommended; Based on the large language model, feature extraction is performed on the text information to obtain resource features of the resource to be recommended.
16. The device according to any one of claims 10 to 15, wherein: The recommendation module is used to sort the multiple resources to be recommended in the resource library in descending order of relevance; and recommend a preset number of resources to be recommended that are ranked high to the target object.
17. The device according to any one of claims 10 to 16, wherein: The device also includes: a training module; The construction module is used to construct sample prompt information based on the positive behavior information of the sample object for the resource, wherein the positive behavior The sample information is used to indicate the positive behavior of the sample object in terms of resource preference, and the sample prompt information is used to indicate the resource preferred by the sample object; The first processing module is used to process the sample prompt information through the large language model to obtain a sample resource text, where the sample resource text is used to describe the resource preference of the sample object in a natural language form; The recommendation module is used to determine a predicted recommendation result based on the sample resource text, wherein the predicted recommendation result is used to represent the resource recommended to the sample object predicted by the large language model; The training module is used to train the large language model based on the predicted recommendation result and the reference recommendation result, and the reference recommendation result is used to represent the resources recommended to the sample object in real situation.
18. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded by the processor to execute the resource recommendation method according to any one of claims 1 to 9.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store at least one computer program, and the at least one computer program is used to execute the resource recommendation method according to any one of claims 1 to 9.
20. A computer program product, comprising computer instructions, wherein the computer instructions are stored in a computer-readable storage medium, and a processor obtains the computer instructions from the computer-readable storage medium, so that the processor loads and executes the computer instructions to implement the resource recommendation method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Multimedia file recommendation method and device, electronic equipment and readable storage medium
CN113032589A
Resource recommendation information pushing method and device, computer equipment and storage medium
CN114707510A
Resource screening method and device, computer equipment and storage medium
CN116955835A
Resource recommendation method and device, computer equipment and storage medium
CN117033799A
Multimedia resource recommendation method and device, computer equipment and storage medium
CN117216297A
Cited By
Resource recommendation method and device, model training method and device, equipment and medium
CN120723977A
Resource recommendation method and device based on multi-cloud environment, equipment and storage medium
CN120979970A