Method and device for generating recommended content based on real-time user data, and storage medium

By collecting real-time user data to generate message lists and using large language models and intelligent agents to generate content, the problem of traditional recommendation systems failing to reflect users' latest interests has been solved, achieving personalized and accurate recommendation results.

CN119493907BActive Publication Date: 2025-11-07BEIJING YUANSHI INNOVATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411541856.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-11-07
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

Traditional recommendation content generation systems struggle to efficiently utilize users' real-time information, resulting in recommendation results that fail to reflect users' latest interests and needs.

Method used

By collecting real-time data from target users, a message list is generated. Large language models and intelligent agents are used to generate content information that matches user interests. Personalized recommendations are then made by combining user profiles and real-time sentiment changes.

Benefits of technology

It enables efficient reflection of immediate interests and needs, and provides more accurate and personalized recommendation services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493907B_ABST
    Figure CN119493907B_ABST
Patent Text Reader

Abstract

The application discloses a recommendation content generation method and device based on user real-time data, and a storage medium. The method comprises the following steps: collecting first real-time data corresponding to a target user, and generating a first message list corresponding to the target user based on the first real-time data; searching for first content information meeting the interest of the target user according to the first message list; and generating second content information for recommending to the target user based on the first content information and by using a content creation model based on a large language model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of content recommendation, and in particular, to a method and device for generating recommended content based on real-time user data and a storage medium. BACKGROUND

[0002] At present, with the rapid growth of the number of users and the rapid development of Internet information technology, a content recommendation system has become an important bridge connecting users and the Internet. Traditional content recommendation systems mainly rely on historical behavior data of users and predict the interests and needs of users through collaborative filtering and content recommendation algorithms. The historical behavior data of users includes, for example, user browsing records, user click records, and user purchase records.

[0003] In addition, with the popularity and continuous updating of instant communication tools (for example, chat applications and social media), the use rate of users for these instant communication tools is increasing. Therefore, the above-mentioned instant communication tools contain a large amount of chat records, status information, and interaction information related to users, and these chat records, status information, and interaction information related to users contain real-time interest information and real-time emotional change information of users.

[0004] However, the traditional recommended content generation system mostly generates recommended content using historical data information or network crawled data information, and it is difficult to efficiently use the above-mentioned user instant information (for example, real-time interest information and real-time emotional change information) to generate recommended content for users, so that the recommended results cannot reflect the latest interests and needs of users, and cannot provide more accurate and personalized recommendation services for users.

[0005] In view of the technical problem in the prior art that the traditional recommended content generation system is difficult to efficiently use user instant information to generate recommended content for users, so that the recommended results cannot reflect the latest interests and needs of users, no effective solution has been proposed so far. SUMMARY

[0006] Embodiments of the present disclosure provide a method and device for generating recommended content based on real-time user data and a storage medium, to at least solve the technical problem in the prior art that the traditional recommended content generation system is difficult to efficiently use user instant information to generate recommended content for users, so that the recommended results cannot reflect the latest interests and needs of users.

[0007] According to an aspect of embodiments of the present disclosure, a method for generating recommended content based on user real-time data is provided, including: collecting first real-time data corresponding to a target user, and generating a first message list corresponding to the target user based on the first real-time data; searching for first content information meeting the interest of the target user according to the first message list; and generating second content information for recommending to the target user based on the first content information and using a content creation model based on a large language model.

[0008] According to another aspect of embodiments of the present disclosure, a storage medium is also provided, including a stored program, wherein the program is executed by a processor when running to perform the method of any one of the above.

[0009] According to another aspect of embodiments of the present disclosure, an apparatus for generating recommended content based on user real-time data is also provided, including: a real-time data collection module configured to collect first real-time data corresponding to a target user, and generate a first message list corresponding to the target user based on the first real-time data; a first content information search module configured to search for first content information meeting the interest of the target user according to the first message list; and a second content information output module configured to generate second content information for recommending to the target user based on the first content information and using a content creation model based on a large language model.

[0010] According to another aspect of embodiments of the present disclosure, an apparatus for generating recommended content based on user real-time data is also provided, including: a processor; and a memory connected with the processor, configured to provide the processor with instructions for processing the following processing steps: collecting first real-time data corresponding to a target user, and generating a first message list corresponding to the target user based on the first real-time data; searching for first content information meeting the interest of the target user according to the first message list; and generating second content information for recommending to the target user based on the first content information and using a content creation model based on a large language model.

[0011] The present application provides a method for generating recommended content based on user real-time data. First, first real-time data corresponding to a target user is collected, and a first message list corresponding to the target user is generated based on the first real-time data. Then, first content information meeting the interest of the target user is searched according to the first message list. Finally, second content information for recommending to the target user is output based on the first content information and using a content creation model based on a large language model.

[0012] As can be known from the above, in the present application, the first real-time data corresponding to the target user is collected, so that the chat information and communication information generated by the target user using the instant messaging tool can be obtained. And in the case of collecting the first real-time data corresponding to the target user, the first real-time data can be input to the pre-trained content recommendation model in the form of a first message list, so as to output the recommended content corresponding to the target user.

[0013] Therefore, since the present application generates recommended content for the target user by using the instant information of the target user, the finally generated recommended content conforms to the interests and needs of the target user in the current state.

[0014] Further, the technical problem that the conventional recommended content generation system in the prior art is difficult to efficiently generate recommended content for the user by using the instant information of the user, so that the recommended result cannot reflect the latest interests and needs of the user is solved. BRIEF DESCRIPTION OF DRAWINGS

[0015] The drawings described herein are used to provide further understanding of the present disclosure, and form a part of the present application. The schematic embodiments of the present disclosure and the description thereof are used to explain the present disclosure, and do not constitute an improper limitation on the present disclosure. In the drawings:

[0016] Figure 1 is a hardware structure block diagram of a computing device for implementing the method according to embodiment 1 of the present disclosure;

[0017] Figure 2 is a schematic diagram of a recommended content generation system based on user real-time data according to embodiment 1 of the present disclosure;

[0018] Figure 3 is a flowchart of a recommended content generation method based on user real-time data according to embodiment 1 of the present disclosure;

[0019] Figure 4 is a schematic diagram of training an intelligent agent and a first large language model according to embodiment 1 of the present disclosure;

[0020] Figure 5 is a modularization schematic diagram of a recommended content generation device based on user real-time data according to embodiment 2 of the present disclosure;

[0021] Figure 6 is a modularization schematic diagram of a recommended content generation device based on user real-time data according to embodiment 3 of the present disclosure. DETAILED DESCRIPTION

[0022] In order to make the technical solution of the present disclosure better understood by the person skilled in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, not all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by the person skilled in the art without creative labor should be within the scope of protection of the present disclosure.

[0023] It should be noted that the terms "first", "second" and the like in the specification and claims of the present disclosure and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0024] Embodiment 1

[0025] According to the present embodiment, a method embodiment for generating recommended content based on user real-time data is provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.

[0026] The method embodiment provided by the present embodiment can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Figure 1 A hardware structure block diagram of a computing device for implementing the method of generating recommended content based on user real-time data is shown. As Figure 1 shown, the computing device can include one or more processors (the processor can include but not limited to a microprocessor MCU or a programmable logic device FPGA processing device), a memory for storing data, a transmission device for communication function and an input / output interface. The memory, the transmission device and the input / output interface are connected with the processor through a bus. In addition, it can also include a display, a keyboard and a cursor control device connected with the input / output interface. Those skilled in the art can understand that Figure 1 The structure shown is only a schematic, which does not limit the structure of the above-mentioned electronic device. For example, the computing device can also include more Figure 1more or fewer components than those shown or configured differently from those shown. Figure 1

[0027] It should be noted that the one or more processors and / or other data processing circuitry described above can be referred to herein as "data processing circuitry" in general. The data processing circuitry can be embodied as, entirely or in part, software, hardware, firmware, or any combination thereof. Moreover, the data processing circuitry can be a single standalone processing module, or incorporated in whole or in part within any one of other elements of the computing device. As referred to in the embodiments of the present disclosure, the data processing circuitry serves as a processor to control, for example, the selection of the variable resistance terminal path connected to the interface.

