Method for training user portrait model, method for determining user data, device
Through masking processing of labelless samples in user portrait model training and preset model training, the universality and accuracy problems of user portrait model training are solved, and efficient training and optimization under different training goals are achieved.
Patent Information
- Application Number
- CN202111675261.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The user portrait model training method in the prior art lacks universality and needs to be initialized from scratch for different training targets. The training parameters mostly lead to poor sample size and training duration, and are prone to falling into local optimization and no longer optimized.
By obtaining the original samples without marks, performing masking processing to generate training samples, and using preset models for training, discovering the correlation between different features, and optimizing model parameters to generate user portrait models.
It realizes the universality of the user portrait model and higher training accuracy, and can maintain good results under different training goals.
Smart Images

Figure CN114330579B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to user profiling technology, and in particular to a method for training a user profiling model, a method for determining user data, and a device. Background Art
[0002] With the rapid development of computer and Internet technologies, user profiling technology has emerged. A user profiling model refers to a labeled user model abstracted based on information such as user attributes, user preferences, living habits, and user behaviors.
[0003] In the prior art, in the training method of a user profiling model, most of them first perform one-hot encoding on the original features to generate training samples; then the training samples are passed through a single-layer fully connected layer, or multiple layers to compress the dimensions, or directly connected to the target task model for synchronous training.
[0004] However, the above method has no generality for different training tasks, and for different training objectives, it needs to be initialized from scratch; and there are many training parameters, resulting in poor effects with the same sample size and training duration, and it is easy to fall into a local optimum and no longer optimize. Summary of the Invention
[0005] The present disclosure provides a method for training a user profiling model, a method for determining user data, and a device to solve the problems in the prior art that there is no generality for different training tasks, and for different training objectives, it needs to be initialized from scratch; and there are many training parameters, resulting in poor effects with the same sample size and training duration, and it is easy to fall into a local optimum and no longer optimize.
[0006] According to a first aspect of the present disclosure, there is provided a method for training a user profiling model, including:
[0007] Obtain a training data set; the training data set includes a plurality of unlabeled original samples; each of the unlabeled original samples includes a plurality of features of a user;
[0008] Perform masking processing on the plurality of features in the original samples to obtain masked training samples; wherein, the training samples include some of the features in the original samples;
[0009] Train a preset model according to the training samples and the original samples corresponding to the training samples to obtain a user profiling model; wherein, the user profiling model is used to output a user profiling vector.
[0010] According to a second aspect of the present disclosure, there is provided a method for determining user data, including:
[0011] Input user information into the user profile model to obtain a user profile vector; the user profile model is trained by the method for training the user profile model described in any of the above embodiments.
[0012] Input the user profile vector into a model for processing the user profile vector to obtain data corresponding to the user.
[0013] According to the third aspect of the present disclosure, there is provided an apparatus for training a user profile model, the apparatus including:
[0014] An acquisition unit for acquiring a training data set; the training data set includes a plurality of unlabeled original samples; each of the unlabeled original samples includes a plurality of features of a user.
[0015] A processing unit for performing a masking process on the plurality of features in the original sample to obtain a masked training sample; wherein, the training sample includes some of the features in the original sample.
[0016] A training unit for training a preset model according to the training sample and the original sample corresponding to the training sample to obtain a user profile model; wherein, the user profile model is used to output a user profile vector.
[0017] According to the fourth aspect of the present disclosure, there is provided a user data determination apparatus, including:
[0018] A processing unit for inputting user information into the user profile model to obtain a user profile vector; the user profile model is trained by the method for training the user profile model described in any of the above embodiments.
[0019] A determination unit for inputting the user profile vector into a model for processing the user profile vector to obtain data corresponding to the user.
[0020] According to the fifth aspect of the present disclosure, there is provided an electronic device, including a memory and a processor; wherein, the memory is used to store a computer program; the processor is used to read the computer program stored in the memory and execute the methods described in the first aspect and the second aspect according to the computer program in the memory.
[0021] According to the sixth aspect of the present disclosure, there is provided a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the methods described in the first aspect and the second aspect are implemented.
[0022] According to a seventh aspect of the present disclosure, there is provided a computer program product including a computer program which, when executed by a processor, implements the methods described in the first aspect and the second aspect.
[0023] The method, user data determination method, and device for training a user portrait model provided by the present disclosure include: obtaining a training data set; the training data set includes a plurality of unlabeled original samples; each unlabeled original sample includes a plurality of features of a user; performing a masking process on the plurality of features in the original sample to obtain a masked training sample; wherein, the training sample includes some of the features in the original sample; training a preset model according to the training sample and the original sample corresponding to the training sample to obtain a user portrait model; wherein, the user portrait model is used to output a user portrait vector. In the solution provided by the present disclosure, a method for training a user portrait model is provided, which can integrally train multiple features of different types of training samples, can discover the correlation between different features, and enables the training result to have better accuracy while having generality. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flowchart showing the method for training a user portrait model according to an exemplary embodiment of the present application;
[0025] Figure 2 It is a flowchart showing the method for training a user portrait model according to another exemplary embodiment of the present application;
[0026] Figure 3 It is a flowchart showing the method for determining user data according to an exemplary embodiment of the present application;
[0027] Figure 4 It is a structural diagram of a device for training a user portrait model according to an exemplary embodiment of the present application;
[0028] Figure 5 It is a structural diagram of a device for determining user data according to an exemplary embodiment of the present application;
[0029] Figure 6 It is a structural diagram of an electronic device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0030] With the rapid development of computer and Internet technologies, user profiling technology has emerged. A user profile model refers to a labeled user model abstracted based on information such as user attributes, user preferences, living habits, and user behaviors. In the prior art, in the training method of the user profile model, most of them first perform one-hot encoding on the original features to generate training samples; then the training samples are passed through a single-layer fully connected layer, or multiple layers to compress the dimensions, or directly connected to the target task model for synchronous training.
[0031] This solution requires using labeled user data to train the model. When the target tasks of the model are different, the labels of the user data used are also different. Therefore, when the target tasks are different, the models trained in this way are not universal. For different training objectives, it is necessary to initialize the training from scratch; and the large number of training parameters results in poor effects with the same sample size and training duration, and it is easy to fall into a local optimum and no longer optimize.
[0032] To solve the above problems, the solution provided in this disclosure includes a method for training a user profile model, which can integrally train multiple features of different types of training samples, can discover the correlation between different features, and enables the training result to have universality while also bringing better accuracy.
[0033] Figure 1 It is a schematic flowchart of the method for training a user profile model shown in an exemplary embodiment of this application.
[0034] As Figure 1 shown, the method for training a user profile model provided in this embodiment includes:
[0035] Step 101, obtain a training data set; the training data set includes multiple unlabeled original samples; each unlabeled original sample includes multiple features of a user.
[0036] Among them, the method provided in this disclosure can be executed by an electronic device with computing capabilities, such as a computer or other devices.
[0037] This electronic device can obtain the training data set. The training data set can be stored in the electronic device in advance, and when model training is required, the electronic device can obtain this training data set.
[0038] Among them, the training data set can include multiple unlabeled original samples. For example, it can include N original samples, and each original sample corresponds to a user.
[0039] The original sample may include multiple features of the user, which may include, for example, user attributes, user preferences, living habits, user behaviors, etc.; among them, user attributes may include, for example, user gender, user age, etc.; user behaviors may include, for example, user web browsing behaviors, etc.
[0040] Among them, the original sample may be data in the form of the user's voice data, text data, picture data, etc.
[0041] Specifically, in traditional supervised learning, the learner learns from a large number of labeled training examples to establish a model for predicting the labels of unseen examples. Here, the "label" is the output corresponding to the example. In a classification problem, the label is the category of the example, and in a regression problem, the label is the real-valued output corresponding to the example. Specifically, the original sample in this embodiment is an unlabeled sample.
[0042] Furthermore, in the solution provided by the present disclosure, an original sample without labels is used to train the model, making the model general.
[0043] Step 102: Perform a masking process on multiple features in the original sample to obtain a masked training sample; among them, the training sample includes some features in the original sample.
[0044] Specifically, the features in the original sample can be processed to obtain an incomplete feature sequence, which is used as training data.
[0045] Specifically, performing a masking process on multiple features in the original sample may specifically include directly replacing the features in the original sample with preset feature values, and may also include using the replacement method of the same type of features.
[0046] Specifically, through the masking process on the original sample, a masked training sample is obtained. The features in this masked training sample have changed, and it can be used as training data to train the model, and the corresponding original sample is used as label data to optimize the parameters in the model.
[0047] Step 103: Train a preset model according to the training sample and the original sample corresponding to the training sample to obtain a user portrait model; among them, the user portrait model is used to output a user portrait vector.
[0048] Among them, the user portrait model refers to a labeled user model abstracted according to information such as user attributes, user preferences, living habits, and user behaviors.
[0049] Specifically, the masked training samples can be input into a preset model to obtain the predicted user portrait vector. The predicted user portrait vector can be decoded to obtain the predicted user features. The model parameters can be optimized based on the predicted user features and the multiple features of the user included in the original sample to obtain the user portrait model.
[0050] Among them, the user portrait vector can be a 64-dimensional vector; or a 32-dimensional vector; or a 24-dimensional vector.
[0051] Through multiple iterations, the user portrait vector output by the model can be made more and more accurate, and the user features obtained from the user portrait vector output by the model are getting closer and closer to the features included in the original sample. When the preset degree of closeness is satisfied, the training can be stopped to obtain the user portrait model that meets the requirements.
[0052] Furthermore, after obtaining the user portrait model, the user portrait vector can be input into any model that can process the user portrait vector to obtain data corresponding to the user. For example, the model for processing the user portrait can be a network recommendation model, and the data corresponding to the user can be the recommendation data corresponding to the user. For example, the model for processing the user portrait can be a user classification model, and the data corresponding to the user can be the category corresponding to the user.
[0053] The method for training the user portrait model provided by the present disclosure includes: obtaining a training data set; the training data set includes a plurality of unlabeled original samples; each unlabeled original sample includes multiple features of a user; performing a masking process on the multiple features in the original sample to obtain masked training samples; wherein, the training samples include some of the features in the original sample; training a preset model according to the training samples and the original samples corresponding to the training samples to obtain a user portrait model; wherein, the user portrait model is used to output a user portrait vector. In the solution provided by the present disclosure, a method for training a user portrait model is provided, which can perform integrated training on multiple features of different types of training samples, can discover the correlation between different features, and enables the training result to have better accuracy while having generality.
[0054] Figure 2 It is a schematic flowchart of the method for training the user portrait model shown in another exemplary embodiment of the present application.
[0055] As Figure 2 shown, the method for training the user portrait model provided in this embodiment includes:
[0056] Step 201, obtain a training data set; the training data set includes a plurality of unlabeled original samples; each unlabeled original sample includes multiple features of a user.
[0057] Specifically, the principle and implementation method of step 201 are similar to those of step 101, and will not be elaborated here.
[0058] Step 202: Perform the following processing on each feature in the original sample: Obtain the first feature in the original sample, where the first feature is any feature in the original sample; Determine the masking processing method for the first feature according to a preset probability, where probability values corresponding to each masking processing method are preset, and the sum of the probability values is equal to 1; Perform masking processing on the first feature according to the determined masking processing method to obtain a masked training sample, where the training sample includes some features in the original sample.
[0059] Specifically, the features in the original sample can be processed to obtain an incomplete feature sequence, which is used as training data.
[0060] Among them, the masking processing method can include multiple methods. For example, directly replace the feature in the original sample with a preset feature value; or replace the feature in the original sample with a similar feature, or replace the feature in the original sample with the feature before masking.
[0061] Among them, the preset probability is a probability preset according to the actual situation.
[0062] Specifically, a probability value corresponding to each masking processing method is preset, and the sum of the probability values is equal to 1. For example, the masking processing method includes three methods. Among them, the first method is to directly replace the feature in the original sample with a preset feature value, and its corresponding probability value can be 80%; the second method is to replace the feature in the original sample with a similar feature, and its corresponding probability value can be 10%; the third method is to replace the feature in the original sample with the feature before masking, and its corresponding probability value can be 10%.
[0063] Optionally, when the determined masking processing method is the first method, replace the first feature in the original sample with a masking feature.
[0064] Among them, the masking feature can be preset. For example, it can be set as [A]. For example, if the first feature is "male", then the "male" feature included in the original sample can be replaced with [A].
[0065] Optionally, when the determined masking processing method is the second method, replace the first feature in the original sample with another feature having the same attribute as the first feature.
[0066] Specifically, for example, if the first feature is "male", then a feature having the same attribute as the "male" feature can be "female". Then the "male" feature included in the original sample can be replaced with "female".
[0067] Specifically, by masking the original sample, the masked training sample is obtained. The features in the masked training sample have changed, and the masked training sample includes some features in the original sample. It can be used as training data to train the model, and the corresponding original sample can be used as label data to optimize the parameters in the model.
[0068] Step 203, input the training sample into the preset model to obtain the predicted user profile vector.
[0069] Among them, the masked training sample after the masking process can be used as the data for training the model. The features in this data are incomplete, and the original sample corresponding to this training sample can be used as its label data.
[0070] Among them, the preset model is a pre-set model. For example, the preset model can be a bidirectional Transformer model. This model can process the input training sample and output the predicted user profile vector.
[0071] Optionally, the training sample can be a masked feature sequence.
[0072] Among them, the predicted user profile vector can be a 64-dimensional vector; or a 32-dimensional vector; or a 24-dimensional vector.
[0073] Optionally, a special separator is set between any two features of the training sample.
[0074] Specifically, for example, two adjacent features in the training sample are gender and age; then a special separator can be added between these two features. For example, the special separator can be a semicolon. The specific representation of the special separator in this solution is not limited.
[0075] In an alternative embodiment, if the obtained original sample is text data, the training sample obtained from this text data can be encoded, and then the encoded training sample is input into the preset model.
[0076] Among them, the original sample can include data in the forms of voice data, text data, picture data, etc. Among them, if the original sample is in the form of voice data or picture data, the training samples corresponding to these samples do not need to be encoded; among them, if the original sample is in the form of text data, encoding is required. One-hot encoding can be used to perform dictionary encoding on the text data to obtain the encoded training sample.
[0077] Among them, one-hot encoding, also known as one-hot effective encoding, is a method that uses an N-bit status register to encode N states. Each state has its own independent register bit, and at any given time, only one of them is valid.
[0078] Specifically, in order to distinguish between two adjacent features, a special delimiter can be added to the encoded training samples. For example, the special delimiter can be a semicolon. The specific representation of the special delimiter in this solution is not restricted.
[0079] Step 204: Optimize the parameters in the preset model according to the predicted user portrait vector and the original sample corresponding to the training sample to obtain an optimized preset model. Among them, the optimized preset model that meets the stop training condition is the user portrait model. The user portrait model is used to output the user portrait vector.
[0080] Specifically, the label for training the user portrait model can be the original sample corresponding to the training sample. The predicted user portrait vector can be decoded to obtain the predicted user features. Optimize the parameters in the preset model through the predicted user features and the features included in the original sample to obtain an optimized preset model.
[0081] Furthermore, the features in the original sample are used as label data. By optimizing the preset model, the predicted user features of the user portrait vector output by the model are getting closer and closer to the features in the original sample, and thus the output result of the preset model is getting more and more accurate.
[0082] In practical applications, a loss function can be constructed based on the predicted user features and the features in the original sample, and the parameters in the preset model can be optimized through the loss function.
[0083] Among them, the conditions for stopping training can be set in advance. The conditions for stopping training can be set, for example, that the similarity between the predicted user features and the features in the original sample reaches 90%.
[0084] Specifically, the user portrait model is used to output the user portrait vector, and the user portrait vector is used to represent multiple features of the user.
[0085] Optionally, decode the predicted user portrait vector to obtain the predicted user features;
[0086] Specifically, the predicted user portrait can pass through a preset decoding network to obtain the predicted user features corresponding to the predicted user portrait. The predicted user features include the predicted features of the masked user features.
[0087] Construct a loss function based on the predicted user characteristics and the characteristics included in the original samples corresponding to the training samples, and optimize the parameters in the preset model according to the loss function to obtain an optimized preset model.
[0088] Specifically, a loss function (loss) can be constructed based on the predicted characteristics of the masked user characteristics included in the predicted user characteristics and the true characteristics corresponding to the masked user characteristics included in the original samples corresponding to the training samples, and reverse optimization propagation can be performed on the loss function, thereby optimizing the parameters in the preset model to obtain an optimized preset model.
[0089] Figure 3 It is a schematic flowchart of the user data determination method shown in an exemplary embodiment of the present application.
[0090] As Figure 3 shown, the user data determination method provided in this embodiment includes:
[0091] Step 301, input user information into the user portrait model to obtain a user portrait vector; the user portrait model is trained by the method for training the user portrait model provided in any of the above embodiments.
[0092] Among them, the user information may include multiple characteristics of the user, and these characteristics may include, for example, user attributes, user preferences, living habits, user behaviors, etc.; among them, user attributes, such as, may include user gender, user age, etc.; user behaviors, such as, may include user web browsing behaviors, etc.
[0093] Among them, the user information may be data in the form of user voice data, text data, picture data, etc.
[0094] Among them, the user information may be unlabeled information.
[0095] Among them, each piece of user information corresponds to one user.
[0096] Specifically, the user information can be input into the user portrait model, and the user portrait model can first perform encoding processing on the text data of the user included in the user information (wherein, the user voice data and picture data included in the user information can be not encoded), to obtain encoded user information, and special delimiters can be added between two adjacent characteristics included in the user information. The user portrait model can output the user portrait vector corresponding to the user information. Among them, the user portrait vector can represent the characteristics of the user.
[0097] Among them, the user portrait vector can be a 64-dimensional vector; or a 32-dimensional vector; or a 24-dimensional vector.
[0098] Step 302: Input the user profile vector into a model for processing the user profile vector to obtain data corresponding to the user.
[0099] Specifically, the user profile vector can be input into any model for processing the user profile vector to obtain data corresponding to the user. For example, the model for processing the user profile can be a network recommendation model; then the data corresponding to the user can be network recommendation data corresponding to the user. For example, the model for processing the user profile can be a user classification model, and the data corresponding to the user can be the category corresponding to the user.
[0100] Figure 4 This is the structural diagram of the device for training the user profile model shown in an exemplary embodiment of the present application.
[0101] As Figure 4 shown, the device 400 for training the user profile model provided by the present application includes:
[0102] An acquisition unit 410, configured to acquire a training data set; the training data set includes a plurality of unlabeled original samples; each unlabeled original sample includes a plurality of features of a user;
[0103] A processing unit 420, configured to perform a masking process on the plurality of features in the original sample to obtain a masked training sample; wherein, the training sample includes some of the features in the original sample;
[0104] A training unit 430, configured to train a preset model according to the training sample and the original sample corresponding to the training sample to obtain a user profile model; wherein, the user profile model is used to output a user profile vector.
[0105] The processing unit 420 is specifically configured to perform the following processing on each feature in the original sample:
[0106] Acquire a first feature in the original sample; wherein, the first feature is any feature in the original sample;
[0107] Determine a masking processing method for the first feature according to a preset probability; wherein, probability values corresponding to each masking processing method are preset, and the sum of the probability values is equal to 1;
[0108] Perform a masking process on the first feature according to the determined masking processing method.
[0109] When the determined masking processing method is the first method, the processing unit 420 is specifically configured to replace the first feature in the original sample with a masking feature.
[0110] When the determined masking processing method is the second method, the processing unit 420 is specifically configured to replace the first feature in the original sample with other features having the same feature attributes as the first feature.
[0111] The training unit 430 is specifically configured to input the training sample into a preset model to obtain a predicted user portrait vector;
[0112] Optimize the parameters in the preset model according to the predicted user portrait vector and the original sample corresponding to the training sample to obtain an optimized preset model;
[0113] Among them, the optimized preset model that meets the training stop condition is the user portrait model.
[0114] If the original sample is text data, the training unit 430 is specifically configured to encode the training sample to obtain an encoded training sample;
[0115] Input the encoded training sample into the preset model.
[0116] The training unit 430 is further configured to set a special separator between any two features of the training sample.
[0117] The training unit 430 is specifically configured to perform decoding processing on the predicted user portrait vector to obtain predicted user features;
[0118] Construct a loss function according to the predicted user features and the features included in the original sample corresponding to the training sample, and optimize the parameters in the preset model according to the loss function to obtain an optimized preset model.
[0119] Figure 5 This is the structural diagram of the user data determination device shown in an exemplary embodiment of the present application.
[0120] As Figure 5 shown, the device 500 for training a user portrait model provided by the present application includes:
[0121] The processing unit 510 is configured to input user information into the user portrait model to obtain a user portrait vector; the user portrait model is trained by the method for training a user portrait model provided in any of the above embodiments;
[0122] The determination unit 520 is configured to input the user portrait vector into a model for processing the user portrait vector to obtain data corresponding to the user.
[0123] Figure 6 This is the structural diagram of the electronic device shown in an exemplary embodiment of the present application.
[0124] As Figure 6 shown, the electronic device provided in this embodiment includes:
[0125] Memory 601;
[0126] Processor 602; and
[0127] A computer program;
[0128] wherein, the computer program is stored in the memory 601 and is configured to be executed by the processor 602 to implement any one of the methods for training a user profile model or the method for determining user data as described above.
[0129] This embodiment also provides a computer-readable storage medium, on which a computer program is stored,
[0130] and the computer program is executed by a processor to implement any one of the methods for training a user profile model or the method for determining user data as described above.
[0131] This embodiment also provides a computer program product, including a computer program, which when executed by a processor, implements any one of the methods for training a user profile model or the method for determining user data as described above.
[0132] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: various media such as ROM, RAM, magnetic disk, or optical disk that can store program codes.
[0133] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for training a user portrait model, characterized in that, Including: Obtain a training data set; the training data set includes a plurality of unlabeled original samples; each of the unlabeled original samples includes a plurality of features of a user; Perform a masking process on the plurality of features in the original sample to obtain a masked training sample; wherein, the training sample includes some of the features in the original sample; Train a preset model according to the training sample and the original sample corresponding to the training sample to obtain a user portrait model; wherein, the user portrait model is used to output a user portrait vector; Wherein, the performing a masking process on the plurality of features in the original sample to obtain a masked training sample includes: performing the following process on each feature in the original sample: obtain a first feature in the original sample; wherein, the first feature is any feature in the original sample; determine a masking process method for the first feature according to a preset probability; wherein, probability values corresponding to each masking process method are preset, and the sum of the probability values is equal to 1; perform a masking process on the first feature according to the determined masking process method; Wherein, when the determined masking process method is the first method, the performing a masking process on the first feature according to the determined masking process method includes: replacing the first feature in the original sample with a masking feature; Wherein, when the determined masking process method is the second method, the performing a masking process on the first feature according to the determined masking process method includes: replacing the first feature in the original sample with another feature having the same attribute as the first feature.
2. The method according to claim 1, wherein The training the preset model according to the training sample and the original sample corresponding to the training sample to obtain a user portrait model includes: Input the training sample into the preset model to obtain a predicted user portrait vector; Optimize the parameters in the preset model according to the predicted user portrait vector and the original sample corresponding to the training sample to obtain an optimized preset model; Wherein, the optimized preset model that meets the stop training condition is the user portrait model.
3. The method according to claim 2, wherein If the original sample is text data, then the inputting the training sample into the preset model includes: Encode the training sample to obtain an encoded training sample; Input the encoded training sample into the preset model.
4. The method according to claim 1, wherein A special separator is set between any two features of the training sample.
5. The method according to claim 2, characterized in that, The optimizing the parameters in the preset model according to the predicted user portrait vector and the original sample corresponding to the training sample to obtain an optimized preset model includes: Perform a decoding process on the predicted user portrait vector to obtain predicted user features; Construct a loss function according to the predicted user features and the features included in the original sample corresponding to the training sample, and optimize the parameters in the preset model according to the loss function to obtain an optimized preset model.
6. A method for determining user data, characterized in that, Including: Input user information into the user portrait model to obtain a user portrait vector; the user portrait model is trained by the method according to any one of claims 1-5; Input the user portrait vector into a model for processing the user portrait vector to obtain data corresponding to the user.
7. An apparatus for training a user profile model, characterized in that, The apparatus includes: An acquisition unit for acquiring a training data set; the training data set includes a plurality of unlabeled original samples; each of the unlabeled original samples includes a plurality of features of a user; A processing unit for performing masking processing on the plurality of features in the original sample to obtain a masked training sample; wherein, the training sample includes some of the features in the original sample; wherein, performing masking processing on the plurality of features in the original sample to obtain a masked training sample includes: performing the following processing on each feature in the original sample: obtaining a first feature in the original sample; wherein, the first feature is any feature in the original sample; determining a masking processing method for the first feature according to a preset probability; wherein, probability values corresponding to each masking processing method are preset, and the sum of the probability values is equal to 1; performing masking processing on the first feature according to the determined masking processing method; wherein, when the determined masking processing method is the first method, performing masking processing on the first feature according to the determined masking processing method includes: replacing the first feature in the original sample with a masking feature; wherein, when the determined masking processing method is the second method, performing masking processing on the first feature according to the determined masking processing method includes: replacing the first feature in the original sample with another feature having the same attribute as the first feature; A training unit for training a preset model according to the training sample and the original sample corresponding to the training sample to obtain a user portrait model; wherein, the user portrait model is used to output a user portrait vector.
8. A user data determination device, characterized in that It includes: A processing unit for inputting user information into the user portrait model to obtain a user portrait vector; The user portrait model is trained by the method according to any one of claims 1-5; A determination unit for inputting the user portrait vector into a model for processing the user portrait vector to obtain data corresponding to the user.
9. An electronic device, characterized in that, It includes a memory and a processor; wherein, The memory is used to store a computer program; The processor is used to read the computer program stored in the memory and execute the method according to any one of claims 1-5 or 6 according to the computer program in the memory.
10. A computer-readable storage medium, characterized in that, Computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the method according to any one of claims 1-8 or 9 is implemented.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1-5 or 6 is implemented.
Citation Information
Patent Citations
Portrait data processing method and portrait model training method
CN111191092A
Image processing model training method, and image processing method and device
CN113808003A