Model training method and device, content generation method and device

By training the AIGC model using historical input information from target users and associated users, and combining it with a loss function, the problem of insufficient personalization of AIGC-generated content in existing technologies is solved, thus realizing personalized content generation.

CN117171443BActive Publication Date: 2026-06-16ALIPAY (HANGZHOU) INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
Filing Date
2023-09-21
Publication Date
2026-06-16

Smart Images

  • Figure CN117171443B_ABST
    Figure CN117171443B_ABST
Patent Text Reader

Abstract

The embodiment of the specification discloses a model training method and device, and a content generation method and device. The training method comprises: training a content generation model by using a condition feature of a target user, target input information, noise and a loss function. The content generation method comprises: inputting the condition feature of the target user and the target input information into the trained content generation model to generate target content; the condition feature of the target user is generated based on predicted input information of the target user, and the predicted input information of the target user is obtained based on target input information of the target user, historical input information of the target user and historical input information of an associated user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to the field of artificial intelligence technology, and in particular to model training methods and apparatus, and content generation methods and apparatus. Background Technology

[0002] AIGC (Artificial Intelligence Generated Content) refers to content generated by artificial intelligence. AIGC technology can automatically analyze and understand various types of data, such as text, images, audio, and video, and automatically generate mathematical models based on the data, thereby achieving automated modeling.

[0003] Existing AIGC technology produces similar outputs when faced with similar inputs from different users, without fully taking into account the differences in users' personalized needs. Summary of the Invention

[0004] This specification describes a model training method and apparatus, a data processing method and apparatus, through one or more embodiments, which can solve the problem of high computing power consumption during AIGC model runtime while ensuring good quality of generated content.

[0005] Firstly, the embodiments of this specification provide a model training method, including:

[0006] The predicted input information of the target user is input into the conditional feature encoder to obtain the conditional features of the target user; wherein, the predicted input information of the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users in the first training sample;

[0007] Based on the target user's conditional characteristics, target user's target input information, and noise, target content is generated using a content generation model.

[0008] The first loss function is used to predict and judge the reference content and the target content generated by the content generation model. When the prediction result does not meet the convergence condition, the above training process is repeated until the convergence condition is met. When the convergence condition is met, the content generation model is trained. The reference content is content pre-generated based on the target user's target input information.

[0009] Secondly, the embodiments of this specification provide a content generation method, including:

[0010] The predicted input information of the target user is input into the conditional feature encoder to obtain the conditional features of the target user; wherein, the predicted input information of the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users;

[0011] Based on the target user's conditional features, target user's target input information, and noise, the content generation model trained using the method described in the first aspect above generates target content.

[0012] Thirdly, embodiments of this specification provide a model training apparatus, including:

[0013] The feature training module is equipped with a conditional feature encoder, which is used to input the predicted input information of the target user into the conditional feature encoder to obtain the conditional features of the target user; wherein, the predicted input information of the target user is obtained based on the target input information of the target user, the historical input information of the target user, and the historical input information of associated users in the first training sample;

[0014] The content training module is used to generate target content based on the target user's conditional features, target user's target input information, and noise, using a content generation model.

[0015] The training and judgment module is used to predict and judge the reference content and the target content generated by the content generation model using the first loss function. When the prediction result does not meet the convergence condition, the above training process is repeated until the convergence condition is met. When the convergence condition is met, the content generation model is trained. The reference content is content pre-generated based on the target user's target input information.

[0016] Fourthly, embodiments of this specification provide a content generation apparatus, including:

[0017] The conditional feature module is equipped with a conditional feature encoder, which is used to input the predicted input information of the target user into the conditional feature encoder to obtain the conditional features of the target user; wherein, the predicted input information of the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users;

[0018] The content generation module is used to generate target content based on the target user's conditional features, target user's target input information, and noise, using the content generation model trained by the method in the first aspect mentioned above.

[0019] Fifthly, embodiments of this specification provide an electronic device, including a processor and a memory;

[0020] The processor is connected to the memory;

[0021] The memory is used to store executable program code;

[0022] The processor runs a program corresponding to the executable program code stored in the memory to perform the method described in any of the above aspects.

[0023] Sixthly, embodiments of this specification provide a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the methods described in any of the above aspects.

[0024] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following:

[0025] In one or more embodiments of this specification, a content generation model capable of outputting personalized content is trained based on the predicted input information of the target user and the target input information. The predicted input information of the target user is obtained based on the target user's historical input information and the historical input information of associated users. This embodiment of the specification can utilize the historical input information of associated users who have similar preferences or habits to the target user to predict the current user's input information. This embodiment of the specification generates content based on customized input information, thus meeting the user's personalized needs. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this specification, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a global schematic diagram illustrating an application scenario of a content generation method provided in an embodiment of this specification.

[0028] Figure 2 This is a user-oriented interactive diagram illustrating an application scenario of a content generation method provided in an embodiment of this specification.

[0029] Figure 3 A schematic diagram illustrating the scenario deployment of the model provided in the embodiments of this specification;

[0030] Figure 4 A schematic flowchart illustrating a model training method provided in an embodiment of this specification;

[0031] Figure 5 A flowchart illustrating a content generation method provided in an embodiment of this specification;

[0032] Figure 6 This is a flowchart illustrating the process of predicting the target user's input information using a prediction model in the embodiments of this specification.

[0033] Figure 7 This is a flowchart illustrating the training process of the prediction model in the embodiments of this specification;

[0034] Figure 8 This is a schematic diagram of the process of obtaining the list of associated users through the associated user model in the embodiments of this specification;

[0035] Figure 9 This is a flowchart illustrating the training process of the associated user model in the embodiments of this specification;

[0036] Figure 10 This is a schematic diagram of the structure of a model training device provided in the embodiments of this specification;

[0037] Figure 11 This is a schematic diagram of the structure of a content generation device provided in an embodiment of this specification;

[0038] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Detailed Implementation

[0039] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings.

[0040] The terms "first," "second," "third," etc., in the description, claims, and accompanying drawings are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.

[0041] AIGC is a new artificial intelligence technology that uses AI models to automatically generate various types of text, images, audio, video, and other content based on given conditions such as topics, keywords, formats, and styles (inputted to the model in the form of AI prompts "Prompt").

[0042] Figure 1The diagram illustrates an AIGC content generation application scenario. The AIGC model in the diagram can be loaded onto an AIGC platform or APP application on terminal devices (such as smartphones, tablets, desktops, laptops, ultra-mobile personal computers (UMPCs), handheld computers, PC devices, personal digital assistants (PDAs), virtual reality devices, etc.) for user use.