[0028] The memory can be used to store software programs and modules of application software, such as program instructions / data storage means corresponding to the method for generating recommended content based on real-time user data in the embodiments of the present disclosure. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, i.e., implements the method for generating recommended content based on real-time user data of the application program described above. The memory can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory can further include a memory remotely disposed relative to the processor, which can be connected to the computing device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0029] The transmission device is used to receive or send data via a network. Specific examples of the network can include a wireless network provided by a communication provider of the computing device. In one example, the transmission device includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.

[0030] The display can be, for example, a touch screen type liquid crystal display (LCD), which can enable a user to interact with the user interface of the computing device.

[0031] It should be noted that in some optional embodiments, the computing device described above Figure 1 It should be noted that the computing device described above can include hardware elements (including circuitry), software elements (including computer code stored on a computer readable medium), or a combination of both hardware and software elements. It should be noted that in some embodiments, the functions described above Figure 1 ​is merely one instance of a particular, concrete example and is intended to show the types of components that can be present in the computing device described above.

[0032] Figure 2 is a schematic diagram of a recommendation content generation system based on user real-time data according to the present embodiment. Referring to Figure 2 , the system includes a real-time data collection and processing module, an agent, and a first large language model. The real-time data collection and processing module is in communication connection with a chat application server, and is configured to collect real-time data (e.g., chat content, state information, and interaction information, etc.) corresponding to a target user from the chat application server, and generate a message list corresponding to the target user according to the real-time data. The message list may, for example, be a list of real-time data arranged in chronological order. In addition, referring to Figure 2 , in the present embodiment, the agent and the first large language model jointly constitute a content recommendation model.

[0033] The real-time data collection and processing module is in communication connection with the first large language model and the agent, respectively. The first large language model is configured to predict a topic of interest to the target user according to the message list corresponding to the target user. The agent is configured to generate content recommended to the target user in combination with the topic of interest to the target user and the message list corresponding to the target user.

[0034] In addition, referring to Figure 4 , the system further includes a second large language model, and the second large language model is configured to determine a user portrait corresponding to an online real user, label information of the user portrait of the online real user, simulate behaviors of a virtual user and generate corresponding behavior data samples, and determine a correlation between the user portrait of the online real user and the behavior data samples. The second large language model is a pre-trained general multi-modal large model.

[0035] Further, referring to Figure 2 , the agent further includes a user portrait determination module, a search module, and a content generation module. The user portrait determination module is configured to generate a user portrait of the target user according to the message list corresponding to the target user. The search module is in communication connection with the user portrait determination module, and is configured to search the Internet according to the user portrait of the target user and the topic of interest to the target user, and determine multi-modal content that conforms to the user portrait of the target user and the topic of interest to the target user. The content generation module is in communication connection with the search module, and is configured to generate prompt information according to the multi-modal content, use a content creation model and the prompt information to output content recommended to the target user.

[0036] It should be noted that the real-time data collection and processing module, the first large language model, and the agent in the system can all be applicable to the hardware structure described above.

[0037] In the above operating environment, according to a first aspect of the present embodiment, there is provided a recommended content generation method based on user real-time data, which is implemented by the system shown in Figure 2 Figure 3 A flowchart of the method is shown, which, as shown in Figure 3 The method comprises:

[0038] S302: Collecting first real-time data corresponding to a target user, and generating a first message list corresponding to the target user based on the first real-time data;

[0039] S304: Searching for first content information meeting the interest of the target user according to the first message list; and

[0040] S306: Generating second content information corresponding to the target user based on the first content information and using a content creation model based on a large language model.

[0041] Specifically, first, the real-time data collection and processing module collects first real-time data corresponding to a target user from a chat application server, and then generates a first message list corresponding to the target user based on the collected first real-time data (S302). The first real-time data includes but is not limited to chat content, state information and interaction information of the target user. It is worth noting that the time interval at which the real-time data collection and processing module collects the first real-time data can be pre-set in the system by the administrator, so that the real-time data collection and processing module can collect the first real-time data corresponding to the target user from the chat application server at a certain time interval. In addition, the real-time data collection and processing module can also collect the first real-time data corresponding to the target user from the chat application server at irregular intervals, for example, as long as the first real-time data of the target user changes, the real-time data collection and processing module will collect the first real-time data from the chat application server.

[0042] For example, at 9:00-9:01, the real-time data collection and processing module collects the chat content and state information of the target user (i.e., the first real-time data). Then, the real-time data collection and processing module generates the first message list shown in Table 1 below based on the collected chat content and state information of the target user.

[0043] Table 1

[0044]

[0045] ​Referring to Table 1, the first message list includes real-time data corresponding to the time interval 8:30-8:31, the real-time data of this time interval including chat content of the target user and interaction information; real-time data corresponding to the time interval 8:31-8:32, the real-time data of this time interval including chat content of the target user, state information, and interaction information;...; real-time data corresponding to the time interval 9:00-9:01, the real-time data of this time interval including chat content of the target user and state information. Thus, according to the above-mentioned content, the first message list is arranged in chronological order and is used to display a list of real-time data corresponding to the target user.

[0046] In addition, referring to the content shown in Table 1 above, the first message list corresponding to the first real-time data not only includes the first real-time data corresponding to the target user collected by the real-time data collection and processing module (i.e., real-time data corresponding to the current time interval), but also includes historical data corresponding to the target user collected by the real-time data collection and processing module. The historical data corresponds to a historical time interval. The first message list is generated by updating the message list of the previous time interval based on the collection of the first real-time data corresponding to the target user. Thus, it is worth noting that the first message list input to the content recommendation model not only includes real-time data corresponding to the time interval 9:00-9:01, but also includes real-time data before 9:00-9:01.

[0047] For example, Table 2 shows a message list corresponding to the previous time interval.

[0048] Table 2

[0049]

[0050] Referring to Table 2, the message list corresponding to the previous time interval includes real-time data corresponding to the time interval 8:30-8:31, the real-time data of this time interval including chat content of the target user and interaction information; real-time data corresponding to the time interval 8:31-8:32, the real-time data of this time interval including chat content of the target user, state information, and interaction information;...; real-time data corresponding to the time interval 8:59-9:00, the real-time data of this time interval including chat content of the target user and state information. Thus, in the case where the real-time data collection and processing module collects the first real-time data corresponding to the target user, Table 2 is updated and Table 1 (i.e., the first message list) is generated.

[0051] Afterwards, the content recommendation model searches for first content information that matches the interest of the target user from the Internet according to the first message list (S304). Specifically, the content recommendation model collects relevant content that matches the interest of the target user from the massive multi-modal data of the Internet based on the first message list. The specific operation of how the content recommendation model searches for the first content information that matches the interest of the target user will be described later, and thus will not be described here.

[0052] Finally, in the case where the content recommendation model searches for the first content information corresponding to the target user from the Internet, the content recommendation model generates second content information corresponding to the target user based on the first content information and by using a content creation model based on a large language model (S306). The second content information is the content recommended to the target user. Referring to Figure 2 As shown, in the case where the content recommendation model searches for the first content information corresponding to the target user from the Internet, the first content information is filled into a pre-set prompt template, and corresponding prompt information is generated. Afterwards, the content recommendation model inputs the prompt information into the content creation model, so that the content creation model can output the content recommended to the target user based on the prompt information. The above content will be described in detail later, and thus will not be described here.

[0053] As the content described in the background, the traditional recommendation system excessively relies on behavior data related to content (for example, click rate and collection rate of other users on the content, etc.) for recommendation, which makes it difficult to accurately and timely recommend content information related to real-time interest and real-time emotional change information of the user to the user, and thus cannot provide more accurate and personalized recommendation services.

[0054] Therefore, the present application provides a recommendation content generation method based on real-time data of a user. In the present application, by collecting first real-time data corresponding to the target user, chat information and communication information generated by the target user using the instant messaging tool can be obtained. In the case where the first real-time data corresponding to the target user is collected, the first real-time data can be input into a pre-trained content recommendation model in the form of a first message list, so as to output recommendation content corresponding to the target user. In addition, the present application does not rely on behavior data (like rate, collection rate) for recommendation, but dynamically predicts content interested by the user through the content of the message list of the user, so as to realize an efficient recommendation algorithm for instant interest recommendation.

