Model Training Method, Device, Electronic Device and Readable Storage Medium

By using weight value weighting in the prediction model to process user vectors, the problem of inaccurate prediction models in the prior art is solved, and more accurate user interest representation and target object prediction are achieved.

CN114841265BActive Publication Date: 2025-06-20VIVO MOBILE COMM CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210480049.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-05
Publication Date
2025-06-20
Estimated Expiration
2042-05-05

AI Technical Summary

Technical Problem

In the prior art, the prediction model is inaccurate in prediction of the target object, resulting in inaccurate user interest representation.

Method used

By obtaining multiple sample data, inputting user and object features into the preset network structure, outputting user and object vectors, determining the weight value of the user vector based on the object vector, performing weighting processing, generating predicted values ​​and training the network model until the preset conditions are met.

Benefits of technology

It improves the accuracy of the representation of user interests by the prediction model, enhances the prediction accuracy of the target object, and improves the effect of the model in recall and sorting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114841265B_ABST
    Figure CN114841265B_ABST
Patent Text Reader

Abstract

The present application discloses a model training method, apparatus, electronic device, and readable storage medium, belonging to the field of artificial intelligence. Among them, the method includes: obtaining a plurality of sample data; inputting the sample user features into a preset network structure to output N sample user vectors; inputting the sample object features into the preset network structure to output a sample object vector; determining the weight value corresponding to each sample user vector according to the sample object vector; performing weighted processing on the N sample user vectors according to the weight value of each sample user vector to determine a weighted user vector; determining a predicted value according to the weighted user vector and the sample object vector, and the sample object vector corresponding to the historical object; determining a loss value according to the predicted value and the target value; training the preset network structure according to the loss value until the preset network model meets the preset training conditions to obtain a prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence, and particularly relates to a model training method, apparatus, electronic device, and readable storage medium. Background Art

[0002] With the development of information technology, currently, corresponding objects can be pushed to users according to the users' interests, where the objects can include: commodities, news, videos, etc. Among them, the historical behavior characteristics of users can reflect the users' interests. Therefore, historical behavior characteristics are usually used to train a prediction model for predicting target objects that users may be interested in.

[0003] Due to the large number of historical behavior characteristics of users, currently, only pooling operations can be used to aggregate historical behavior characteristics. However, such a method is relatively simple and crude, and the prediction model trained in this way is inaccurate in predicting target objects. Summary of the Invention

[0004] The purpose of the embodiments of this application is to provide a model training method, which can solve the problem that in the prior art, the prediction model is inaccurate in predicting target objects.

[0005] In a first aspect, the embodiments of this application provide a model training method, which includes:

[0006] Obtain a plurality of sample data; each sample data includes sample user characteristics and sample object characteristics of a sample user, and the sample user characteristics include N sample historical behavior characteristics, where N is an integer greater than 1;

[0007] Input the sample user characteristics into a preset network structure to output N sample user vectors, and the sample user vectors correspond to the sample historical behavior characteristics respectively;

[0008] Input the sample object characteristics into a preset network structure to output a sample object vector;

[0009] Determine the weight value corresponding to each sample user vector according to the sample object vector;

[0010] Perform weighted processing on the N sample user vectors according to the weight values of each sample user vector to determine a weighted user vector;

[0011] Determine a prediction value according to the weighted user vector and the sample object vector, where the prediction value is used to represent the degree of positive feedback of the sample user to the historical object, and the historical object corresponds to the sample object vector;

[0012] Determine a loss value according to the prediction value and the target value, where the target value is used to represent the operation behavior of the sample user on the historical object;

[0013] Train a preset network structure according to the loss value until the preset network model meets the preset training conditions, and obtain a prediction model.

[0014] In a second aspect, an embodiment of the present application provides a model construction method, and the method includes:

[0015] Construct a preset network structure including multiple levels, the preset network structure includes a first network structure and a second network structure; each level of the first network structure includes a neural network layer for feature extraction; the second network structure is used to calculate the loss value based on the attention mechanism for the output of the first network structure;

[0016] Train the preset network structure according to the loss value to determine the parameters of the trained multiple neural network layers at each level among the multiple levels;

[0017] Determine the trained first network structure as the prediction model.

[0018] In a third aspect, an embodiment of the present application provides an object determination method, and the method includes:

[0019] Obtain the user features of the user, the user features include M historical behavior features of the user, and M is an integer greater than 1;

[0020] Input the user features into the pre-trained prediction model, and output M user vectors, and the user vectors correspond to the historical behavior features respectively;

[0021] Extract at least one target user vector from the M user vectors;

[0022] From the preset object library, determine the target object corresponding to each target user vector respectively.

[0023] In a fourth aspect, an embodiment of the present application provides a model training device, and the device includes:

[0024] An acquisition module, configured to acquire a plurality of sample data; each sample data includes the sample user features and sample object features of the sample user, and the sample user features include N sample historical behavior features, and N is an integer greater than 1;

[0025] An input module, configured to input the sample user features into the preset network structure, and output N sample user vectors, and the sample user vectors correspond to the sample historical behavior features respectively;

[0026] The input module is further configured to input the sample object features into the preset network structure, and output a sample object vector;

[0027] A first module, configured to determine the weight value corresponding to each sample user vector according to the sample object vector;

[0028] A weighting module, configured to perform weighting processing on N sample user vectors according to the weight values of each sample user vector to determine weighted user vectors;

[0029] A second module, configured to determine a prediction value according to the weighted user vectors and the sample object vectors, where the prediction value is used to characterize the degree of positive feedback of the sample user on the historical object, and the historical object corresponds to the sample object vector;

[0030] A third determination module, configured to determine a loss value according to the prediction value and the target value, where the target value is used to characterize the operation behavior of the sample user on the historical object;

[0031] A first training module, configured to train a preset network structure according to the loss value until the preset network model meets the preset training conditions to obtain a prediction model.

[0032] In a fifth aspect, an embodiment of the present application provides a model construction device, and the device includes:

[0033] A construction module, configured to construct a preset network structure including multiple levels, where the preset network structure includes a first network structure and a second network structure; each level of the first network structure includes a neural network layer for feature extraction; the second network structure is configured to calculate a loss value based on the output of the first network structure by using an attention mechanism;

[0034] A second training module, configured to train the preset network structure according to the loss value to determine the parameters of the trained multiple neural network layers at each of the multiple levels;

[0035] A fourth determination module, configured to determine the trained first network structure as a prediction model.