[0043] Users can choose according to their needs. Figure 2 Enter the AI ​​prompt word on the interface shown. The AIGC platform or APP application will intelligently process the received input information and generate content corresponding to the AI ​​prompt word. Figure 2 Taking image data as an example, when a user enters the text "sunset at the seaside" on the input interface, the AIGC platform or APP application outputs the image information of "sunset at the seaside" on the interface based on the AI ​​prompt. Figure 2 The purpose is to illustrate the interaction process in application scenarios, and it is not limited to image data. That is, the generated content can be one or more types of data such as text, images, audio, and video (i.e., the target content mentioned in the embodiments of this specification).

[0044] See Figure 3 , Figure 3 The diagram illustrates a scenario for deploying an AIGC model. This scenario includes a server 100 and terminal devices 200. The server 100 and the terminal devices 200 are communicatively linked. Multiple terminal devices 200 can be connected to the server 100. The server can store AIGC models, which can be single models or a group of models.

[0045] The server 100, on the one hand, can respond to instructions from the terminal device 200 and load the model onto the terminal device. For example, based on the user's actual operation, it is determined that a model needs to be retrieved from the server. If an AI prompt word is received, it is determined that a model needs to be retrieved from the server 100 and loaded onto the terminal device 200.

[0046] The server 100, on the other hand, can be used for model training. For example, the server 100 is equipped with a training platform that can train an initial model using a training set and a test set to obtain a target model. The trained model can be stored on the server or locally using a software development kit (SDK).

[0047] Current popular AIGC technologies often produce similar outputs when faced with similar inputs from different users, without fully taking into account the differences in users' personalized needs.

[0048] To enhance the personalization capabilities of AIGC in content generation, existing technologies propose two main approaches. Approach 1, based on manually adjusted prompts, requires users to modify the prompt themselves. These modifications may include, but are not limited to, prompt expansion, style adjustments, and synonym replacement. However, this approach demands high user skills and relies heavily on human experience, making it difficult to scale and master quickly for ordinary users. Approach 2, based on reference images, requires not only the input prompt but also reference images relevant to the personalization needs. These reference images typically include depth maps, layout maps, or edge maps. The AIGC model comprehensively considers the prompt and personalized reference images to generate content, ensuring the generated image is highly consistent with the provided personalized reference image in terms of depth, layout, and style. However, this method requires users to carefully select the type of personalized reference image and experiment with different combinations of reference images, resulting in a relatively low success rate. Furthermore, defining and obtaining appropriate reference images is challenging in certain application scenarios.

[0049] Based on this, this specification provides one or more embodiments that, on an easily implementable basis, address the issue of insufficient personalization in AIGC generated content.

[0050] Please see Figure 4 , Figure 4 A schematic flowchart of a model training method provided in an embodiment of this specification is shown. Figure 4 The content generation model is trained to generate personalized content that can be tailored to the user based on a customized prompt.

[0051] like Figure 4 As shown, the model training method may specifically include the following steps:

[0052] Step 102: Input the predicted input information of the target user into the conditional feature encoder to obtain the conditional features of the target user;

[0053] The predicted input information of the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users in the first training sample;

[0054] Step 104: Based on the target user's conditional features, target user's target input information, and noise, generate target content using a content generation model;

[0055] Step 106: Use the first loss function to predict and judge the control content and the target content generated by the content generation model. If the prediction result does not meet the convergence condition, repeat the above training process until the convergence condition is met. When the convergence condition is met, the content generation model is trained.

[0056] The comparison content is content pre-generated based on the target user's target input information.

[0057] The model training method described in this specification trains a content generation model based on the predicted input information of the target user and the target input information. Since the predicted input information of the target user is the target input information obtained based on the target user's historical input information and the historical input information of related users, this information considers the user's historical usage habits and preferences, as well as the historical usage habits and preferences of related users similar to the user. Therefore, during the training process, content that matches the user's personalization can be output. Then, a first loss function can be used to determine whether the predicted result output by the content generation model is close to the actual result. Training is then performed based on this determination until convergence, at which point training is complete.

[0058] The model training method described in this specification can be completed on a training platform on a server, and the trained model is stored on the server.

[0059] The following examples and embodiments illustrate... Figure 4 Each step in the process will be explained separately.

[0060] In step 102, the conditional feature encoder is pre-trained before executing the model training method of the embodiments of this specification. Based on user input information, such as historical prompts, the conditional feature encoder is trained to obtain features that are closest to the original data. After training, it is applied in the embodiments of this specification.

[0061] The predicted input information for the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users. The target user and the target user's historical input information, as well as the associated users and the associated users' historical input information, are obtained by the server collecting and analyzing data from various terminal devices, and are ultimately stored on the server in the form of a target user list and an associated user list.

[0062] The first training sample is configured according to the training objective after collecting historical data from terminal devices via a server. The first training sample includes a target user list and an associated user list. The target user list stores the user ID of the target user, along with its corresponding target input information and historical input information. The associated user list stores the associated user ID and its corresponding historical input information. The associated user list includes multiple sublists, divided according to the target user associated with it. Each sublist corresponds to one target user and reflects the associated user information related to that target user.

[0063] The predicted input information for the target user is determined based on a target user selected from the first training sample. During training, the target user list in the first training sample can be traversed sequentially. Each target user has a different sublist of associated users. The predicted input information for different target users is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users.

[0064] In step 104, based on the conditional features obtained in step 102, the target user's target input information, and random noise, the content generation model outputs target content, such as one or more combinations of image content, video content, audio content, and text content.

[0065] In step 106, the first loss function can predict and judge the comparison content and the target content generated by the content generation model.

[0066] When the content generation model is a diffusion model, the first loss function can be a function such as Euclidean distance, Mahalanobis distance, or cosine distance. When the two distances are closest, it indicates that the predicted result is close to the true result, i.e., convergence has been achieved. During training, the parameters of the content generation model are adjusted. In this example, the conditional features obtained in step 102, the target user's target input information, and random noise are directly input into the diffusion model for content output.

[0067] When the content generation model is a GAN model, the first loss function is the GAN adversarial loss function. In this example, the target user's input information needs to be transformed into features using a feature encoder first, and then fused with conditional features before being input into the GAN model.

[0068] The comparison content is obtained in advance based on the training data of the first training sample, before executing step 106. In one example, before or simultaneously with obtaining the predicted input information of the target user based on the target user's target input information, the target user's historical input information, and the historical input information of associated users, a manual screening method is used to obtain related historical input information from the historical input information based on the target input information. Then, content is generated based on the screening results and the target input information, thus obtaining the comparison content. Taking image data as an example, a first loss function is used to determine the consistency between the comparison image and the image output by the content generation model. When they are nearly identical, the content generation model converges, and training is complete.