[0055] Therefore, since the present application generates recommendation content for the target user by using instant information of the target user, the finally generated recommendation content matches the interest and demand of the target user in the current state.

[0056] Further, the technical problem that the conventional recommendation content generation system is difficult to efficiently utilize the instant information of the user to generate the recommendation content for the user, so that the recommendation result cannot reflect the latest interest and demand of the user is solved.

[0057] Optionally, based on the first content information and by utilizing the content creation model based on the large language model, the operation of outputting the second content information corresponding to the target user comprises: filling the first content information into a pre-set prompt template and generating prompt information; and inputting the prompt information into the content creation model and outputting the second content information corresponding to the target user.

[0058] Specifically, in the case that the content recommendation model searches the first content information from the Internet, the first content information is filled into a pre-set prompt template and prompt information is generated. Then the content recommendation model further inputs the prompt information into the content creation model based on the large language model, and receives the second content information (i.e. the content recommended to the target user) generated by the content creation model. Finally, the content recommendation model outputs the second content information corresponding to the target user.

[0059] For example, the input prompt information in the content recommendation model is: you are an article writing assistant, please write an article on the topic of “philosophy and psychology-psychology-positive psychology-theory and practical application of positive psychology” (format: primary category-secondary category-entity-topic). The first user portrait of the target user is: 28 years old; male; the occupation may be related to games, IT or marketing; lives in China, may be in Sichuan. The long-term interest of the target user is: long-term interest in horror mobile games and movies; long-term interest in hiking and related equipment; strong interest in Chinese ancient history and culture. The short-term interest of the target user is: recent interest in modern minimalist bedroom furniture; some interest in handcrafting techniques, especially dough handling; interest in the quality and best eating method of olive oil. The search related web pages (i.e. the first content information) are: the content included in web page 1, the content included in web page 2 and the content included in web page 3.

[0060] The content recommendation model outputs the recommended content for the target user as: "Dao and Confucianism Positive Psychology: Modern Application of Ancient Wisdom". In recent years, a wave of "positive psychology" is quietly rising. From the bestseller list to social media hot topics, from corporate training courses to school mental health education, positive psychology seems to be everywhere. So, what is positive psychology? How is it related to the traditional Chinese culture we are familiar with, especially the thoughts of Taoism and Confucianism?... In this fast-paced era, let's re-examine these ancient wisdom. Perhaps, we will find that long-lost inner peace, love for life, and hope for the future. After all, true wisdom is tested by time.

[0061] Thus, by filling the first content information into the pre-set prompt template, the corresponding prompt information is generated, and the content creation model is utilized and the recommended content intersected with the long / short-term interests in the target user portrait is outputted according to the prompt information, thereby achieving the technical effect of personalized content recommendation.

[0062] Optionally, according to the first message list, the operation of searching for the first content information conforming to the interests of the target user comprises: inputting the first message list into a pre-trained first large language model, and utilizing the first large language model to predict the first interest topic corresponding to the target user; and inputting the first interest topic into a pre-trained agent, and utilizing the agent to search for the first content information conforming to the interests of the target user based on the first message list. Further optionally, the operation of inputting the first interest topic into the pre-trained agent, and utilizing the agent to search for the first content information conforming to the interests of the target user based on the first message list comprises: inputting the first message list into the pre-trained agent, and utilizing the agent to generate a first user portrait of the target user; and utilizing the agent, and searching for the first content information conforming to the first interest topic and the first user portrait according to the first interest topic and the first user portrait.

[0063] Specifically, in the case that the real-time data acquisition and processing module generates the first message list corresponding to the target user, the first message list is inputted into a pre-trained first large language model, and the first large language model is utilized to predict the first interest topic corresponding to the target user. For example, the real-time data acquisition and processing module inputs the first message list shown in Table 1 above into the first large language model, and then the first large language model outputs the topic (i.e., the first interest topic) interested by the target user. The topic structure of the first interest topic may be, for example, "first interest category-second interest category-entity-topic content", so that the detailed topic structure can help the subsequent agent to accurately generate the second content information.

[0064] In addition, it is worth noting that, since the first message list contains the first real-time data corresponding to the target user, and the first large language model can predict the topic of interest of the target user at the current time and state based on the first real-time data corresponding to the target user, the predicted topic of interest of the target user is not fixed, but is updated based on the changes in time and data. The first interest topic with timeliness can more accurately represent the interest orientation of the target user at the current time and state, and help to provide accurate recommendation services for the target user subsequently.

[0065] Meanwhile, in the case that the real-time data collection and processing module inputs the first message list to the agent, the user portrait determination module in the agent can further determine the first user portrait of the target user according to the first message list. Wherein, the agent is a pre-trained user personalized agent. And wherein, the first user portrait includes but is not limited to gender, age, mobile phone model, occupation, geographic location, interest and occupation, etc.

[0066] In addition, it is worth noting that, since the first message list contains the first real-time data corresponding to the target user, and the user portrait determination module can determine the first user portrait of the target user at the current time and state based on the first real-time data corresponding to the target user, the determined user portrait of the target user is not fixed, but is updated based on the changes in time and data. The user portrait with timeliness can more accurately locate the characteristics of the target user, and help to provide accurate recommendation services for the target user subsequently.

[0067] Finally, in the case that the agent receives the topic of interest of the target user (i.e., the first interest topic) sent by the first large language model and generates the first user portrait of the target user, the related content (i.e., the first content information) can be searched from the Internet in combination with the topic of interest of the target user and the first user portrait of the target user.

[0068] Therefore, since the application utilizes the first large language model to predict the topic of interest of the target user and utilizes the agent double verification mechanism, it can effectively improve the content recommendation accuracy and provide more accurate and personalized recommendation services for the target user.

[0069] Optionally, the operation of searching the first content information conforming to the first interest topic and the first user portrait from the Internet by using the agent includes: searching the third content information conforming to the first interest topic from the Internet by using the agent; and screening the third content information by using the label information in the first user portrait, and determining the first content information, wherein the label information includes long-term interests and short-term interests of the target user.

[0070] Specifically, refer to Figure 2 As shown, when the user profile determination module generates the first user profile based on the first message list corresponding to the target user, and the first large language model determines the first interest topic corresponding to the target user based on the first message list corresponding to the target user, the search module in the agent can first search the Internet and obtain third content information based on the first interest topic corresponding to the target user (i.e., the topic that the target user is interested in).

[0071] For example, the first language model, based on the first message list corresponding to the target user, determines that the target user is interested in the topic of "Vietnamese history." Therefore, the search module searches the internet for "Vietnamese history" and obtains content related to "Vietnamese history" (i.e., third-party content information). This content related to "Vietnamese history" includes: "What role did golf play in Vietnamese history?", "The development of Vietnamese history", and "What is the relationship between Vietnamese history and American history?", etc.

[0072] The search module then uses the tag information from the first user profile to filter the third content information and determine the first content information. The tag information in the first user profile includes, but is not limited to, gender, age, mobile phone model, occupation, location, long-term interests, and short-term interests. It's important to note that the search module does not use all tags from the first user profile for filtering; instead, it adaptively selects multiple tags from all tags for filtering. For example, the search module might use gender, age, mobile phone model, occupation, location, and long-term interests from the first user profile to filter the third content information. Alternatively, the search module could also use gender, age, mobile phone model, occupation, location, and short-term interests from the first user profile to filter the third content information.