[0036] In a sixth aspect, an embodiment of the present application provides an object determination device, and the device includes:

[0037] An acquisition module, configured to acquire user features of a user, where the user features include M historical behavior features of the user, and M is an integer greater than 1;

[0038] An output module, configured to input the user features into a pre-trained prediction model and output M user vectors, where the user vectors correspond to the historical behavior features respectively;

[0039] An extraction module, configured to extract at least one target user vector from the M user vectors;

[0040] A fifth determination module, configured to respectively determine a target object corresponding to each target user vector from a preset object library.

[0041] In a seventh aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory. The memory stores a program or instructions that can run on the processor. When the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0042] In an eighth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instructions are stored. When the program or instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0043] In a ninth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run a program or instructions to implement the method described in the first aspect.

[0044] In a tenth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.

[0045] In the embodiment of the present application, by obtaining a plurality of sample data, inputting the sample user features into a preset network structure, and outputting N sample user vectors. Since the sample user vectors correspond to the sample historical behavior features respectively, each sample historical behavior feature corresponds to an actual historical behavior and also reflects different degrees of interest. According to the sample object vector, the weight value corresponding to each sample user vector can be determined respectively. The above-mentioned different weight values will be obtained for different sample user vectors, which is the modeling of the part of the user's historical interests reflected by the object of the user's operation. By performing weighted processing on the N sample user vectors according to the weight value of each sample user vector, the obtained weighted user vector can accurately express the user's interest preference. Then, input the sample object features into the preset network structure to output the sample object vector. According to the weighted user vector and the sample object vector, determine the predicted value used to characterize the positive feedback degree of the sample user to the historical object. According to the predicted value and the target value used to characterize the operation behavior of the sample user to the historical object, the loss value of model training can be determined. Finally, train the preset network model according to the loss value until the preset network model meets the preset training conditions, which can continuously improve the accuracy of the preset network model in extracting features and obtain a prediction model. Thus, based on the model training method of the embodiment of the present application, the obtained prediction model can quickly and accurately extract the corresponding user vector from the user features according to each historical behavior feature of the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a schematic diagram of a prediction model training process and an application process provided by an embodiment of the present application;

[0047] Figure 2 is a flowchart of a model training method provided by an embodiment of the present application;

[0048] Figure 3 is a flowchart of a model construction method provided by an embodiment of the present application;

[0049] Figure 4 is a flowchart of an object determination method provided by an embodiment of the present application;

[0050] Figure 5 is a structural diagram of a model training device provided by an embodiment of the present application;

[0051] Figure 6 is a structural diagram of a model construction device provided by an embodiment of the present application;

[0052] Figure 7 is a structural diagram of an object determination device provided by an embodiment of the present application;

[0053] Figure 8 is one of the schematic diagrams of the hardware structure of an electronic device provided by an embodiment of the present application;

[0054] Figure 9 is the second schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0055] Next, the technical solutions of the embodiments of the present application will be clearly described in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application belong to the scope of protection of the present application.

[0056] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data may be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order different from those illustrated or described herein, and the objects distinguished by "first", "second", etc. generally belong to the same category, and the number of objects is not limited. For example, the first object may be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.

[0057] In the recall and ranking of recommendation systems, due to the large number of historical behavior features of users, historical behavior features are usually aggregated only through pooling operations. This processing brings some problems. On the one hand, directly pooling the overall historical behavior features will bring interference information, resulting in inaccurate model training. On the other hand, directly performing pooling is very likely to cause the recall results to focus on the user's highest interest points, resulting in a single recall interest, lack of divergence, and problems such as information cocoons. Therefore, the current processing method is relatively simple and crude, and the predicted user vector cannot well represent the user's interests, resulting in low accuracy of the recalled target objects.

[0058] First, a holistic description of the prediction model provided by the embodiments of the present invention will be given below.

[0059] Figure 1 It is a schematic diagram of a prediction model training process and an application process provided by an embodiment of the present application. As Figure 1 shown, it is divided into a training process 110 and an application process 120.

[0060] In the training process 110, first, a plurality of sample data are obtained. Each sample data includes a sample user feature 111 and a sample object feature 112 of the sample user. The sample user feature 111 includes N sample historical behavior features, and N is an integer greater than 1. Then, the sample user feature is input into a preset network structure 113, and N sample user vectors 114 are output. The sample user vectors correspond to the sample historical behavior features respectively. Since the sample historical behavior features are determined according to the historical behavior of the sample user, that is to say, the sample user vectors correspond one-to-one with the historical behavior of the sample user.

[0061] Next, the sample object feature 114 is input into the preset network structure, and a sample object vector 115 is output. Then, according to the N sample user vectors 114, the sample object vector 115, and the target value 116, the loss value 117 of model training is determined. Among them, the target value 116 is used to represent the operation behavior of the sample user on the historical object. For example: if the sample user has a click behavior on the historical object, the target value can be 1; if the sample user does not have a click behavior on the historical object, the target value can be 0. Finally, the preset network model 113 is trained according to the loss value 117 until the preset network model meets the preset training conditions, and a prediction model 123 is obtained.

[0062] In the application process 120, first, in the case of receiving a recommendation request initiated by a user, user characteristics 121 of the user are obtained. The user characteristics 121 include M historical behavior characteristics of the user, and M is an integer greater than 1. Since the above-mentioned trained prediction model 123 can extract corresponding user vectors from the user characteristics according to each behavior characteristic of the user, inputting the user characteristics 121 into the pre-trained prediction model can output M user vectors 124 corresponding to the historical behavior characteristics respectively. Inputting the sample object characteristics 122 into the prediction model 123 outputs a sample object vector 125.

[0063] Because the historical behavior characteristics (such as click behavior) of each user can reflect their diverse interests, that is, the historical behavior characteristics of the user are generated under the user's multiple interests, the M user vectors corresponding to the historical behavior characteristics respectively determined in the embodiments of the present application can comprehensively express the interest preferences of the user. Then, extracting at least one target user vector 126 from the M user vectors 123 can accurately express the interest preferences of the user and can also narrow the search range of the object. Finally, from the preset object library 128, the target object 127 corresponding to each target user vector 126 is determined respectively. The target object determined in this way can meet the multiple interests of the user. Thus, the accuracy of object determination can be improved.

[0064] Next, in conjunction with the accompanying drawings, through specific embodiments and their application scenarios, the model construction method, model training method, and object determination method provided in the embodiments of the present application will be described in detail respectively.

[0065] Figure 2 It is a flowchart of a model construction method provided in the embodiments of the present application.