[0069] In another example, the comparison content is historical comparison content, which is selected from historical data to match user satisfaction with the target input information. The comparison content is directly stored in the first training sample. When making predictions, the comparison content in the first training sample is directly retrieved for judgment.

[0070] Please see Figure 5 , Figure 5 A flowchart illustrating a content generation method provided in an embodiment of this specification is shown.

[0071] like Figure 5 As shown, the content generation method may specifically include the following steps:

[0072] Step 112: Input the predicted input information of the target user into the conditional feature encoder to obtain the conditional features of the target user;

[0073] The predicted input information of the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users;

[0074] Step 114: Based on the target user's conditional features, target user's target input information, and noise, generate target content using a content generation model.

[0075] The content generation method described in this specification can utilize a content generation model to obtain target content based on the predicted input information of the target user and the target input information. Since the predicted input information of the target user is obtained based on the target user's historical input information and the historical input information of related users, this information takes into account the user's historical usage habits and preferences, as well as the historical usage habits and preferences of related users similar to the user. Therefore, the embodiments of this specification can generate content that conforms to the user's personalization.

[0076] The content generation method described in this specification can be executed on a terminal device. After a user inputs an AI prompt (i.e., the target input information) on the terminal device, the terminal device can be triggered to communicate with the server to obtain the model deployed on the server (i.e., the content generation model), and then the model is stored locally on the device.

[0077] After obtaining the target user's input information, the terminal device can obtain the target user's historical input information, and the server can obtain the historical input information of related users. Based on the target user's historical input information and the historical input information of related users, predicted input information can be obtained at the server or terminal device. The predicted input information can undergo feature transformation at the server or terminal device. The terminal device loads a content generation model, processes the conditional features of the input content generation model, the target input information, and noise, and then generates content that conforms to the user's personalization.

[0078] The following examples and embodiments illustrate... Figure 5 Each step in the process will be explained separately.

[0079] In step 112, the conditional feature encoder is pre-trained before executing the content generation method of the embodiments of this specification. The conditional feature encoder can be trained with reference to the training method of the conditional feature encoder used in the content generation model training process, or it can be directly trained using the conditional feature encoder used in the content generation model training process.

[0080] The predicted input information for the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users. The predicted input information for the target user is determined according to actual usage. The target user and its historical input information, as well as the associated users and their historical input information, are all obtained by the server through collecting and analyzing data from various terminal devices, and are ultimately stored on the server in the form of a target user list and an associated user list.

[0081] The target user list stores the user ID of the target user, along with its corresponding target input information and historical input information. The associated user list stores the associated user ID and its corresponding historical input information. The associated user list includes multiple sublists, divided according to the target user associated with it. Each sublist corresponds to one target user and reflects the associated user information related to that target user. When the server obtains the target input information of a target user, it can retrieve the corresponding associated user sublist based on that target user, thereby obtaining the historical input information of the associated user.

[0082] In step 114, the content generation model is based on Figure 4 The training method shown is used to train the model. The conditional features obtained in step 112, the target user's target input information, and the random noise input content are used to generate a content generation model. The content generation model outputs target content, such as one or more combinations of image content, video content, audio content, and text content.

[0083] In the content generation method of the embodiments of this specification, the process of obtaining the predicted input information can be carried out in one implementation: semantic analysis can be performed on the target input information, the target user's historical input information and the associated user's historical input information; based on the target input information, historical input information with similar or related meanings to the target input information is obtained from the target user's historical input information and the associated user's historical input information, and then the filtered historical input information and the target input information are summarized and output as predicted input information.

[0084] The process of obtaining the predicted input information can also be carried out in another embodiment: the predicted input information of the target user is obtained through a prediction model, the historical input information of the target user and the historical input information of associated users are input into the prediction model, and the predicted input information of the target user is output.

[0085] Figure 6 The process of using a prediction model to output predicted input information is specifically illustrated. The prediction model includes an associated user feature encoder, a target user feature encoder, and a prediction module. For example... Figure 6 The step of inputting the target user's historical input information and the historical input information of associated users into the prediction model, and outputting the target user's predicted input information, includes:

[0086] Step 202: Input the historical input information of the target user into the target user feature encoder to obtain the target user feature vector; input the historical input information of the associated user into the associated user feature encoder to obtain the associated user feature vector;

[0087] Step 204: Input the target user feature vector and the associated user feature vector into the prediction module to obtain the prediction input information.

[0088] The process of the prediction model outputting predicted input information in the embodiments of this specification is executed on the server. The server collects data from various terminal devices, analyzes it to obtain the target user and the target user's historical input information, the associated users and the associated users' historical input information, and finally stores them on the server in the form of a target user list and an associated user list. The server inputs the target user's historical input information and the associated user's historical input information into the prediction model stored on the server, and outputs the predicted input information after processing by the prediction model. The following describes the process with specific examples and embodiments. Figure 6 Each step in the process will be explained separately.

[0089] In step 202, the associated user feature encoder and the target user feature encoder are pre-trained before obtaining the predicted input information according to the embodiments of this specification. Based on the user's input information, such as historical prompts, the associated user feature encoder and the target user encoder are trained to obtain features that are closest to the labeled data. After training, they are applied in the embodiments of this specification.

[0090] In step 204, the prediction module is pre-trained before obtaining the prediction input information in the embodiments of this specification. Based on the feature vectors, the prediction module is trained to obtain accurate prediction input information. After training, it is applied in the embodiments of this specification.

[0091] During use, it can output predicted input information that is greater than the target input information, that is, the target input information has been expanded by association, or it can output the target input information, that is, the target input information has not been expanded by personalized association, and it is still the target input information initially entered by the target user.

[0092] Similarly, in the model training method of the embodiments of this specification, the predicted input information of the target user can also be obtained through any of the above-described implementation methods. The difference is that, in the model training method, the predicted input information of the target user is determined based on the data within the first training sample.

[0093] Figure 7 A flowchart of the above prediction model training process is shown. Figure 7 The training process of the prediction model is as follows:

[0094] Step 212: Input the historical input information of the target user in the second training sample into the target user feature encoder to obtain the target user feature vector; input the historical input information of the associated user in the second training sample into the associated user feature encoder to obtain the associated user feature vector.

[0095] Step 214: Input the target user feature vector and the associated user feature vector into the prediction module to obtain the prediction input information;