[0073] For example, when the search module searches the internet for content related to "Vietnamese history," some tag information in the first user profile (including the target user's long-term interests) shows that the target user is interested in "golf." Therefore, the search module can filter the identified content related to "Vietnamese history," retaining only the content further related to "golf." That is, it can retain the question, "What role did golf play in Vietnamese history?"

[0074] Thus, by utilizing the first interest topic, searching for the third content information meeting the requirement from the Internet, and then screening the third content information according to the label information in the first user portrait, and determining the operation of the first content information, the technical effect of ensuring that the first content information is strongly related to the user portrait of the target user, and then ensuring that the second content information ultimately received by the target user meets the interest of the target user, and improving the satisfaction of the target user for the second content information ultimately generated is achieved.

[0075] Optionally, the operation of searching for the first content information meeting the first interest topic and the first user portrait from the Internet by utilizing the agent and according to the first interest topic and the first user portrait comprises: fine-tuning the first interest topic by utilizing the label information in the first user portrait, and generating a second interest topic; and searching for the first content information meeting the second interest topic from the Internet by utilizing the agent.

[0076] Specifically, referring to FIG. 1, Figure 2 In the case that the user portrait determination module generates the first user portrait based on the first message list corresponding to the target user, and the first large language model determines the first interest topic corresponding to the target user based on the first message list corresponding to the target user, the search module in the agent can first fine-tune the first interest topic by utilizing the label information in the first user portrait.

[0077] It is worth noting that the search module does not fine-tune the first interest topic by utilizing all the labels in the label information of the first user portrait, but adaptively selects multiple labels from all the labels to fine-tune the first interest topic. For example, the search module fine-tunes the first interest topic by utilizing the gender, age, mobile phone model used, occupation, address location, and long-term interest in the first user portrait. For another example, the search module can also fine-tune the first interest topic by utilizing the gender, age, mobile phone model used, occupation, address location, and short-term interest in the first user portrait.

[0078] For example, the first large language model determines that the topic of interest of the target user is “American history” based on the first message list corresponding to the target user. And wherein the search module determines that the target user is more interested in “baseball” according to part of the label information in the first user portrait (which includes the short-term interest of the target user). Thus, the search module fine-tunes “American history” and adjusts it to an interest topic related to “baseball” (i.e., a second interest topic). Wherein the fine-tuned “American history” and the interest topic related to “baseball” is “what role does baseball play in American history”.

[0079] After the search module determines the second interest topic corresponding to the target user, the first content information meeting the second interest topic is searched from the Internet.

[0080] For example, in the above-mentioned content, the search module determines the second interest topic as "what role does baseball play in the history of the United States". Then the search module searches and obtains the content related to "what role does baseball play in the history of the United States" from the Internet (i.e., the first content information).

[0081] Therefore, through the operation of searching the third content information conforming to the first interest topic from the Internet, screening the third content information by using the label information in the first user portrait, and determining the first content information, the technical effect of ensuring that the first content information is strongly related to the user portrait of the target user, and further ensuring that the second content information finally received by the target user conforms to the interest of the target user, and improving the satisfaction of the target user for the second content information finally generated is achieved.

[0082] Optionally, further comprising: collecting second real-time data corresponding to the target user, and generating a second message list based on the second real-time data, wherein the second real-time data is used to indicate the updated first real-time data, and the second message list is used to indicate the updated first message list; in the case of generating the second message list, inputting the second message list to the agent, and generating a second user portrait of the target user by using the agent; and updating the first user portrait by using the second user portrait.

[0083] Specifically, referring to FIG. 1, since the target user constantly updates the chat record, state information, and interaction information, etc. on the chat application server, the real-time data corresponding to the target user is not fixed, but constantly changes over time. Figure 2

[0084] Therefore, in the case that the chat record, state information, and interaction information, etc. corresponding to the target user on the chat application server constantly change, the real-time data collection and processing module collects second real-time data corresponding to the target user from the chat application server, and generates a second message list based on the second real-time data. The second real-time data may be, for example, data updated after the first real-time data.

[0085] Table 3 shows the second message list generated based on the second real-time data.

[0086] Table 3

[0087]

[0088] Referring to the content shown in Table 1 and Table 3, in the case that the real-time data collection and processing module collects the second real-time data corresponding to the time period 9:01-9:02, the second real-time data is used to update the above-mentioned Table 1 (i.e., the first message list), thereby generating the above-mentioned Table 3 (i.e., the second message list). ​

[0089] And in the case that the real-time data acquisition and processing module generates the second message list, the second message list is input to the agent, and the second user portrait of the target user is generated by using the agent. Then the first user portrait is updated by using the second user portrait. For example, in the case that the real-time data acquisition and processing module generates the above table 3 and updates the above table 1 by using the above table 3, the above table 3 is further input to the user portrait determination module in the agent. Therefore, the user portrait determination module can generate the second user portrait based on the above table 3.

[0090] Therefore, by collecting the chat records, state information and interaction information generated by the target user on the chat application server in real time, and dynamically updating the message list by using the collected information, and further dynamically updating the user portrait of the target user by using the updated message list, the technical effect of accurately generating the user portrait and ensuring that the finally generated second content information meets the interest changes of the target user is achieved.

[0091] Optionally, the method further comprises: pre-training the user portrait determination module in the agent to determine the first user portrait, wherein the operation of pre-training the user portrait determination module comprises: determining first behavior data samples corresponding to a plurality of first real users, and generating a third message list based on the first behavior data samples; determining third user portraits corresponding to each of the first real users by using the pre-trained second large language model, so as to construct a plurality of first sample pairs based on the third message list corresponding to each of the first real users and the third user portrait corresponding to each of the first real users; determining second behavior data samples corresponding to a plurality of second real users, and generating a fourth message list based on the second behavior data samples; determining fourth user portraits corresponding to each of the second real users by using artificial labeling, so as to construct a plurality of second sample pairs based on the fourth message list corresponding to each of the second real users and the fourth user portrait corresponding to each of the second real users; and inputting the first sample pairs and the second sample pairs to the user portrait determination module, and training the user portrait determination module.

[0092] Specifically, Figure 4 is a schematic diagram of training the user portrait determination module and the first large language model of the agent according to the embodiments of the present application. As shown in Figure 4 Before the user portrait determination module generates the second content information recommended to the target user, the user portrait determination module needs to be pre-trained.

[0093] Thus, first, the chat application server calls the first behavior data samples corresponding to the plurality of first real users, and generates a third message list based on the first behavior data samples corresponding to each first real user. The first behavior data samples may be, for example, historical chat records, historical state information, and historical interaction information of the plurality of first real users. The historical chat records, historical state information, and historical interaction information of the plurality of first real users are stored in the chat application server.

[0094] Then, the second large language model receives the third message list corresponding to each first real user sent by the chat application server, and further determines the third user portrait corresponding to each first real user. The prompt information input into the second large language model includes: “Please construct the third user portrait of the first real user based on the third message list of the first real user. Input: the third message list corresponding to each first real user, arranged in chronological order. Output: the third user portrait description of each first real user, which is divided into three components. That is, output one: basic information of the first real user, including basic information such as age, gender, and occupation of the first real user; output two: long-term interest of the first real user; output three: short-term interest of the first real user.” The second large language model may be, for example, a general large language model.

[0095] For example, the third message list is input into the second large language model. The third message list is shown in the following list 4.

[0096] Table 4

[0097]

[0098]

[0099] Based on the above table 4, the output basic portrait of the first real user is: age 28; male; occupation may be related to games, IT or marketing; lives in China, may be in Sichuan. The output long-term interest of the first real user is: long-term interest in horror mobile games and movies; long-term interest in hiking and related equipment; strong interest in ancient Chinese history and culture. The output short-term interest of the first real user is: recent interest in modern minimalist bedroom furniture; some interest in handmade crafts, especially dough handling; interest in the quality of olive oil and the best way to eat it.

[0100] Further, the second large language model constructs a plurality of first sample pairs based on the third message list corresponding to each first real user and the third user portrait corresponding to each first real user. The format of the plurality of first sample pairs synthesized by the second large language model is: [message list, user portrait].

[0101] Further, the chat application server calls second behavior data samples corresponding to the plurality of second real users, and generates a fourth message list based on the second behavior data samples corresponding to each second real user. The second behavior data samples may be, for example, historical chat records, historical state information, and historical interaction information of the plurality of second real users. The historical chat records, the historical state information, and the historical interaction information of the plurality of second real users are stored in the chat application server.

[0102] Then, each second real user is labeled by manual labeling to determine a fourth user portrait corresponding to each second real user.

[0103] Further, the chat application server constructs a plurality of second sample pairs [message list, user portrait] from the fourth message list and the fourth user portrait corresponding to each second real user.

[0104] Thus, the sample set composed of the plurality of first sample pairs and the plurality of second sample pairs can be used to train the user portrait determination module.

[0105] For example, the plurality of first sample pairs and the plurality of second sample pairs can be input into the user portrait determination module, and the input in the agent is: "You are an intelligent recommendation assistant, please analyze the third message list and analyze the third user portrait of the corresponding first real user". The third message list is shown in Table 4.

[0106] The user portrait determination module outputs: "age 28; male; occupation may be related to games, IT or marketing; lives in China, may be in Sichuan. Long-term interests of the first real user: long-term interest in horror mobile games and movies; long-term interest in hiking and related equipment; strong interest in Chinese ancient history and culture. Short-term interests of the first real user: recent interest in modern minimalist bedroom furniture; some interest in handcrafting techniques, especially dough handling; interest in the quality of olive oil and the best way to eat it".

[0107] For example, the plurality of first sample pairs and the plurality of second sample pairs are input into the user portrait determination module, and in this embodiment, the input of the user portrait determination module does not calculate the loss, only the loss of the answer of the user portrait determination module. Wherein, the parameters of the user portrait determination module are θ1, the training data set is Wherein is a label mask, is the predicted output of the user portrait determination module, represented as a probability distribution. For the cross-entropy loss function L CE1 (θ1), it can be represented as:

[0108]

[0109] wherein C denotes the number of categories of characters. denotes a sample denotes the true label (usually one-hot encoded, denotes that the sample belongs to category C. denotes the input of the user portrait determination module predicts the probability that belongs to category C. is a label mask, denotes is valid, denotes is invalid (i.e., skip the loss calculation of the sample).

[0110] In another training algorithm, not just 0 or 1, wherein, denotes that the input of the user portrait determination module has no loss. w1 denotes the weight value corresponding to the long-term interest in the user portrait training result. w2 denotes the weight value corresponding to the short-term interest in the user portrait training result. And so on. w n denotes the weight value corresponding to the occupation in the user portrait training result.

[0111] For example, in the case of and w1=0.8, it means that the weight of the long-term interest in the user portrait training result is 0.8. For another example, in the case of and w2=0.9, it means that the weight of the short-term interest in the user portrait training result is 0.9. For another example, in the case of and w n =1, it means that the weight of the occupation in the user portrait training result is 1.

[0112] Thus, based on the weight values of each user portrait label information in the above training result, the importance of each user portrait label information can be determined. And in the case of the greater the weight value, the greater the importance of the corresponding user portrait label information; in the case of the smaller the weight value, the smaller the importance of the corresponding user portrait label information.

[0113] Then, according to the user portrait output by the user portrait determination module and the user portrait in the sample pair, the user portrait determination module is fine-tuned.

[0114] Thus, by synthesizing a plurality of first sample pairs by using the second large language model and a plurality of second sample pairs by using artificial means, and training the user portrait determination module using the plurality of first sample pairs and the plurality of second sample pairs, the necessary basis for subsequent provision of the second content information to the target user is provided.

[0115] Optionally, the first large language model is pre-trained, wherein the pre-training of the first large language model comprises: collecting different label information corresponding to each label item of the user portrait, and generating a plurality of fifth user portraits by arranging and combining the collected label information of each label item, and generating a corresponding virtual user according to the fifth user portrait; generating third behavior data samples and corresponding interested topics by using the second large language model and according to the virtual user, and generating a fifth message list based on the third behavior data samples, so as to construct a plurality of third sample pairs according to the fifth message list and the corresponding interested topics; generating a sixth message list according to the fourth behavior data samples and the interested topics corresponding to a plurality of third real users respectively, and constructing a plurality of fourth sample pairs based on the sixth message list and the corresponding interested topics; and training the first large language model by using the plurality of third sample pairs and the plurality of fourth sample pairs.

[0116] Specifically, referring to FIG. 1, Figure 4 Before generating the topic of interest of the target user by using the first large language model, the first large language model needs to be pre-trained.

[0117] Thus, first, the second large language model collects label information corresponding to the label items of each user portrait from online. The label items corresponding to each fifth user portrait include but are not limited to gender, age, mobile phone model used, occupation, geographic location, long-term interest, and short-term interest, etc. Different label information is collected for each label item, for example, for the gender label item, "male" and "female" are collected. For the age label item, different ages are collected as label information; for the mobile phone model used, different mobile phone models are collected as label information; and so on.

[0118] The different label information corresponding to each label item is arranged and combined, so as to simulate a plurality of user portraits (i.e. fifth user portraits), wherein each generated user portrait corresponds to a virtual user.

[0119] For example, the label information of the fifth user portrait 1 is gender 1, age 1, mobile phone model 1, occupation 1, geographic location 1, long-time interest 1, and short-time interest 1; the label information of the fifth user portrait 2 is gender 2, age 2, mobile phone model 2, occupation 2, geographic location 2, long-time interest 2, and short-time interest 2. Thus, different fifth user portraits can be generated based on the arrangement and combination of each label information, and corresponding virtual users can be generated.

[0120] Further, in the case of generating a plurality of fifth user portraits, a second large language model can be used to generate a fifth message list matched with the fifth user portrait and a topic of interest corresponding to the fifth message list based on the fifth user portrait. Thus, the second large language model further constructs a plurality of third sample pairs according to the fifth message list and the corresponding topic of interest.

[0121] Among them, it can be realized by inputting prompt information to the second large language model. For example, the second large language model can input: “You are an intelligent recommendation assistant, please analyze the fifth message list of the virtual user and predict the topic he wants to see next.” Wherein the fifth message list is shown in the following list 5.

[0122] Table 5

[0123]

[0124] The topic of interest output by the first large language model is: philosophy and psychology-psychology-positive psychology-theory and practical application of positive psychology.

[0125] Finally, the second large language model constructs a plurality of third sample pairs, wherein the format of the third sample pair is: [message list, topic of interest of the user].

[0126] At the same time, after the real user is online, the chat application server calls the fourth behavior data sample corresponding to each third real user, and generates a sixth message list and a corresponding topic of interest according to the fourth behavior data sample corresponding to each third real user. For example, for a series of N behaviors (such as chat messages) of a real user, the previous N-1 behaviors can be used as a message list, and the Nth behavior can be used as a topic of interest, so as to construct a fourth sample pair corresponding to each third real user in this way.

[0127] Finally, the first large language model can be trained using the sample set constructed by the above-mentioned plurality of third sample pairs and plurality of fourth sample pairs.

[0128] In the embodiments of the present application, the algorithm for training the first large language model, the input information and the output information are original modality information (for example, text, pictures and videos, etc.). Compared with the traditional content recommendation system which relies on the user's behavior (for example, likes or collections, etc. posterior characteristics) to assist in improving the recommendation accuracy, the present application only relies on the continuity of the content for recommendation. Further, the first large language model is based on the modeling paradigm of the original modality information, and the parameters of the first large language model can be hot-started from the general multi-modal large model (i.e., the second large language model), and continue the vast amount of already trained knowledge.

[0129] For example, the above-mentioned plurality of third sample pairs and plurality of fourth sample pairs are input to the first large language model, and in the present embodiment, the input of the first large language model does not calculate the loss, only the loss of the answer of the first large language model is calculated. Wherein, let the parameters of the first large language model be θ2, the training data set of the training data set be Wherein is a label mask, is the predicted output of the first large language model, represented as a probability distribution. For the cross-entropy loss function L CE2 (θ2), can be represented as:

[0130]

[0131] Wherein, C represents the number of categories of characters. represents the sample The real label under the category C (usually one-hot encoding, represents that the sample belongs to the category C. represents the input of the first large language model. Predicts the probability of belonging to the category C. is a label mask, represents effective, represents invalid (i.e., skip the loss calculation of this sample).

[0132] Thus, by utilizing the second large language model and constructing a plurality of third sample pairs based on cold-start data and a plurality of fourth sample pairs utilizing the behavior data samples corresponding to the real users online, and training the first large language model by utilizing the plurality of third sample pairs and the plurality of fourth sample pairs, the technical effect of providing a necessary basis for subsequent second content information to the target user is achieved.

[0133] Optionally, according to fourth behavior data samples corresponding to the plurality of third real users respectively, a sixth message list is generated, and based on the sixth message list, the operation of constructing a plurality of fourth sample pairs includes: collecting fifth behavior data samples corresponding to a plurality of fourth real users, and analyzing the correlation between the user portraits of the plurality of fourth real users and the corresponding fifth behavior data samples by using the second large language model, wherein the number of the plurality of fourth real users is greater than or equal to the number of the plurality of third real users; in the case that the correlation is greater than a preset threshold, a plurality of fourth behavior data samples corresponding to the plurality of fifth behavior data samples are selected, and a sixth message list is constructed according to the plurality of fourth behavior data samples; and a plurality of fourth sample pairs are constructed according to the sixth message list.

[0134] Specifically, referring to FIG. 2, before the second large language model constructs a plurality of fourth sample pairs according to fourth behavior data samples corresponding to a plurality of third real users respectively, the second large language model first collects fifth behavior data samples corresponding to a plurality of fourth real users. Wherein the number of the plurality of fourth real users is greater than or equal to the number of the plurality of third real users. Figure 4

[0135] Then the second large language model determines the user portrait corresponding to each fourth real user, and determines the correlation between the user portrait of the plurality of fourth real users and the corresponding fifth behavior data samples. And from the plurality of fifth behavior data samples, a plurality of fourth behavior data samples with a correlation greater than a preset threshold are determined, and the plurality of fourth behavior data samples with a correlation greater than the preset threshold are retained, and the behavior data samples with a correlation less than or equal to the preset threshold are removed.

[0136] Finally, the second large language model constructs a plurality of fourth sample pairs according to the sixth message list corresponding to the plurality of fourth behavior data samples determined.

[0137] Thus, by performing the operation of data cleaning on the behavior data samples corresponding to the real users, and filtering out the behavior data samples with low correlation to the user portrait of the real user, and only retaining the behavior data samples with high correlation to the user portrait of the real user, the technical effect of improving the accuracy of the plurality of fourth sample pairs constructed, and further ensuring the accuracy of the first large language model trained, is achieved.

[0138] In addition, referring to FIG. 2, according to the second aspect of the present embodiment, a storage medium is provided. The storage medium includes a stored program, wherein when the program is running, the processor executes the method described in any one of the above. Figure 1

[0139] Thus, according to the present embodiment, the technical effect of providing more accurate and personalized recommendation services for users can be achieved. ​​

[0140] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all described as a combination of a series of actions, but those skilled in the art should know that the present application is not limited by the order of the described actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.

[0141] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, or network device, etc.) execute the method described in each embodiment of the present application.

[0142] Embodiment 2

[0143] Figure 5 A device 500 for generating recommended content based on user real-time data according to the present embodiment is shown, which corresponds to the method according to Embodiment 1. As shown in the figure, the device 500 includes a real-time data acquisition module 510 for acquiring first real-time data corresponding to a target user and generating a first message list corresponding to the target user based on the first real-time data; a first content information search module 520 for searching first content information that meets the interests of the target user according to the first message list; and a second content information output module 530 for generating second content information for recommending to the target user based on the first content information and using a content creation model based on a large language model. Figure 5

[0144] Optionally, the second content information output module 530 includes a prompt information generation module for filling the first content information into a pre-set prompt template and generating prompt information; and a second content information output sub-module for inputting the prompt information into the content creation model and outputting the second content information for recommending to the target user.

[0145] ​Optionally, the first content information search module 520 comprises: a first interest topic prediction module, configured to input the first message list into a pre-trained first large language model, and predict a first interest topic corresponding to the target user by using the first large language model; and a first content information search submodule, configured to input the first interest topic into a pre-trained agent, and search for first content information meeting the interest of the target user by using the agent based on the first message list.

[0146] Optionally, the first content information search submodule comprises: a first user portrait generation module, configured to input the first message list into the pre-trained agent, and generate a first user portrait of the target user by using the agent; and an agent search module, configured to search for first content information meeting the first interest topic and the first user portrait by using the agent according to the first interest topic and the first user portrait.

[0147] Optionally, the first content information search module 520 comprises: a third content information search module, configured to search for third content information meeting the first interest topic from the Internet by using the agent; and a screening module, configured to screen the third content information by using label information in the first user portrait, and determine the first content information, wherein the label information comprises long-term interests and short-term interests of the target user.

[0148] Optionally, the first content information search module 520 comprises: a fine-tuning module, configured to fine-tune the first interest topic by using the label information in the first user portrait, and generate a second interest topic; and a first content information search submodule, configured to search for first content information meeting the second interest topic from the Internet by using the agent.

[0149] Optionally, the apparatus 500 further comprises: a first data acquisition module, configured to acquire second real-time data corresponding to the target user, and generate a second message list based on the second real-time data, wherein the second real-time data is used to indicate updated first real-time data, and the second message list is used to indicate an updated first message list; a second user portrait generation module, configured to input the second message list into the agent in a case where the second message list is generated, and generate a second user portrait of the target user by using the agent; and a user portrait updating module, configured to update the first user portrait by using the second user portrait.

[0150] Optionally, the apparatus 500 further comprises a first model training module configured to pre-train a user portrait determination module in the agent for determining a first user portrait, wherein the first model training module comprises: a second data collection module configured to determine first behavior data samples corresponding to a plurality of first real users, and generate a third message list based on the first behavior data samples; a first sample pair construction module configured to determine a third user portrait corresponding to each first real user by using a pre-trained second large language model, and thereby construct a plurality of first sample pairs based on a third message list corresponding to each first real user and the third user portrait corresponding to each first real user; a third data collection module configured to determine second behavior data samples corresponding to a plurality of second real users, and generate a fourth message list based on the second behavior data samples; a second sample pair construction module configured to determine a fourth user portrait corresponding to each second real user by using an artificial labeling manner, and thereby construct a plurality of second sample pairs based on a fourth message list corresponding to each second real user and the fourth user portrait corresponding to each second real user; and a first model training submodule configured to input the first sample pairs and the second sample pairs into the user portrait determination module, and train the user portrait determination module.

[0151] Optionally, the apparatus 500 further comprises a second model training module configured to pre-train the first large language model, wherein the second model training module comprises: a fifth portrait generation module configured to collect different label information corresponding to each label item of the user portrait, and arrange and combine the label information of each label item to generate a plurality of fifth user portraits; a third sample pair construction module configured to generate a fifth message list and a corresponding interested topic by using the second large language model and according to the fifth user portrait, and construct a plurality of third sample pairs according to the fifth message list and the corresponding interested topic; a fourth sample pair construction module configured to construct a plurality of fourth sample pairs according to a sixth message list corresponding to a plurality of third real users and the interested topic, and based on the sixth message list and the corresponding interested topic; and a second model training submodule configured to train the first large language model by using the plurality of third sample pairs and the plurality of fourth sample pairs.

[0152] Optionally, the fourth sample pair construction module comprises: a correlation determination module configured to collect fifth behavior data samples corresponding to a plurality of fourth real users, and analyze a correlation between user portraits of the plurality of fourth real users and the corresponding fifth behavior data samples by using the second large language model, wherein a number of the plurality of fourth real users is greater than or equal to a number of the plurality of third real users; a sixth message list construction module configured to, in a case where the correlation is greater than a preset threshold, select corresponding fourth behavior data samples from the plurality of fifth behavior data samples, and construct a sixth message list according to the plurality of fourth behavior data samples; and a fourth sample pair construction submodule configured to construct the plurality of fourth sample pairs according to the sixth message list.

[0153] Thus, according to the embodiment, the technical effect of providing more accurate and personalized recommendation services for users can be achieved.

[0154] Embodiment 3

[0155] Figure 6 A device 600 for generating recommendation content based on real-time data of a user according to the embodiment is shown. The device 600 corresponds to the method according to Embodiment 1. As shown in the figure, the device 600 comprises: a processor 610; and a memory 620 connected with the processor 610, configured to provide the processor 610 with instructions for processing the following processing steps: collecting first real-time data corresponding to a target user, and generating a first message list corresponding to the target user based on the first real-time data; searching for first content information meeting interests of the target user according to the first message list; and generating second content information for recommending to the target user based on the first content information and by using a content creation model based on a large language model. Figure 6 Optionally, the operation of generating the second content information for recommending to the target user based on the first content information and by using the content creation model based on the large language model comprises: filling the first content information into a pre-set prompt template, and generating prompt information; and inputting the prompt information into the content creation model, and outputting the second content information for recommending to the target user.

[0156] Optionally, the operation of generating the second content information corresponding to the target user based on the first content information and by using the content creation model based on the large language model comprises: filling the first content information into a pre-set prompt template, and generating prompt information; and inputting the prompt information into the content creation model, and outputting the second content information corresponding to the target user.

[0157]

[0158] ​Optionally, the operation of searching, according to the first message list, the first content information conforming to the interest of the target user comprises: inputting the first message list into a pre-trained first large language model, and predicting a first interest topic corresponding to the target user by using the first large language model; and inputting the first interest topic into a pre-trained agent, and searching, by using the agent and based on the first message list, the first content information conforming to the interest of the target user.

[0159] Optionally, the operation of searching, by using the agent and according to the first interest topic and the first user portrait, the first content information conforming to the first interest topic and the first user portrait from the Internet comprises: searching, by using the agent, third content information conforming to the first interest topic from the Internet; and

[0160] The third content information is filtered by using label information in the first user portrait, and the first content information is determined, wherein the label information comprises long-term interests and short-term interests of the target user.

[0161] Optionally, the operation of searching, by using the agent and according to the first interest topic and the first user portrait, the first content information conforming to the first interest topic and the first user portrait from the Internet comprises: fine-tuning the first interest topic by using label information in the first user portrait, and generating a second interest topic; and searching, by using the agent, the first content information conforming to the second interest topic from the Internet.

[0162] Optionally, the apparatus 600 further comprises: collecting second real-time data corresponding to the target user, and generating a second message list based on the second real-time data, wherein the second real-time data is used to indicate updated first real-time data, and the second message list is used to indicate updated first message list; in the case of generating the second message list, inputting the second message list into the agent, and generating a second user portrait of the target user by using the agent; and updating the first user portrait by using the second user portrait.

[0163] Optionally, the apparatus 600 further comprises: pre-training the agent, wherein the operation of pre-training the user portrait determination module in the agent to determine the first user portrait comprises: determining first behavior data samples corresponding to a plurality of first real users, and generating a third message list based on the first behavior data samples; determining a third user portrait corresponding to each of the first real users by using a pre-trained second large language model, so as to construct a plurality of first sample pairs based on the third message list corresponding to each of the first real users and the third user portrait corresponding to each of the first real users; determining second behavior data samples corresponding to a plurality of second real users, and generating a fourth message list based on the second behavior data samples; determining a fourth user portrait corresponding to each of the second real users by using artificial labeling, so as to construct a plurality of second sample pairs based on the fourth message list corresponding to each of the second real users and the fourth user portrait corresponding to each of the second real users; and inputting the first sample pairs and the second sample pairs into the user portrait determination module, and training the user portrait determination module.

[0164] Optionally, the apparatus 600 further comprises: pre-training the first large language model, wherein the operation of pre-training the first large language model comprises: collecting different label information corresponding to each label item of the user portrait, and generating a plurality of fifth user portraits by arranging and combining the collected label information of each label item; generating a fifth message list and a corresponding interested topic by using the second large language model and according to the fifth user portrait, and constructing a plurality of third sample pairs according to the fifth message list and the corresponding interested topic; constructing a plurality of fourth sample pairs according to a sixth message list corresponding to a plurality of third real users and the interested topic, and based on the sixth message list and the corresponding interested topic; and training the first large language model by using the plurality of third sample pairs and the plurality of fourth sample pairs.

[0165] Optionally, the operation of generating the sixth message list according to the fourth behavior data samples corresponding to the plurality of third real users, and constructing the plurality of fourth sample pairs based on the sixth message list comprises: collecting fifth behavior data samples corresponding to a plurality of fourth real users, and analyzing the correlation between the user portraits of the plurality of fourth real users and the corresponding fifth behavior data samples by using the second large language model, wherein the number of the plurality of fourth real users is greater than or equal to the number of the plurality of third real users; in the case that the correlation is greater than a preset threshold, selecting corresponding fourth behavior data samples from the plurality of fifth behavior data samples, and constructing the sixth message list according to the plurality of fourth behavior data samples; and constructing the plurality of fourth sample pairs according to the sixth message list.

[0166] Thus, according to the present embodiment, the technical effect of providing more accurate and personalized recommendation services for users can be achieved.

[0167] The above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0168] In the above-mentioned embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0169] In several embodiments provided in the present application, it should be understood that the disclosed technical contents can be implemented by other ways. Among them, the above-mentioned device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division way, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or modules shown or discussed can be indirect coupling or communication connection through some interfaces, units or modules, which can be electrical or other forms.