[0066] As Figure 2 shown, the object determination method may include step 210 - step 230. This method is applied to a model construction device and is specifically as follows:

[0067] Step 210, construct a preset network structure including multiple levels. The preset network structure includes a first network structure and a second network structure; each level of the first network structure includes a neural network layer for feature extraction; the second network structure is used to calculate a loss value based on the output of the first network structure using an attention mechanism.

[0068] Each level of the first network structure includes a neural network layer for feature extraction, which can specifically be used to extract features from sample user characteristics and sample object characteristics.

[0069] The second network structure is used to calculate a loss value based on the attention mechanism for the output of the first network structure. Specifically, it can determine a predicted value for characterizing the positive feedback degree of the sample user for the historical object according to the sample user vector and the sample object vector output by the first network structure, and determine the loss value according to the predicted value and the target value for characterizing the operation behavior of the sample user for the historical object.

[0070] Because the sample historical behavior features (such as click behavior) of each user can reflect their diverse interests and hobbies, that is to say, the historical behavior features of users are generated under multiple interests and hobbies of users.

[0071] Since the historical behavior features of users are a partial manifestation of users' historical interests, in order to better model sequence features, an attention mechanism is introduced to process the sequence. The attention mechanism endows the model with the ability to distinguish, for example, different weights can be assigned to each sample user vector output by the first network structure.

[0072] Step 220: Train the preset network structure according to the loss value to determine the parameters of the trained multiple neural network layers at each level in multiple levels.

[0073] Train the preset network structure according to the loss value until the preset network structure meets the preset training conditions, such as meeting the preset convergence conditions. When the preset network structure meets the preset training conditions, determine the parameters of the trained multiple neural network layers at each level in multiple levels.

[0074] Step 230: Determine the trained first network structure as the prediction model.

[0075] Thus, by constructing a preset network structure including multiple levels, the preset network structure includes a first network structure and a second network structure. Each level of the first network structure includes a neural network layer for feature extraction. The second network structure is used to calculate the loss value based on the attention mechanism for the output of the first network structure. Because the sample historical behavior features (such as click behavior) of each user can reflect their diverse interests and hobbies, in order to better model sequence features, the second network structure introduces an attention mechanism to process the output of the first network structure. The attention mechanism endows the model with the ability to distinguish, for example, different weights can be assigned to each sample user vector output by the first network structure. Train the preset network structure according to the loss value to determine the parameters of the trained multiple neural network layers at each level in multiple levels, which can continuously improve the accuracy of the first network structure in extracting features. Finally, determine the trained first network structure as the prediction model. Thus, the trained prediction model can quickly and accurately extract the corresponding user vector from the user features according to each historical behavior feature of the user.

[0076] Based on the above-mentioned model construction method, an embodiment of the present application provides a model training method, which is described as follows:

[0077] Figure 3 It is a flowchart of a model training method provided by an embodiment of the present application.

[0078] As Figure 3 shown, the model training method may include step 310-step 380. This method is applied to a model training device, and is specifically as follows:

[0079] Step 310, obtain a plurality of sample data; each sample data includes sample user characteristics and sample object characteristics of a sample user. The sample user characteristics include N sample historical behavior characteristics, and N is an integer greater than 1.

[0080] The sample user characteristics include scene characteristics, user account characteristics, and N sample historical behavior characteristics.

[0081] Among them, the user account characteristics may include: user age, user gender, user occupation, etc.

[0082] Among them, the scene characteristics may include: usage time, usage location, usage environment, etc.

[0083] Among them, the output sample user vector may be a 64-dimensional vector. Among them, historical behaviors may include: click, favorite, forward, and viewing time greater than a preset threshold.

[0084] Specifically, first connect the characteristics corresponding to each historical behavior among the scene characteristics, user account characteristics, and N sample historical behavior characteristics to obtain N d-dimensional vectors, and then input these N d-dimensional user vectors into the user fully connected layer to obtain N 64-dimensional final user vectors. Each sample historical behavior characteristic will generate a unique sample user vector, aiming to interact with the sample object characteristics using the attention mechanism later.

[0085] Step 320, input the sample user characteristics into a preset network structure, and output N sample user vectors, which respectively correspond to the sample historical behavior characteristics.

[0086] Here, since the sample user characteristics include N sample historical behavior characteristics, the sample user vectors output based on the sample user characteristics correspond one-to-one with the sample historical behavior characteristics. The sample historical behavior characteristics of each user can reflect their diverse interests and hobbies.

[0087] Step 330, input the sample object characteristics into a preset network structure, and output a sample object vector.

[0088] The sample object features are used to obtain the sample object vector through the fully connected layers (item fc layers).

[0089] Among them, the sample object features are obtained by connecting the relevant features in the historical object corresponding to the historical behavior features, and the sample object vector can also be a 64-dimensional vector.

[0090] Step 340: Determine the weight value corresponding to each sample user vector according to the sample object vector.

[0091] Calculate the similarity between the N sample user vectors and the sample object vector respectively, and determine the weight value weight_i corresponding to each sample user vector.

[0092] After obtaining the weight value weight_i corresponding to each sample user vector (i = 1, 2,..., N), then use the weight value (weight_i) of each sample user vector to perform weighted processing on the N sample user vectors to determine the weighted user vector.

[0093] Among them, in the step of determining the weight value corresponding to each sample user vector according to the sample object vector involved above, it may specifically include the following steps:

[0094] Determine the similarity between the sample object vector and each sample user vector as the weight value;

[0095] Directly use the dot product, that is, weight_i = uservec_i * itemvec

[0096] Among them, weight_i is the weight value, uservec_i is the sample object vector, and itemvec is the sample object vector.

[0097] Thus, by calculating the similarity between the sample object vector and each sample user vector, the weight value of each sample user vector can be quickly determined.

[0098] Among them, in the step of determining the weight value corresponding to each sample user vector according to the sample object vector involved above, it may specifically include the following steps:

[0099] According to the sample object vector and each sample user vector, determine the concatenated vector corresponding to each sample user vector respectively;

[0100] Extract features from the concatenated vector to obtain the weight value corresponding to each sample user vector respectively.

[0101] Specifically, it can be calculated by constructing a small fully connected network. The inner product vectors based on the sample object vector and each sample user vector are determined respectively. Then, the sample object vector, the sample user vector, and the inner product vector are concatenated to obtain N concatenated vectors. Finally, feature extraction is performed on the concatenated vectors to obtain the weight values corresponding to each sample user vector respectively.