[0096] Step 216: Use the second loss function to predict and judge the predicted input information and the control input information. If the prediction result does not meet the convergence condition, repeat the above training process until the convergence condition is met. When the convergence condition is met, the prediction model is trained. The control input information is the real input information that is pre-annotated based on the target user's target input information, the target user's historical input information, the associated user's historical input information, and the historical generated content in the second training sample.

[0097] In the embodiments of this specification, the training process of the prediction model is completed on the server, and the trained prediction model is stored on the server.

[0098] The second training sample is configured according to the training objective after collecting historical data from terminal devices via a server. The second training sample includes a target user list, an associated user list, and historically generated content. The target user list stores the user ID of the target user, along with its corresponding target input information and historical input information. The associated user list stores associated user IDs and their corresponding historical input information. The associated user list includes multiple sublists, divided based on the associated target user. Each sublist corresponds to one target user and reflects the associated user information, while also including corresponding historically generated content. The historically generated content is determined based on user satisfaction, derived from content generated based on target input information and content generated based on historical input information. The second training sample can use data from the first training sample or can be obtained by reusing data collected and analyzed from multiple terminal devices via a server.

[0099] The following examples and embodiments illustrate... Figure 7 Each step in the process will be explained separately.

[0100] In step 212, the associated user feature encoder and the target user feature encoder are pre-trained before obtaining the predicted input information according to the embodiments of this specification. Based on user input information, such as historical prompts, the associated user feature encoder and the target user encoder are trained to obtain features that are closest to the labeled data. After training, they are applied in the embodiments of this specification. Furthermore, Figure 5 Examples and Figure 4 Instances can share the trained associated user feature encoder and the target user feature encoder.

[0101] In step 214, the feature vector is input into the prediction module to obtain prediction input information.

[0102] In step 216, the second loss function can calculate the regression loss on the predicted input information and the control input information. The second loss function can be a loss function such as Euclidean distance or relative entropy. Convergence is achieved when the predicted result is close to the true result. During training, the parameters of the prediction module are adjusted.

[0103] The reference input information is obtained in advance based on the training data of the second training sample, before executing step 216. Combined with historically generated content, the historical input information of the target user and the historical input information of associated users are manually annotated; based on the annotated features, the historical input information with relevant features is obtained as the reference input information.

[0104] Figure 4 , Figure 5 , Figure 6 , Figure 7 The examples shown all require knowledge of the associated users and their historical input information. In one or more embodiments of this specification, the relevant information of the associated users is stored in the form of an associated user list.

[0105] The list of associated users can be obtained by collecting end-user data through a server and then using intelligent algorithms (such as semantic matching algorithms) or manual filtering in the backend. The filtering criteria can be based on similarity to users' usage habits or preferences. For example, filtering can be based on a single dimension, such as preferences (e.g., what similarities exist in the content viewed), or consumption (e.g., the amount spent, the brand purchased); or filtering can be based on a combination of multiple dimensions, such as preferences and consumption; or combinations of more than two dimensions, etc.

[0106] This specification provides an associated user model to obtain a list of associated users through an intelligent model. The associated user model outputs a list of associated users based on the target user's target input information.

[0107] Figure 8 This is a schematic diagram illustrating the process of obtaining a list of associated users through an associated user model in an embodiment of this specification. The associated user model includes a key factor sorting module and a retrieval module. The list of associated users is obtained through the associated user model, including:

[0108] Step 302: The target user's target input information feature encoder obtains several different types of information feature vectors;

[0109] Step 304: Input several different types of information feature vectors into the key factor ranking module, and output the importance ranking and the relevance value corresponding to the importance ranking; wherein, the importance ranking includes several different types of information feature vectors ranked in order of importance.

[0110] Step 306: Input the importance ranking and relevance value into the retrieval module, and output the list of associated users; wherein, the associated users in the list of associated users are users whose relevance value is greater than the relevance value.

[0111] The associated user model in this specification's embodiments filters associated users based on multiple dimensions. Several different types of information vectors are determined according to different dimensions, for example, based on preferences and consumption; or based on space, preferences, and consumption, etc. Space refers to a certain degree of overlap between target users in a given space, such as working or living in the same area. The aforementioned spatial feature information can be obtained based on the location information of the user ID sent with the input information. Generally, when a terminal device logs in with a user ID, it sends its location information and IP address to the server along with the user's input information prompt. In other words, the target input information and historical input information contain spatial feature information in addition to the main text content.

[0112] The process of outputting the associated user list using the associated user model in the embodiments of this specification can be executed on a server. The server uses the associated user model stored on it to execute the above process and obtain the associated user list.

[0113] In the embodiments of this specification, the associated user list can be generated normally. The server periodically collects data from the terminal devices communicating with it and uses the associated user model to periodically determine the associated user list for a particular user. Besides being used in obtaining predicted input information for the target user, generating personalized content, and various training methods in the embodiments of this specification, the generated associated user list can also be used in other application scenarios that require associated user information.

[0114] The following examples and embodiments illustrate... Figure 8 Each step in the process will be explained separately.

[0115] In step 302, the information feature encoder is pre-trained before executing the process of obtaining the associated user list in the embodiments of this specification. Based on user input information, such as historical prompts, the information feature encoder is trained to obtain features that are closest to the labeled data, enabling it to obtain features of different dimensions based on the target input information. After training, it is applied in the embodiments of this specification.

[0116] In step 304, the key factor ranking module is a multilayer perceptron, which outputs importance ranking and relevance value based on the input information feature vector.

[0117] When identifying relevant users from multiple dimensions, each dimension has a priority order for the user, which determines the different importance of the dimensions. The more dimensions considered, the more possible ordering combinations there are. For example, when there are 2 dimensions, there are 2 possible ordering combinations: (Dimension 1, Dimension 2) and (Dimension 2, Dimension 1). Similarly, when there are 3 dimensions, there are 6 possible ordering combinations: (Dimension 1, Dimension 2, Dimension 3), (Dimension 2, Dimension 3, Dimension 1), (Dimension 3, Dimension 1, Dimension 2), (Dimension 1, Dimension 3, Dimension 2), (Dimension 2, Dimension 1, Dimension 3), (Dimension 3, Dimension 2, Dimension 1), with the order within parentheses sorted from highest to lowest importance.

[0118] Step 304 specifically involves:

