Recommendation method, recommendation model training method and device, equipment and medium
By obtaining user historical interaction data and using coding networks and predicting networks to determine the recommendation moments, the problem of failure to effectively determine the recommendation timing in the prior art is solved, and more efficient and accurate recommendation effects are achieved.
Patent Information
- Application Number
- CN202411508091.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-25
AI Technical Summary
When the prior art actively recommends content to users, it fails to effectively consider the determination of the recommendation timing, resulting in poor recommendation results.
By obtaining the historical interaction data of the user, using multiple first coding networks and prediction networks, the recommended content and recommendation moments are determined, and the content is pushed to the user at the appropriate time.
Improve recommendation accuracy and efficiency, optimize recommendation timing, and increase the probability of users clicking or browsing recommended content.
Smart Images

Figure CN119513403A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the field of recommendation technology, and specifically to a recommendation method, a training method and device for a recommendation model, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0003] With the development of computer technology and big data technology, people's consumption, entertainment, learning, travel and other behaviors in life are closely related to big data. In the operation process of business platforms, it is usually necessary to actively recommend content to users in order to improve corresponding business performance.
[0004] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0005] The present disclosure provides a recommendation method, a training method and device for a recommendation model, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] According to one aspect of the present disclosure, a recommendation method is provided, comprising: obtaining historical interaction data of a user, wherein the historical interaction data includes interaction content of the user at multiple historical moments and interaction behavior information for the interaction content; determining recommended content and future recommendation moments based on the historical interaction data of the user; and recommending the recommended content to the user based on the recommendation moment.
[0007] According to one aspect of the present disclosure, a training method for a recommendation model is provided, wherein the recommendation model includes a prediction network and multiple first encoding networks, and the method includes: obtaining historical interaction data of sample users, wherein the historical interaction data includes interaction content of the sample users at multiple historical moments and interaction behavior information for the interaction content; for each historical moment of the multiple historical moments, inputting the interaction behavior information of the sample user at the historical moment into the first encoding network corresponding to the historical moment to obtain the encoding features of the historical moment output by the first encoding network; inputting the encoding features of the multiple historical moments into the prediction network to obtain predicted recommended content and predicted recommended moments output by the prediction network; calculating a loss value based on the predicted recommended content and the predicted recommended moment; and adjusting the parameters of the recommendation model based on the loss value.
[0008] According to one aspect of the present disclosure, a recommendation model is provided, comprising: a plurality of first encoding networks, each of the plurality of first encoding networks being used to encode based on interaction content of a historical moment input into the first encoding network and interaction behavior information for the interaction content, so as to obtain encoding features of the historical moment; and a prediction network being used to determine recommended content and future recommendation moments for the user based on the encoding features of a plurality of historical moments output by the plurality of first encoding networks.
[0009] According to one aspect of the present disclosure, a recommendation device is provided, comprising: a first acquisition unit, configured to acquire historical interaction data of a user, wherein the historical interaction data includes interaction content of the user at multiple historical moments and interaction behavior information for the interaction content; a first determination unit, configured to determine recommended content and future recommendation moments based on the historical interaction data of the user; and a recommendation unit, configured to recommend the recommended content to the user based on the recommendation moment.
[0010] According to one aspect of the present disclosure, a training device for a recommendation model is provided, wherein the recommendation model includes a prediction network and multiple first encoding networks, and the device includes: a second acquisition unit, configured to acquire historical interaction data of a sample user, wherein the historical interaction data includes interaction content of the sample user at multiple historical moments and interaction behavior information for the interaction content; a third input unit, configured to, for each of the multiple historical moments, input the interaction behavior information of the sample user at the historical moment into the first encoding network corresponding to the historical moment, so as to obtain the encoding features of the historical moment output by the first encoding network; a fourth input unit, configured to input the encoding features of the multiple historical moments into the prediction network, so as to obtain the predicted recommended content and predicted recommended moment output by the prediction network; a calculation unit, configured to calculate a loss value based on the predicted recommended content and the predicted recommended moment; and an adjustment unit, configured to adjust the parameters of the recommendation model based on the loss value.
[0011] According to one aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned recommendation method or the training method of the recommendation model.
[0012] According to one aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned recommendation method or recommendation model training method.
[0013] According to one aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program can implement the above-mentioned recommendation method or the training method of the recommendation model when executed by a processor.
[0014] According to one or more embodiments of the present disclosure, the recommendation accuracy and recommendation efficiency can be improved.
[0015] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0017] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an exemplary embodiment of the present disclosure;
[0018] Figure 2 A flowchart of a recommendation method according to an exemplary embodiment of the present disclosure is shown;
[0019] Figure 3 A flowchart of a training method for a recommendation model according to an exemplary embodiment of the present disclosure is shown;
[0020] Figure 4 A structural block diagram showing a recommendation model according to an exemplary embodiment of the present disclosure
[0021] Figure 5 A schematic diagram showing a recommendation model according to an exemplary embodiment of the present disclosure is shown;
[0022] Figure 6 A structural block diagram of a recommendation device according to an exemplary embodiment of the present disclosure is shown;
[0023] Figure 7 A structural block diagram of a training device for a recommendation model according to an exemplary embodiment of the present disclosure is shown;
[0024] Figure 8 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0025] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0026] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0027] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0028] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0029] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
[0030] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the execution of a recommendation method or a training method for a recommendation model.
[0031] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0032] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0033] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to send the user's historical interaction data. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.
[0034] Client devices 101, 102, 103, 104, 105 and / or 106 may include various categories of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various categories and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (eg, email applications), short message service (SMS) applications, and may use various communication protocols.
[0035] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0036] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0037] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0038] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0039] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.
[0040] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different categories. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.
[0041] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different categories of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0042] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.
[0043] In the related art, when it is necessary to actively recommend to users, candidate contents are usually only screened to determine the recommended contents, but how to determine the appropriate recommendation timing to push the contents to users is not considered.
[0044] Based on this, the present disclosure provides a recommendation method, which makes recommendations based on the behavioral characteristics of users at different historical moments, and determines the recommendation time while determining the recommended content, so as to actively push content to users at the right time, thereby improving the recommendation effect.
[0045] Figure 2 FIG. 2 shows a flow chart of a recommendation method 200 according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the method 200 includes:
[0046] Step S201: Acquire historical interaction data of a user, wherein the historical interaction data includes interaction content of the user at multiple historical moments and interaction behavior information for the interaction content;
[0047] Step S202: determining recommended content and future recommendation time based on the user's historical interaction data; and
[0048] Step S203: Recommend the recommended content to the user based on the recommendation time.
[0049] By applying the above-mentioned recommendation method 200, recommendations can be made based on the user's interaction data at different historical moments. The recommendation time can be determined while determining the recommended content, so as to actively push content to the user at the right time. By optimizing the recommendation time, the probability of users clicking or browsing the recommended content can be increased, thereby improving the accuracy of recommendations.
[0050] It should be understood that the recommended content can be various types of content in a variety of application scenarios. In one example, when method 200 is applied to e-commerce scenarios such as online shopping, the recommended content may include different types of goods or various types of product promotion rights in the scenario, such as consumer vouchers, discount coupons, etc. In one example, when method 200 is applied to operating scenarios of Internet platforms such as video playback and e-book reading, the recommended content may include various videos, e-books, etc. to be recommended. In one example, when method 200 is applied to an advertising push scenario, the recommended content may include different types of advertisements, such as various types of opening screen advertisements, pop-up advertisements, etc. in mobile applications.
[0051] In some examples, the user's historical interaction data may be an interaction behavior record including a time index (i.e., information at a historical moment), the interaction content may be the display content of the user interface, such as various pop-up windows, pages, advertising links, and other interface elements, and the interaction behavior may be user behaviors such as clicking, browsing, and actively inputting content. For example, when method 200 is applied to an e-commerce scenario, the target user's historical interaction data may indicate the following: the target user's browsing behavior, clicking behavior, consulting behavior, and purchasing behavior for historically recommended products. For another example, when method 200 is applied to a video playback scenario, the target user's historical interaction data may indicate the following: the target user's clicking behavior, playback and viewing behavior for historically recommended videos, and the like.
[0052] In some examples, the user's historical interaction data may also include statistical features of the user's historical interaction behavior, such as browsing time and number of clicks on interactive content, to more comprehensively and accurately indicate the user's preference for interactive content, thereby improving recommendation accuracy.
[0053] In some examples, method 200 can be applied to the interaction process between the intelligent assistant and the user. In this case, the user's historical interaction data can include the conversation content and conversation time information between the user and the intelligent assistant, and then the intelligent assistant can be used to actively send recommended content to the user.
[0054] According to some embodiments, determining the recommended content and the future recommended time based on the historical interaction data of the user in step S202 includes: inputting the historical interaction data of the user into a recommendation model to obtain the recommended content and the recommended time output by the recommendation model, wherein the recommendation model is trained using sample behavior data of sample users. By using the recommendation model to obtain the recommended content and the recommended time, the recommendation efficiency and accuracy can be improved.
[0055] In some examples, the recommendation model may be obtained by supervised training using sample data annotated with reference labels to improve the prediction accuracy of the recommendation model.
[0056] It is understandable that the recommendation model can also be trained by other methods. For example, the output results of the recommendation model can be scored during the training process, and the parameters of the recommendation model can be adjusted based on the score, so as to apply reinforcement learning to tune the recommendation model and improve the prediction performance of the recommendation model.
[0057] According to some embodiments, the recommendation model includes a prediction network and multiple first encoding networks, and the inputting of the user's historical interaction data into the recommendation model to obtain the recommended content and the recommended time output by the recommendation model includes: for each of the multiple historical moments, inputting the user's interactive behavior information at the historical moment into the first encoding network corresponding to the historical moment to obtain the encoding features of the historical moment output by the first encoding network; and inputting the encoding features of the multiple historical moments into the prediction network to obtain the recommended content and the recommended time output by the prediction network. By using different encoding networks to encode the behavior features at different moments, the corresponding encoding features of different historical moments that are independent of each other can be obtained, which facilitates the capture of temporal dependencies for the encoding features of different historical moments, so that the model can more accurately predict the recommendation time.
[0058] In some examples, after using different encoding networks to encode behavioral features at different moments, the encoded features of multiple historical moments can be further input into an LSTM (Long Short-Term Memory) network to use the LSTM network to capture the temporal dependencies between the encoded features of multiple historical moments, thereby enabling more accurate recommendations based on the output results of the LSTM network.
[0059] According to some embodiments, the recommendation model further includes a second encoding network, and method 200 further includes: inputting the user features of the user into the second encoding network to obtain the encoded user features output by the second encoding network, wherein the inputting the encoded features of the multiple historical moments into the prediction network to obtain the recommended content and the recommended time output by the prediction network includes: inputting the encoded features of the multiple historical moments and the encoded user features into the prediction network to obtain the recommended content and the recommended time output by the prediction network. By using a second encoding network independent of the first encoding network to encode user portrait features that are not related to time sequence, the mutual influence of different types of features can be avoided, thereby improving the accuracy of model prediction.
[0060] In some examples, the user characteristics of the target user may also include a user portrait of the target user. In one example, the user portrait may include the age group information, consumption capacity information, etc. of the target user after desensitization processing, as long as it can affect the target user's preference for recommended content in the current application scenario, and this disclosure does not limit this.
[0061] According to some embodiments, method 200 further includes: inputting a plurality of candidate contents into the recommendation model so that the recommendation model can determine the recommended content from the plurality of candidate contents. By using the candidate contents as input features of the model, the recommended content can be adjusted more flexibly and conveniently in actual application scenarios, thereby improving the recommendation efficiency.
[0062] In some examples, the recommendation model may include a third encoding network that is independent of the aforementioned first encoding network and second encoding network, and the third encoding network can be used to obtain encoding content features corresponding to multiple candidate contents to avoid mutual influence of different types of features and further improve the accuracy of model prediction.
[0063] In some examples, the content types of multiple candidate contents may be the same or different. In one example, multiple candidate contents may include a specific type of recommendation object (such as a recommended video, a recommended book, a recommended online course, etc.), and may also include a recommended text. By pushing the recommended text to the user, the user may be actively recommended based on appropriate words to improve the recommendation effect.
[0064] In some examples, one or more of the first encoding network, the second encoding network, and the third encoding network described above may include a key feature extraction layer, thereby being able to further extract key information when the amount of input feature data is large. For example, keywords can be extracted from long texts, thereby improving the accuracy of model prediction by capturing key information in the input features.
[0065] According to some embodiments, the plurality of candidate contents include candidate recommended texts obtained by: determining user intent based on the user's historical interaction data; determining text generation instructions based on the user intent; and inputting the text generation instructions into a generative language model to obtain the candidate recommended texts output by the generative language model. Thus, the generation capability of the large model can be used to obtain candidate recommended texts in the candidate contents, that is, more accurate words for active recommendation to the user can be obtained to achieve more accurate recommendations.
[0066] In some examples, the generative language model can be pre-trained using a large-scale corpus, such as the Wenxin Yiyan model. As long as the candidate recommendation text can be obtained based on the text generation instruction, the present disclosure does not limit the specific type and training method of the generative language model.
[0067] In some examples, the step of determining the user's intent based on the user's historical interaction data can be implemented using an intent recognition model. In this example, the user's historical interaction data can be input into the intent recognition model so that the intent recognition model can determine the target intent corresponding to the input information from multiple candidate intents, and then determine the text generation instruction based on the target intent. In one example, the intent recognition model can be obtained by supervised training using sample data annotated with reference labels, based on which the prediction accuracy of the intent recognition model can be improved, thereby improving the accuracy of active recommendations to users.
[0068] According to some embodiments, the candidate recommended text includes multiple sub-texts, and the sending of the text generation instruction to the generative language model to obtain the candidate recommended text output by the generative language model includes: performing multiple rounds of inputting the text generation instruction into the generative language model to obtain multiple sub-texts output by the generative language model. By using a large model to generate multiple sub-texts, the recommendation model can select the most appropriate recommended text from them, further improving the recommendation effect.
[0069] According to some embodiments, determining the text generation instruction based on the user intent includes: filling the user intent into an instruction template including an intent slot to obtain the text generation instruction. By applying a preset template to determine the text generation instruction, the convenience of instruction generation can be improved, thereby improving the recommendation efficiency.
[0070] According to some embodiments, method 200 further includes: determining multiple candidate moments in the future based on the current moment and multiple candidate time intervals, wherein determining the recommended content and the recommended moment in the future based on the historical interaction data of the user in step S202 includes: determining the recommended moment from the multiple candidate moments based on the historical interaction data of the user. By determining multiple candidate moments based on the candidate time interval, it is possible to select the recommended moment from a limited domain, thereby improving convenience.
[0071] In some examples, multiple candidate time intervals may be 1 second, 2 seconds, or 3 seconds, and then 1 second, 2 seconds, or 3 seconds may be added to the current moment to obtain multiple candidate moments, so as to more easily determine the recommended moment and make active recommendations based on the recommended moment.
[0072] According to one aspect of the present disclosure, a training method for a recommendation model is also provided. Figure 3 FIG. 3 is a flowchart of a training method 300 for a recommendation model according to an exemplary embodiment of the present disclosure, wherein the recommendation model includes a prediction network and a plurality of first encoding networks. Figure 3 As shown, the method 300 includes:
[0073] Step S301: Acquire historical interaction data of a sample user, wherein the historical interaction data includes interaction content of the sample user at multiple historical moments and interaction behavior information for the interaction content;
[0074] Step S302: for each historical moment among the multiple historical moments, input the interactive behavior information of the sample user at the historical moment into a first coding network corresponding to the historical moment, so as to obtain a coding feature of the historical moment output by the first coding network;
[0075] Step S303: inputting the encoding features of the multiple historical moments into the prediction network to obtain the predicted recommended content and predicted recommended time output by the prediction network;
[0076] Step S304, calculating a loss value based on the predicted recommended content and the predicted recommended time; and
[0077] Step S305: Adjust the parameters of the recommendation model based on the loss value.
[0078] By applying the above method 300, a recommendation model including multiple first encoding networks and prediction networks can be obtained, and when it is necessary to actively recommend to the user, multiple independent first encoding networks can be used to encode the user's interaction data at multiple historical moments respectively, and then the prediction network can be used to make predictions based on the encoding features of different historical moments to improve the recommendation accuracy.
[0079] According to some embodiments, the recommendation model further includes a second encoding network, and method 300 further includes: inputting the user features of the sample user into the second encoding network to obtain the encoded user features output by the second encoding network, wherein in step S303, inputting the encoded features of the multiple historical moments into the prediction network to obtain the predicted recommended content and predicted recommended time output by the prediction network includes: inputting the encoded features of the multiple historical moments and the encoded user features into the prediction network to obtain the predicted recommended content and predicted recommended time output by the prediction network. By using a second encoding network independent of the first encoding network to encode user portrait features that are not related to time series, the mutual influence of different types of features can be avoided, thereby improving the accuracy of model prediction.
[0080] According to some embodiments, the recommendation model further includes a third encoding network, and method 300 further includes: inputting a plurality of candidate contents into the third encoding network to obtain the encoded content features output by the third encoding network, wherein in step S303, inputting the encoded features of the plurality of historical moments into the prediction network to obtain the predicted recommended content and predicted recommended time output by the prediction network includes: inputting the encoded features of the plurality of historical moments and the encoded content features into the prediction network to obtain the predicted recommended content and predicted recommended time output by the prediction network. By using the candidate contents as the input features of the model, the recommended content can be adjusted more flexibly and conveniently in actual application scenarios, thereby improving the recommendation efficiency.
[0081] According to one aspect of the present disclosure, a recommendation model is also provided. Figure 4 FIG. 4 shows a structural block diagram of a recommendation model 400 according to an exemplary embodiment of the present disclosure. Figure 4 As shown, the recommendation model 400 includes:
[0082] A plurality of first coding networks 401, each of the plurality of first coding networks being used to encode based on interactive content at a historical moment input into the first coding network and interactive behavior information for the interactive content, so as to obtain a coding feature of the historical moment; and
[0083] The prediction network 402 is used to determine the recommended content and future recommended moments for the user based on the encoding features of the multiple historical moments output by the multiple first encoding networks.
[0084] By utilizing the above-mentioned recommendation model 400, when it is necessary to make active recommendations to users, multiple independent first encoding networks can be used to encode the user's interaction data at multiple historical moments respectively, and then a prediction network can be used to make predictions based on the encoding features of different historical moments to improve the accuracy of recommendations.
[0085] like Figure 4 As shown, the multiple first encoding networks 401 can encode the user interaction data corresponding to time t1, time t2 and time t3 respectively and transmit them to the prediction network 402, so that the prediction network 402 can output the recommended content and recommended time.
[0086] According to some embodiments, the recommendation model 400 further includes: a second encoding network for encoding the user features of the user to obtain encoded user features, wherein the prediction network 402 is used to determine the recommended content and future recommended moments for the user based on the encoded user features and the encoded features of multiple historical moments output by the multiple first encoding networks. By using a second encoding network independent of the first encoding network to encode user portrait features that are not related to time sequence, the mutual influence of different types of features can be avoided, thereby improving the accuracy of model prediction.
[0087] According to some embodiments, the recommendation model 400 further includes: a third encoding network for encoding multiple candidate contents to obtain encoded content features, wherein the prediction network 402 is used to determine the recommended content and future recommended moments for the user based on the encoded content features and the encoded features of multiple historical moments output by the multiple first encoding networks. By using the candidate content as the input features of the model, the recommended content can be adjusted more flexibly and conveniently in actual application scenarios, thereby improving the recommendation efficiency.
[0088] Figure 5 FIG. 5 shows a schematic diagram of the structure of a recommendation model 500 according to an exemplary embodiment of the present disclosure. Figure 5 As shown, the recommendation model 500 includes a plurality of first encoding networks 501, a second encoding network 502, and a third encoding network 503. In this example, the plurality of first encoding networks 501 are used to encode the user interaction data corresponding to time tk and time t respectively, the second encoding network 502 is used to encode the user features (i.e., fixed features independent of time), and the third encoding network 503 is used to encode the candidate content.
[0089] In this example, the parameters of the first encoding network 501, the second encoding network 502 and the third encoding network 503 are independent of each other. The second encoding network 502 is used to process global invariant features, each first encoding network 501 is used to process features of each historical moment, and the third encoding network 503 is used to process future features (i.e., features of candidate content for recommendation in the future). On this basis, the LSTM (Long Short-Term Memory) network 504 can process the local features output by each encoding network and pass each group of features backward in sequence. In this example, the attention network 506 can be constructed based on the multi-head attention mechanism in the Transformer model. By further using the attention network 506 to globally process the output content of each encoding network on the basis of using the LSTM network for feature processing, it can fully capture the short-term and long-term dependencies in the temporal relationship, and then output the recommended content and recommended time through the multi-layer perception network 508.
[0090] In this example, the residual and normalization network 505 and the residual and normalization network 507 can perform necessary normalization processing on each group of features, and realize cross-layer transmission of information through residual connections, thereby improving the prediction performance of the model.
[0091] According to one aspect of the present disclosure, a recommendation device is also provided. Figure 6 FIG. 6 shows a structural block diagram of a recommendation device 600 according to an exemplary embodiment of the present disclosure. Figure 6 As shown, the device 600 includes:
[0092] A first acquisition unit 601 is configured to acquire historical interaction data of a user, wherein the historical interaction data includes interaction content of the user at multiple historical moments and interaction behavior information for the interaction content;
[0093] A first determining unit 602 is configured to determine recommended content and future recommendation time based on the historical interaction data of the user; and
[0094] The recommendation unit 603 is configured to recommend the recommended content to the user based on the recommendation time.
[0095] According to some embodiments, the first determination unit 602 includes: a first input unit, configured to input the user's historical interaction data into a recommendation model to obtain the recommended content and the recommended time output by the recommendation model, wherein the recommendation model is trained using sample behavior data of sample users.
[0096] According to some embodiments, the recommendation model includes a prediction network and multiple first encoding networks, and the first input unit includes: a first input subunit, configured to input the user's interactive behavior information at each historical moment in the multiple historical moments into the first encoding network corresponding to the historical moment, so as to obtain the encoding features of the historical moment output by the first encoding network; and a second input subunit, configured to input the encoding features of the multiple historical moments into the prediction network, so as to obtain the recommended content and the recommended moment output by the prediction network.
[0097] According to some embodiments, the recommendation model also includes a second encoding network, and the first input unit also includes: a third input subunit, configured to input the user features of the user into the second encoding network to obtain the encoded user features output by the second encoding network, wherein the second input subunit is configured to input the encoded features of the multiple historical moments and the encoded user features into the prediction network to obtain the recommended content and the recommended moment output by the prediction network.
[0098] According to some embodiments, the apparatus 600 further includes: a second input unit configured to input a plurality of candidate contents into the recommendation model, so that the recommendation model can determine the recommended content from the plurality of candidate contents.
[0099] According to some embodiments, the multiple candidate contents include candidate recommended texts obtained by using a text acquisition unit, and the text acquisition unit includes: a first determination subunit, configured to determine user intent based on the user's historical interaction data; a generation subunit, configured to determine a text generation instruction based on the user intent; and a fourth input subunit, configured to input the text generation instruction into a generative language model to obtain the candidate recommended text output by the generative language model.
[0100] According to some embodiments, the candidate recommended text includes multiple sub-texts, and the fourth input sub-unit is configured to: perform multiple rounds of sending the text generation instruction to the generative language model to obtain multiple sub-texts output by the generative language model.
[0101] According to some embodiments, the generating subunit is configured to fill the user intention into an instruction template including an intention slot to obtain the text generating instruction.
[0102] According to some embodiments, the device 600 also includes: a second determination unit, configured to determine multiple candidate moments in the future based on the current moment and multiple candidate time intervals, wherein the first determination unit 602 is configured to: determine the recommended moment from the multiple candidate moments based on the user's historical interaction data.
[0103] According to one aspect of the present disclosure, a training device for a recommendation model is also provided. Figure 7 FIG. 7 shows a structural block diagram of a training device 700 for a recommendation model according to an exemplary embodiment of the present disclosure, wherein the recommendation model includes a prediction network and a plurality of first encoding networks. Figure 7 As shown, the apparatus 700 includes:
[0104] The second acquisition unit 701 is configured to acquire historical interaction data of the sample user, wherein the historical interaction data includes interaction content of the sample user at multiple historical moments and interaction behavior information for the interaction content;
[0105] The third input unit 702 is configured to input the interactive behavior information of the sample user at each historical moment in the multiple historical moments into the first coding network corresponding to the historical moment, so as to obtain the coding feature of the historical moment output by the first coding network;
[0106] The fourth input unit 703 is configured to input the encoding features of the multiple historical moments into the prediction network to obtain the predicted recommended content and predicted recommended time output by the prediction network;
[0107] A calculation unit 704 is configured to calculate a loss value based on the predicted recommended content and the predicted recommended time; and
[0108] The adjusting unit 705 is configured to adjust the parameters of the recommendation model based on the loss value.
[0109] According to some embodiments, the recommendation model also includes a second encoding network, and the device 700 also includes: a fifth input unit, configured to input the user features of the sample user into the second encoding network to obtain the encoded user features output by the second encoding network, wherein the fourth input unit 703 is configured to: input the encoded features of the multiple historical moments and the encoded user features into the prediction network to obtain the predicted recommended content and predicted recommended time output by the prediction network.
[0110] According to some embodiments, the recommendation model also includes a third encoding network, and the device 700 also includes: a sixth input unit, configured to input multiple candidate contents into the third encoding network to obtain encoded content features output by the third encoding network, wherein, the fourth input unit 703 is configured to: input the encoding features of the multiple historical moments and the encoded content features into the prediction network to obtain predicted recommended content and predicted recommended moments output by the prediction network.
[0111] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0112] According to one aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned recommendation method or recommendation model training method.
[0113] According to one aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned recommendation method or recommendation model training method.
[0114] According to one aspect of the present disclosure, a computer program product is also provided, including a computer program, wherein the computer program implements the above-mentioned recommendation method or recommendation model training method when executed by a processor.
[0115] refer to Figure 8 , a block diagram of an electronic device 800 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0116] like Figure 8As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0117] Multiple components in the device 800 are connected to the I / O interface 805, including: an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 can be any type of device that can input information to the device 800. The input unit 806 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 807 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 808 can include but is not limited to a disk, an optical disk. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0118] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a recommendation method or a training method for a recommendation model. For example, in some embodiments, the recommendation method or the training method for a recommendation model may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the recommendation method or the training method for the recommendation model described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the recommendation method or the training method of the recommendation model in any other appropriate manner (for example, by means of firmware).
[0119] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0120] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0121] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0122] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0123] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0124] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0125] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0126] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples. Various elements in the embodiments or examples may be omitted or may be replaced by their equivalent elements. In addition, each step may be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. It is important that with the evolution of technology, many elements described herein may be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A recommendation method, comprising: Acquire historical interaction data of the user, wherein the historical interaction data includes interaction content of the user at multiple historical moments and interaction behavior information for the interaction content; Determining recommended content and future recommendation times based on the user's historical interaction data; and Based on the recommendation time, the recommended content is recommended to the user.
2. The method of claim 1, wherein: The determining of the recommended content and future recommendation time based on the historical interaction data of the user comprises: The user's historical interaction data is input into a recommendation model to obtain the recommended content and the recommended time output by the recommendation model, wherein the recommendation model is trained using sample behavior data of sample users.
3. The method of claim 2, wherein: The recommendation model includes a prediction network and a plurality of first encoding networks, and the step of inputting the historical interaction data of the user into the recommendation model to obtain the recommended content and the recommended time output by the recommendation model includes: For each historical moment among the multiple historical moments, input the interactive behavior information of the user at the historical moment into a first coding network corresponding to the historical moment to obtain a coding feature of the historical moment output by the first coding network; and The encoded features of the multiple historical moments are input into the prediction network to obtain the recommended content and the recommended moment output by the prediction network.
4. The method of claim 3, wherein: The recommendation model further includes a second encoding network, and the method further includes: Inputting the user feature of the user into the second coding network to obtain the coded user feature output by the second coding network, The step of inputting the encoding features of the plurality of historical moments into the prediction network to obtain the recommended content and the recommended moment output by the prediction network comprises: The encoded features of the multiple historical moments and the encoded user features are input into the prediction network to obtain the recommended content and the recommended time output by the prediction network.
5. The method of claim 2, further comprising: A plurality of candidate contents are input into the recommendation model so that the recommendation model can determine the recommended content from the plurality of candidate contents.
6. The method of claim 5, wherein: The plurality of candidate contents include candidate recommendation texts obtained in the following manner: determining user intent based on historical interaction data of the user; Determining text generation instructions based on the user intent; and The text generation instruction is input into a generative language model to obtain the candidate recommended text output by the generative language model.
7. The method of claim 6, wherein: The candidate recommended text includes a plurality of sub-texts, and the step of sending the text generation instruction to a generative language model to obtain the candidate recommended text output by the generative language model includes: The operation of inputting the text generation instruction into the generative language model is performed multiple times to obtain multiple sub-texts output by the generative language model.
8. The method according to claim 6 or 7, wherein: Determining a text generation instruction based on the user intention includes: Fill the user intention into the instruction template including the intention slot to obtain the text generation instruction.
9. The method according to any one of claims 1 to 8, further comprising: Based on the current moment and multiple candidate time intervals, multiple candidate moments in the future are determined. Wherein, determining the recommended content and future recommendation time based on the historical interaction data of the user includes: The recommended moment is determined from the multiple candidate moments based on the historical interaction data of the user.
10. A training method for a recommendation model, wherein: The recommendation model includes a prediction network and a plurality of first encoding networks, and the method includes: Acquire historical interaction data of the sample user, wherein the historical interaction data includes interaction content of the sample user at multiple historical moments and interaction behavior information for the interaction content; For each historical moment among the multiple historical moments, input the interactive behavior information of the sample user at the historical moment into a first coding network corresponding to the historical moment to obtain a coding feature of the historical moment output by the first coding network; Inputting the encoded features of the plurality of historical moments into the prediction network to obtain predicted recommended content and predicted recommended moments output by the prediction network; Calculating a loss value based on the predicted recommended content and the predicted recommended time; and Parameters of the recommendation model are adjusted based on the loss value.
11. The method of claim 10, wherein: The recommendation model further includes a second encoding network, and the method further includes: Inputting the user features of the sample user into the second coding network to obtain the coded user features output by the second coding network, The step of inputting the encoding features of the plurality of historical moments into the prediction network to obtain the predicted recommended content and predicted recommended time output by the prediction network includes: The encoded features of the multiple historical moments and the encoded user features are input into the prediction network to obtain the predicted recommended content and predicted recommended time output by the prediction network.
12. The method according to claim 10 or 11, wherein: The recommendation model further includes a third encoding network, and the method further includes: Inputting a plurality of candidate contents into the third encoding network to obtain encoded content features output by the third encoding network, The step of inputting the encoding features of the plurality of historical moments into the prediction network to obtain the predicted recommended content and predicted recommended time output by the prediction network includes: The encoding features of the multiple historical moments and the encoding content features are input into the prediction network to obtain the predicted recommended content and predicted recommended time output by the prediction network.
13. A recommendation model, comprising: A plurality of first coding networks, each of the plurality of first coding networks being used to encode based on interactive content at a historical moment input into the first coding network and interactive behavior information for the interactive content, so as to obtain a coding feature of the historical moment; as well as A prediction network is used to determine the recommended content and future recommended moments for the user based on the encoding features of the multiple historical moments output by the multiple first encoding networks.
14. The recommendation model according to claim 13, further comprising: a second encoding network, configured to encode the user feature of the user to obtain an encoded user feature, The prediction network is used to determine the recommended content and future recommended moments for the user based on the encoded user features and the encoded features of multiple historical moments output by the multiple first encoding networks.
15. The recommendation model according to claim 13 or 14, further comprising: The third encoding network is used to encode the multiple candidate contents to obtain the encoded content features, The prediction network is used to determine the recommended content and future recommended moments for the user based on the encoded content features and the encoded features of multiple historical moments output by the multiple first encoding networks.
16. A recommendation device, comprising: A first acquisition unit is configured to acquire historical interaction data of a user, wherein the historical interaction data includes interaction content of the user at multiple historical moments and interaction behavior information for the interaction content; A first determining unit is configured to determine recommended content and future recommendation time based on the historical interaction data of the user; and The recommendation unit is configured to recommend the recommended content to the user based on the recommendation time.
17. The device of claim 16, wherein: The first determining unit includes: The first input unit is configured to input the user's historical interaction data into a recommendation model to obtain the recommended content and the recommended time output by the recommendation model, wherein the recommendation model is trained using sample behavior data of sample users.
18. The device of claim 17, wherein: The recommendation model includes a prediction network and a plurality of first encoding networks, and the first input unit includes: A first input subunit is configured to input the user's interactive behavior information at each historical moment into a first coding network corresponding to the historical moment for each of the multiple historical moments, so as to obtain a coding feature of the historical moment output by the first coding network; and The second input subunit is configured to input the encoding features of the multiple historical moments into the prediction network to obtain the recommended content and the recommended moment output by the prediction network.
19. The device of claim 18, wherein: The recommendation model further includes a second encoding network, and the first input unit further includes: The third input subunit is configured to input the user feature of the user into the second encoding network to obtain the encoded user feature output by the second encoding network, The second input subunit is configured to input the encoded features of the multiple historical moments and the encoded user features into the prediction network to obtain the recommended content and the recommended moments output by the prediction network.
20. The apparatus of claim 17, further comprising: The second input unit is configured to input a plurality of candidate contents into the recommendation model, so that the recommendation model can determine the recommended content from the plurality of candidate contents.
21. The device of claim 20, wherein: The plurality of candidate contents include candidate recommended texts obtained by a text acquisition unit, wherein the text acquisition unit includes: A first determination subunit is configured to determine the user intention based on the historical interaction data of the user; A generating subunit configured to determine a text generating instruction based on the user intention; and The fourth input subunit is configured to input the text generation instruction into the generative language model to obtain the candidate recommended text output by the generative language model.
22. The device of claim 21, wherein: The candidate recommendation text includes a plurality of sub-texts, and the fourth input sub-unit is configured to: The operation of sending the text generation instruction to the generative language model is performed multiple times to obtain multiple sub-texts output by the generative language model.
23. The device according to claim 21 or 22, wherein: The generating subunit is configured as follows: Fill the user intention into the instruction template including the intention slot to obtain the text generation instruction.
24. The apparatus of any one of claims 16 to 23, further comprising: The second determining unit is configured to determine multiple candidate moments in the future based on the current moment and multiple candidate time intervals, Wherein, the first determining unit is configured to: The recommended moment is determined from the multiple candidate moments based on the historical interaction data of the user.
25. A training device for a recommendation model, wherein: The recommendation model includes a prediction network and a plurality of first encoding networks, and the device includes: A second acquisition unit is configured to acquire historical interaction data of the sample user, wherein the historical interaction data includes interaction content of the sample user at multiple historical moments and interaction behavior information for the interaction content; A third input unit is configured to input the interactive behavior information of the sample user at each historical moment of the multiple historical moments into a first coding network corresponding to the historical moment, so as to obtain a coding feature of the historical moment output by the first coding network; a fourth input unit, configured to input the encoding features of the plurality of historical moments into the prediction network to obtain the predicted recommended content and predicted recommended moment output by the prediction network; a calculation unit configured to calculate a loss value based on the predicted recommended content and the predicted recommended time; and An adjustment unit is configured to adjust parameters of the recommendation model based on the loss value.
26. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 12.
27. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-12.
28. A computer program product comprising a computer program, wherein: The computer program implements the method according to any one of claims 1 to 12 when executed by a processor.