[0170] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0171] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be realized in the form of hardware or in the form of software functional unit.

[0172] When the integrated unit is realized in the form of software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art that makes contributions or all or part of the technical solutions can be embodied in the form of software product, which is stored in a storage medium and includes a plurality of instructions for making a computer device (which can be a personal computer, a server or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The above-mentioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and various program code storage media.

[0173] The above merely describes the preferred embodiments of the present application, and it should be pointed out that, for those skilled in the art, several improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be considered as falling within the protection scope of the present application.

Claims

1. A method for generating recommended content based on user real-time data, characterized in that, Comprise: Collect first real-time data corresponding to a target user, and generate a first message list corresponding to the target user based on the first real-time data; Search for first content information that meets the interest of the target user according to the first message list; And Generate second content information for recommending to the target user based on the first content information and using a content creation model based on a large language model, wherein the operation of searching for first content information that meets the interest of the target user according to the first message list comprises: Input the first message list into a pre-trained first large language model, and use the first large language model to predict a first interest topic corresponding to the target user; and Input the first interest topic into a pre-trained agent, and use the agent to search for first content information that meets the interest of the target user based on the first message list, wherein the operation of inputting the first interest topic into a pre-trained agent, and using the agent to search for first content information that meets the interest of the target user based on the first message list comprises: Input the first message list into a pre-trained agent, and use the agent to generate a first user portrait of the target user; and Use the agent to search for first content information that meets the first interest topic and the first user portrait according to the first interest topic and the first user portrait, wherein it further comprises: Collect second real-time data corresponding to the target user, and generate a second message list based on the second real-time data, wherein the second real-time data is used to indicate updated first real-time data, and the second message list is used to indicate updated first message list; In the case of generating the second message list, input the second message list into the agent, and use the agent to generate a second user portrait of the target user; and Update the first user portrait using the second user portrait, wherein it further comprises: pre-training a user portrait determination module in the agent for determining the first user portrait, wherein the operation of pre-training the user portrait determination module comprises: Determine first behavior data samples corresponding to a plurality of first real users, and generate a third message list based on the first behavior data samples; Determine a third user portrait corresponding to each first real user using a pre-trained second large language model, so as to construct a plurality of first sample pairs based on the third message list corresponding to each first real user and the third user portrait corresponding to the first real user; and Determine second behavior data samples corresponding to a plurality of second real users, and generate a fourth message list based on the second behavior data samples; Determine a fourth user portrait corresponding to each second real user using artificial labeling, so as to construct a plurality of second sample pairs based on the fourth message list corresponding to each second real user and the fourth user portrait corresponding to the second real user; and inputting the first sample pair and the second sample pair to the user portrait determination module and training the user portrait determination module, wherein a cross-entropy loss function for training the user portrait determination module is as follows: where N denotes the number of the first sample pairs or the second sample pairs, 1 denotes a parameter of the user portrait determination module, denotes a label mask, and C denotes the number of categories of characters, denotes a true label of a third message list in the first sample pair and a fourth message list in the second sample pair under a category C, denotes a probability predicted by the user portrait determination module for the third message list in the first sample pair and the fourth message list in the second sample pair to belong to the category C.

2. The method of claim 1, wherein, The operation of generating second content information for recommendation to the target user based on the first content information and using a content creation model based on a large language model includes: filling the first content information into a pre-set prompt template and generating prompt information; and inputting the prompt information into the content creation model and outputting second content information for recommendation to the target user.

3. The method of claim 1, wherein, The operation of searching for first content information that meets the first interest topic and the first user portrait from the Internet according to the first interest topic and the first user portrait using the agent includes: searching for third content information that meets the first interest topic from the Internet using the agent; and screening the third content information using label information in the first user portrait, and determining the first content information, wherein the label information includes long-term interests and short-term interests of the target user.

4. The method of claim 3, wherein, The operation of searching for first content information that meets the first interest topic and the first user portrait from the Internet according to the first interest topic and the first user portrait using the agent includes: fine-tuning the first interest topic using label information in the first user portrait, and generating a second interest topic; and searching for first content information that meets the second interest topic using the agent.

5. The method of claim 4, wherein, Further comprising: pre-training the first large language model, wherein the operation of pre-training the first large language model includes: collecting different label information corresponding to each label item of a user portrait, and generating a plurality of fifth user portraits by arranging and combining the collected label information of each label item; generating a fifth message list and a corresponding interested topic using the second large language model according to the fifth user portrait, and constructing a plurality of third sample pairs according to the fifth message list and the corresponding interested topic; and constructing a plurality of fourth sample pairs based on a sixth message list and a corresponding interested topic corresponding to a plurality of third real users, respectively; and training the first large language model using the plurality of third sample pairs and the plurality of fourth sample pairs, wherein the operation of generating a sixth message list according to fourth behavior data samples corresponding to a plurality of third real users, respectively, and constructing a plurality of fourth sample pairs based on the sixth message list includes: collecting fifth behavior data samples corresponding to the plurality of fourth real users, and analyzing the correlation between user portraits of the plurality of fourth real users and the corresponding fifth behavior data samples using the second large language model, wherein the number of the plurality of fourth real users is greater than or equal to the number of the plurality of third real users; in the case where the correlation is greater than a preset threshold, selecting the corresponding plurality of fourth behavior data samples from a plurality of fifth behavior data samples, and constructing the sixth message list according to the plurality of fourth behavior data samples; and constructing the plurality of fourth sample pairs according to the sixth message list.

6. A storage medium, characterized by The storage medium comprises a stored program, wherein the method of any one of claims 1 to 5 is executed by a processor when the program is running.

7. A device for generating recommendation content based on real-time user data, characterized in that, Comprise: A real-time data collection module for collecting first real-time data corresponding to a target user and generating a first message list corresponding to the target user based on the first real-time data; A first content information search module for searching first content information that meets the interests of the target user according to the first message list; And A second content information output module for generating second content information for recommending to the target user based on the first content information and using a content creation model based on a large language model, wherein the first content information search module comprises: a first interest topic prediction module for inputting the first message list into a pre-trained first large language model and predicting a first interest topic corresponding to the target user using the first large language model; and A first content information search submodule for inputting the first interest topic into a pre-trained agent, searching first content information that meets the interests of the target user using the agent and based on the first message list, and wherein the first content information search submodule comprises: A first user portrait generation module for inputting the first message list into a pre-trained agent and generating a first user portrait of the target user using the agent; and An agent search module for using the agent and searching first content information that meets the first interest topic and the first user portrait according to the first interest topic and the first user portrait, and the device further comprises: a first data collection module for collecting second real-time data corresponding to the target user and generating a second message list based on the second real-time data, wherein the second real-time data is used to indicate updated first real-time data, and the second message list is used to indicate updated first message list; A second user portrait generation module for inputting the second message list into the agent and generating a second user portrait of the target user using the agent in the case of generating the second message list; and A user portrait update module for updating the first user portrait using the second user portrait, wherein The device further comprises a first model training module for pre-training a user portrait determination module in the agent that determines the first user portrait, wherein the first model training module comprises: a second data collection module for determining first behavior data samples corresponding to a plurality of first real users and generating third message lists based on the first behavior data samples; A first sample pair construction module for determining third user portraits corresponding to each first real user using a pre-trained second large language model, thereby constructing a plurality of first sample pairs based on third message lists corresponding to each first real user and third user portraits corresponding to the each first real user; A first sample pair construction module for determining third user portraits corresponding to each first real user using a pre-trained second large language model, thereby constructing a plurality of first sample pairs based on third message lists corresponding to each first real user and third user portraits corresponding to the each first real user; The third data collection module is configured to determine second behavior data samples corresponding to a plurality of second real users, and generate a fourth message list based on the second behavior data samples. The second sample pair construction module is configured to determine a fourth user portrait corresponding to each second real user by using artificial labeling, and construct a plurality of second sample pairs based on the fourth message list corresponding to each second real user and the fourth user portrait corresponding to the second real user. The first model training submodule is configured to input the first sample pair and the second sample pair into the user portrait determination module and train the user portrait determination module, wherein a cross-entropy loss function for training the user portrait determination module is as follows: where N denotes the number of the first sample pairs or the number of the second sample pairs, 0 1 denotes a parameter of the user portrait determination module, denotes a label mask, and C denotes the number of categories of characters, denotes a true label of a third message list in the first sample pair and a fourth message list in the second sample pair under a category C, denotes a probability predicted by the user portrait determination module for the third message list in the first sample pair and the fourth message list in the second sample pair to belong to the category C. 8.A device for generating recommended content based on user real-time data, characterized by, The method comprises: a processor; and a memory connected to the processor, configured to provide the processor with instructions for processing the following processing steps: collecting first real-time data corresponding to a target user, and generating a first message list corresponding to the target user based on the first real-time data; searching for first content information meeting the interest of the target user according to the first message list; and generating second content information for recommending to the target user based on the first content information and by using a content creation model based on a large language model, wherein the operation of searching for first content information meeting the interest of the target user according to the first message list comprises: inputting the first message list into a pre-trained first large language model, and predicting a first interest topic corresponding to the target user by using the first large language model; and inputting the first interest topic into a pre-trained agent, and searching for first content information meeting the interest of the target user by using the agent and based on the first message list, wherein the operation of inputting the first interest topic into a pre-trained agent, and searching for first content information meeting the interest of the target user by using the agent and based on the first message list comprises: inputting the first message list into the pre-trained agent, and generating a first user portrait of the target user by using the agent; and searching for first content information meeting the first interest topic and the first user portrait by using the agent and according to the first interest topic and the first user portrait, wherein it further comprises: collecting second real-time data corresponding to the target user, and generating a second message list based on the second real-time data, wherein the second real-time data is used to indicate updated first real-time data, and the second message list is used to indicate updated first message list; in the case of generating the second message list, inputting the second message list into the agent, and generating a second user portrait of the target user by using the agent; and updating the first user portrait by using the second user portrait, wherein it further comprises: pre-training a user portrait determination module in the agent for determining the first user portrait, wherein the operation of pre-training the user portrait determination module comprises: determining first behavior data samples corresponding to a plurality of first real users, and generating a third message list based on the first behavior data samples; determine a third user portrait corresponding to each first real user by using a pre-trained second large language model, so as to construct a plurality of first sample pairs based on the third message list corresponding to each first real user and the third user portrait corresponding to the first real user; determine a second behavior data sample corresponding to a plurality of second real users, and generate a fourth message list based on the second behavior data sample; determine a fourth user portrait corresponding to each second real user by using a manual labeling manner, so as to construct a plurality of second sample pairs based on the fourth message list corresponding to each second real user and the fourth user portrait corresponding to the second real user; and inputting the first sample pair and the second sample pair to the user portrait determination module and training the user portrait determination module, wherein a cross-entropy loss function for training the user portrait determination module is as follows: where N denotes the number of the first sample pairs or the second sample pairs, 1 denotes a parameter of the user portrait determining module, denotes a label mask, and C denotes the number of categories of characters, denotes a true label of a third message list in the first sample pair and a fourth message list in the second sample pair under a category C, denotes a probability predicted by the user portrait determining module for the third message list in the first sample pair and the fourth message list in the second sample pair to belong to the category C.

Citation Information

Patent Citations

  • Information recommendation method and device, electronic equipment and storage medium

    CN115357793A

  • Information recommendation method and device, equipment, medium and product

    CN118195703A