Content recommendation method and device, storage medium and computing equipment
By integrating large language models and calling interfaces of different recommendation modules in the recommendation system, predicting user intentions and calling corresponding modules, the problem of insufficient flexibility and scalability of the existing recommendation system is solved, and efficient and diversified content recommendation is achieved.
Patent Information
- Application Number
- CN202411805230.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-28
AI Technical Summary
The existing recommendation system is based on fixed algorithms and models, lacks flexibility and scalability, making it difficult to effectively recommend different types of content, resulting in users needing additional learning to use different recommendation modules, which increases the cost of use.
In the recommendation system, the large language model and the calling interface for calling different recommendation modules are integrated, the user's recommendation intention is predicted through the large language model, and the corresponding recommendation module is called for content recommendation.
It realizes low-cost content recommendation, improves the diversity of recommendation results, reduces user learning costs, and does not require users to judge which recommendation module their own needs belong to.
Smart Images

Figure CN119719498A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and more specifically, to a content recommendation method, apparatus, storage medium, and computing device. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the present disclosure. No description herein is admitted to be prior art by virtue of its inclusion in this section.
[0003] With the development of Internet technology, users are faced with a huge amount of information. How to quickly and accurately obtain the content they are interested in has become an important issue. As a solution, the recommendation system provides users with personalized content recommendation services by analyzing their historical behaviors and interests.
[0004] However, existing recommendation systems usually recommend content based on fixed algorithms and models, lacking flexibility and scalability. In addition, different types of content require different recommendation modules to recommend specific types of content. Users need to learn how to use different recommendation modules, which has a certain usage cost. Summary of the invention
[0005] In a first aspect of the embodiments of the present disclosure, a content recommendation method is provided. The method is applied to a recommendation system, wherein the recommendation system integrates a large language model and a calling interface for calling different recommendation modules, wherein different recommendation modules are used to perform different types of content recommendations, and the method comprises:
[0006] In response to a recommendation request to be processed, inputting the request data carried by the recommendation request as prompt information into the large language model;
[0007] Obtaining a target calling interface determined by the large language model from different calling interfaces according to the prompt information; the target calling interface includes a calling interface corresponding to the request intent of the request data;
[0008] Through the target calling interface, a target recommendation module connected to the target calling interface is called to perform content recommendation.
[0009] Optionally, basic prompt information is pre-stored in the recommendation system, and the basic prompt information is used to guide the large language model to generate output that meets expectations;
[0010] Before inputting the request data carried by the recommendation request as prompt information into the large language model, the method further includes:
[0011] The request data carried in the recommendation request is concatenated with the basic prompt information to obtain new prompt information;
[0012] The step of inputting the request data carried by the recommendation request as prompt information into the large language model includes:
[0013] The new prompt information is input into the large language model.
[0014] Optionally, the expected output includes: the output result includes at least a target calling interface and interface parameters; wherein the interface parameters include the request intent determined from the prompt information.
[0015] Optionally, calling a target recommendation module connected to the target calling interface to perform content recommendation through the target calling interface includes:
[0016] Calling the target calling interface, and transmitting the interface parameters to the target recommendation module connected to the target calling interface;
[0017] The target recommendation module retrieves the recommended content that meets the request intent based on the interface parameters.
[0018] Optionally, before concatenating the request data carried in the recommendation request with the basic prompt information to obtain new prompt information, the method further includes:
[0019] Acquire recommendation preference data of the initiator of the recommendation request; wherein the recommendation preference data indicates the content type preferred by the initiator;
[0020] The step of concatenating the request data carried by the recommendation request with the basic prompt information to obtain new prompt information includes:
[0021] The request data carried in the recommendation request and the recommendation preference data are concatenated with the basic prompt information to obtain new prompt information.
[0022] Optionally, obtaining the recommendation preference data of the initiator of the recommendation request includes:
[0023] Acquire historical behavior data of the initiator of the recommendation request within a first preset time period before the current moment;
[0024] The recommendation preference data of the initiator is determined from the historical behavior data.
[0025] Optionally, before concatenating the request data carried in the recommendation request with the basic prompt information to obtain new prompt information, the method further includes:
[0026] Acquire real-time recommendation trend data of the recommendation system; wherein the real-time recommendation trend data represents the content type preferred by global users;
[0027] The step of concatenating the request data carried by the recommendation request with the basic prompt information to obtain new prompt information includes:
[0028] The request data carried in the recommendation request and the real-time recommendation trend data are concatenated with the basic prompt information to obtain new prompt information.
[0029] Optionally, obtaining real-time recommendation trend data of the recommendation system includes:
[0030] Acquire historical recommendation events that occurred in the recommendation system within a second preset time period before the current moment;
[0031] Real-time recommendation trend data of global users is determined from the historical recommendation events.
[0032] Optionally, the method further includes:
[0033] When the large language model cannot determine the target calling interface according to the prompt information, repeat the following steps until the large language model determines the target calling interface:
[0034] Acquire reply information generated by the large language model; wherein the reply information includes information generated when the large language model cannot determine the target calling interface, and the reply information is used to guide the initiator of the recommendation request to add more prompt information;
[0035] In response to the supplementary information input by the initiator in response to the reply information, the supplementary information is concatenated with the prompt information into new enhanced information, and the new prompt information is input into the large language model.
[0036] Optionally, the method further includes:
[0037] Recommending the target content to be recommended returned by the target recommendation module to the initiator of the recommendation request;
[0038] In response to the initiator's interactive behavior with respect to the target content, subsequent content is recommended to the initiator.
[0039] Optionally, in response to the initiator's interactive behavior with respect to the target content, recommending subsequent content to the initiator includes:
[0040] In response to the initiator's interactive behavior with respect to the target content, if the interactive behavior is a positive interactive behavior, recommending subsequent content that is positively related to the target content to the initiator through the target recommendation module;
[0041] If the interactive behavior is a negative interactive behavior, the target recommendation module recommends subsequent content that is negatively related to the target content to the initiator.
[0042] In a second aspect of the embodiments of the present disclosure, a content recommendation device is provided, which is applied to a recommendation system, wherein the recommendation system integrates a large language model and a calling interface for calling different recommendation modules, wherein different recommendation modules are used to perform different types of content recommendations, and the device includes:
[0043] an input unit, in response to a recommendation request to be processed, inputting request data carried in the recommendation request as prompt information into the large language model;
[0044] an acquisition unit, which acquires a target calling interface determined by the large language model from different calling interfaces according to the prompt information; the target calling interface includes a calling interface corresponding to the request intent of the request data;
[0045] The recommendation unit, through the target calling interface, calls the target recommendation module connected to the target calling interface to perform content recommendation.
[0046] Optionally, basic prompt information is pre-stored in the recommendation system, and the basic prompt information is used to guide the large language model to generate output that meets expectations;
[0047] The input unit comprises:
[0048] a splicing subunit, in response to a recommendation request to be processed, splicing the request data carried by the recommendation request with the basic prompt information to obtain new prompt information;
[0049] The input subunit inputs the new prompt information into the large language model.
[0050] Optionally, the expected output includes: the output result includes at least a target calling interface and interface parameters; wherein the interface parameters include the request intent determined from the prompt information.
[0051] Optionally, the recommendation unit is further used to call the target calling interface, transmit the interface parameters to the target recommendation module connected to the target calling interface; and further obtain the recommended content that meets the request intent by searching the target recommendation module based on the interface parameters.
[0052] Optionally, the device further comprises:
[0053] A first acquisition subunit is configured to acquire recommendation preference data of the initiator of the recommendation request; wherein the recommendation preference data indicates the content type preferred by the initiator;
[0054] The splicing subunit is further used to splice the request data carried by the recommendation request and the recommendation preference data with the basic prompt information to obtain new prompt information.
[0055] Optionally, the first acquisition subunit is further used to acquire historical behavior data of the initiator of the recommendation request within a first preset time period before the current moment, and determine the recommendation preference data of the initiator from the historical behavior data.
[0056] Optionally, the device further comprises:
[0057] A second acquisition subunit acquires real-time recommendation trend data of the recommendation system; wherein the real-time recommendation trend data represents the content type preferred by global users;
[0058] The splicing subunit is further used to splice the request data carried by the recommendation request and the real-time recommendation trend data with the basic prompt information to obtain new prompt information.
[0059] Optionally, the second acquisition subunit is further used to acquire historical recommendation events that occurred in the recommendation system within a second preset time period before the current moment, and determine real-time recommendation trend data of global users from the historical recommendation events.
[0060] Optionally, the device further comprises:
[0061] When the large language model cannot determine the target calling interface according to the prompt information, repeatedly executing the iterative unit until the large language model determines the target calling interface:
[0062] The iteration unit is further used to obtain reply information generated by the large language model; wherein the reply information includes information generated when the large language model cannot determine the target calling interface, and the reply information is used to guide the initiator of the recommendation request to supplement more prompt information; and in response to the supplementary information input by the initiator for the reply information, the supplementary information and the prompt information are spliced into new enhanced information, and the new prompt information is input into the large language model.
[0063] Optionally, the recommendation unit is further configured to recommend the target content to be recommended returned by the target recommendation module to the initiator of the recommendation request; and, in response to the initiator's interactive behavior with respect to the target content, recommend subsequent content to the initiator.
[0064] Optionally, the recommendation unit is further used to respond to the initiator's interactive behavior towards the target content. If the interactive behavior is a positive interactive behavior, the target recommendation module is used to recommend subsequent content that is positively related to the target content to the initiator; if the interactive behavior is a negative interactive behavior, the target recommendation module is used to recommend subsequent content that is negatively related to the target content to the initiator.
[0065] In a third aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, comprising:
[0066] When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the content recommendation method as described in any of the preceding items.
[0067] In a fourth aspect of the embodiments of the present disclosure, there is provided a computing device, comprising:
[0068] processor;
[0069] a memory for storing instructions executable by the processor;
[0070] The processor is configured to execute the executable instructions to implement the content recommendation method as described in any of the preceding items.
[0071] According to the content recommendation solution provided by the embodiment of the present disclosure, by integrating a large language model and calling interfaces for calling different recommendation modules in the recommendation system, the large language model is used to predict the recommendation intention expected by the user who initiated the recommendation request based on the request data carried in the recommendation request to be processed, and the target recommendation module connected to the calling interface corresponding to the recommendation intention is further called to perform content recommendation. In this way, a low-cost content recommendation method can be provided, which increases the diversity of recommendation results and does not require users to pay additional learning costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:
[0073] Figure 1 The system architecture diagram provided by the present disclosure is schematically shown;
[0074] Figure 2 The following schematically shows a content recommendation method provided by the present disclosure;
[0075] Figure 3 A schematic diagram schematically shows the structure of the prompt information provided by the present disclosure;
[0076] Figure 4 The medium schematic diagram provided by the present disclosure is schematically shown;
[0077] Figure 5 The following schematically shows a content recommendation device provided by the present disclosure;
[0078] Figure 6 The schematic diagram of the computing device provided by the present disclosure is schematically shown.
[0079] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0080] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0081] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0082] According to an embodiment of the present disclosure, a content recommendation method, a computer-readable storage medium, an apparatus, and a computing device are proposed.
[0083] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0084] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.
[0085] The data involved in the present disclosure may be data authorized by the user or fully authorized by all parties. The collection, dissemination, and use of the data shall comply with the requirements of relevant national laws and regulations. The implementation methods / examples of the present disclosure may be combined with each other. SUMMARY OF THE INVENTION
[0087] The present disclosure aims to provide a content recommendation solution, which integrates a large language model and a calling interface for calling different recommendation modules in a recommendation system, predicts the recommendation intention expected by the user who initiated the recommendation request based on the request data carried in the recommendation request to be processed by the large language model, and further calls the target recommendation module connected to the calling interface corresponding to the recommendation intention to perform content recommendation. In this way, a low-cost content recommendation method can be provided, which improves the diversity of recommendation results and does not require users to pay additional learning costs.
[0088] After introducing the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure are described in detail below.
[0089] Application Scenario Overview
[0090] The content recommendation solution provided by the present disclosure can be applied to various scenarios involving content recommendation, such as recommending short videos to users on a short video platform, recommending songs to users on a music platform, and so on.
[0091] First reference Figure 1 A system architecture diagram suitable for content recommendation is shown in FIG. In the system architecture diagram, various network nodes can communicate information with the help of the network, and then complete interaction and data processing.
[0092] The system architecture diagram may include a recommendation system 12 that performs data communication with one or more clients 11 via a network 13 , and a database 14 that may be integrated with the recommendation system 12 or independent of the recommendation system 12 .
[0093] The recommendation system 12 may integrate a large language model and several different calling interfaces. Each calling interface may be connected to a recommendation module (not shown in the figure), and different recommendation modules are used to perform different types of content recommendations.
[0094] Exemplarily, the recommendation system 12 can receive a recommendation request sent by the client 11, and predict the recommendation intent from the request data carried in the recommendation request based on the integrated large language model, and further call the target recommendation module connected to the calling interface corresponding to the recommendation intent to perform content recommendation.
[0095] The recommendation system 12 may include a service platform that provides content recommendation services, wherein the content may include video (such as short videos, long videos), audio (such as radio stations, music songs, user-recorded audio, audio e-books, etc.), text images (such as e-books, comic books, illustrated news, blogs, microblogs, etc.), etc.
[0096] In some application scenarios, the recommendation system 12 may include a dedicated service platform, which is used to play a certain type of content. For example, a video platform can only play videos but not e-books; a music platform can only play audio but not videos and e-books. In some application scenarios, the recommendation system 12 may include a multi-functional service platform, which can usually support at least two different types of content. Regardless of the form of the service platform, it can have the function or service of recommending content to users.
[0097] In the system architecture diagram, each network 13 may include a wired or wireless telecommunication device, through which the network device on which the client 11 is based may exchange data. For example, each network 13 may include a local area network ("LAN"), a wide area network ("WAN"), an intranet, the Internet, a mobile phone network, a virtual private network (VPN), a cellular or other mobile communication network, Bluetooth, NFC, or any combination thereof. In the discussion of the exemplary embodiments, it should be understood that the terms "data" and "information" may be used interchangeably herein to refer to text, images, audio, video, or any other form of information that may exist in a computer-based environment.
[0098] The network device on which each client 11 is based may include a device having a communication module capable of sending and receiving data via the network 13. For example, the network device on which each client 11 is based may include a server, a desktop computer, a laptop computer, a tablet computer, a smart phone, a handheld computer, a personal digital assistant (“PDA”), or any other wired or wireless processor-driven device.
[0099] exist Figure 1 In the depicted exemplary embodiment, the network device on which the client 11 is based may be operated by a user who is a consumer of the recommended content.
[0100] Users (including individuals or organizations) can use applications such as web browser applications or stand-alone applications to view, download, upload or otherwise access the service platform or service website via the network 13 to obtain content recommendation services.
[0101] The web browser application or the stand-alone application can interact with the web server connected to the network 13 to complete data interaction.
[0102] The data / relationships that need to be read or the processing that needs to be performed in the interactive process may need to be obtained from the connected database 14 , and the data / relationships that need to be written or the processing results involved in the interactive process may need to be written into the connected database 14 .
[0103] Figure 1 In the example, the computing device 15 may be in an integrated relationship or a separate relationship with the recommendation system 12. In the latter case, it may be connected through an internal network or a dedicated network, or may be connected through an encrypted public network. In particular, when it is an integrated relationship, a connection in the form of an internal bus with a higher efficiency and a faster transmission speed may be adopted. The computing device 15, when it is an integrated relationship or a separate relationship, may access the database 14 directly (not shown in the figure) or through the recommendation system 12.
[0104] The computing device 15 can be properly programmed to control the implementation of the method in this specification through such instructions. In particular, when it is an integrated relationship, the transaction processed by the computing device 15 can be regarded as the processing of the recommendation system 12 without special distinction.
[0105] Exemplary Methods
[0106] Combine the following Figure 1 The application scenario shown is shown in Figure 2 To describe the method of content recommendation according to the exemplary embodiment of the present disclosure. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0107] like Figure 2 As shown, the content recommendation method can be applied to a recommendation system, wherein the recommendation system integrates a large language model and a calling interface for calling different recommendation modules, and different recommendation modules are used to perform different types of content recommendations. The method includes:
[0108] Step 210, in response to the recommendation request to be processed, inputting the request data carried by the recommendation request as prompt information into the large language model;
[0109] Step 220, obtaining a target calling interface determined by the large language model from different calling interfaces according to the prompt information; the target calling interface includes a calling interface corresponding to the request intent of the request data;
[0110] Step 230: Calling a target recommendation module connected to the target calling interface through the target calling interface to perform content recommendation.
[0111] In this embodiment, the service server where the recommendation system is located can build several recommendation modules that can recommend different types of content according to actual service needs. Taking the music recommendation service as an example, the following recommendation modules are provided:
[0112] The theme recommendation module is used to output song recommendation results that meet the user's personalized listening needs under the input theme tags related to music style, emotion, scene, etc. (such as rock, sadness, sleep aid, etc.).
[0113] The artist recommendation module is used to output song recommendation results under the artist's name that meet the user's personalized listening needs based on the input artist.
[0114] The similar song recommendation module is used to output other recommended songs that are similar to the input song and meet the user's personalized listening needs.
[0115] In existing recommendation systems, different recommendation modules usually operate relatively independently. This means that there is a lack of effective integration and coordination between modules such as theme recommendation, similarity recommendation and artist recommendation. Taking the theme recommendation module as an example, it may only focus on making recommendations according to preset theme classifications, and fail to fully consider the user's historical feedback and preferences in similarity recommendations or artist recommendations. This independent operation mode limits the diversity and comprehensiveness of the recommendation results. For example, when a user expresses interest in a certain artist's song, the system can only provide related works based on the artist recommendation module, but cannot combine the user's preferences for other themes or similar songs at the same time to recommend a wider and richer selection of music to the user. This situation of module independence leads to limitations in recommendation results, and it is impossible to fully tap the user's potential diverse music preferences, and it is difficult to provide surprising and novel recommendations, thereby affecting the user's opportunity and experience in discovering new music.
[0116] In the related art, users need to judge which recommendation module their needs belong to and enter the recommendation module for content recommendation. This method requires users to learn to use different recommendation modules, which has a certain usage cost. In addition, if the user makes a wrong judgment, they need to jump between different recommendation modules, which will undoubtedly reduce the user experience.
[0117] In this embodiment, the recommendation functions of each recommendation module are integrated into the recommendation system, so that users do not need to judge which recommendation module their needs belong to. The recommendation system uniformly judges and calls the calling interface provided by the relevant recommendation system to realize content recommendation. In this process, the recommendation system needs to predict the recommendation intention expected by the user.
[0118] In related technologies, predicting users' desired recommendation intentions usually relies on inferences based on users' explicit choices or limited behavioral data. It is difficult to accurately and deeply understand the complex, ambiguous, or even potential recommendation preferences expressed by users through natural language.
[0119] For example, users may express their needs in a more abstract and emotional way, such as "I want music that I can immerse myself in when I am alone thinking late at night." Existing recommendation systems may not be able to accurately capture the key elements contained therein, such as the quiet atmosphere implied by "late at night" and the introspective emotions represented by "thinking alone," and thus cannot provide music recommendations that truly match the user's current mood. In addition, users' language habits and expressions vary greatly, and may include rhetorical techniques such as metaphors and symbols, or be influenced by cultural background and personal experience, which further increases the difficulty of accurately identifying user intentions.
[0120] In order to accurately identify user intent, this embodiment integrates a large language model (LLM) for understanding user intent in the recommendation system. The large language model may refer to a natural language processing (NLP) model based on deep learning technology, such as GPT3.5, llama3, baichuan2 and other models. These large language models have strong user general intent understanding capabilities and online reasoning performance. With the help of large language models, the recommendation system can understand and accurately predict the user's request intent (such as the type of recommended content that the user expects, etc.) in this embodiment.
[0121] In this specification, the recommendation system expects the large language model to not only predict the user's request intent, but also to convert the predicted request intent into a call interface, that is, the large language model is expected to directly output a target call interface provided by a target recommendation module that can meet the user's request intent. In this way, the recommendation system can directly call the target recommendation module connected to the target call interface according to the target call interface output by the large language model to perform content recommendation.
[0122] In order to implement the large language model output target calling interface, in an exemplary embodiment, basic prompt information may be pre-stored in the recommendation system, and the basic prompt information is used to guide the large language model to generate an output that meets expectations;
[0123] Accordingly, before inputting the request data carried by the recommendation request as prompt information into the large language model, step 210 may further include:
[0124] The request data carried in the recommendation request is concatenated with the basic prompt information to obtain new prompt information, and then the new prompt information is input into the large language model.
[0125] In this embodiment, by constructing a prompt information structure Prompt specifically for content recommendation, the large language model can output an output result that meets the requirements.
[0126] For example, taking the aforementioned theme recommendation module, artist recommendation module, and similar song recommendation module as examples, the calling interface corresponding to the theme recommendation module may be a theme recommendation interface, the calling interface corresponding to the artist recommendation module may be an artist recommendation interface, and the calling interface corresponding to the similar song recommendation module may be a similar recommendation interface. Then the above basic prompt information may be as follows:
[0127] “In terms of question type: users will input their current feelings or questions, and you will act as a music recommendation assistant.
[0128] In terms of structural output: you can only call from the existing calling interfaces: theme recommendation interface, artist recommendation interface, similar recommendation interface, and you will parse the input request data into parameters of different interfaces. "
[0129] Assume that the request data 1 carried by the recommendation request is:
[0130] “User: Do you know any touching songs by singer Zhang San?”
[0131] Based on this, the recommendation system can splice the request data 1 and the basic prompt, and then input the spliced request data 1 and the basic prompt as new prompt information into the large language model; by analyzing the input prompt information through the large language model, the keyword "singer Zhang San" can be determined, and then it can be determined that the artist recommendation module should recommend the content, so the output result is the artist recommendation interface.
[0132] In actual applications, in order to ultimately recommend content that meets the user's request intent, it is necessary not only to determine the target call interface, but also to determine the interface parameters for the target recommendation module to retrieve. Taking the request data 1 input by the user as an example, the user not only expects to obtain Zhang San's songs, but also expects them to be touching songs. It can be seen that "singer Zhang San" can help the large language model determine that the target call interface is the artist recommendation interface, and "touching songs" can help the large language model determine that the interface parameters are request intents similar to "touching" and "touching".
[0133] To this end, in an exemplary embodiment, the basic prompt information is used to guide the large language model to generate an output that meets expectations, and the output that meets expectations may include: the output result includes at least a target call interface and interface parameters; wherein the interface parameters include the request intent determined from the prompt information.
[0134] Exemplarily, in addition to the aforementioned question type and structure output, the basic prompt information also includes an output format, as follows:
[0135] “In terms of question type: users will input their current feelings or questions, and you will act as a music recommendation assistant.
[0136] In terms of structural output: you can only call from the existing calling interfaces: topic recommendation interface, artist recommendation interface, and similar recommendation interface. You will parse the input request data into parameters of different interfaces.
[0137] In terms of output format: your output is in JSON format, containing two key-value pairs: calling interface and interface parameters. "
[0138] The above prompt information can guide the large language model to generate output in a fixed format, which makes it easier for the recommendation system to read the target call interface and interface parameters in the output according to the fixed format, thereby avoiding abnormal situations such as failure to correctly read the target call interface or interface parameters.
[0139] In this specification, after obtaining the target calling interface and interface parameters output by the large language model, the recommendation system can further call the target calling interface and transmit the interface parameters to the target recommendation module connected to the target calling interface;
[0140] The target recommendation module retrieves the recommended content that meets the request intent based on the interface parameters.
[0141] In this embodiment, after the target recommendation module obtains the interface parameters transmitted by the target calling interface, it can perform content retrieval according to the interface parameters. Since the interface parameters represent the user's request intent, the content retrieved in this way is the recommended content that meets the user's request intent. The retrieved recommended content can be returned to the recommendation system, which then returns it to the user, and the retrieved recommended content can be one or more.
[0142] In actual applications, in addition to basic prompt information and request data, such as Figure 3 As shown, more abundant user data such as recommendation preference data, real-time recommendation trend data, multi-round conversation data, feedback data, etc. can also be added to help the large language model predict user intentions more accurately. Please explain these data separately below.
[0143] [Recommendation preference data]
[0144] The recommendation preference data may indicate the content type preferred by the initiator of the recommendation request (hereinafter referred to as the user).
[0145] In an exemplary embodiment, before the request data carried by the recommendation request is concatenated with the basic prompt information to obtain new prompt information, the following may also be included:
[0146] Acquire recommendation preference data of the initiator of the recommendation request; wherein the recommendation preference data indicates the content type preferred by the initiator;
[0147] Accordingly, the request data carried by the recommendation request is concatenated with the basic prompt information to obtain new prompt information, which may include:
[0148] The request data carried in the recommendation request and the recommendation preference data are concatenated with the basic prompt information to obtain new prompt information.
[0149] In this embodiment, the recommendation preference data may be determined by analyzing the data of the user's recent use of the recommendation system. For example, the historical behavior data of the initiator of the recommendation request within a first preset time period before the current moment may be obtained; and then the recommendation preference data of the initiator may be determined from the historical behavior data.
[0150] The first preset duration may be a preset empirical value, such as 7 days, 15 days, 3 days, etc.
[0151] Taking song recommendation as an example, the recommendation preference data may be as follows:
[0152] "This user prefers rock music in terms of style and English songs in terms of language. The following are the songs that this user has listened to in the past 7 days: {singer A, song title aaa}, {singer B, song title bbb}, ..."
[0153] The recommendation preference data may include various user preferences such as the recent favorite music genre is rock, the recent listening language is English, and the recent (i.e., the first preset duration of 7 days) listening details, etc. By adding the recommendation preference data to the prompt information, the user's personalized preferences can be provided to the large language model, thereby helping the large language model to more accurately predict the user's recommendation intention.
[0154] [Real-time recommendation trend data]
[0155] The real-time recommendation trend data may represent content types preferred by global users.
[0156] In an exemplary embodiment, before the request data carried by the recommendation request is concatenated with the basic prompt information to obtain new prompt information, the following may also be included:
[0157] Obtaining real-time recommendation trend data of the recommendation system;
[0158] Accordingly, the request data carried by the recommendation request is concatenated with the basic prompt information to obtain new prompt information, which may include:
[0159] The request data carried in the recommendation request and the real-time recommendation trend data are concatenated with the basic prompt information to obtain new prompt information.
[0160] In this embodiment, the real-time recommendation trend data can be determined by analyzing the data of all users' recent use of the recommendation system. For example, historical recommendation events that occurred in the recommendation system within a second preset time period before the current moment can be obtained; then, the real-time recommendation trend data of global users can be determined from the historical recommendation events.
[0161] The second preset duration may be a preset empirical value, such as 3 hours, 2 hours, 1 hour, etc.
[0162] Taking song recommendation as an example, the real-time recommendation trend data may be as follows:
[0163] "In the past three hours, more users have asked about the background of singer Zhang San, and more users have listened to rock music and expressed satisfaction."
[0164] The real-time recommendation trend data includes the singers, songs, music styles, etc. that are frequently or popular among all users recently. By adding the real-time recommendation trend data to the prompt information, the real-time hot trend can be provided to the large language model. Since the real-time hot trend will affect the user's intention and make the user tend to obtain content related to the real-time hot trend, the real-time recommendation trend data can help the large language model to more accurately predict the user's recommendation intention.
[0165] [Multi-round dialogue data]
[0166] The multi-round dialogue data may refer to dialogue information generated by multiple dialogues between the large language model and the user, and the dialogue information includes reply information generated by the large language model, supplementary information input by the user for the reply information, etc.
[0167] In an exemplary embodiment, when the large language model cannot determine the target calling interface according to the prompt information, the following steps may be repeated until the large language model determines the target calling interface:
[0168] Acquire reply information generated by the large language model; wherein the reply information includes information generated when the large language model cannot determine the target calling interface, and the reply information is used to guide the initiator of the recommendation request to add more prompt information;
[0169] In response to the supplementary information input by the initiator in response to the reply information, the supplementary information is concatenated with the prompt information into new enhanced information, and the new prompt information is input into the large language model.
[0170] In this embodiment, when the large language model cannot determine the target calling interface from the prompt information, it can generate a reply message by asking the user a question. For example, if the user input is vague, such as "I want relaxing music", the large language model can further ask "Do you mean relaxing pop music or classical music?" to make the conversation more focused and targeted.
[0171] The supplementary information entered by the user for the reply will be further added to the original prompt information and input into the large language model again. In order to prevent the large language model from losing context information during the conversation, the conversation information of the previous round can also be spliced into the prompt information of the next round, so that the user's actual intention can be predicted based on the user's real-time feedback in actual use. In this way, the large language model can accurately predict the user's intention through multiple rounds of conversation and determine the target calling interface.
[0172] [Feedback data]
[0173] The feedback data may refer to data related to the user's interactive behavior with respect to the target content recommended by the recommendation system.
[0174] In an exemplary embodiment, after obtaining the target content to be recommended returned by the target recommendation module in step 230, the following may also be included:
[0175] Recommending the target content to be recommended returned by the target recommendation module to the initiator of the recommendation request;
[0176] In response to the initiator's interactive behavior with respect to the target content, subsequent content is recommended to the initiator.
[0177] In this embodiment, the user can make relevant interactive behaviors for the recommended target content according to his / her preference, such as like, dislike, favorite, forward, comment, share, etc. These interactive behaviors can also be used as data for analyzing user intentions and provide reference for subsequent content recommendations.
[0178] Exemplarily, the recommendation system may respond to the initiator's interactive behavior towards the target content. If the interactive behavior is a positive interactive behavior, the target recommendation module may recommend subsequent content that is positively related to the target content to the initiator; and if the interactive behavior is a negative interactive behavior, the target recommendation module may recommend subsequent content that is negatively related to the target content to the initiator.
[0179] For example, after a song is recommended to a user, the user is guided to interact with the song while listening to it. If the user likes the song, he / she will interact positively, such as like or collect it. If the user does not like the song, he / she will interact negatively, such as dislike or block it. The recommendation system can record these interactions and provide them to the target recommendation module to obtain subsequent recommendations. For example, positive interactions indicate that the user is satisfied with the recommended song, so other songs of the same type as the song can be recommended. Negative interactions indicate that the user is dissatisfied with the recommended song, so similar songs will not be recommended, but songs of other types will be recommended. In addition, the user's feedback data can be added to the prompt information to correct the user intent predicted by the large language model, output accurate target call interface and interface parameters, and obtain the corrected recommendation content from the corrected target call interface.
[0180] In short, through the actual feedback data of users on the recommended target content, the accuracy of content recommendations can be further improved and the user experience can be enhanced.
[0181] Exemplary Media
[0182] After introducing the method of the exemplary embodiment of the present disclosure, next, refer to Figure 4 A medium according to an exemplary embodiment of the present disclosure is described.
[0183] In this exemplary embodiment, the above method can be implemented by a program product, such as a portable compact disk read-only memory (CD-ROM) and including program code, and can be run on a device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus, or a device.
[0184] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0185] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0186] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RE, etc., or any suitable combination of the foregoing.
[0187] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0188] In summary, the present disclosure may provide a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device may be enabled to execute the aforementioned content recommendation method embodiment.
[0189] Exemplary Devices
[0190] After introducing the medium of the exemplary embodiment of the present disclosure, next, reference is made to Figure 5 A device according to an exemplary embodiment of the present disclosure is described.
[0191] Figure 5 The block diagram of a content recommendation device according to an embodiment of the present disclosure is schematically shown, corresponding to the aforementioned Figure 2 The content recommendation device is applied to a recommendation system, wherein the recommendation system integrates a large language model and a calling interface for calling different recommendation modules, wherein different recommendation modules are used for performing different types of content recommendations, and the device comprises:
[0192] An input unit 510, in response to a recommendation request to be processed, inputs the request data carried by the recommendation request as prompt information into the large language model;
[0193] An acquisition unit 520 acquires a target calling interface determined by the large language model from different calling interfaces according to the prompt information; the target calling interface includes a calling interface corresponding to the request intent of the request data;
[0194] The recommendation unit 530 calls the target recommendation module connected to the target calling interface through the target calling interface to perform content recommendation.
[0195] Optionally, basic prompt information is pre-stored in the recommendation system, and the basic prompt information is used to guide the large language model to generate output that meets expectations;
[0196] The input unit 510 includes:
[0197] The splicing subunit 513, in response to the recommendation request to be processed, splices the request data carried by the recommendation request with the basic prompt information to obtain new prompt information;
[0198] The input subunit 515 inputs the new prompt information into the large language model.
[0199] Optionally, the expected output includes: the output result includes at least a target calling interface and interface parameters; wherein the interface parameters include the request intent determined from the prompt information.
[0200] Optionally, the recommendation unit 530 is further used to call the target calling interface, transmit the interface parameters to the target recommendation module connected to the target calling interface; and further obtain the recommended content that meets the request intent obtained by the target recommendation module through retrieval based on the interface parameters.
[0201] Optionally, the device further comprises:
[0202] A first acquisition subunit 511 is configured to acquire recommendation preference data of the initiator of the recommendation request; wherein the recommendation preference data indicates the content type preferred by the initiator;
[0203] The splicing subunit 513 is further used to splice the request data carried by the recommendation request and the recommendation preference data with the basic prompt information to obtain new prompt information.
[0204] Optionally, the first acquisition subunit 511 is further used to acquire historical behavior data of the initiator of the recommendation request within a first preset time period before the current moment, and determine the recommendation preference data of the initiator from the historical behavior data.
[0205] Optionally, the device further comprises:
[0206] The second acquisition subunit 512 acquires real-time recommendation trend data of the recommendation system; wherein the real-time recommendation trend data represents the content type preferred by global users;
[0207] The splicing subunit 513 is further used to splice the request data carried by the recommendation request and the real-time recommendation trend data with the basic prompt information to obtain new prompt information.
[0208] Optionally, the second acquisition subunit 512 is further used to acquire historical recommendation events that occurred in the recommendation system within a second preset time period before the current moment, and determine real-time recommendation trend data of global users from the historical recommendation events.
[0209] Optionally, the device further comprises:
[0210] When the large language model cannot determine the target calling interface according to the prompt information, iterative unit 521 is repeatedly executed until the large language model determines the target calling interface:
[0211] The iterative unit 521 is further used to obtain reply information generated by the large language model; wherein the reply information includes information generated when the large language model cannot determine the target calling interface, and the reply information is used to guide the initiator of the recommendation request to supplement more prompt information; and, in response to the supplementary information input by the initiator for the reply information, splicing the supplementary information with the prompt information into new enhanced information, and inputting the new prompt information into the large language model.
[0212] Optionally, the recommendation unit 530 is further configured to recommend the target content to be recommended returned by the target recommendation module to the initiator of the recommendation request; and, in response to the initiator's interactive behavior with respect to the target content, recommend subsequent content to the initiator.
[0213] Optionally, the recommendation unit 530 is further used to respond to the initiator's interactive behavior towards the target content. If the interactive behavior is a positive interactive behavior, the subsequent content positively related to the target content is recommended to the initiator through the target recommendation module; if the interactive behavior is a negative interactive behavior, the subsequent content negatively related to the target content is recommended to the initiator through the target recommendation module.
[0214] Exemplary Computing Devices
[0215] After introducing the method, medium and apparatus of the exemplary embodiments of the present disclosure, next, reference is made to Figure 6 A computing device according to an exemplary embodiment of the present disclosure is described.
[0216] Figure 6 The computing device 1500 shown is only an example and should not bring any limitation to the functionality and scope of use of the embodiments of the present disclosure.
[0217] like Figure 6 As shown, computing device 1500 is in the form of a general computing device. Components of computing device 1500 may include, but are not limited to: at least one processing unit 1501, at least one storage unit 1502, and a bus 1503 connecting different system components (including processing unit 1501 and storage unit 1502).
[0218] The bus 1503 includes a data bus, a control bus, and an address bus.
[0219] The storage unit 1502 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 15021 and / or a cache memory 15022 , and may further include a readable medium in the form of a non-volatile memory, such as a read-only memory (ROM) 15023 .
[0220] The storage unit 1502 may also include a program / utility 15025 having a set (at least one) of program modules 15024, such program modules 15024 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0221] The computing device 1500 may also communicate with one or more external devices 1504 (eg, a keyboard, pointing device, etc.).
[0222] Such communication may be performed via input / output (I / O) interface 1505. In addition, computing device 1500 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via network adapter 1506. Figure 6 As shown, network adapter 1506 communicates with other modules of computing device 1500 via bus 1503. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with computing device 1500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0223] Through Figure 6 The computing device 1500 shown can implement the aforementioned content recommendation method. More specifically, the storage unit 1502 stores instructions executable by the processing unit 1501. When the processing unit 1501 executes the instructions, the aforementioned content recommendation method is implemented.
[0224] It should be noted that although several units / modules or sub-units / modules of the content recommendation device are mentioned in the above detailed description, such division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above may be embodied in one unit / module. Conversely, the features and functions of one unit / module described above may be further divided to be embodied by multiple units / modules.
[0225] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0226] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.
Claims
1. A content recommendation method, applied to a recommendation system, wherein the recommendation system integrates a large language model and a calling interface for calling different recommendation modules, wherein different recommendation modules are used for performing different types of content recommendations, the method comprising: In response to a recommendation request to be processed, inputting request data carried in the recommendation request as prompt information into the large language model; Obtaining a target calling interface determined by the large language model from different calling interfaces according to the prompt information; the target calling interface includes a calling interface corresponding to the request intent of the request data; Through the target calling interface, a target recommendation module connected to the target calling interface is called to perform content recommendation.
2. According to the method of claim 1, the recommendation system pre-stores basic prompt information, and the basic prompt information is used to guide the large language model to generate output that meets expectations; Before inputting the request data carried by the recommendation request as prompt information into the large language model, the method further includes: The request data carried in the recommendation request is concatenated with the basic prompt information to obtain new prompt information; The step of inputting the request data carried by the recommendation request as prompt information into the large language model includes: The new prompt information is input into the large language model.
3. The method according to claim 2, wherein the desired output comprises: The output result includes at least a target calling interface and interface parameters; wherein the interface parameters include the request intent determined from the prompt information.
4. The method according to claim 3, wherein the target recommendation module connected to the target call interface is called through the target call interface to perform content recommendation, comprising: Calling the target calling interface, and transmitting the interface parameters to the target recommendation module connected to the target calling interface; The target recommendation module retrieves the recommended content that meets the request intent based on the interface parameters.
5. The method according to claim 2, before concatenating the request data carried by the recommendation request with the basic prompt information to obtain new prompt information, further comprising: Acquire recommendation preference data of the initiator of the recommendation request; wherein the recommendation preference data indicates the content type preferred by the initiator; The step of concatenating the request data carried by the recommendation request with the basic prompt information to obtain new prompt information includes: The request data carried in the recommendation request and the recommendation preference data are concatenated with the basic prompt information to obtain new prompt information.
6. The method according to claim 5, wherein obtaining the recommendation preference data of the initiator of the recommendation request comprises: Acquire historical behavior data of the initiator of the recommendation request within a first preset time period before the current moment; The recommendation preference data of the initiator is determined from the historical behavior data.
7. The method according to claim 2, before concatenating the request data carried by the recommendation request with the basic prompt information to obtain new prompt information, further comprising: Acquire real-time recommendation trend data of the recommendation system; wherein the real-time recommendation trend data represents the content type preferred by global users; The step of concatenating the request data carried by the recommendation request with the basic prompt information to obtain new prompt information includes: The request data carried in the recommendation request and the real-time recommendation trend data are concatenated with the basic prompt information to obtain new prompt information.
8. A content recommendation device, applied to a recommendation system, wherein the recommendation system integrates a large language model and a calling interface for calling different recommendation modules, wherein different recommendation modules are used to perform different types of content recommendations, the device comprising: an input unit, in response to a recommendation request to be processed, inputting request data carried in the recommendation request as prompt information into the large language model; an acquisition unit, which acquires a target calling interface determined by the large language model from different calling interfaces according to the prompt information; the target calling interface includes a calling interface corresponding to the request intent of the request data; The recommendation unit, through the target calling interface, calls a target recommendation module connected to the target calling interface to perform content recommendation.
9. A computer-readable storage medium, comprising: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the content recommendation method as described in any one of claims 1 to 7.
10. A computing device comprising: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the executable instructions to implement the content recommendation method as described in any one of claims 1-7.