[0119] After several different types of information feature vectors are input into the key factor ranking module, the module arranges and combines these vectors to obtain multiple rankings. Then, based on each ranking, the data collected from terminal devices by the server is sequentially retrieved (i.e., each retrieval only includes the results of the previous retrieval). Taking (dimension 1, dimension 2, dimension 3) as an example, a certain number of users are first retrieved based on dimension 1, then a smaller number of users are retrieved based on dimension 2, and finally an even smaller number of users are retrieved based on dimension 3. After sequential retrieval of multiple rankings, the retrieval results of each ranking are evaluated. A similarity value between the retrieval results and the actual results is calculated using an algorithm such as cosine similarity, and a relevance value is assigned to the similarity value. This relevance value is generally no greater than 1; for example, a similarity value of 99% corresponds to a relevance value of 0.9, and a similarity value of 55% corresponds to a relevance value of 0.5. Finally, the key factor ranking module sorts all groups by relevance value from highest to lowest, and outputs the group with the highest relevance value as the importance ranking. The output also includes the relevance value of the ranked group for subsequent retrieval.

[0120] In step 306, the retrieval module is an existing module that primarily implements data retrieval functions. This can be understood as follows: by inputting search elements into the retrieval module, the module retrieves user data obtained from the terminal device within the server based on these elements. During the retrieval process, a sequential search is first performed using importance ranking, followed by a filtering using relevance values ​​to select users with relevance values ​​greater than the specified relevance value. The resulting list of associated users is then compiled to link the target user to this list.

[0121] Figure 8The example shown primarily uses a serial retrieval method based on key factor sorting to achieve efficient retrieval of related users. The embodiments in this specification are not limited to the above method; a full-scale retrieval method can also be used. For example, the key factor sorting module can be omitted, and the retrieval results can be obtained directly through the retrieval module. When using a full-scale retrieval method, the retrieval efficiency will decrease exponentially as the number of dimensions increases. Therefore, a preferred method is... Figure 8 The example shown can reduce the search space, improve search efficiency, and obtain highly relevant results based on importance ranking.

[0122] Figure 9 This is a flowchart illustrating the training process of the associated user model in the embodiments of this specification. The training process of the associated user model is as follows:

[0123] Step 312: Input the target input information of the target user in the third training sample into the information feature encoder to obtain several different types of information feature vectors;

[0124] Step 314: Input several different types of information feature vectors into the key factor ranking module, and output the importance ranking and the relevance value corresponding to the importance ranking; wherein, the importance ranking includes several different types of information feature vectors ranked in order of importance.

[0125] Step 316: Input the importance ranking and relevance value into the retrieval module, and output the list of associated users; wherein, the associated users in the list of associated users are users whose relevance value is greater than the relevance value.

[0126] Step 318: Use the third loss function to predict and judge the user IDs in the associated user list and the user IDs in the comparison user list. If the prediction result does not meet the convergence condition, repeat the above training process until the convergence condition is met. When the convergence condition is met, the key factor ranking module is trained and the trained associated user model is output.

[0127] The reference user list stores users associated with the user corresponding to the target input information, which are obtained through a full search.

[0128] The training process of the associated user model in the embodiments of this specification is completed on the server, and the trained associated user model is stored on the server. The training process aims to train the key factor ranking module and update its relevant parameters; the retrieval module is not updated.

[0129] The third training sample is configured according to the training objective after collecting historical data from terminal devices via a server. The third training sample includes a target user list and a list of all users. The list of all users stores the user IDs of all users and their corresponding historical input information. A number of users are randomly selected from the list of all users as target users, thus forming the target user list. The target user list stores the target users and target input information, using the most recent historical input information as the target input information.

[0130] The following examples and embodiments illustrate... Figure 9 Each step in the process will be explained separately.

[0131] In step 312, the information feature encoder is pre-trained before executing the process of obtaining the associated user list according to the embodiments of this specification. The information feature encoder can be pre-trained using the training method in step 302. The information feature encoder in step 312 can use the same pre-trained encoder as the information feature encoder in step 302.

[0132] In step 314, the key factor ranking module is a multilayer perceptron that outputs importance ranking and relevance values ​​based on the input information feature vector. The training process follows the same procedure as in step 304, except that the parameters of the key factor ranking module are adjusted with each training iteration. The parameters of the key factor ranking module in step 304 are based on... Figure 9 The example training method determines the final parameters after the model has converged.

[0133] In step 316, the data retrieval process executed by the retrieval module is the same as in step 306.

[0134] In step 318, the third loss function can determine the consistency between the user IDs in the associated user list and the user IDs in the comparison user list. The third loss function can be a consistency loss function. Convergence is achieved when the predicted result matches the actual result.

[0135] The data in the reference user list is obtained using existing full-data retrieval methods. When calculating the third loss function, the consistency between the user IDs in the associated user list and the user IDs in the reference user list is mainly compared. When the proportion of identical user IDs is close to 1, the model training has converged.

[0136] The control user list is obtained in advance based on the training data of the third training sample, before executing step 318. First, a target user and the target user's target input information are obtained from the target user list. Then, a full search is performed on all user lists of the third training sample (searching based on multiple dimensions). The user list formed by the search results is the control user list.

[0137] The content generation method in the embodiments of this specification, before inputting the predicted input information of the target user into the conditional feature encoder, further includes:

[0138] Step 110: If a target user instruction is detected, the predicted input information is updated and input into the conditional feature encoder to obtain the conditional features of the target user.

[0139] The target user instruction is a command from the user to modify the predicted input information. After receiving the predicted input information, the server can send it back to the terminal device, where the user can modify or adjust the predicted input information. If modified, the server will receive the target user instruction from the terminal device, update the predicted input information, and output the updated information to subsequent steps; if not modified, the server will not receive the target user instruction, skip this step, and proceed to subsequent steps.

[0140] This step allows for the incorporation of user needs, resulting in more personalized content.

[0141] Similarly, the model training method implemented in this specification, before inputting the predicted input information of the target user into the conditional feature encoder, also includes:

[0142] Step 100: When a target user in the first training sample still has target user instructions, when a target user instruction is detected during training, the predicted input information is updated, and the updated predicted input information is input into the conditional feature encoder to obtain the conditional features of the target user.

[0143] Step 100 is similar to step 110 in its execution. Introducing this process during the training phase involves adding human-modified variables as variables to the model training to obtain a more accurate predictive model.

[0144] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0145] Please see Figure 10 The diagram shown is a structural schematic of a model training device provided in an embodiment of this specification.

[0146] like Figure 10 As shown, the model training device 1000 may include at least a feature training module 1001, a content training module 1002, and a training judgment module 1003, wherein:

[0147] The feature training module 1001 is equipped with a conditional feature encoder, which is used to input the predicted input information of the target user into the conditional feature encoder to obtain the conditional features of the target user.

[0148] The predicted input information of the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users in the first training sample.