[0102] Thus, by performing feature extraction on the concatenated vectors determined by the sample object vector and each sample user vector, better feature interaction between the user vector and the object vector can be achieved, and the weight values of each sample user vector can be accurately determined.

[0103] Here, since the sample user vectors correspond to the sample historical behavior features respectively, different weight values weight_i (i = 1, 2,..., N) will be obtained for different sample user vectors, and then different final user vectors will be obtained. That is to say, each weight value corresponds to the sample historical behavior feature respectively. This is the modeling of the problem that the user's click on the object is a partial manifestation of the user's historical interests. Compared with direct pooling, the attention mechanism can achieve better results.

[0104] Step 350: Weight the N sample user vectors according to the weight values of each sample user vector to determine the weighted user vector.

[0105] Here, because the sample historical behavior features (such as click behavior) of each user can reflect their diverse interests and hobbies, that is to say, the user's historical behavior features are generated under the user's multiple interests and hobbies. In the processing of the sample historical behavior features, since the user's historical behavior features are a partial manifestation of the user's historical interests, in order to better model the sequence features, the attention mechanism is introduced to process the sequence. The attention mechanism endows the model with the ability to distinguish, for example, different weights can be assigned to each user feature of the user.

[0106] Since the preset network structure outputs N sample user vectors, each corresponding to the user's one-time historical behavior feature, the interaction between the user and the material vector can be performed here. By introducing the attention mechanism, better modeling of the historical behavior features can be achieved.

[0107] Step 360: Determine the prediction value according to the weighted user vector and the sample object vector. The prediction value is used to represent the degree of positive feedback of the sample user to the historical object, and the historical object corresponds to the sample object vector.

[0108] Specifically, the prediction value can be obtained by calculating the dot product of the weighted user vector and the sample object vector.

[0109] Step 370: Determine the loss value based on the predicted value and the target value, where the target value is used to characterize the operation behavior of the sample user on the historical object.

[0110] Determine the loss value according to the predicted value and the target value (labels). The target value is used to characterize the operation behavior of the sample user on the historical object. For example, if the sample user has a click behavior on the historical object, the target value can be 1; if the sample user does not have a click behavior on the historical object, the target value can be 0.

[0111] Among them, cross-entropy can be used to determine the above loss value, that is:

[0112]

[0113] Among them, n is the total number of samples, C is the number of categories, which is the sum of the positive samples (1) and the sampled negative samples in the recall task, and t ki is the probability that sample k belongs to category i, and y ki is the probability that the model predicts that sample k belongs to category i.

[0114] Step 380: Train the preset network structure according to the loss value until the preset network model meets the preset training conditions to obtain a prediction model.

[0115] Specifically, training the preset network structure according to the loss value may include: training the preset network structure according to the loss value, updating the network parameters by backpropagation, and then looping until the preset network model meets the preset training conditions, such as meeting the preset convergence conditions, and then obtaining the prediction model.

[0116] In summary, in the embodiments of the present application, by obtaining a plurality of sample data, inputting the sample user features into a preset network structure, and outputting N sample user vectors. Since the sample user vectors correspond to the sample historical behavior features respectively, each sample historical behavior feature corresponds to an actual historical behavior and also reflects different degrees of interest. According to the sample object vector, the weight value corresponding to each sample user vector can be determined respectively. The above-mentioned different weight values will be obtained for different sample user vectors, which is the modeling of the part of the user's historical interests reflected by the object of the user's operation. According to the weight values of each sample user vector, the N sample user vectors are weighted to obtain a weighted user vector, which can accurately express the user's interest preference. Then, the sample object features are input into the preset network structure to output a sample object vector. According to the weighted user vector and the sample object vector, a predicted value for characterizing the positive feedback degree of the sample user to the historical object is determined. According to the predicted value and the target value for characterizing the operation behavior of the sample user to the historical object, the loss value of the model training can be determined. Finally, according to the loss value, the preset network model is trained until the preset network model meets the preset training conditions, which can continuously improve the accuracy of the preset network model in extracting features and obtain a prediction model. Thus, the trained prediction model can quickly and accurately extract the corresponding user vector from the user features according to each historical behavior feature of the user.

[0117] Based on the above-mentioned model training method, the embodiments of the present application provide an object determination method, which is described below:

[0118] Figure 4 The following is a flowchart of an object determination method provided by the embodiments of the present application. The method includes:

[0119] Such as Figure 4 shown, the object determination method may include step 410-step 440. The method is applied to an object determination device, and is specifically as follows:

[0120] Step 410, when receiving a recommendation request initiated by a user, obtain the user features of the user. The user features include M historical behavior features of the user, and M is an integer greater than 1.

[0121] Among them, the recommendation request may be a refresh request of the user. Obtain the user features including M historical behavior features of the user. The historical behavior may include: click, favorite, forward, and the viewing time is greater than a preset threshold.

[0122] Step 420, input the user features into a pre-trained prediction model, and output M user vectors, where the user vectors correspond to the historical behavior features respectively.

[0123] In a possible embodiment, in step 420, it includes:

[0124] Input user features into a prediction model, and perform feature extraction on the user features through the fully connected layer and activation function in the prediction model to obtain user vectors.

[0125] Among them, the neural network layer in the prediction model can include a fully connected layer. The user features can be gradually and sequentially subjected to feature extraction through multiple fully connected layers and activation functions in the prediction model, and the user vectors that can accurately express the user's interests in the user features are extracted.

[0126] Here, since the historical behavior features (such as click behavior) of each user can reflect their diverse interests and hobbies, that is to say, the historical behavior features of users are generated under multiple interests and hobbies of users. The M user vectors determined above are all expressions of a historical behavior feature. Therefore, the M user vectors output by the prediction model can comprehensively express the user's interest preferences.

[0127] Step 430: Extract at least one target user vector from the M user vectors.

[0128] Since M user vectors are output in step 420, different schemes can be adopted to determine the target user vector according to the operating performance of the actual device and different usage purposes. Each of the following several ways of determining the target user vector has its own focus and can be carried out in parallel, so that better recall results can be obtained. The following will be described separately:

[0129] In order to determine the feature expressions of users for different categories of objects, the M user vectors can be fused to obtain the target user vector. In one possible embodiment, in step 430, it may specifically include the following steps:

[0130] Perform clustering processing on the M user vectors to obtain at least one target user vector.

