Recommendation method, training method, device and electronic device for feature generation network
The feature generation network for generating new users is adjusted through the pre-trained feature generation network, which solves the problem of insufficient learning of feature vectors for new users and improves the accuracy and efficiency of recommendations.
Patent Information
- Application Number
- CN202010930231.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-07
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2040-09-07
AI Technical Summary
When new users are cold-started, due to sparse data, it is difficult to effectively learn and update new user feature vectors, which affects the accuracy of recommendations.
Through pre-trained feature generation network, the account association data of the new account is used to adjust the initialization parameters, and the target feature generation network is generated, which is used to process the attribute features of the target account, and obtain the target feature vector, thereby recommending the object.
It improves the efficiency and accuracy of new user recommendations, reduces the training data requirement for new user feature generation networks, and enhances the adaptability of the recommendation system.
Smart Images

Figure CN114154050B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet technology, and in particular to a recommendation method, device, electronic device and storage medium, and a training method, device, electronic device and storage medium for a feature generation network. Background Art
[0002] With the development of information technology and Internet technology, people have entered the era of information overload from the era of information scarcity. In this era, it is increasingly difficult for people to find information of interest from a large amount of information. The emergence of recommendation systems solves this problem. When recommending objects to users, the recommendation system can calculate the similarity between the feature vector of the user side and the feature vector of the candidate object, and recommend the candidate object with higher similarity.
[0003] In the related art, the feature vector of the user side can be obtained by randomly initializing the representation, transforming the feature vector of the existing old account or object, etc. However, the above method of generating the feature vector of the user side often requires a large amount of user behavior data to train the recommendation model. For the cold start process of new users, since the system has too little accumulated data and the generated user behavior data is extremely sparse, the system cannot effectively learn and update the feature vector of the new user, which affects the accuracy of the recommendation for the new user. Summary of the invention
[0004] The present disclosure provides a recommendation method, device, electronic device and storage medium, as well as a training method, device, electronic device and storage medium for a feature generation network, to at least solve the problem in the related art that the system cannot effectively learn and update the feature vector of a new user, thereby affecting the accuracy of recommendations for new users. The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a recommendation method is provided, including:
[0006] The account-associated data of the target account is obtained, and the account-associated data includes the attribute characteristics and behavior data of the target account; the account-associated data of the target account is used to adjust the initialization parameters of the pre-trained feature generation network to generate a target feature generation network corresponding to the target account, and the pre-trained feature generation network is pre-trained based on the account-associated data of multiple new accounts that have been obtained; the attribute characteristics of the target account are input into the target feature generation network to obtain a target feature vector; and an object is recommended to the target account according to the target feature vector.
[0007] In one embodiment, a method for generating a pre-trained feature generation network includes: obtaining account association data of multiple new accounts generated within a preset time, the account association data of each new account including attribute characteristics and behavior data of each new account; generating a training set corresponding to each new account, the training set including multiple training samples, each training sample is obtained by marking the account association data of each new account according to the behavior data of each new account; training the feature generation network according to the training samples in the training set corresponding to each new account until the convergence condition is reached, thereby obtaining the pre-trained feature generation network.
[0008] In one embodiment, a feature generation network is trained according to training samples in a training set corresponding to each new account until a convergence condition is reached to obtain a pre-trained feature generation network, including: obtaining a first training set and a second training set corresponding to each new account from the training set corresponding to each new account; using the first training set of each new account to train the feature generation network, and updating basic parameters of the feature generation network according to the obtained first loss function value to obtain an intermediate feature generation network; using the second training set of each new account to train the intermediate feature generation network, obtaining the gradient of the basic parameters according to the obtained second loss function value, and updating the basic parameters according to the gradient of the basic parameters until a convergence condition is reached to obtain a pre-trained feature generation network.
[0009] In one of the embodiments, the account-associated data of the target account is used to adjust the parameters of the pre-trained feature generation network to generate a target feature generation network corresponding to the target account, including: generating a sample set according to the account-associated data of the target account, the sample set comprising multiple samples, each sample being obtained by labeling the account-associated data of the target account according to the target account behavior data; obtaining a first sample set from the sample set, using the first sample set to train the pre-trained feature generation network, and updating the initialization parameters of the pre-trained feature generation network according to the obtained third loss function value; obtaining a second sample set from the sample set, using the second sample set to train the updated pre-trained feature generation network, obtaining the gradient of the initialization parameters according to the obtained fourth loss function value, and updating the initialization parameters according to the gradient of the initialization parameters to obtain the target feature generation network.
[0010] In one embodiment, the feature generation network includes at least one fully connected layer; inputting the attribute features of the target account into the target feature generation network to obtain a target feature vector, including: inputting the attribute features of the target account into the target feature generation network, and performing fully connected processing on the attribute features through at least one fully connected layer in the target feature generation network to obtain the target feature vector.
[0011] In one embodiment, recommending an object to a target account based on a target feature vector includes: obtaining an object feature vector of a candidate object; obtaining the similarity between the target feature vector of the target account and the object feature vector of the candidate object; sorting the candidate objects based on the similarity to obtain sorted candidate objects; and recommending the sorted candidate objects to the target account.
[0012] According to a second aspect of an embodiment of the present disclosure, a method for training a feature generation network is provided, comprising:
[0013] The account-associated data of the target account is obtained, and the account-associated data of the target account includes the attribute characteristics and behavior data of the target account; a sample set is generated according to the account-associated data of the target account, and the sample set includes multiple samples, and each sample is obtained by marking the account-associated data of the target account according to the behavior data of the target account; the pre-trained feature generation network is adjusted using the sample set, and the initialization parameters in the pre-trained feature generation network are updated to obtain the target feature generation network, and the pre-trained feature generation network is pre-trained according to the account-associated data of multiple new accounts that have been obtained.
[0014] In one embodiment, a method for generating a pre-trained feature generation network includes: obtaining account association data of multiple new accounts generated within a preset time, the account association data of each new account including attribute characteristics and behavior data of each new account; generating a training set corresponding to each new account, the training set including multiple training samples, each training sample being obtained by marking the account association data of each new account according to the behavior data of each new account; training the feature generation network according to the training samples of the training set corresponding to each new account until a convergence condition is reached to obtain a pre-trained feature generation network.
[0015] In one embodiment, a feature generation network is trained according to training samples in a training set corresponding to each new account until a convergence condition is reached to obtain a pre-trained feature generation network, including: obtaining a first training set and a second training set corresponding to each new account from the training set corresponding to each new account; using the first training set of each new account to train the feature generation network, and updating basic parameters of the feature generation network according to the obtained first loss function value to obtain an intermediate feature generation network; using the second training set of each new account to train the intermediate feature generation network, obtaining the gradient of the basic parameters according to the obtained second loss function value, and updating the basic parameters according to the gradient of the basic parameters until a convergence condition is reached to obtain a pre-trained feature generation network.
[0016] In one of the embodiments, a pre-trained feature generation network is adjusted using a sample set, and initialization parameters in the pre-trained feature generation network are updated to obtain a target feature generation network, including: obtaining a first sample set from the sample set, using the first sample set to train the pre-trained feature generation network, and updating the initialization parameters of the pre-trained feature generation network according to the obtained third loss function value; obtaining a second sample set from the sample set, using the second sample set to train the updated pre-trained feature generation network, obtaining the gradient of the initialization parameter according to the obtained fourth loss function value, and updating the initialization parameter according to the gradient of the initialization parameter to obtain the target feature generation network.
[0017] According to a third aspect of an embodiment of the present disclosure, a recommendation device is provided, including:
[0018] The first acquisition module is configured to execute acquisition of the account-related data of the target account, wherein the account-related data includes the attribute characteristics and behavior data of the target account; the first training module is configured to execute adjustment of the initialization parameters of the pre-trained feature generation network using the account-related data of the target account to generate a target feature generation network corresponding to the target account, wherein the pre-trained feature generation network is pre-trained based on the account-related data of multiple new accounts that have been acquired; the feature vector generation module is configured to execute input of the attribute characteristics of the target account into the target feature generation network to obtain a target feature vector; the recommendation module is configured to execute recommendation of objects to the target account according to the target feature vector.
[0019] In one embodiment, the device also includes: a second acquisition module, configured to execute acquisition of account-associated data of multiple new accounts generated within a preset time, the account-associated data of each new account including attribute characteristics and behavior data of each new account; a training set generation module, configured to execute generation of a training set corresponding to each new account, the training set including multiple training samples, each training sample being obtained by marking the account-associated data of each new account according to the behavior data of each new account; a second training module, configured to execute training of a feature generation network according to the training samples in the training set corresponding to each new account until a convergence condition is reached to obtain a pre-trained feature generation network.
[0020] In one embodiment, the second training module includes: a first acquisition unit, configured to acquire the first training set and the second training set corresponding to each new account from the training set corresponding to each new account; the first training unit, configured to train the feature generation network using the first training set of each new account, and update the basic parameters of the feature generation network according to the obtained first loss function value to obtain an intermediate feature generation network; the second training unit, configured to train the intermediate feature generation network using the second training set of each new account, acquire the gradient of the basic parameters according to the obtained second loss function value, and update the basic parameters according to the gradient of the basic parameters until the convergence condition is reached to obtain the pre-trained feature generation network.
[0021] In one embodiment, the first training module includes: a sample set generation unit, configured to generate a sample set based on the account-associated data of the target account, the sample set includes multiple samples, and each sample is obtained by marking the account-associated data of the target account according to the target account behavior data; a third training unit, configured to obtain a first sample set from the sample set, use the first sample set to train a pre-trained feature generation network, and update the initialization parameters of the pre-trained feature generation network according to the obtained third loss function value; a fourth training unit, configured to obtain a second sample set from the sample set, use the second sample set to train the updated pre-trained feature generation network, obtain the gradient of the initialization parameter according to the obtained fourth loss function value, update the initialization parameter according to the gradient of the initialization parameter, and obtain the target feature generation network.
[0022] In one embodiment, the feature generation network includes at least one fully connected layer; the feature vector generation module is configured to input the attribute features of the target account into the target feature generation network, perform fully connected processing on the attribute features through at least one fully connected layer in the target feature generation network, and obtain a target feature vector.
[0023] In one embodiment, the recommendation module includes: a second acquisition unit, configured to execute acquisition of an object feature vector of a candidate object; a similarity determination unit, configured to execute acquisition of the similarity between a target feature vector of a target account and an object feature vector of the candidate object; a sorting unit, configured to execute sorting of the candidate objects according to the similarity to obtain sorted candidate objects; and a recommendation unit, configured to execute recommendation of the sorted candidate objects to the target account.
[0024] According to a fourth aspect of an embodiment of the present disclosure, a training device for a feature generation network is provided, comprising:
[0025] The first acquisition module is configured to execute acquisition of the account-associated data of the target account, wherein the account-associated data of the target account includes the attribute characteristics and behavior data of the target account; the sample set generation module is configured to execute generation of a sample set based on the account-associated data of the target account, wherein the sample set includes multiple samples, and each sample is obtained by marking the account-associated data of the target account according to the behavior data of the target account; the first training module is configured to execute adjustment of the pre-trained feature generation network using the sample set, update the initialization parameters in the pre-trained feature generation network, and obtain the target feature generation network, wherein the pre-trained feature generation network is pre-trained based on the account-associated data of multiple new accounts that have been acquired.
[0026] In one embodiment, the device also includes: a second acquisition module, configured to execute acquisition of account-associated data of multiple new accounts generated within a preset time, the account-associated data of each new account including attribute characteristics and behavior data of each new account; a training set generation module, configured to execute generation of a training set corresponding to each new account, the training set including multiple training samples, each training sample being obtained by marking the account-associated data of each new account according to the behavior data of each new account; a second training module, configured to execute training of a feature generation network according to the training samples of the training set corresponding to each new account until a convergence condition is reached to obtain a pre-trained feature generation network.
[0027] In one embodiment, the second training module includes: an acquisition unit, configured to execute acquisition of a first training set and a second training set corresponding to each new account from the training set corresponding to each new account; a first training unit, configured to execute training of a feature generation network using the first training set of each new account, and update the basic parameters of the feature generation network according to the obtained first loss function value to obtain an intermediate feature generation network; a second training unit, configured to execute training of the intermediate feature generation network using the second training set of each new account, and obtain the gradient of the basic parameters according to the obtained second loss function value, and update the basic parameters according to the gradient of the basic parameters until the convergence condition is reached to obtain a pre-trained feature generation network.
[0028] In one embodiment, the first training module includes: a third training unit, configured to execute acquiring a first sample set from a sample set, using the first sample set to train a pre-trained feature generation network, and updating the initialization parameters of the pre-trained feature generation network according to the obtained third loss function value; a fourth training unit, configured to execute acquiring a second sample set from the sample set, using the second sample set to train the updated pre-trained feature generation network, obtaining the gradient of the initialization parameter according to the obtained fourth loss function value, updating the initialization parameter according to the gradient of the initialization parameter, and obtaining a target feature generation network.
[0029] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0030] a processor; a memory for storing instructions executable by the processor;
[0031] The processor is configured to execute instructions to implement the recommendation method described in any one of the embodiments of the first aspect.
[0032] According to a sixth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0033] a processor; a memory for storing instructions executable by the processor;
[0034] The processor is configured to execute instructions to implement the training method of the feature generation network described in any one of the embodiments of the second aspect.
[0035] According to a seventh aspect of the embodiments of the present disclosure, a storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the recommendation method as described in any one of the embodiments of the first aspect.
[0036] According to an eighth aspect of the embodiments of the present disclosure, a storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the training method of the feature generation network described in any one of the embodiments of the second aspect.
[0037] According to a ninth aspect of an embodiment of the present disclosure, a computer program product is provided, the program product comprising a computer program, the computer program being stored in a readable storage medium, at least one processor of a device reading and executing the computer program from the readable storage medium, so that the device executes the recommendation method described in any one of the embodiments of the first aspect.
[0038] According to a tenth aspect of the embodiments of the present disclosure, a computer program product is provided, the program product comprising a computer program, the computer program being stored in a readable storage medium, at least one processor of a device reading and executing the computer program from the readable storage medium, so that the device executes the training method of the feature generation network described in any one of the embodiments of the second aspect.
[0039] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0040] By pre-deploying a pre-trained feature generation network trained based on the account-associated data of multiple new accounts, when it is necessary to recommend an object to a target account, the pre-trained feature generation network is adjusted based on the account-associated data of the target account to obtain a target feature generation network corresponding to the target account. The account-associated data of the target account is processed using the target feature generation network to obtain a target feature vector. Then, objects are recommended to the target account based on the target feature vector. According to the technical solution disclosed in the present invention, since the pre-trained feature generation network has learned the account-related data of a certain amount of new accounts of certain categories, for the target account to which an object needs to be recommended, only a small amount of sample data is needed to quickly adjust the pre-trained feature generation network to obtain a target feature generation network suitable for the target account, and then the target feature generation network is used to process the attribute features to obtain a more accurate target feature vector of the target account, thereby improving the efficiency and accuracy of the recommendation.
[0041] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0043] Figure 1 The figure is a diagram showing an application environment of a recommendation method according to an exemplary embodiment.
[0044] Figure 2 The figure is a flowchart of a recommendation method according to an exemplary embodiment.
[0045] Figure 3 The present invention is a flowchart showing steps of generating a pre-trained feature generation network according to an exemplary embodiment.
[0046] Figure 4 The present invention is a flowchart showing steps of generating a pre-trained feature generation network according to an exemplary embodiment.
[0047] Figure 5 It is a schematic diagram showing a method of training a feature generation network according to an exemplary embodiment.
[0048] Figure 6 The present invention is a flowchart showing steps of generating a target feature generation network according to an exemplary embodiment.
[0049] Figure 7 The present invention is a flowchart showing the steps of recommending an object to a target account according to an exemplary embodiment.
[0050] Figure 8 The figure is a flowchart of a recommendation method according to an exemplary embodiment.
[0051] Fig. 9 The present invention is a flowchart of a method for training a feature generation network according to an exemplary embodiment.
[0052] Fig.10 The present invention is a flowchart of a method for training a feature generation network according to an exemplary embodiment.
[0053] Fig.11 It is a block diagram of a recommendation device according to an exemplary embodiment.
[0054] Fig.12 It is a block diagram of a training device for a feature generation network according to an exemplary embodiment.
[0055] Fig.13 The figure is a diagram showing the internal structure of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0056] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0057] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0058] The recommended method provided by the present disclosure can be applied to Figure 1In the application environment shown in FIG. 1 , the terminal 110 interacts with the server 120 through a network. The terminal 110 is deployed with a client corresponding to the target account. The terminal 110 receives a recommendation request, wherein the recommendation request may be triggered by a user through the terminal 110 or by the terminal 110 itself. In response to the recommendation request, the server 120 obtains the account association data of the target account, wherein the account association data includes the attribute characteristics and behavior data of the target account. The server 120 uses the account association data of the target account to adjust the initialization parameters of the pre-trained feature generation network to generate a target feature generation network corresponding to the target account. The pre-trained feature generation network may be obtained by the server 120 in advance based on the account association data of multiple new accounts that have been obtained. The server 120 inputs the attribute characteristics of the target account into the target feature generation network to obtain a target feature vector. Then, the object is recommended to the target account according to the target feature vector. The terminal 110 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server 120 may be implemented by an independent server or a server cluster consisting of multiple servers.
[0059] Figure 2 is a flowchart of a recommendation method according to an exemplary embodiment. Figure 2 As shown, the recommended method is used in the server 120 and includes the following steps.
[0060] In step S210, the account-related data of the target account is obtained, and the account-related data includes attribute characteristics and behavior data of the target account.
[0061] Among them, the target account refers to the account of the object to be recommended. Account-related data refers to data related to the target account, including but not limited to the attribute characteristics and behavior data of the target account. Attribute characteristics refer to characteristics that describe the relevant characteristics of the target account, such as the age, gender, geographic location, etc. of the target account. Behavioral data is an observation report about the behavior of the body and the environment when the behavior occurs, such as the browsing log of the target account, the rating of the object, etc. The object can be a short video, commodity, news, article, music and other resources. Specifically, when the client detects a recommendation request for the target account, it sends a recommendation request to the server so that the server responds to the recommendation request and obtains the account-related data of the target account. Among them, the recommendation request for the target account can be actively triggered by the user according to demand, or it can be triggered by the client itself.
[0062] In step S220, the account association data of the target account is used to adjust the initialization parameters of the pre-trained feature generation network to generate a target feature generation network corresponding to the target account. The pre-trained feature generation network is pre-trained based on the account association data of multiple new accounts that have been acquired.
[0063] In step S230, the attribute features of the target account are input into the target feature generation network to obtain a target feature vector.
[0064] The feature generation network can be any deep learning network that can be used to generate feature vectors (Embedding), for example, Word2vec (word to vector, a related model for generating word vectors), or a deep learning network designed according to actual conditions. A new account refers to an account that is registered for the first time or has been registered for a preset time period. The account association data of multiple new accounts can be obtained from the acquired logs.
[0065] Specifically, the pre-trained feature generation network can be trained by the server using the account association data of multiple new accounts in an online or offline manner. The account association data of the new account is not limited to the attribute features and behavior data of the new account. After the server responds to the recommendation request for the target account and obtains the account association data of the target account, the pre-trained feature generation network is adjusted using the account association data of the target account to obtain a target feature generation network suitable for the target account. The target feature generation network suitable for the target account is used to process the attribute features of the target account to obtain a target feature vector.
[0066] In step S240, an object is recommended to the target account based on the target feature vector.
[0067] Specifically, after obtaining the target feature vector corresponding to the target account, the pre-deployed recommendation model is used to recommend an object to the target account according to the target feature vector of the target feature. The recommendation model is not limited to the dual-tower model.
[0068] In the above recommendation method, since the pre-trained feature generation network has learned the account-related data of a certain amount of new accounts, for the target account that needs to be recommended, only a small number of samples are needed to quickly adjust the pre-trained feature generation network to obtain a target feature generation network suitable for the target account, and then use the target feature generation network to process the attribute features of the target account to obtain a more accurate target feature vector of the target account, thereby improving the efficiency and accuracy of the recommendation.
[0069] In an exemplary embodiment, a method for generating a pre-trained feature generation network is described. Figure 3 As shown, this can be achieved through the following steps:
[0070] In step S310, account association data of multiple new accounts generated within a preset time is obtained, and the account association data of each new account includes attribute characteristics and behavior data of each new account.
[0071] In this embodiment, the pre-trained feature generation network can be generated periodically by the server in an offline state. The period depends on the specific situation and can be any time such as 12 hours or a day. Specifically, for a new account, a label corresponding to the new account is pre-configured. After the pre-training instruction of the feature generation network is triggered, the server obtains the logs within the generated period. The new account and the account-related data of the new account are queried from the log according to the label corresponding to the new account.
[0072] In step S320, a training set corresponding to each new account is generated, the training set includes multiple training samples, and each training sample is obtained by marking the account-related data of each new account according to the behavior data of each new account.
[0073] In step S330, the feature generation network is trained according to the training samples in the training set corresponding to each new account until the convergence condition is reached, thereby obtaining a pre-trained feature generation network.
[0074] Specifically, the behavior data of each new account may include multiple categories, such as clicked videos / unclicked videos. The server may label the account-related data of each new account acquired based on the behavior data of each new account to obtain multiple training samples. The feature generation network is trained using multiple training samples corresponding to each new account until a convergence condition is reached to obtain a pre-trained feature generation network. The convergence condition may be pre-configured, for example, the loss function value is minimized.
[0075] In this embodiment, by periodically training and updating the feature generation network, the pre-trained feature generation network can continuously learn new knowledge, so that the initialization parameters of the pre-trained feature generation network can be maintained at a better position.
[0076] In an exemplary embodiment, if Figure 4 As shown, in step S330, the feature generation network is trained according to the training samples in the training set corresponding to each new account until the convergence condition is reached to obtain a pre-trained feature generation network, which can be specifically achieved by the following steps:
[0077] In step S331, a first training set and a second training set corresponding to each new account are obtained from the training set corresponding to each new account.
[0078] In step S332, the feature generation network is trained using the first training set of each new account, and the basic parameters of the feature generation network are updated according to the obtained first loss function value to obtain an intermediate feature generation network.
[0079] In step S333, the intermediate feature generation network is trained using the second training set of each new account, the gradient of the basic parameter is obtained according to the obtained second loss function value, and the basic parameter is updated according to the gradient of the basic parameter until the convergence condition is reached to obtain the pre-trained feature generation network.
[0080] Among them, the basic parameters refer to the parameters of the feature generation network that has not been trained. Specifically, if the target account is a new account, during the cold start process of the target account, due to the small amount of behavioral data generated by the target account, it is difficult to obtain a feature generation network with high robustness using traditional model training methods. Therefore, in this embodiment, a meta-learning method is used to learn the account behavior data of multiple new accounts obtained to obtain a better initialization parameter (that is, the optimal position of the parameter in the solution space) to generate a pre-trained feature generation network. Meta-learning, also known as learning to learn, aims to train models on various learning tasks so that the pre-trained model can solve new learning tasks based on a small number of training samples.
[0081] In this embodiment, meta-learning can be explicitly trained using MAML (Model-Agnostic Meta-Learning). Explicit training means that there is an explicit expression to update the parameters of the model. The training process of MAML is based on tasks. In this embodiment, each new account corresponds to a task. For each training task of a new account, the feature generation network is updated twice based on the double gradient. Figure 5 The example shows a schematic diagram of the process of pre-training the feature generation network using MAML. Figure 5 As shown in the figure, after obtaining the account association data of multiple new accounts, the attribute features of each new account are represented and spliced, and the attribute features after the feature representation and feature splicing are labeled according to the behavior data to generate a training set corresponding to each new account. The first training set and the second training set are obtained from the training set corresponding to each new account by random sampling or division. Since MAML is divided into two loops: inner loop and outer loop. The first training set can be used for inner loop training (corresponding to Figure 5 The second training set can be used for outer loop testing (corresponding to Figure 5 The query set data in , query set).
[0082] Specifically, the inner loop and the outer loop share parameters in the feature generation network, and the learning rates of the gradient updates of the two are represented by hyperparameters α and β, respectively. Hyperparameters α and β can be preconfigured. After obtaining the first training set and the second training set of a new account, the server inputs the first training set into the feature generation network. Through the first loss function L S Train the feature generation network to obtain the first loss function value. Then use the obtained first loss function value to update the basic parameters of the feature generation network until the convergence condition is reached, and obtain the updated basic parameters (corresponding to Figure 5 The updated basic parameters are used to set the feature generation network to obtain an intermediate feature generation network. The second training set is input into the intermediate feature generation network. The second loss function L Q The intermediate feature generation network is trained to obtain a second loss function value. The obtained second loss function value is used to calculate the gradient of the basic parameters, and the basic parameters are gradient updated according to the gradient of the basic parameters until the convergence condition is reached. The SGD (Stochastic Gradient Descent) method can be used to update the gradient of the basic parameters. Based on the feature generation network obtained by the above training task, the above internal and external loop training process is repeated until all training tasks for multiple new accounts are completed to obtain a pre-trained feature production network. In this embodiment, the convergence condition may refer to the loss function value reaching the minimum value.
[0083] In this embodiment, since MAML learns the rules of initializing parameters θ, the initialization parameters θ are the optimal parameter solutions θ for each task in the parameter space. 1 ,θ 2 ,...θ n Highly sensitive, therefore, for the training task of the target account, only a small amount of sample data is needed to fine-tune the pre-trained feature generation network, so that it can quickly reach the optimal point along the gradient direction in one or several steps of gradient descent, and obtain a target feature generation network with better performance.
[0084] In an exemplary embodiment, if Figure 6 As shown, in step S220, the account association data of the target account is used to adjust the parameters of the pre-trained feature generation network to generate a target feature generation network corresponding to the target account, which can be specifically achieved by the following steps:
[0085] In step S221, a sample set is generated according to the account-associated data of the target account, the sample set includes a plurality of samples, and each sample is obtained by marking the account-associated data of the target account according to the target account behavior data.
[0086] In step S222, a first sample set is obtained from the sample set, a pre-trained feature generation network is trained using the first sample set, and initialization parameters of the pre-trained feature generation network are updated according to the obtained third loss function value.
[0087] In step S223, a second sample set is obtained from the sample set, and the updated pre-trained feature generation network is trained using the second sample set. The gradient of the initialization parameter is obtained according to the obtained fourth loss function value, and the initialization parameter is updated according to the gradient of the initialization parameter to obtain the target feature generation network.
[0088] In this embodiment, after obtaining a pre-trained feature generation network based on the meta-learning method, for the training task where the target account is a new account, you can refer to Figure 5 The flowchart shown adjusts the pre-trained feature generation network.
[0089] Specifically, the account-related data of the target account includes the characteristics of the target account and a small amount of behavioral data that has been generated. After obtaining the account-related data of the target account, the attribute characteristics of the target account are represented and spliced, and the attribute characteristics after the feature representation and feature splicing are labeled according to the behavioral data to generate a sample set corresponding to the target account. The first sample set and the second sample set can be obtained from the sample set by random sampling or division. The first sample set can be used for inner loop training (corresponding to Figure 5 The second sample set can be used for outer loop testing (corresponding to Figure 5 The first sample set is input into the pre-trained feature generation network. The pre-trained feature generation network is trained by the third loss function to obtain the third loss function value. The initialization parameters of the pre-trained feature generation network are updated by the obtained third loss function value until the convergence condition is reached. The second sample set is input into the updated pre-trained feature generation network. The updated pre-trained feature generation network is trained by the fourth loss function to obtain the fourth loss function value. The gradient of the initialization parameter is obtained by using the obtained fourth loss function value, and the gradient of the initialization parameter is updated according to the gradient of the initialization parameter until the convergence condition is reached to obtain the target feature generation network. In this embodiment, the convergence condition may refer to the loss function value reaching the minimum value.
[0090] In this embodiment, the feature generation network is pre-trained by adopting a meta-learning method to give the feature generation network prior knowledge. For training tasks where the target account is a new account, after obtaining the attribute characteristics of the target account and a small amount of sample data, the pre-trained feature generation network can be fine-tuned through real-time updating to obtain a target feature generation network suitable for the target account, thereby improving the generation accuracy and efficiency of the target feature vector of the target account, thereby improving the accuracy and efficiency of recommendations.
[0091] In an exemplary embodiment, the feature generation network includes at least one fully connected layer; in step S230, the attribute features of the target account are input into the target feature generation network to obtain a target feature vector, including: inputting the attribute features of the target account into the target feature generation network, and performing fully connected processing on the attribute features through at least one fully connected layer in the target feature generation network to obtain a target feature vector.
[0092] Specifically, the feature generation network for the target account can be deployed separately. The feature generation network adopts a fully connected network, including at least one fully connected layer. When it is judged that the target account meets the preset requirements, the meta-learning method in the above embodiment is used to obtain the target feature generation network of the target account. The preset requirements are not limited to the target account being a new account, an account that has not been logged in for a certain period of time, etc. The attribute features of the target account are input into the target feature generation network, and the attribute features of the target account are fully connected through the target feature generation network to obtain the target feature vector. Furthermore, for accounts that do not meet the preset requirements, other methods (for example, Embedding Lookup) can be used to obtain the feature vector on the user account side. In this embodiment, the accuracy of the feature vector on the user account side can be improved by adopting different deep learning models according to the actual situation of the account to obtain the feature vector on the user account side.
[0093] In an exemplary embodiment, if Figure 7 As shown, in step S240, recommending an object to a target account according to the target feature vector can be specifically achieved through the following steps:
[0094] In step S241, the object feature vector of the candidate object is obtained.
[0095] In step S242, the similarity between the target feature vector of the target account and the object feature vector of the candidate object is obtained.
[0096] In step S243, the candidate objects are sorted according to similarity to obtain sorted candidate objects; and the sorted candidate objects are recommended to the target account.
[0097] Among them, candidate objects refer to objects to be predicted for similarity, and the number includes multiple. Candidate objects can be screened from all objects or a specified set of objects through a preset recall strategy. For example, a multi-way recall strategy can be adopted to perform interest tag matching, interest entity matching, collaborative filtering, geographic location matching and other operations based on the account-related data of the target account to screen candidate objects from all objects or a specified set of objects. The object feature vector of the candidate object can be obtained by processing the object-related data of the candidate object through MLP (Multilayer Perceptron), one-hot encoding (unique hot encoding), Embedding Lookup and other methods. Similarity can be represented by click-through rate CTR (Click-Through Rate), conversion rate CVR (Conversion Rate) and the like.
[0098] Specifically, after obtaining the target feature vector corresponding to the target account and the object feature vector of the candidate object, the target feature vector corresponding to the target account and the object feature vector of the candidate object are input into the deep learning model. The similarity between the target feature vector corresponding to the target account and the object feature vector of each candidate object is obtained through the deep learning model. Among them, the deep learning model can be determined according to actual needs. For example, LR (LogisticRegression, logistic regression model), GDBT (Gradient Boosting Decision Tree, gradient boosting iterative decision tree), FM (Factorization Machine, factor decomposition machine), etc. can be used. The candidate objects are sorted according to the similarity, and the sorted candidate objects are recommended to the client.
[0099] In this embodiment, by obtaining the similarity between multiple candidate objects and the target account, sorting the multiple candidate objects based on the similarity, and recommending the candidate objects with higher similarity to the client, it helps to improve the user retention rate.
[0100] Figure 8 is a flowchart of a recommendation method according to an exemplary embodiment. Figure 8 As shown, the recommendation method is used for the video recommendation service in the cold start process of a new account, and includes the following steps.
[0101] In step S801, account association data of multiple new accounts generated within a preset time is obtained, and the account association data of each new account includes attribute characteristics and behavior data of each new account.
[0102] In step S802, a training set corresponding to each new account is generated according to the account association data of the multiple new accounts. The training samples in the training set are obtained by marking the attribute features of each new account according to the behavior data of each new account.
[0103] In step S803, the feature generation network is trained according to the training sets of multiple new accounts based on a meta-learning method (such as MAML) to obtain a pre-trained feature generation network.
[0104] The feature generation network adopts a fully connected network, including at least one fully connected layer, for example, two fully connected layers. Figure 5 The flowchart diagram and the above-mentioned embodiment illustrate that the feature generation network is trained based on the meta-learning method to obtain a pre-trained feature generation network, which will not be elaborated in detail here.
[0105] In step S804, when it is determined that the target account is a new account, the account association data of the target account is obtained. The account association data of the target account includes attribute characteristics and behavior data of the target account. The behavior data of the target account may be behavior data of browsing videos, etc.
[0106] In step S805, a sample set corresponding to the target account is generated according to the account association data of the target account. The samples in the sample set are obtained by marking the attribute characteristics of the target account according to the behavior data of the target account.
[0107] In step S806, the pre-trained feature generation network is adjusted according to the sample set of the target account to obtain the target feature generation network corresponding to the target account. The process of adjusting the pre-trained feature generation network can refer to Figure 5 The flowchart shown is not described in detail here.
[0108] In step S807, the attribute features of the target account are input into the target feature generation network to obtain a target feature vector.
[0109] In step S808, the video is recommended to the target account according to the target feature vector.
[0110] Specifically, after obtaining the target feature vector corresponding to the target account and the object feature vector of the candidate video, the target feature vector corresponding to the target account and the object feature vector of the candidate video are input into the deep learning model. The similarity between the target feature vector corresponding to the target account and the object feature vector of the candidate video is obtained through the deep learning model. The candidate videos are sorted according to the similarity, and the sorted candidate videos are recommended to the client.
[0111] Fig. 9The flowchart of a method for training a feature generation network according to an exemplary embodiment is shown. The method for training a feature generation network is applicable to scenarios where a model is trained based on a small amount of sample data, such as new account feature processing, content recommendation during client cold start, etc. Fig. 9 As shown, the training method of the feature generation network is used in the server and includes the following steps.
[0112] In step S910, the account-associated data of the target account is obtained, where the account-associated data of the target account includes attribute characteristics and behavior data of the target account.
[0113] In step S920, a sample set is generated according to the account-associated data of the target account, the sample set includes a plurality of samples, and each sample is obtained by marking the account-associated data of the target account according to the behavior data of the target account.
[0114] In step S930, the pre-trained feature generation network is adjusted using the sample set, and the initialization parameters in the pre-trained feature generation network are updated to obtain a target feature generation network. The pre-trained feature generation network is pre-trained based on the account association data of multiple new accounts that have been acquired.
[0115] Among them, the target account refers to the account to be trained on the model. Account-related data refers to data related to the target account, including but not limited to the attribute characteristics and behavior data of the target account. The feature generation network can be any deep learning network that can be used to generate feature vectors (Embedding), such as Word2vec, or a deep learning network designed according to actual conditions. The pre-trained feature generation network can be obtained by training the server online or offline using the account-related data of multiple new accounts. A new account refers to an account that is registered for the first time or has been registered for a preset time period. The account-related data of multiple new accounts can be obtained from the acquired logs.
[0116] Specifically, when the server detects a model training request for a target account, the account-related data of the target account is obtained. The server generates a sample set based on the account-related data of the target account. The sample set of the target account is used to further adjust the pre-trained feature generation network to obtain a target feature generation network suitable for the target account.
[0117] In the above-mentioned feature generation network training method, since the pre-trained feature generation network has learned account-related data of a certain amount of new accounts, for the target account, only a small amount of sample data is needed to quickly adjust the pre-trained feature generation network and obtain a target feature generation network suitable for the target account, thereby improving model performance and model training efficiency.
[0118] In an exemplary embodiment, a method for generating a pre-trained feature generation network is described. The method for generating a pre-trained feature generation network includes: obtaining account association data of multiple new accounts generated within a preset time, the account association data of each new account including attribute characteristics and behavior data of each new account; generating a training set corresponding to each new account, the training set including multiple training samples, each training sample is obtained by marking the account association data of each new account according to the behavior data of each new account; training the feature generation network according to the training samples of the training set corresponding to each new account until the convergence condition is reached, thereby obtaining the pre-trained feature generation network.
[0119] Specifically, in this embodiment, the pre-trained feature generation network can be generated periodically by the server in an offline state. The period depends on the specific situation and can be any time such as 12 hours or a day. Specifically, for new accounts, the labels corresponding to the new accounts are pre-configured. After triggering the training instruction of the feature generation network, the server obtains the logs within the generated period. According to the labels corresponding to the new account, the new account and the account-related data of the new account are queried from the logs. The server can mark the account-related data of each new account that has been obtained according to the behavior data of each new account to obtain multiple training samples. The feature generation network is trained using multiple training samples corresponding to each new account until the convergence condition is reached to obtain a pre-trained feature generation network.
[0120] In this embodiment, by periodically training and updating the feature generation network, the pre-trained feature generation network can continuously learn new knowledge, so that the initialization parameters of the pre-trained feature generation network can be maintained at a better position.
[0121] In an exemplary embodiment, the feature generation network is trained according to the training samples in the training set corresponding to each new account until the convergence condition is reached to obtain a pre-trained feature generation network, including: obtaining the first training set and the second training set corresponding to each new account from the training set corresponding to each new account; using the first training set of each new account to train the feature generation network, and updating the basic parameters of the feature generation network according to the obtained first loss function value to obtain an intermediate feature generation network; using the second training set of each new account to train the intermediate feature generation network, obtaining the gradient of the basic parameters according to the obtained second loss function value, and updating the basic parameters according to the gradient of the basic parameters until the convergence condition is reached to obtain a pre-trained feature generation network.
[0122] Specifically, after obtaining the training set corresponding to each account, the feature generation network can be trained based on the meta-learning method. Figure 5The process diagram shown in FIG. 1 is a flow chart. The first training set and the second training set are obtained from the training set corresponding to each account by random sampling or division. The first training set can be used for inner loop training (corresponding to Figure 5 The second training set can be used for outer loop testing (corresponding to Figure 5 The query set data in ( ). The first training set is input into the feature generation network. The feature generation network is trained by the first loss function to obtain the first loss function value. The basic parameters of the feature generation network are updated by using the obtained first loss function value until the convergence condition is reached, and an intermediate feature generation network is obtained. The second training set is input into the intermediate feature generation network. The intermediate feature generation network is trained by the second loss function to obtain the second loss function value. The gradient of the basic parameters is obtained by using the obtained second loss function value, and the basic parameters are gradient updated according to the gradient of the basic parameters until the convergence condition is reached, and a pre-trained feature generation network is obtained. In this embodiment, the convergence condition may refer to the loss function value reaching a minimum value.
[0123] In this embodiment, since MAML learns the rules of initializing parameters θ, the initialization parameters θ are the optimal parameter solutions θ for each task in the parameter space. 1 ,θ 2 ,...θ n Highly sensitive, therefore, for the training task of the target account, only a small amount of sample data is needed to fine-tune the pre-trained feature generation network, so that it can quickly reach the optimal point along the gradient direction in one or several steps of gradient descent, and obtain a target feature generation network with better performance.
[0124] In an exemplary embodiment, a pre-trained feature generation network is adjusted using a sample set, and the initialization parameters in the pre-trained feature generation network are updated to obtain a target feature generation network, including: obtaining a first sample set from the sample set, using the first sample set to train the pre-trained feature generation network, and updating the initialization parameters of the pre-trained feature generation network according to the obtained third loss function value; obtaining a second sample set from the sample set, using the second sample set to train the updated pre-trained feature generation network, obtaining the gradient of the initialization parameter according to the obtained fourth loss function value, and updating the initialization parameter according to the gradient of the initialization parameter to obtain the target feature generation network.
[0125] Specifically, after obtaining the pre-trained feature generation network based on the meta-learning method, for the training task of the target account, you can refer to Figure 5The flowchart shown adjusts the pre-trained feature generation network. A first sample set and a second sample set are obtained from a sample set by random extraction or division. The first sample set can be used for inner loop training. The second sample can be used for outer loop testing. The first sample set is input into the pre-trained feature generation network. The pre-trained feature generation network is trained by a third loss function to obtain a third loss function value. The initialization parameters of the pre-trained feature generation network are updated using the obtained third loss function value until the convergence condition is reached. The second sample set is input into the updated pre-trained feature generation network. The updated pre-trained feature generation network is trained by a fourth loss function to obtain a fourth loss function value. The gradient of the initialization parameter is obtained using the obtained fourth loss function value, and the gradient of the initialization parameter is updated according to the gradient of the initialization parameter until the convergence condition is reached to obtain the target feature generation network. In this embodiment, the convergence condition may refer to the loss function value reaching a minimum value.
[0126] In this embodiment, the feature generation network is pre-trained by adopting a meta-learning method to give the feature generation network prior knowledge. For training tasks where the target account is a new account, after obtaining the attribute characteristics of the target account and a small amount of sample data, the pre-trained feature generation network can be fine-tuned through real-time updates to obtain a target feature generation network with better performance suitable for the target account.
[0127] Fig.10 is a flow chart of a method for training a feature generation network according to an exemplary embodiment. Fig.10 As shown, the training method of the feature generation network is used in the server and includes the following steps.
[0128] In step S1001, account association data of multiple new accounts generated within a preset time is obtained, and the account association data of each new account includes attribute characteristics and behavior data of each new account.
[0129] In step S1002, a training set corresponding to each new account is generated according to the account association data of the multiple new accounts. The training samples in the training set are obtained by marking the attribute features of each new account according to the behavior data of each new account.
[0130] In step S1003, the feature generation network is trained according to the training sets of multiple new accounts based on a meta-learning method to obtain a pre-trained feature generation network.
[0131] In step S1004, the account-related data of the target account is obtained. The account-related data of the target account includes attribute characteristics and behavior data of the target account.
[0132] In step S1005, a sample set corresponding to the target account is generated according to the account association data of the target account. The samples in the sample set are obtained by marking the attribute characteristics of the target account according to the behavior data of the target account.
[0133] In step S1006, the pre-trained feature generation network is adjusted according to the sample set of the target account to obtain the target feature generation network corresponding to the target account. The process of adjusting the pre-trained feature generation network can refer to Figure 5 The training process diagram shown is not elaborated in detail here.
[0134] It should be understood that, although the various steps in the above flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowchart may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0135] Fig.11 FIG. 1 is a block diagram of a recommendation device 1100 according to an exemplary embodiment. Fig.11 The device includes a first acquisition module 1101, a first training module 1102, a feature vector generation module 1103 and a recommendation module 1104.
[0136] The first acquisition module 1101 is configured to execute acquisition of the account-associated data of the target account, wherein the account-associated data includes the attribute characteristics and behavior data of the target account; the first training module 1102 is configured to execute adjustment of the initialization parameters of the pre-trained feature generation network using the account-associated data of the target account to generate a target feature generation network corresponding to the target account, wherein the pre-trained feature generation network is pre-trained based on the account-associated data of multiple new accounts that have been acquired; the feature vector generation module 1103 is configured to execute input of the attribute characteristics of the target account into the target feature generation network to obtain a target feature vector; the recommendation module 1104 is configured to execute recommendation of objects to the target account according to the target feature vector.
[0137] In an exemplary embodiment, the device 1100 also includes: a second acquisition module, configured to execute acquisition of account association data of multiple new accounts generated within a preset time, the account association data of each new account including attribute characteristics and behavior data of each new account; a training set generation module, configured to execute generation of a training set corresponding to each new account, the training set including multiple training samples, each training sample is obtained by marking the account association data of each new account according to the behavior data of each new account; a second training module, configured to execute training of the feature generation network according to the training samples in the training set corresponding to each new account until the convergence condition is reached to obtain a pre-trained feature generation network.
[0138] In an exemplary embodiment, the second training module includes: a first acquisition unit, configured to acquire the first training set and the second training set corresponding to each new account from the training set corresponding to each new account; a first training unit, configured to train the feature generation network using the first training set of each new account, and update the basic parameters of the feature generation network according to the obtained first loss function value to obtain an intermediate feature generation network; a second training unit, configured to train the intermediate feature generation network using the second training set of each new account, acquire the gradient of the basic parameters according to the obtained second loss function value, and update the basic parameters according to the gradient of the basic parameters until the convergence condition is reached to obtain a pre-trained feature generation network.
[0139] In an exemplary embodiment, the first training module 1102 includes: a sample set generation unit, configured to generate a sample set based on the account-associated data of the target account, the sample set including multiple samples, each sample being obtained by marking the account-associated data of the target account based on the target account behavior data; a third training unit, configured to obtain a first sample set from the sample set, train a pre-trained feature generation network using the first sample set, and update the initialization parameters of the pre-trained feature generation network according to the obtained third loss function value; a fourth training unit, configured to obtain a second sample set from the sample set, train the updated pre-trained feature generation network using the second sample set, obtain the gradient of the initialization parameter according to the obtained fourth loss function value, update the initialization parameter according to the gradient of the initialization parameter, and obtain the target feature generation network.
[0140] In an exemplary embodiment, the feature generation network includes at least one fully connected layer; the feature vector generation module 1103 is configured to input the attribute features of the target account into the target feature generation network, perform fully connected processing on the attribute features through at least one fully connected layer in the target feature generation network, and obtain a target feature vector.
[0141] In an exemplary embodiment, the recommendation module 1104 includes: a second acquisition unit, configured to execute acquisition of an object feature vector of a candidate object; a similarity determination unit, configured to execute acquisition of the similarity between a target feature vector of a target account and an object feature vector of a candidate object; a sorting unit, configured to execute sorting of the candidate objects according to the similarity to obtain sorted candidate objects; and a recommendation unit, configured to execute recommendation of the sorted candidate objects to the target account.
[0142] Fig.12 1 is a block diagram of a training device 1200 for a feature generation network according to an exemplary embodiment. Fig.12 The device includes a first acquisition module 1201, a sample set generation module 1202 and a first training module 1203.
[0143] The first acquisition module 1201 is configured to execute acquisition of the account-associated data of the target account, wherein the account-associated data of the target account includes the attribute characteristics and behavior data of the target account; the sample set generation module 1202 is configured to execute generation of a sample set based on the account-associated data of the target account, wherein the sample set includes multiple samples, and each sample is obtained by labeling the account-associated data of the target account according to the behavior data of the target account; the first training module 1203 is configured to execute adjustment of the pre-trained feature generation network using the sample set, update the initialization parameters in the pre-trained feature generation network, and obtain the target feature generation network, wherein the pre-trained feature generation network is pre-trained based on the account-associated data of multiple new accounts that have been acquired.
[0144] In an exemplary embodiment, the device 1200 also includes: a second acquisition module, configured to execute acquisition of account-associated data of multiple new accounts generated within a preset time, the account-associated data of each new account including attribute characteristics and behavior data of each new account; a training set generation module, configured to execute generation of a training set corresponding to each new account, the training set including multiple training samples, each training sample being obtained by marking the account-associated data of each new account according to the behavior data of each new account; a second training module, configured to execute training of a feature generation network according to the training samples of the training set corresponding to each new account until a convergence condition is reached to obtain a pre-trained feature generation network.
[0145] In an exemplary embodiment, the second training module includes: an acquisition unit, configured to acquire a first training set and a second training set corresponding to each new account from the training set corresponding to each new account; a first training unit, configured to train a feature generation network using the first training set of each new account, and update basic parameters of the feature generation network according to the obtained first loss function value to obtain an intermediate feature generation network; a second training unit, configured to train the intermediate feature generation network using the second training set of each new account, acquire the gradient of the basic parameters according to the obtained second loss function value, and update the basic parameters according to the gradient of the basic parameters until the convergence condition is reached to obtain a pre-trained feature generation network.
[0146] In an exemplary embodiment, the first training module 1203 includes: a third training unit, configured to execute acquiring a first sample set from a sample set, using the first sample set to train a pre-trained feature generation network, and updating the initialization parameters of the pre-trained feature generation network according to the obtained third loss function value; a fourth training unit, configured to execute acquiring a second sample set from the sample set, using the second sample set to train the updated pre-trained feature generation network, obtaining the gradient of the initialization parameter according to the obtained fourth loss function value, updating the initialization parameter according to the gradient of the initialization parameter, and obtaining a target feature generation network.
[0147] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0148] Fig.13 1 is a block diagram of a device 1300 for training a recommendation and / or feature generation network according to an exemplary embodiment. For example, the device 1300 may be a server. Fig.13 The device 1300 includes a processing component 1320, which further includes one or more processors, and a memory resource represented by a memory 1322 for storing instructions executable by the processing component 1320, such as an application. The application stored in the memory 1322 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1320 is configured to execute instructions to perform the above-mentioned recommendation method and / or feature generation network training method.
[0149] The device 1300 may also include a power component 1324 configured to perform power management of the device 1300, a wired or wireless network interface 1326 configured to connect the device 1300 to a network, and an input / output (I / O) interface 1328. The device 1300 may operate based on an operating system stored in the memory 1322, such as Windows Server, Mac OSX, Unix, Linux, FreeBSD, or the like.
[0150] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory 1322 including instructions, which can be executed by a processor of the device 1300 to perform the above method. The storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0151] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0152] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A recommendation method, characterized in that: include: Acquire account-related data of a target account, wherein the account-related data of the target account includes attribute characteristics and behavior data of the target account; The account association data of the target account is used to adjust the initialization parameters of the pre-trained feature generation network to generate a target feature generation network corresponding to the target account, wherein the pre-trained feature generation network is pre-trained based on the account association data of multiple new accounts that have been acquired based on a meta-learning method, and the training process of the meta-learning method is based on the training task corresponding to each of the new accounts, and the training task of each of the new accounts includes updating the parameters of the feature generation network twice based on a double gradient; Inputting the attribute features of the target account into the target feature generation network to obtain a target feature vector; An object is recommended to the target account according to the target feature vector.
2. The recommendation method according to claim 1, characterized in that: The generation method of the pre-trained feature generation network includes: Acquire account association data of the multiple new accounts generated within a preset time, wherein the account association data of each new account includes attribute characteristics and behavior data of each new account; Generate a training set corresponding to each new account, wherein the training set includes a plurality of training samples, and each training sample is obtained by marking the account-related data of each new account according to the behavior data of each new account; Based on the meta-learning method, the feature generation network is trained according to the training samples in the training set corresponding to each new account until a convergence condition is reached, thereby obtaining the pre-trained feature generation network.
3. The recommendation method according to claim 2, characterized in that: The method of training the feature generation network based on the meta-learning method according to the training samples in the training set corresponding to each new account until a convergence condition is reached to obtain the pre-trained feature generation network includes: Acquire a first training set and a second training set corresponding to each new account from the training set corresponding to each new account; The feature generation network is trained using the first training set of each new account, and basic parameters of the feature generation network are updated according to the obtained first loss function value to obtain an intermediate feature generation network; The intermediate feature generation network is trained using the second training set of each new account, the gradient of the basic parameter is obtained according to the obtained second loss function value, and the basic parameter is updated according to the gradient of the basic parameter until the convergence condition is reached, so as to obtain the pre-trained feature generation network.
4. The recommendation method according to claim 1, characterized in that: The using the account association data of the target account to adjust the parameters of the pre-trained feature generation network to generate a target feature generation network corresponding to the target account includes: Generate a sample set according to the account-associated data of the target account, the sample set comprising a plurality of samples, each sample being obtained by marking the account-associated data of the target account according to the target account behavior data; Acquire a first sample set from the sample set, use the first sample set to train the pre-trained feature generation network, and update the initialization parameters of the pre-trained feature generation network according to the obtained third loss function value; Obtain a second sample set from the sample set, use the second sample set to train the updated pre-trained feature generation network, obtain the gradient of the initialization parameter according to the obtained fourth loss function value, update the initialization parameter according to the gradient of the initialization parameter, and obtain the target feature generation network.
5. The recommendation method according to any one of claims 1 to 4, characterized in that: The feature generation network includes at least one fully connected layer; the step of inputting the attribute features of the target account into the target feature generation network to obtain a target feature vector includes: The attribute features of the target account are input into the target feature generation network, and the attribute features are fully connected through at least one fully connected layer in the target feature generation network to obtain the target feature vector.
6. The recommendation method according to any one of claims 1 to 4, characterized in that: The recommending an object to the target account according to the target feature vector includes: Obtain object feature vectors of candidate objects; Obtaining a similarity between a target feature vector of the target account and an object feature vector of the candidate object; Sorting the candidate objects according to the similarities to obtain sorted candidate objects; The ranked candidate objects are recommended to the target account.
7. A method for training a feature generation network, characterized in that: include: Acquire account-related data of a target account, wherein the account-related data of the target account includes attribute characteristics and behavior data of the target account; Generate a sample set according to the account-associated data of the target account, the sample set comprising a plurality of samples, each sample being obtained by marking the account-associated data of the target account according to the behavior data of the target account; The sample set is used to adjust the pre-trained feature generation network, and the initialization parameters in the pre-trained feature generation network are updated to obtain a target feature generation network. The pre-trained feature generation network is trained in advance based on the account association data of multiple new accounts that have been acquired based on a meta-learning method. The training process of the meta-learning method is performed based on the training tasks corresponding to each of the new accounts. The training tasks of each of the new accounts include two parameter updates of the feature generation network based on double gradients.
8. The method for training a feature generation network according to claim 7, characterized in that: The generation method of the pre-trained feature generation network includes: Acquire account association data of the multiple new accounts generated within a preset time, wherein the account association data of each new account includes attribute characteristics and behavior data of each new account; Generate a training set corresponding to each new account, wherein the training set includes a plurality of training samples, and each training sample is obtained by marking the account-related data of each new account according to the behavior data of each new account; Based on the meta-learning method, the feature generation network is trained according to the training samples of the training set corresponding to each new account until a convergence condition is reached, thereby obtaining the pre-trained feature generation network.
9. The method for training a feature generation network according to claim 8, characterized in that: The method of training the feature generation network based on the meta-learning method according to the training samples in the training set corresponding to each new account until a convergence condition is reached to obtain the pre-trained feature generation network includes: Acquire a first training set and a second training set corresponding to each new account from the training set corresponding to each new account; The feature generation network is trained using the first training set of each new account, and basic parameters of the feature generation network are updated according to the obtained first loss function value to obtain an intermediate feature generation network; The intermediate feature generation network is trained using the second training set of each new account, the gradient of the basic parameter is obtained according to the obtained second loss function value, and the basic parameter is updated according to the gradient of the basic parameter until the convergence condition is reached, so as to obtain the pre-trained feature generation network.
10. The method for training a feature generation network according to claim 9, characterized in that: The method of using the sample set to adjust the pre-trained feature generation network, updating the initialization parameters in the pre-trained feature generation network, and obtaining the target feature generation network includes: Acquire a first sample set from the sample set, use the first sample set to train the pre-trained feature generation network, and update the initialization parameters of the pre-trained feature generation network according to the obtained third loss function value; Obtain a second sample set from the sample set, use the second sample set to train the updated pre-trained feature generation network, obtain the gradient of the initialization parameter according to the obtained fourth loss function value, update the initialization parameter according to the gradient of the initialization parameter, and obtain the target feature generation network.
11. A recommendation device, characterized in that: include: A first acquisition module is configured to acquire account-related data of a target account, wherein the account-related data includes attribute characteristics and behavior data of the target account; A first training module is configured to adjust the initialization parameters of a pre-trained feature generation network using the account association data of the target account to generate a target feature generation network corresponding to the target account, wherein the pre-trained feature generation network is pre-trained based on the account association data of multiple new accounts acquired in a meta-learning manner, and the training process of the meta-learning manner is performed based on a training task corresponding to each of the new accounts, and the training task of each of the new accounts includes performing two parameter updates on the feature generation network based on a double gradient; A feature vector generation module is configured to input the attribute features of the target account into the target feature generation network to obtain a target feature vector; The recommendation module is configured to recommend an object to the target account according to the target feature vector.
12. The recommendation device according to claim 11, characterized in that: The device also includes: A second acquisition module is configured to execute acquisition of account association data of the multiple new accounts generated within a preset time, wherein the account association data of each new account includes attribute characteristics and behavior data of each new account; A training set generation module is configured to generate a training set corresponding to each new account, wherein the training set includes a plurality of training samples, and each training sample is obtained by marking the account-related data of each new account according to the behavior data of each new account; The second training module is configured to execute based on the meta-learning method, train the feature generation network according to the training samples in the training set corresponding to each new account until the convergence condition is reached, and obtain the pre-trained feature generation network.
13. The recommendation device according to claim 12, characterized in that: The second training module comprises: A first acquisition unit is configured to acquire a first training set and a second training set corresponding to each new account from the training set corresponding to each new account; A first training unit is configured to train the feature generation network using the first training set of each new account, and update basic parameters of the feature generation network according to the obtained first loss function value to obtain an intermediate feature generation network; The second training unit is configured to execute training of the intermediate feature generation network using the second training set of each new account, obtain the gradient of the basic parameter according to the obtained second loss function value, and update the basic parameter according to the gradient of the basic parameter until the convergence condition is reached, thereby obtaining the pre-trained feature generation network.
14. The recommendation device according to claim 11, characterized in that: The first training module includes: A sample set generating unit is configured to generate a sample set according to the account-associated data of the target account, wherein the sample set includes a plurality of samples, each of which is obtained by marking the account-associated data of the target account according to the target account behavior data; A third training unit is configured to obtain a first sample set from the sample set, train the pre-trained feature generation network using the first sample set, and update the initialization parameters of the pre-trained feature generation network according to the obtained third loss function value; The fourth training unit is configured to obtain a second sample set from the sample set, use the second sample set to train the updated pre-trained feature generation network, obtain the gradient of the initialization parameter according to the obtained fourth loss function value, update the initialization parameter according to the gradient of the initialization parameter, and obtain the target feature generation network.
15. The recommendation device according to any one of claims 11 to 14, characterized in that: The feature generation network includes at least one fully connected layer; the feature vector generation module is configured to input the attribute features of the target account into the target feature generation network, perform fully connected processing on the attribute features through at least one fully connected layer in the target feature generation network, and obtain the target feature vector.
16. The recommendation device according to any one of claims 11 to 14, characterized in that: The recommendation module includes: A second acquisition unit is configured to acquire an object feature vector of a candidate object; A similarity determination unit is configured to execute obtaining a similarity between a target feature vector of the target account and an object feature vector of the candidate object; a sorting unit, configured to sort the candidate objects according to the similarities to obtain sorted candidate objects; The recommendation unit is configured to recommend the ranked candidate objects to the target account.
17. A training device for a feature generation network, characterized in that: include: A first acquisition module is configured to execute acquisition of account-related data of a target account, wherein the account-related data of the target account includes attribute characteristics and behavior data of the target account; A sample set generation module is configured to generate a sample set according to the account-associated data of the target account, wherein the sample set includes a plurality of samples, each of which is obtained by marking the account-associated data of the target account according to the behavior data of the target account; The first training module is configured to adjust the pre-trained feature generation network using the sample set, update the initialization parameters in the pre-trained feature generation network, and obtain a target feature generation network. The pre-trained feature generation network is trained in advance based on the account association data of multiple new accounts that have been acquired based on a meta-learning method. The training process of the meta-learning method is performed based on the training tasks corresponding to each of the new accounts. The training tasks of each of the new accounts include two parameter updates of the feature generation network based on double gradients.
18. The training device for a feature generation network according to claim 17, characterized in that: The device also includes: A second acquisition module is configured to execute acquisition of account association data of the multiple new accounts generated within a preset time, wherein the account association data of each new account includes attribute characteristics and behavior data of each new account; A training set generation module is configured to generate a training set corresponding to each new account, wherein the training set includes a plurality of training samples, and each training sample is obtained by marking the account-related data of each new account according to the behavior data of each new account; The second training module is configured to execute based on the meta-learning method, train the feature generation network according to the training samples of the training set corresponding to each new account until the convergence condition is reached, and obtain the pre-trained feature generation network.
19. The training device for a feature generation network according to claim 18, characterized in that: The second training module comprises: An acquiring unit is configured to acquire a first training set and a second training set corresponding to each new account from the training set corresponding to each new account; A first training unit is configured to train the feature generation network using the first training set of each new account, and update basic parameters of the feature generation network according to the obtained first loss function value to obtain an intermediate feature generation network; The second training unit is configured to execute training of the intermediate feature generation network using the second training set of each new account, obtain the gradient of the basic parameter according to the obtained second loss function value, and update the basic parameter according to the gradient of the basic parameter until the convergence condition is reached, thereby obtaining the pre-trained feature generation network.
20. The training device for a feature generation network according to claim 19, characterized in that: The first training module includes: A third training unit is configured to obtain a first sample set from the sample set, train the pre-trained feature generation network using the first sample set, and update the initialization parameters of the pre-trained feature generation network according to the obtained third loss function value; The fourth training unit is configured to obtain a second sample set from the sample set, use the second sample set to train the updated pre-trained feature generation network, obtain the gradient of the initialization parameter according to the obtained fourth loss function value, update the initialization parameter according to the gradient of the initialization parameter, and obtain the target feature generation network.
21. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the recommendation method according to any one of claims 1 to 6.
22. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the training method of the feature generation network as described in any one of claims 7 to 10.
23. A storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the recommendation method as claimed in any one of claims 1 to 6.
24. A storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the training method for a feature generation network as described in any one of claims 7 to 10.
25. A computer program product, comprising instructions, characterized in that: When the instruction is executed by a processor of an electronic device, the electronic device is enabled to perform the recommendation method as described in any one of claims 1 to 6.
26. A computer program product, comprising instructions, characterized in that: When the instructions are executed by a processor of an electronic device, the electronic device is enabled to perform the training method for a feature generation network as described in any one of claims 7 to 10.
Citation Information
Patent Citations
Weighted mixed k-nearest neighbor algorithm-based book recommendation method and system
CN108415928A
A resource recommendation method and device
CN109241431A
Method, device and server for determining recommendation data
CN109299369A
A reference-free image quality evaluation method based on LBP
CN109344860A
Video recommendation method and device and computer readable storage medium
CN109800325A