[0149] The first training sample is configured according to the training objective after collecting historical data from terminal devices via a server. The first training sample includes a target user list and an associated user list. The target user list stores the user ID of the target user, along with its corresponding target input information and historical input information. The associated user list stores the associated user ID and its corresponding historical input information. The associated user list includes multiple sublists, divided according to the target user associated with it. Each sublist corresponds to one target user and reflects the associated user information related to that target user.

[0150] The predicted input information for the target user is determined based on a target user selected from the first training sample. When a target user is selected, a list of associated users related to that target user is obtained, and the predicted input information for the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of the associated users.

[0151] The conditional feature encoder is pre-trained before executing the model training process of the embodiments in this specification.

[0152] The content training module 1002 is used to generate target content based on the target user's conditional features, the target user's target input information, and noise using a content generation model.

[0153] The training judgment module 1003 is used to predict and judge the control content and the target content generated by the content generation model using the first loss function. When the prediction result does not meet the convergence condition, the above training process is repeated until the convergence condition is met. When the convergence condition is met, the content generation model is trained.

[0154] The comparison content is content pre-generated based on the target user's target input information.

[0155] When the content generation model is a diffusion model, the first loss function can be a function such as Euclidean distance, Mahalanobis distance, or cosine distance. When the two distances are closest, it indicates that the predicted result is close to the true result, i.e., convergence has been achieved. During training, the parameters of the content generation model are adjusted. In this example, the conditional features obtained in step 102, the target user's target input information, and random noise are directly input into the diffusion model for content output.

[0156] When the content generation model is a GAN model, the first loss function is the GAN adversarial loss function. In this example, the target user's input information needs to be transformed into features using a feature encoder first, and then fused with conditional features before being input into the GAN model. During training, the parameters of the content generation model are adjusted.

[0157] The comparison content is obtained based on the training data of the first training sample. In one example, a manual screening method is used to obtain relevant historical input information from historical input information based on the target input information. Then, content is generated according to the screening results and the target input information, thus obtaining the comparison content. In another example, the comparison content is historical comparison content. This historical comparison content is selected from historical data that corresponds to the target input information and meets user satisfaction standards. This comparison content is directly stored in the first training sample. When making predictions, the comparison content in the first training sample is directly retrieved for judgment.

[0158] The model training apparatus in this embodiment trains a content generation model based on the predicted input information of the target user and the target input information. Since the predicted input information of the target user is the target input information obtained based on the target user's historical input information and the historical input information of related users, this information considers the user's historical usage habits and preferences, as well as the historical usage habits and preferences of related users similar to the user. Therefore, during training, content that matches the user's personalization can be output. Then, a first loss function can be used to determine whether the predicted result output by the content generation model is close to the actual result. Training is then performed based on this determination until convergence, at which point training is complete.

[0159] The model training device described in this specification can be set up on a server, and the trained model is stored on the server.

[0160] Please see Figure 11 The diagram shown is a structural schematic of a content generation apparatus provided in an embodiment of this specification.

[0161] like Figure 11As shown, the content generation device 2000 may include at least a condition feature module 2001 and a content generation module 2002, wherein:

[0162] The conditional feature module 2001 is equipped with a conditional feature encoder, which is used to input the predicted input information of the target user into the conditional feature encoder to obtain the conditional features of the target user.

[0163] The predicted input information of the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users.

[0164] The predicted input information for the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users. The predicted input information for the target user is determined according to actual usage. The target user and its historical input information, as well as the associated users and their historical input information, are all obtained by the server through collecting and analyzing data from various terminal devices, and are ultimately stored on the server in the form of a target user list and an associated user list.

[0165] The conditional feature encoder is pre-trained before executing the content generation method of the embodiments of this specification.

[0166] The content generation module 2002 is used to generate target content based on the target user's conditional features, the target user's target input information, and noise, using a content generation model trained according to the model training method in one or more embodiments of this specification.

[0167] The content generation apparatus of this specification embodiment can obtain target content based on the predicted input information of the target user and the target input information using a content generation model. Since the predicted input information of the target user is the target input information obtained based on the target user's historical input information and the historical input information of related users, this information takes into account the user's historical usage habits and preferences, as well as the historical usage habits and preferences of related users similar to the user. Therefore, the embodiments of this specification can generate content that conforms to the user's personalization.

[0168] The content generation device described in this specification can be located on a terminal device. After a user inputs an AI prompt (i.e., the target input information) on the terminal device, the terminal device can be triggered to communicate with the server to obtain the model deployed on the server (i.e., the content generation model), and then the model is stored locally on the device.

[0169] In the apparatus described in the embodiments of this specification, the model training apparatus or content generation apparatus further includes: a prediction input module.

[0170] In one implementation, the prediction input module is used to perform semantic analysis on the target input information, the target user's historical input information, and the associated user's historical input information; based on the target input information, it obtains historical input information with similar or related meanings from the target user's historical input information and the associated user's historical input information, and then summarizes and outputs the predicted input information by combining the filtered historical input information and the target input information.

[0171] In another implementation, the prediction input module is used to input the historical input information of the target user and the historical input information of associated users into the prediction model, and output the predicted input information of the target user.

[0172] The prediction model includes an associated user feature encoder, a target user feature encoder, and a prediction module. The prediction input module performs the process of inputting the target user's historical input information and the associated user's historical input information into the prediction model, and outputting the target user's predicted input information. For details, please refer to [link to relevant documentation]. Figure 6 .

[0173] When the prediction input module is included in the model training device, the predicted input information for the target user is determined based on data from the first training sample. When the prediction input module is included in the model content generation device, the predicted input information for the target user is determined based on the target input information currently input by the user.

[0174] In the apparatus described in the embodiments of this specification, the model training apparatus or content generation apparatus further includes a prediction model training module, used for performing, for example... Figure 7 Training under the process shown.

[0175] The second training sample is configured according to the training objective after collecting historical data from terminal devices via a server. The second training sample includes a target user list and an associated user list. The target user list stores the user ID of the target user, along with its corresponding target input information and historical input information. The associated user list stores associated user IDs and their corresponding historical input information. The associated user list includes multiple sublists, divided based on the associated target user. Each sublist corresponds to one target user and reflects the associated user information. The second training sample can use data from the first training sample or can be obtained by reusing data collected and analyzed from multiple terminal devices via a server.

[0176] In the apparatuses described in the embodiments of this specification, both the model training apparatus and the content generation apparatus need to know the associated users and their historical input information. In one or more embodiments of this specification, the relevant information of the associated users is stored in the form of an associated user list.