[0131] On the one hand, since the historical behavior features are the features generated by interacting with historical objects, the M user vectors can be clustered according to the categories of historical objects. In this way, for user vectors of the same category, taking the average or weighted average according to the usage duration can obtain a better vector representation of the user in this category, that is, among the at least one target user vector obtained, the target user vectors correspond to the categories of historical objects respectively.

[0132] Therefore, by performing clustering processing on the M user vectors to obtain at least one target user vector, it is possible to fully consider the user's interests in different categories of objects, improve and enrich the categories of target objects, and have high flexibility.

[0133] On the other hand, in order to quickly recall the target object, the kmeans clustering algorithm can be directly used to aggregate M user vectors. In this way, the target object can be quickly determined.

[0134] If performance permits, the corresponding target object may be recalled for each of the M user vectors.

[0135] In another possible embodiment, the historical behavior feature includes the time when the historical behavior occurred and the duration of the historical behavior. Step 430 may specifically include the following steps:

[0136] At least one target user vector is extracted from the M user vectors according to the historical behavior occurrence time or the historical behavior occurrence duration.

[0137] Among them, the user's historical behavior characteristics contain a lot of information, including the time when the historical behavior occurred (such as click time) and the duration of the historical behavior (such as consumption duration). With the help of this information, at least one target user vector can be extracted from M user vectors based on the time when the historical behavior occurred or the duration of the historical behavior.

[0138] On the one hand, since user vectors correspond to historical behavior features, the M user vectors can be sorted according to the time of historical behavior, that is, they can be sorted from recent to far in order of historical behavior time, and the first K historical behavior time is selected, and the user vectors corresponding to the first K historical behavior time are determined as the target user vector. This processing is more biased towards the objects with the latest historical behavior, and has stronger real-time performance.

[0139] On the other hand, since the user vectors correspond to the historical behavior features respectively, the M user vectors can be sorted according to the duration of the historical behavior, that is, they can be sorted in descending order according to the duration of the historical behavior, and the first K durations of the historical behavior are selected, and the user vectors corresponding to the first K durations of the historical behavior are determined as the target user vectors. Since the duration of the historical behavior reflects the degree of interest of the user, the longer the consumption time, the more interested the user is. Therefore, the target object determined in this way can better meet the user's preferences.

[0140] Therefore, after outputting M user vectors, different methods can be used to determine the target user vector according to different goals. For example, if you want to consider the user's real-time interests, you can extract the target user vector from the M user vectors according to the time when the historical behavior occurred; if you want to comprehensively consider the historical interests, you can extract the target user vector from the M user vectors according to the duration of the historical behavior; if you want to consider the user's interest in objects of different categories, you can obtain the target user vector by clustering the M user vectors, so that the recalled target objects will be more flexible.

[0141] Step 440: Determine the target object corresponding to each target user vector from a preset object library respectively.

[0142] Construct an object index, obtain the objects that can be pushed and the corresponding object features, determine the object vectors corresponding to the object features through a prediction model, then use an indexing tool to index these object vectors, and determine the target object corresponding to each target user vector from the preset object library respectively. Package the retrieval results (target objects) of different target user vectors as the final recall result and return it.

[0143] In summary, in the embodiment of the present application, by obtaining the user features of the user, the user features include M historical behavior features of the user. Since the above prediction model is trained according to multiple sample data, each sample data includes N sample historical behavior features of the sample user and sample object features, the trained prediction model can extract the corresponding user vector from the user features according to each historical behavior feature of the user. Therefore, when the user features are input into the pre-trained prediction model, M user vectors corresponding to the historical behavior features respectively can be output. Because the historical behavior features of the user are generated under the user's various interests and hobbies, the M user vectors corresponding to the historical behavior features respectively output by the prediction model can comprehensively express the user's interest preferences. Then, at least one target user vector is extracted from the M user vectors, which can accurately express the user's interest preferences. Finally, the target object corresponding to each target user vector is determined from the preset object library respectively. The determined target object can comprehensively and accurately meet the various interests of the user. Thus, the accuracy of object determination can be improved.

[0144] For the model training method provided in the embodiment of the present application, the execution subject may be a model training device. In the embodiment of the present application, taking the model training device executing the model training method as an example, the model training device provided in the embodiment of the present application is described.

[0145] Figure 5 It is a block diagram of a model training device provided in the embodiment of the present application. The device 500 includes:

[0146] The first acquisition module 510 is used to acquire multiple sample data; each sample data includes the sample user features of the sample user and sample object features, and the sample user features include N sample historical behavior features, and N is an integer greater than 1.

[0147] The input module 520 is used to input the sample user features into a preset network structure and output N sample user vectors, and the sample user vectors correspond to the sample historical behavior features respectively.

[0148] The input module 520 is further used to input the sample object features into a preset network structure and output a sample object vector.

[0149] The first determination module 530 is configured to determine the weight value corresponding to each sample user vector according to the sample object vector.

[0150] The weighting module 540 is configured to perform weighting processing on the N sample user vectors according to the weight values of each sample user vector to determine a weighted user vector.

[0151] The second determination module 550 is configured to determine a prediction value according to the weighted user vector and the sample object vector, where the prediction value is used to characterize the degree of positive feedback of the sample user on the historical object, and the historical object corresponds to the sample object vector.

[0152] The third determination module 560 is configured to determine a loss value according to the prediction value and the target value, where the target value is used to characterize the operation behavior of the sample user on the historical object.

[0153] The first training module 570 is configured to train a preset network structure according to the loss value until the preset network model meets the preset training conditions to obtain a prediction model.

[0154] Optionally, the first determination module is specifically configured to:

[0155] Determine the dot product of the sample object vector and each sample user vector as the weight value.

[0156] Optionally, the first determination module is specifically configured to:

[0157] According to the sample object vector and each sample user vector, respectively determine the concatenated vector corresponding to each sample user vector;

[0158] Perform feature extraction on the concatenated vector to respectively obtain the weight value corresponding to each sample user vector.