[0177] The list of associated users can be obtained by collecting end-user data through a server and then using intelligent algorithms (such as semantic matching algorithms) or manual filtering in the backend. The filtering criteria can be based on similarity to users' usage habits or preferences. For example, filtering can be based on a single dimension, such as preferences (e.g., what similarities exist in the content viewed), or consumption (e.g., the amount spent, the brand purchased); or filtering can be based on a combination of multiple dimensions, such as preferences and consumption; or combinations of more than two dimensions, etc.

[0178] In the apparatus described in the embodiments of this specification, the model training apparatus or content generation apparatus further includes an associated user module, which is used to input the target input information of the target user into the associated user model and output an associated user list; the historical input information of the associated user is stored in the form of an associated user list.

[0179] The associated user model includes a key factor ranking module and a retrieval module. The process by which the associated user module inputs the target user's target input information into the associated user model and outputs a list of associated users is described below. Figure 8 The process is shown below.

[0180] The associated user model in this specification's embodiments filters associated users based on multiple dimensions. Several different types of information vectors are determined according to different dimensions, for example, based on preferences and consumption; or based on space, preferences, and consumption, etc. Space refers to a certain degree of overlap between target users in a given space, such as working or living in the same area. The aforementioned spatial feature information can be obtained based on the location information of the user ID sent with the input information. Generally, when a terminal device logs in with a user ID, it sends its location information and IP address to the server along with the user's input information prompt. In other words, the target input information and historical input information contain spatial feature information in addition to the main text content.

[0181] In the embodiments of this specification, the associated user list can be generated normally. The server periodically collects data from the terminal devices that communicate with it, and uses the associated user model to periodically determine the associated user list associated with a certain user.

[0182] In the apparatus described in the embodiments of this specification, the model training apparatus or content generation apparatus further includes an associated user model training module, used for performing... Figure 9 The process is shown below.

[0183] The third training sample is configured according to the training objective after collecting historical data from terminal devices via a server. The third training sample includes a target user list and a list of all users. The list of all users stores the user IDs of all users and their corresponding historical input information. A number of users are randomly selected from the list of all users as target users, thus forming the target user list. The target user list stores the target users and target input information, using the most recent historical input information as the target input information.

[0184] In the apparatus of the embodiments described above, the model training apparatus or content generation apparatus further includes: an editing module, configured to update the predicted input information if a target user instruction is detected before inputting the predicted input information of the target user into the conditional feature encoder, and input the updated predicted input information into the conditional feature encoder to obtain the conditional features of the target user.

[0185] The target user instruction is a command from the user to modify the predicted input information. After receiving the predicted input information, the server can send it back to the terminal device, where the user can modify or adjust the predicted input information. If modified, the server will receive the target user instruction from the terminal device, update the predicted input information, and output the updated information to subsequent steps; if not modified, the server will not receive the target user instruction, skip this step, and proceed to subsequent steps.

[0186] When the editing module is included in the content generation device, user requirements can be incorporated to generate more personalized content. When the editing module is included in the model training device, human modifications can be added as variables to the model training to obtain a more accurate predictive model.

[0187] Please see Figure 12 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this specification.

[0188] like Figure 12 As shown, the electronic device 1100 may include: at least one processor 1101, at least one network interface 1104, user interface 1103, memory 1105, and at least one communication bus 1102.

[0189] The communication bus 1102 can be used to realize the connection and communication of the above components.

[0190] The user interface 1103 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.

[0191] The network interface 1104 may include, but is not limited to, Bluetooth modules, NFC modules, Wi-Fi modules, etc.

[0192] The processor 1101 may include one or more processing cores. The processor 1101 connects to various parts within the electronic device 1100 using various interfaces and lines. It executes instructions, programs, code sets, or instruction sets stored in the memory 1105, and calls data stored in the memory 1105 to perform various functions and process data within the routing device 1100. Optionally, the processor 1101 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The processor 1101 may integrate one or more of the following: CPU, GPU, and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 1101 and may be implemented as a separate chip.

[0193] The memory 1105 may include RAM or ROM. Optionally, the memory 1105 may include a non-transitory computer-readable medium. The memory 1105 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 1105 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1105 may also be at least one storage device located remotely from the aforementioned processor 1101. Figure 11 As shown, the memory 1105, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and application programs. The processor 1101 can be used to call the application programs stored in the memory 1105 and execute the methods in one or more of the above embodiments.

[0194] This specification also provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps in one or more of the above embodiments. If the constituent modules of the above-described electronic device are implemented as software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.

[0195] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).

[0196] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks. Unless otherwise specified, the technical features of this embodiment and its implementation can be combined arbitrarily.

[0197] The embodiments described above are merely preferred embodiments of this specification and are not intended to limit the scope of this specification. Any modifications and improvements made by those skilled in the art to the technical solutions of this specification without departing from the spirit of this specification should fall within the protection scope defined by the claims of this specification.

Claims

1. Content generation methods, including: Input the target user's historical input information and the historical input information of associated users into the prediction model, and output the target user's predicted input information; The historical input information of the associated users is stored in the form of an associated user list, which is obtained through an associated user model and includes: The target user's target input information feature encoder yields several different types of information feature vectors. Several different types of information feature vectors are input into the key factor ranking module, which outputs the importance ranking and the corresponding relevance value; wherein, the importance ranking includes several different types of information feature vectors ordered in order of importance. Input the importance ranking and relevance value into the retrieval module, and output a list of associated users; wherein, the associated users in the list of associated users are those with a relevance value greater than the relevance value. The predicted input information of the target user is input into the conditional feature encoder to obtain the conditional features of the target user; Based on the target user's conditional features, target user's target input information, and noise, a content generation model is used to generate target content; the training method of the content generation model includes: The predicted input information of the target user is input into the conditional feature encoder to obtain the conditional features of the target user; wherein, the predicted input information of the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users in the first training sample; Based on the target user's conditional characteristics, target user's target input information, and noise, target content is generated using a content generation model. The first loss function is used to predict and judge the reference content and the target content generated by the content generation model. When the prediction result does not meet the convergence condition, the above training process is repeated until the convergence condition is met. When the convergence condition is met, the content generation model is trained. The reference content is content pre-generated based on the target user's target input information.

2. The method according to claim 1, wherein the prediction model comprises an associated user feature encoder, a target user feature encoder, and a prediction module; The step of inputting the target user's historical input information and the historical input information of associated users into the prediction model, and outputting the target user's predicted input information, includes: The target user's historical input information is input into the target user feature encoder to obtain the target user feature vector; the associated user's historical input information is input into the associated user feature encoder to obtain the associated user feature vector. Input the target user feature vector and the associated user feature vector into the prediction module to obtain the prediction input information.