[0159] In the embodiments of the present application, by obtaining a plurality of sample data, inputting sample user features into a preset network structure, and outputting N sample user vectors. Since the sample user vectors correspond to the sample historical behavior features respectively, each sample historical behavior feature corresponds to an actual historical behavior and also reflects different degrees of interest. According to the sample object vectors, the weight values corresponding to each sample user vector can be determined respectively. The above-mentioned different weight values will be obtained for different sample user vectors, which is the modeling of the part of the user's historical interests reflected by the object of the user's operation. By performing weighted processing on the N sample user vectors according to the weight values of each sample user vector, the obtained weighted user vector can accurately express the user's interest preference. Then, input the sample object features into the preset network structure to output the sample object vector. According to the weighted user vector and the sample object vector, determine the predicted value used to characterize the positive feedback degree of the sample user to the historical object. According to the predicted value and the target value used to characterize the operation behavior of the sample user to the historical object, the loss value of model training can be determined. Finally, train the preset network model according to the loss value until the preset network model meets the preset training conditions, which can continuously improve the accuracy of the preset network model in extracting features and obtain a prediction model. Thus, based on the model training method of the embodiments of the present application, the obtained prediction model can quickly and accurately extract the corresponding user vector from the user features according to each historical behavior feature of the user.

[0160] In the model construction method provided by the embodiments of the present application, the execution subject may be a model construction device. In the embodiments of the present application, taking the model construction device as an example to execute the model construction method, the model construction device provided by the embodiments of the present application is described.

[0161] Figure 6 FIG. is a block diagram of a model construction device provided by the embodiments of the present application. The device 600 includes:

[0162] A construction module 610, configured to construct a preset network structure including multiple layers. The preset network structure includes a first network structure and a second network structure. Each layer of the first network structure includes a neural network layer for feature extraction. The second network structure is used to calculate the loss value based on the output of the first network structure by means of an attention mechanism.

[0163] A second training module 620, configured to train the preset network structure according to the loss value to determine the parameters of the trained multiple neural network layers at each layer of the multiple layers.

[0164] A fourth determination module 630, configured to determine the trained first network structure as a prediction model.

[0165] In the embodiments of the present application, by constructing a preset network structure including multiple levels, the preset network structure includes a first network structure and a second network structure. Each level of the first network structure includes a neural network layer for feature extraction, and the second network structure is used to calculate a loss value based on the output of the first network structure by means of an attention mechanism. Since the sample historical behavior characteristics (such as click behavior) of each user can reflect their diverse interests and hobbies, in order to better model sequence features, the second network structure introduces an attention mechanism to process the output of the first network structure. The attention mechanism endows the model with the ability to distinguish, for example, different weights can be assigned to each sample user vector output by the first network structure. The preset network structure is trained according to the loss value to determine the parameters of the trained multiple neural network layers at each level among multiple levels, which can continuously improve the accuracy of feature extraction of the first network structure. Finally, the trained first network structure is determined as the prediction model. Thus, the trained prediction model can quickly and accurately extract the corresponding user vector from the user features according to each historical behavior feature of the user.

[0166] For the object determination method provided by the embodiments of the present application, the execution subject may be an object determination device. In the embodiments of the present application, taking the object determination device executing the object determination method as an example, the object determination device provided by the embodiments of the present application is described.

[0167] Figure 7 It is a block diagram of an object determination device provided by the embodiments of the present application. The device 700 includes:

[0168] A second acquisition module 710, configured to acquire user features of a user, where the user features include M historical behavior features of the user, and M is an integer greater than 1.

[0169] An output module 720, configured to input the user features into a pre-trained prediction model and output M user vectors, and the user vectors correspond to the historical behavior features respectively.

[0170] An extraction module 730, configured to extract at least one target user vector from the M user vectors.

[0171] A fifth determination module 740, configured to respectively determine a target object corresponding to each target user vector from a preset object library.

[0172] Optionally, the extraction module 730 is specifically configured to: perform clustering processing on the M user vectors to obtain at least one target user vector.

[0173] Optionally, the historical behavior features include the historical behavior occurrence time and the historical behavior duration. The extraction module 730 is specifically configured to:

[0174] Extract at least one target user vector from the M user vectors according to the historical behavior occurrence time or the historical behavior duration.

[0175] Optionally, the output module 720 is specifically configured to:

[0176] Input the user features into the prediction model, and perform feature extraction on the user features through the fully connected layer and the activation function in the prediction model to obtain user vectors.

[0177] In this way, in the embodiments of the present application, when a recommendation request initiated by a user is received, the user features of the user are obtained, and the user features include M historical behavior features of the user. Since the above prediction model is trained according to a plurality of sample data, each sample data includes N sample historical behavior features and sample object features of a sample user, the trained prediction model can extract the corresponding user vectors from the user features according to each historical behavior feature of the user. Therefore, inputting the user features into the pre-trained prediction model can output M user vectors respectively corresponding to the historical behavior features. Because the historical behavior features of the user are generated under the user's various interests and hobbies, the M user vectors respectively corresponding to the historical behavior features output by the prediction model can comprehensively express the user's interest preferences. Then, extracting at least one target user vector from the M user vectors can accurately express the user's interest preferences. Finally, from the preset object library, the target object corresponding to each target user vector is determined respectively. The target object determined in this way can comprehensively and accurately meet the various interests of the user. Therefore, the accuracy of object determination can be improved.

[0178] The object determination device in the embodiments of the present application may be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than terminals. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. It may also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.

[0179] The object determination device in the embodiments of the present application may be a device with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.

[0180] The object determination device provided in the embodiments of the present application can implement each process implemented in the above method embodiments. To avoid repetition, it will not be elaborated here.

[0181] Optionally, as Figure 8 shown, the embodiments of the present application further provide an electronic device 810, including a processor 811, a memory 812, a program or instruction stored on the memory 812 and executable on the processor 811. When the program or instruction is executed by the processor 811, it implements each step of any of the above object determination method embodiments and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0182] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0183] Figure 9 Schematic diagram of the hardware structure of an electronic device for implementing the embodiments of the present application.

[0184] The electronic device 900 includes, but is not limited to, components such as a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910.

[0185] Those skilled in the art can understand that the electronic device 900 may further include a power source (such as a battery) for powering each component. The power source can be logically connected to the processor 910 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. Figure 9 The structure of the electronic device shown does not limit the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0186] Among them, the network module 902 is used to obtain multiple sample data; each sample data includes a sample user feature and a sample object feature of the sample user. The sample user feature includes N sample historical behavior features, and N is an integer greater than 1.

[0187] The processor 910 is used to input the sample user feature into a preset network structure and output N sample user vectors, and the sample user vectors respectively correspond to the sample historical behavior features.

[0188] The processor 910 is further used to input the sample object feature into the preset network structure and output a sample object vector.

[0189] The processor 910 is further used to determine the weight value corresponding to each sample user vector according to the sample object vector.

[0190] The processor 910 is further used to perform weighted processing on the N sample user vectors according to the weight values of each sample user vector to determine a weighted user vector.

[0191] The processor 910 is further used to determine a prediction value according to the weighted user vector and the sample object vector. The prediction value is used to characterize the degree of positive feedback of the sample user on the historical object, and the historical object corresponds to the sample object vector.

[0192] The processor 910 is further used to determine a loss value according to the prediction value and the target value. The target value is used to characterize the operation behavior of the sample user on the historical object.

[0193] The processor 910 is further used to train the preset network structure according to the loss value until the preset network model meets the preset training conditions to obtain a prediction model.

[0194] Optionally, the processor 910 is further used to determine the dot product of the sample object vector and each sample user vector as the weight value.

[0195] Optionally, the processor 910 is further configured to respectively determine a concatenated vector corresponding to each sample user vector according to the sample object vector and each sample user vector;

[0196] Extract features from the concatenated vectors to respectively obtain weight values corresponding to each sample user vector.

[0197] Wherein, the processor 910 is further configured to construct a preset network structure including multiple levels, the preset network structure includes a first network structure and a second network structure; each level of the first network structure includes a neural network layer for feature extraction; the second network structure is used to calculate a loss value based on the output of the first network structure by means of an attention mechanism.

[0198] The processor 910 is further configured to train the preset network structure according to the loss value to determine the parameters of the trained multiple neural network layers at each of the multiple levels.

[0199] The processor 910 is further configured to determine the trained first network structure as a prediction model.

[0200] Wherein, the network module 902 is further configured to obtain user features of a user, and the user features include M historical behavior features of the user, where M is an integer greater than 1.

[0201] The processor 910 is further configured to input the user features into a pre-trained prediction model and output M user vectors, and the user vectors respectively correspond to the historical behavior features.

[0202] The processor 910 is further configured to extract at least one target user vector from the M user vectors.

[0203] The processor 910 is further configured to respectively determine a target object corresponding to each target user vector from a preset object library.

[0204] Optionally, the processor 910 is further configured to perform clustering processing on the M user vectors to obtain at least one target user vector.

[0205] Optionally, the processor 910 is further configured to extract at least one target user vector from the M user vectors according to the historical behavior occurrence time or the historical behavior occurrence duration.

[0206] Optionally, the processor 910 is further configured to input the user features into the prediction model, and perform feature extraction on the user features through a fully connected layer and an activation function in the prediction model to obtain user vectors.

[0207] In summary, by obtaining multiple sample data, inputting the sample user features into a preset network structure, and outputting N sample user vectors. Since the sample user vectors correspond to the sample historical behavior features respectively, each sample historical behavior feature corresponds to an actual historical behavior and also reflects different degrees of interest. According to the sample object vectors, the weight values corresponding to each sample user vector can be determined respectively. The above will obtain different weight values for different sample user vectors, which is the modeling of the part of the user's historical interests reflected by the object of the user's operation. Weighting the N sample user vectors according to the weight values of each sample user vector, the obtained weighted user vector can accurately express the user's interest preference. Then, input the sample object features into the preset network structure to output the sample object vector. According to the weighted user vector and the sample object vector, determine the predicted value used to characterize the positive feedback degree of the sample user to the historical object. According to the predicted value and the target value used to characterize the operation behavior of the sample user to the historical object, the loss value of model training can be determined. Finally, train the preset network model according to the loss value until the preset network model meets the preset training conditions, which can continuously improve the accuracy of the preset network model in extracting features and obtain the prediction model. Thus, the trained prediction model can quickly and accurately extract the corresponding user vector from the user features according to each historical behavior feature of the user.

[0208] After obtaining the trained prediction model, obtain the user features of the user, where the user features include M historical behavior features of the user. Since the above prediction model is trained according to multiple sample data, the trained prediction model can extract the corresponding user vector from the user features according to each historical behavior feature of the user. Therefore, inputting the user features into the pre-trained prediction model can output M user vectors corresponding to the historical behavior features respectively. Because the historical behavior features of the user are generated under the user's various interests and hobbies, the M user vectors output by the prediction model corresponding to the historical behavior features respectively can comprehensively express the user's interest preference. Then, extract at least one target user vector from the M user vectors, which can accurately express the user's interest preference. Finally, from the preset object library, determine the target object corresponding to each target user vector respectively. The target objects determined in this way can comprehensively and accurately meet the user's various interests. Thus, the accuracy of object determination can be improved.

[0209] It should be understood that in the embodiments of the present application, the input unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042. The GPU 6041 processes the image data of static pictures or video images obtained by an image capturing device (such as a camera) in the video image capturing mode or the image capturing mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of, for example, a liquid crystal display, an organic light emitting diode, etc. The user input unit 607 includes at least one of a touch panel 6071 and other input devices 6072. The touch panel 6071 is also referred to as a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. The other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an action lever, which will not be elaborated here. The memory 609 may be used to store software programs and various data, including but not limited to application programs and operating systems. The processor 610 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interfaces, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 610.

[0210] The memory 609 can be used to store software programs and various data. The memory 609 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 609 may include volatile memory or non-volatile memory, or the memory 609 may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM). The memory 609 in the embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.

[0211] The processor 610 may include one or more processing units; optionally, the processor 610 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above modem processor may not be integrated into the processor 610.

[0212] The embodiments of the present application further provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above object determination method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be elaborated here.

[0213] Among them, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs, etc.

[0214] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above object determination method embodiment, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0215] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.

[0216] The embodiments of the present application provide a computer program product. The program product is stored in a storage medium and is executed by at least one processor to implement each process of the above object determination method embodiment, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0217] It should be noted that in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitations, an element defined by the statement "including one..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, the features described with reference to certain examples may be combined in other examples.

[0218] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases, the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.

[0219] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative rather than restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.

Claims

1. A model training method, characterized in that, The method includes: Obtain a plurality of sample data; each of the sample data includes sample user characteristics and sample object characteristics of a sample user, and the sample user characteristics include N sample historical behavior characteristics, where N is an integer greater than 1; the historical behaviors include: click, favorite, forward, and viewing time greater than a preset threshold; Input the sample user characteristics into a preset network structure to output N sample user vectors, and the sample user vectors respectively correspond to the sample historical behavior characteristics; Input the sample object characteristics into the preset network structure to output a sample object vector; According to the sample object vector, determine the weight value corresponding to each sample user vector respectively, including: determining the dot product of the sample object vector and each sample user vector as the weight value; Perform weighted processing on the N sample user vectors according to the weight value of each sample user vector to determine a weighted user vector; According to the weighted user vector and the sample object vector, determine a prediction value, where the prediction value is used to characterize the positive feedback degree of the sample user to the historical object, and the historical object corresponds to the sample object vector; Determine a loss value according to the prediction value and a target value, where the target value is used to characterize the operation behavior of the sample user to the historical object; Train the preset network structure according to the loss value until the preset network model meets the preset training conditions to obtain a prediction model; Wherein, the preset network structure includes a first network structure and a second network structure; each layer of the first network structure includes a neural network layer for feature extraction; the second network structure is used to calculate the loss value based on the output of the first network structure by means of an attention mechanism.