3. The method according to claim 1, wherein the training process of the prediction model is as follows: The historical input information of the target user in the second training sample is input into the target user feature encoder to obtain the target user feature vector; the historical input information of the associated user in the second training sample is input into the associated user feature encoder to obtain the associated user feature vector. Input the target user feature vector and the associated user feature vector into the prediction module to obtain the prediction input information; The second loss function is used to predict and judge the input information and the control input information. If the prediction result does not meet the convergence condition, the above training process is repeated until the convergence condition is met. When the convergence condition is met, the prediction model is trained. The reference input information is real input information obtained by pre-labeling based on the target user's target input information, the target user's historical input information, the associated user's historical input information, and the historical generated content in the second training sample.

4. The method according to claim 1, wherein the plurality of different types of information feature vectors are three types of information feature vectors obtained from three dimensions: space, preference, and consumption.

5. The method according to claim 1, wherein the training process of the associated user model is as follows: The target input information of the target user in the third training sample is input into the information feature encoder to obtain several different types of information feature vectors. Several different types of information feature vectors are input into the key factor ranking module, which outputs an importance ranking and a relevance value corresponding to the importance ranking; wherein, The importance ranking includes several different types of information feature vectors ordered in order of importance; The importance ranking and relevance value are input into the retrieval module, and a list of associated users is output; wherein, the associated users in the list of associated users are those with a relevance value greater than the relevance value. The third loss function is used to predict and judge the user IDs in the associated user list and the reference user list. When the prediction result does not meet the convergence condition, the above training process is repeated until the convergence condition is met. When the convergence condition is met, the key factor ranking module is trained and the trained associated user model is output. The reference user list stores users associated with the user corresponding to the target input information, which are obtained through full retrieval.

6. The method according to claim 5, wherein the plurality of different types of information feature vectors are three types of information feature vectors obtained from three dimensions: space, preference, and consumption.

7. The method according to claim 1, further comprising, before inputting the predicted input information of the target user into the conditional feature encoder: If a target user instruction is detected, the predicted input information is updated and then input into the conditional feature encoder to obtain the conditional features of the target user.

8. A content generation device, comprising: The prediction input module is used to input the historical input information of the target user and the historical input information of associated users into the prediction model, and output the predicted input information of the target user. The associated user module is used to input the target user's target input information into the associated user model and output a list of associated users; the historical input information of the associated users is stored in the form of an associated user list; the associated user model includes a key factor sorting module and a retrieval module. The process of inputting the target user's target input information into the associated user model and outputting the associated user list by the associated user module includes: The target user's target input information feature encoder yields several different types of information feature vectors. Several different types of information feature vectors are input into the key factor ranking module, which outputs the importance ranking and the corresponding relevance value; wherein, the importance ranking includes several different types of information feature vectors ordered in order of importance. The importance ranking and relevance value are input into the retrieval module, and a list of associated users is output; wherein, the associated users in the list of associated users are those with a relevance value greater than the relevance value. The conditional feature module is equipped with a conditional feature encoder, which is used to input the predicted input information of the target user into the conditional feature encoder to obtain the conditional features of the target user; wherein, the predicted input information of the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users; The content generation module is used to generate target content based on the target user's conditional features, target user's target input information, and noise, using a content generation model; the training method of the content generation model includes: The predicted input information of the target user is input into the conditional feature encoder to obtain the conditional features of the target user; wherein, the predicted input information of the target user is obtained based on the target user's target input information, the target user's historical input information, and the historical input information of associated users in the first training sample; Based on the target user's conditional characteristics, target user's target input information, and noise, target content is generated using a content generation model. The first loss function is used to predict and judge the reference content and the target content generated by the content generation model. When the prediction result does not meet the convergence condition, the above training process is repeated until the convergence condition is met. When the convergence condition is met, the content generation model is trained. The reference content is content pre-generated based on the target user's target input information.

9. The apparatus according to claim 8, wherein the prediction model comprises an associated user feature encoder, a target user feature encoder, and a prediction module; the prediction input module performs the process of inputting the historical input information of the target user and the historical input information of the associated user into the prediction model and outputting the predicted input information of the target user, comprising: Input the target user's historical input information into the target user feature encoder to obtain the target user feature vector; The historical input information of associated users is input into the associated user feature encoder to obtain the associated user feature vector; the target user feature vector and the associated user feature vector are input into the prediction module to obtain the prediction input information.

10. The apparatus according to claim 8, further comprising a prediction model training module for performing the following training: The historical input information of the target user in the second training sample is input into the target user feature encoder to obtain the target user feature vector; the historical input information of the associated user in the second training sample is input into the associated user feature encoder to obtain the associated user feature vector. Input the target user feature vector and the associated user feature vector into the prediction module to obtain the prediction input information; The second loss function is used to predict and judge the input information and the control input information. If the prediction result does not meet the convergence condition, the above training process is repeated until the convergence condition is met. When the convergence condition is met, the prediction model is trained. The reference input information is real input information obtained by pre-labeling based on the target user's target input information, the target user's historical input information, the associated user's historical input information, and the historical generated content in the second training sample.

11. The apparatus according to claim 8, wherein the plurality of different types of information feature vectors are three types of information feature vectors obtained from three dimensions: space, preference, and consumption.

12. The apparatus according to claim 8 further includes an associated user model training module for performing the following training: The target input information of the target user in the third training sample is input into the information feature encoder to obtain several different types of information feature vectors. Several different types of information feature vectors are input into the key factor ranking module, which outputs an importance ranking and a relevance value corresponding to the importance ranking; wherein, The importance ranking includes several different types of information feature vectors ordered in order of importance; The importance ranking and relevance value are input into the retrieval module, and a list of associated users is output; wherein, the associated users in the list of associated users are those with a relevance value greater than the relevance value. The third loss function is used to predict and judge the user IDs in the associated user list and the reference user list. When the prediction result does not meet the convergence condition, the above training process is repeated until the convergence condition is met. When the convergence condition is met, the key factor ranking module is trained and the trained associated user model is output. The reference user list stores users associated with the user corresponding to the target input information, which are obtained through full retrieval.

13. The apparatus according to claim 12, wherein the plurality of different types of information feature vectors are three types of information feature vectors obtained from three dimensions: space, preference, and consumption.

14. The apparatus of claim 8, further comprising: The editing module is used to update the predicted input information if a target user instruction is detected before inputting the predicted input information of the target user into the conditional feature encoder, and then input the updated predicted input information into the conditional feature encoder to obtain the conditional features of the target user.

15. Electronic devices, including processors and memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code stored in the memory to perform the method as described in any one of claims 1-7.

16. A computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of claims 1-7.