2. The method according to claim 1, characterized in that, The determining the weight value corresponding to each sample user vector respectively according to the sample object vector includes: According to the sample object vector and each sample user vector, determine the concatenated vector corresponding to each sample user vector respectively; Perform feature extraction on the concatenated vector to respectively obtain the weight value corresponding to each sample user vector.

3. A model construction method, characterized in that, For constructing the prediction model according to any one of claims 1-2, the method includes: Construct a preset network structure including multiple layers, where the preset network structure includes a first network structure and a second network structure; each layer of the first network structure includes a neural network layer for feature extraction; the second network structure is used to calculate the loss value based on the output of the first network structure by means of an attention mechanism; train the preset network structure according to the loss value to determine the parameters of the multiple neural network layers that have been trained at each of the multiple layers; Determine the trained first network structure as the prediction model.

4. An object determination method, characterized in that, The method includes: Obtain the user characteristics of a user, where the user characteristics include M historical behavior characteristics of the user, and M is an integer greater than 1; the historical behaviors include: click, favorite, forward, and viewing time greater than a preset threshold; Input the user features into a pre-trained prediction model, where the prediction model is the prediction model according to any one of claims 1-2, and output M user vectors, where the user vectors respectively correspond to the historical behavior features; Extract at least one target user vector from the M user vectors; From a preset object library, respectively determine the target object corresponding to each of the target user vectors; The prediction model is obtained by training a preset network structure according to a loss value until the preset network model meets the preset training conditions; Wherein, the preset network structure includes a first network structure and a second network structure; each layer of the first network structure includes a neural network layer for feature extraction; the second network structure is used to calculate the loss value based on the output of the first network structure by means of an attention mechanism.

5. The method according to claim 4, characterized in that, The extracting at least one target user vector from the M user vectors includes: Performing clustering processing on the M user vectors to obtain the at least one target user vector.

6. The method according to claim 5, characterized in that, The historical behavior features include the historical behavior occurrence time and the historical behavior occurrence duration, and the extracting at least one target user vector from the M user vectors includes: According to the historical behavior occurrence time or the historical behavior occurrence duration, extract the at least one target user vector from the M user vectors.

7. The method according to claim 5, characterized in that, The inputting the user features into a pre-trained prediction model and outputting M user vectors includes: Input the user features into the prediction model, and perform feature extraction on the user features through the fully connected layer and the activation function in the prediction model to obtain the user vectors.

8. A model training apparatus, characterized in that, The device includes: A first acquisition module, configured to acquire a plurality of sample data; each sample data includes the sample user features and sample object features of a sample user, and the sample user features include N sample historical behavior features, where N is an integer greater than 1; the historical behaviors include: click, favorite, forward, and the viewing time is greater than a preset threshold; An input module, configured to input the sample user features into the preset network structure and output N sample user vectors, where the sample user vectors respectively correspond to the sample historical behavior features; The input module is further configured to input the sample object features into the preset network structure and output a sample object vector; A first determination module, configured to determine the weight value corresponding to each of the sample user vectors according to the sample object vector, including: determining the dot product of the sample object vector and each of the sample user vectors as the weight value; A weighting module, configured to perform weighting processing on the N sample user vectors according to the weight values of each of the sample user vectors to determine a weighted user vector; A second determination module, configured to determine a prediction value according to the weighted user vector and the sample object vector, where the prediction value is used to characterize the positive feedback degree of the sample user to the historical object, and the historical object corresponds to the sample object vector; A third determination module, configured to determine a loss value according to the prediction value and a target value, where the target value is used to characterize the operation behavior of the sample user to the historical object; The first training module is used to train the preset network structure according to the loss value until the preset network model meets the preset training conditions, and a prediction model is obtained; Among them, the preset network structure includes a first network structure and a second network structure; each layer of the first network structure includes a neural network layer for feature extraction; the second network structure is used to calculate the loss value based on the output of the first network structure by means of an attention mechanism.

9. A model construction device, characterized in that, For constructing the prediction model according to any one of claims 1-2, the device includes: A construction module is used to construct a preset network structure including multiple layers, the preset network structure includes a first network structure and a second network structure; each layer of the first network structure includes a neural network layer for feature extraction; the second network structure is used to calculate the loss value based on the output of the first network structure by means of an attention mechanism; The second training module is used to train the preset network structure according to the loss value to determine the parameters of the trained multiple neural network layers at each of the multiple layers; The fourth determination module is used to determine the trained first network structure as a prediction model.

10. An object determination device, characterized in that, The device includes: The second acquisition module is used to acquire the user features of the user, the user features include M historical behavior features of the user, and M is an integer greater than 1; the historical behaviors include: click, favorite, forward, and viewing time greater than a preset threshold; The output module is used to input the user features into a pre-trained prediction model, the prediction model is the prediction model according to any one of claims 1-2, and output M user vectors, and the user vectors correspond to the historical behavior features respectively; The extraction module is used to extract at least one target user vector from the M user vectors; The fifth determination module is used to respectively determine the target object corresponding to each of the target user vectors from a preset object library; The prediction model is obtained by training a preset network structure according to the loss value until the preset network model meets the preset training conditions; Among them, the preset network structure includes a first network structure and a second network structure; each layer of the first network structure includes a neural network layer for feature extraction; the second network structure is used to calculate the loss value based on the output of the first network structure by means of an attention mechanism.

11. An electronic device, characterized in that, It includes a processor and a memory, and the memory stores a program or instruction that can run on the processor. When the program or instruction is executed by the processor, the steps of the method according to any one of claims 1-7 are implemented.

12. A readable storage medium, characterized in that, The program or instruction is stored on the readable storage medium, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1-7 are implemented.

Citation Information

Patent Citations

  • Commodity recommendation method under mass data, electronic device and storage medium

    CN109509054A

  • Recommendation system recall method based on attention mechanism

    CN111062775A

  • Object recommendation method, device and equipment and storage medium

    CN112597395A