CN114860967A - Model training method, information recommendation method and device - Google Patents

Model training method, information recommendation method and device Download PDF

Info

Publication number
CN114860967A
CN114860967A CN202210473098.7A CN202210473098A CN114860967A CN 114860967 A CN114860967 A CN 114860967A CN 202210473098 A CN202210473098 A CN 202210473098A CN 114860967 A CN114860967 A CN 114860967A
Authority
CN
China
Prior art keywords
multimedia information
feature
recommended
information
deviation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210473098.7A
Other languages
Chinese (zh)
Inventor
胡焜
彭冲
程兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202210473098.7A priority Critical patent/CN114860967A/en
Publication of CN114860967A publication Critical patent/CN114860967A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • G06F16/435Filtering based on additional data, e.g. user or group profiles
    • G06F16/437Administration of user profiles, e.g. generation, initialisation, adaptation, distribution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The specification discloses a model training method, an information recommendation method and an information recommendation device. Firstly, operation information of a user aiming at each piece of recommended multimedia information in a history set time length is obtained. And secondly, according to the operation information, determining each first multimedia information browsed by the user and each second multimedia information not browsed by the user from each recommended multimedia information. And then, inputting the first multimedia information and the second multimedia information into a recommendation model to be trained, and determining a first feature corresponding to each first multimedia information and a second feature corresponding to each second multimedia information. Finally, the recommendation model is trained with the optimization objectives of minimizing the deviation between the first features and maximizing the deviation between the first features and the second features. According to the method, the accuracy of the multimedia information recommended to the user can be improved through the similarity between the first characteristics and the difference between the first characteristics and the second characteristics.

Description

Model training method, information recommendation method and device
Technical Field
The present specification relates to the field of computer technologies, and in particular, to a model training method, an information recommendation method, and an information recommendation apparatus.
Background
With the continuous development of electronic technology and network technology, image recommendations are generally made to users according to image features of images and preference features of users in order to provide more convenience to the daily life of users.
At present, the situation of high similarity among images may occur when the existing recommendation model recommends images to a user, so that the recommended images do not meet the expectations of the user, the accuracy of the images recommended by the recommendation model is poor, and the user experience is reduced.
Therefore, how to improve the accuracy of the image recommended to the user is a problem to be solved.
Disclosure of Invention
The present specification provides a model training method, an information recommendation apparatus, a storage medium, and an electronic device, so as to partially solve the above problems in the prior art.
The technical scheme adopted by the specification is as follows:
the present specification provides a method of model training, comprising:
acquiring operation information of a user for each recommended multimedia information within a historical set time;
according to the operation information, determining recommended multimedia information browsed by the user from the recommended multimedia information to serve as first multimedia information, and determining recommended multimedia information not browsed by the user to serve as second multimedia information;
inputting the first multimedia information and the second multimedia information into a recommendation model to be trained, and determining a characteristic corresponding to each first multimedia information as a first characteristic and a characteristic corresponding to each second multimedia information as a second characteristic;
and aiming at each piece of first multimedia information, training the recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other pieces of first multimedia information and the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature as optimization targets.
Optionally, according to the operation information, determining, from the recommended multimedia information, recommended multimedia information browsed by the user as each first multimedia information, and determining recommended multimedia information not browsed by the user as each second multimedia information specifically includes:
randomly transforming the recommended multimedia information according to the operation information to obtain first transformed multimedia information and second transformed multimedia information;
determining recommended multimedia information browsed by the user from the first converted multimedia information to serve as first multimedia information, and determining recommended multimedia information not browsed by the user to serve as second multimedia information;
and determining recommended multimedia information browsed by the user from the second converted multimedia information to be used as third multimedia information, and determining recommended multimedia information not browsed by the user to be used as fourth multimedia information.
Optionally, the inputting the first multimedia information and the second multimedia information into a recommendation model to be trained, determining a feature corresponding to each first multimedia information as a first feature, and determining a feature corresponding to each second multimedia information as a second feature, specifically including:
inputting the first multimedia information, the second multimedia information, the third multimedia information and the fourth multimedia information into a recommendation model to be trained, determining a feature corresponding to each first multimedia information in the first transformed multimedia information as a first feature, a feature corresponding to each second multimedia information in the first transformed multimedia information as a second feature, a feature corresponding to each third multimedia information in the second transformed multimedia information as a third feature, and a feature corresponding to each fourth multimedia information in the second transformed multimedia information as a fourth feature.
Optionally, for each piece of first multimedia information, taking minimizing a deviation between the first feature corresponding to the piece of first multimedia information and the first features corresponding to other pieces of first multimedia information, and maximizing a deviation between the first feature corresponding to the piece of first multimedia information and the second feature as optimization objectives, training the recommendation model specifically includes:
and aiming at each piece of first multimedia information, training the recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information, the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature, and the maximization of the deviation between the third feature corresponding to the third multimedia information and the third features corresponding to other third multimedia information and the maximization of the deviation between the third feature corresponding to the third multimedia information and the fourth feature as optimization targets.
Optionally, the recommendation model comprises: a characteristic submodel and an auxiliary submodel;
inputting the first multimedia information and the second multimedia information into a recommendation model to be trained, determining a feature corresponding to each first multimedia information as a first feature, and determining a feature corresponding to each second multimedia information as a second feature, specifically including:
inputting the first converted multimedia information and the second converted multimedia information into a feature submodel to be trained, determining a feature corresponding to each first converted multimedia information as a first model feature, and determining a feature corresponding to each second converted multimedia information as a second model feature;
and inputting the first converted multimedia information and the second converted multimedia information into an auxiliary sub-model to be trained, and determining the characteristic corresponding to each first converted multimedia information as a first auxiliary characteristic and the characteristic corresponding to each second converted multimedia information as a second auxiliary characteristic.
Optionally, for each piece of first multimedia information, taking minimizing a deviation between the first feature corresponding to the piece of first multimedia information and the first features corresponding to other pieces of first multimedia information, and maximizing a deviation between the first feature corresponding to the piece of first multimedia information and the second feature as optimization objectives, training the recommendation model specifically includes:
for each piece of recommended multimedia information, determining the similarity between the first model feature corresponding to the piece of recommended multimedia information and the second auxiliary feature corresponding to the piece of recommended multimedia information as a first similarity, and determining the difference between the first model feature corresponding to the piece of recommended multimedia information and the second auxiliary feature corresponding to other pieces of recommended multimedia information as a first difference;
and aiming at each piece of first multimedia information, training the recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information and the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature as optimization targets and taking the maximization of the first similarity and the first difference as optimization targets.
Optionally, for each piece of first multimedia information, taking minimizing a deviation between the first feature corresponding to the piece of first multimedia information and the first feature corresponding to other pieces of first multimedia information, and maximizing a deviation between the first feature corresponding to the piece of first multimedia information and the second feature as optimization objectives, and taking maximizing the first similarity and the first difference as optimization objectives, training the recommendation model specifically includes:
for each piece of recommended multimedia information, determining the similarity between the second model feature corresponding to the piece of recommended multimedia information and the first auxiliary feature corresponding to the piece of recommended multimedia information as a second similarity, and determining the difference between the second model feature corresponding to the piece of recommended multimedia information and the first auxiliary feature corresponding to other pieces of recommended multimedia information as a second difference;
and for each piece of first multimedia information, training the recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information and the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature as optimization targets and the maximization of the first similarity, the first difference, the second similarity and the second difference as optimization targets.
Optionally, for each piece of first multimedia information, training the recommendation model with the optimization objectives of minimizing a deviation between the first feature corresponding to the piece of first multimedia information and the first features corresponding to other pieces of first multimedia information, and maximizing a deviation between the first feature corresponding to the piece of first multimedia information and the second feature, and with the optimization objectives of maximizing the first similarity, the first difference, the second similarity, and the second difference, specifically includes:
regarding each piece of first multimedia information, taking a deviation between a first feature corresponding to the first multimedia information and a first feature corresponding to other pieces of first multimedia information as a first deviation, and taking a deviation between the first feature corresponding to the first multimedia information and the second feature as a second deviation;
determining a weight corresponding to the first deviation and a weight corresponding to the second deviation as round weights according to the round of training for each round of training, wherein the round weight is larger when the round corresponding to the round of training is larger;
and training the recommendation model according to the first deviation, the second deviation, the first similarity, the first difference, the second similarity, the second difference and the turn weight.
The present specification provides an information recommendation method, including:
responding to an information acquisition request of a target user, and acquiring candidate recommended multimedia information and a preference characterization of the target user;
for each candidate recommended multimedia information, inputting the candidate recommended multimedia information and the preference characterization of the target user into a pre-trained recommendation model, and predicting the click rate corresponding to the candidate recommended multimedia information, wherein the recommendation model is obtained by training through the model training method;
and determining recommended multimedia information recommended to the target user according to the click rate corresponding to each candidate recommended multimedia information, taking the recommended multimedia information as target recommended multimedia information, and recommending the target recommended multimedia information to the target user.
The present specification provides an apparatus for model training, comprising:
the acquisition module is used for acquiring operation information of a user aiming at each recommended multimedia information within a historical set time length;
the determining module is used for determining recommended multimedia information browsed by the user from the recommended multimedia information as first multimedia information and determining recommended multimedia information not browsed by the user as second multimedia information according to the operation information;
the input module is used for inputting the first multimedia information and the second multimedia information into a recommendation model to be trained, determining a characteristic corresponding to each first multimedia information as a first characteristic, and determining a characteristic corresponding to each second multimedia information as a second characteristic;
and the training module is used for training the recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information and the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature as optimization targets aiming at each piece of first multimedia information.
This specification provides an apparatus for information recommendation, including:
the response module is used for responding to an information acquisition request of a target user and acquiring candidate recommended multimedia information and a preference representation of the target user;
the prediction module is used for inputting the candidate recommended multimedia information and the preference characterization of the target user into a pre-trained recommendation model aiming at each candidate recommended multimedia information, and predicting the click rate corresponding to the candidate recommended multimedia information, wherein the recommendation model is obtained by training through the model training method;
and the recommending module is used for determining recommended multimedia information recommended to the target user according to the click rate corresponding to each candidate recommended multimedia information, using the recommended multimedia information as target recommended multimedia information, and recommending the target recommended multimedia information to the target user.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described method of model training and method of information recommendation.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of model training and the method of information recommendation described above when executing the program.
The technical scheme adopted by the specification can achieve the following beneficial effects:
in the model training method provided by the present specification, operation information of a user for each piece of recommended multimedia information within a history set time period is acquired. And secondly, according to the operation information, determining recommended multimedia information browsed by the user from the recommended multimedia information as the first multimedia information, and determining recommended multimedia information not browsed by the user as the second multimedia information. And then, inputting the first multimedia information and the second multimedia information into a recommendation model to be trained, and determining the characteristic corresponding to each first multimedia information as a first characteristic and the characteristic corresponding to each second multimedia information as a second characteristic. And finally, aiming at each piece of first multimedia information, taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information and the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature as optimization targets, and training the recommendation model.
The method can determine the similarity between the recommended multimedia information browsed by the user through the recommended multimedia information browsed by the user, and determine the difference between the recommended multimedia information browsed by the user and the recommended multimedia information not browsed by the user through the recommended multimedia information browsed by the user and the recommended multimedia information not browsed by the user. And finally, training a recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information and the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature corresponding to other first multimedia information as optimization targets, so that the correlation between the first features of the recommended multimedia information browsed by the user can be ensured, the difference between the first features of the recommended multimedia information browsed by the user and the second features of the recommended multimedia information not browsed by the user can also be ensured, and the accuracy of the multimedia information recommended to the user is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the specification and not to limit the specification in a non-limiting sense. In the drawings:
FIG. 1 is a schematic flow chart diagram illustrating a method for model training provided in an embodiment of the present disclosure;
FIG. 2 is a diagram of a model structure provided in an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a method for information recommendation provided by an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of an apparatus for model training provided in an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an apparatus for information recommendation provided in an embodiment of the present specification;
fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of this specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
In the embodiment of the present specification, when information recommendation is performed in response to an information acquisition request of a target user, a recommendation model trained in advance needs to be relied on, so a process of training the recommendation model will be described first, as shown in fig. 1.
Fig. 1 is a schematic flow chart of a method for training a model provided in an embodiment of the present specification, which specifically includes the following steps:
s100: and acquiring the operation information of the user aiming at each recommended multimedia information within the historical set time length.
In the embodiment of the present specification, the execution subject for training the recommendation model may be a server, or may be an electronic device such as a desktop computer, and for convenience of description, only the server is taken as the execution subject, and the method for training the recommendation model provided in the present specification is described below.
In practical applications, a user usually operates on recommended multimedia information according to a target requirement for a period of time. For example, a user may need to purchase a pet cat and, over a period of time, the user may click on an image associated with the pet cat. Based on this, the server may determine a set time period within which the target requirement of the user is considered to be unchanged, that is, the categories of the recommended multimedia information clicked by the user within the set time period are the same.
In this embodiment, the server may obtain operation information of the user for each piece of recommended multimedia information within a history set time period. The user referred to herein may refer to any user who has historically operated information on the line in the past. That is, the server may set a time limit, and extract the operation information within the set time limit from each recommended multimedia information of an arbitrary user. For example, if the history setting time is determined to be five minutes, the server may select five minutes of continuous operation information from the recommended multimedia information according to the historical operation information of the user. The specific formula is as follows:
Seq i ={(I t ,C t )|t=0,1,2,3...T}
in the above formula, Seq i The method can be used for representing the operation information of the ith user for each piece of recommended multimedia information within the historical set time length. T may be used to indicate a set duration. I is t Can be used to represent the corresponding recommended multimedia information at time t. C t Can be used to represent user browsing behavior, C t To 1 can indicate that the user browses to the user presentation of recommended multimedia information, C t A value of 0 may indicate that the user has not browsed to present the recommended multimedia information to the user. As can be seen from the above formula, the server selects continuous operation information with a set time length from the historical operation information of the user, and arranges the operation information in reverse order according to time.
Based on the method, the server can obtain the operation information of the plurality of users aiming at each piece of recommended multimedia information in the history set time length, and the obtained operation information of the plurality of users aiming at each piece of recommended multimedia information in the history set time length is used as a user data set. The specific formula is as follows:
D={Seq i |i=0,1,2,3...N}
in the above formula, D may be used to represent a set of operation information of several users for each recommended multimedia information within a history set time period as a user data set. In the training process of the subsequent recommendation model, the server can randomly select operation information of part of users in the history set duration from the user data set to train the recommendation model.
The multimedia information mentioned here includes: images, video, and the like. Each recommended multimedia information may come from various service scenarios, for example, a search scenario for satisfying the user's active search requirement may include: a food search scenario, a travel search scenario, a merchandise search scenario, etc. For another example, a recommendation scenario or the like for satisfying a passive personalized recommendation requirement of a user may include: a food recommendation scenario, a travel recommendation scenario, a commodity recommendation scenario, etc.
The operation information may refer to historical click information of the user, historical order information of the user, historical approval information of the user, and the like. For example, a food image clicked by the user in a food search scene. For another example, the user may be an image corresponding to a product ordered in a product recommendation scene.
It should be noted that, before the server obtains the operation information of the user for each piece of recommended multimedia information, it needs to send an authorization request to the user first, and if the user does not agree with the authorization, the server cannot obtain the operation information of the user for each piece of recommended multimedia information. If the user agrees to the authorization, the server can delete the acquired operation information of the user for each piece of recommended multimedia information when the user cancels the service applying the method.
S102: and determining recommended multimedia information browsed by the user from the recommended multimedia information as first multimedia information and determining recommended multimedia information not browsed by the user as second multimedia information according to the operation information.
In this embodiment, the server may determine, from the recommended multimedia information, recommended multimedia information browsed by the user as each first multimedia information, and determine recommended multimedia information not browsed by the user as each second multimedia information according to the operation information.
In the embodiment of the specification, the recommended model is applied to an automatic supervision comparison algorithm. The positive examples in the auto-supervised contrast algorithm are usually all based on different transformations of the same image, and the negative examples are usually other images. Based on this, the server may randomly transform each image in the user data set to obtain a positive exemplar and a negative exemplar corresponding to the image.
In this embodiment, the server may perform random transformation on each piece of recommended multimedia information according to the operation information to obtain each piece of first transformed multimedia information and each piece of second transformed multimedia information. The random transformations referred to herein include: random clipping, random color transformation, random Gaussian blur, scaling to a fixed size and other multimedia information transformation modes.
Then, the server may determine, from the first converted multimedia information, recommended multimedia information browsed by the user as first multimedia information, and determine recommended multimedia information not browsed by the user as second multimedia information.
Similarly, the server may determine, from the second converted multimedia information, recommended multimedia information browsed by the user as third multimedia information, and determine recommended multimedia information not browsed by the user as fourth multimedia information
The self-monitoring Contrast algorithm used by the recommended model applied in the method may be a Momentum Contrast algorithm (MOCO), a Simple Framework algorithm for Visual representation Contrast Learning (simcl) and the like, and the specific form of the self-monitoring Contrast algorithm used by the recommended model is not limited in this specification.
S104: and inputting the first multimedia information and the second multimedia information into a recommendation model to be trained, and determining the characteristic corresponding to each first multimedia information as a first characteristic and the characteristic corresponding to each second multimedia information as a second characteristic.
S106: and aiming at each piece of first multimedia information, training the recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other pieces of first multimedia information and the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature as optimization targets.
In practical applications, a user generally has a certain target requirement to operate the recommended multimedia information in the process of browsing the recommended multimedia information, and therefore, the server may consider that the categories of the recommended multimedia information operated by the user are consistent in a period of time. That is to say, the semantic relevance between the recommended multimedia information operated by the user within the set time length is strong and has the same characteristics, while the semantic relevance between the recommended multimedia information operated by the user within the set time length and the recommended multimedia information not operated by the user within the set time length is weak and does not have the same characteristics. Based on the method, the server can carry out model training on the recommendation model by shortening the distance between the recommended multimedia information operated by the user and pushing away the distance between the recommended multimedia information operated by the user and the recommended multimedia information not operated by the user, so that the recommendation model can better represent the characteristics of the recommended multimedia information in the actual application process.
In this embodiment, the server may input each first multimedia information and each second multimedia information into the recommendation model to be trained, and determine a feature corresponding to each first multimedia information as a first feature, and a feature corresponding to each second multimedia information as a second feature.
Then, the server may train the recommendation model for each piece of the first multimedia information with the optimization objectives of minimizing a deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other pieces of the first multimedia information, and maximizing a deviation between the first feature corresponding to the first multimedia information and the second feature. The specific formula is as follows:
Figure BDA0003623848230000091
in the above formula, f q1i Can be used for characterizing the correspondence of the ith first multimedia informationA first feature.
Figure BDA0003623848230000092
Can be used to characterize the first feature corresponding to the jth other first multimedia information.
Figure BDA0003623848230000093
Can be used to characterize the corresponding second feature of the jth second multimedia information. N may be used to characterize the amount of the first multimedia information. M may be used to characterize the amount of second multimedia information.
Figure BDA0003623848230000094
The method can be used for characterizing that, for each first multimedia information, a first average value of distances between a first feature corresponding to the first multimedia information and first features corresponding to other first multimedia information is determined. The smaller the first average value is, the greater the similarity between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information is.
Figure BDA0003623848230000095
The method may be used to characterize, for each first multimedia information, a second average of distances between a first feature corresponding to the first multimedia information and a second feature corresponding to the second multimedia information. The larger the second average value is, the larger the difference between the first feature corresponding to the first multimedia information and the second feature corresponding to the second multimedia information is.
As a result of this, it is possible to,
Figure BDA0003623848230000096
the training recommendation model is negative, and the value of the training recommendation model cannot be well determined. Based on this, the server sets the parameter m such that the difference between the first average value and the second average value is close to the parameter m. If the difference between the first average value and the second average value exceeds the parameter m, so that
Figure BDA0003623848230000097
Result of (2) is less than 0Thus, the formula result is determined to be 0 to determine that the recommended model training is completed. Wherein the parameter m may be set manually according to expert experience.
The above formula can be seen that the formula can make the characteristics of the recommended multimedia information of the same category determined by the recommendation model have more similarity, and make the characteristics of the recommended multimedia information of different categories determined by the recommendation model have more difference.
In practical application, after the same image is subjected to different random transformations, two transformed images are obtained, if the recommendation model can better extract the features of the images, the image features of the two transformed images corresponding to the same image should be basically the same, and based on this, for each transformed image, the server can perform model training on the recommendation model by shortening the distance between the recommended multimedia information operated by the user in the transformed image and advancing the distance between the recommended multimedia information operated by the user in the transformed image and the recommended multimedia information not operated by the user in the transformed image, so that the optimization degree of the recommendation model is higher.
In this embodiment, the server may input each of the first multimedia information, each of the second multimedia information, each of the third multimedia information, and each of the fourth multimedia information into a recommendation model to be trained, determine a feature corresponding to each of the first multimedia information in each of the first transformed multimedia information as a first feature, determine a feature corresponding to each of the second multimedia information in each of the first transformed multimedia information as a second feature, determine a feature corresponding to each of the third multimedia information in each of the second transformed multimedia information as a third feature, and determine a feature corresponding to each of the fourth multimedia information in each of the second transformed multimedia information as a fourth feature.
Similarly, the server may train the recommendation model for each third multimedia information with the goal of minimizing the deviation between the third feature corresponding to the third multimedia information and the third features corresponding to other third multimedia information, and maximizing the deviation between the third feature corresponding to the third multimedia information and the fourth feature. The specific formula is as follows:
Figure BDA0003623848230000101
in the above formula, f q2i Can be used to characterize the third feature corresponding to the ith third multimedia information.
Figure BDA0003623848230000102
Can be used to characterize the third feature corresponding to the jth other third multimedia information.
Figure BDA0003623848230000103
May be used to characterize a fourth feature corresponding to the jth fourth multimedia information. N may be used to characterize the amount of the third multimedia information. M may be used to characterize the amount of the fourth multimedia information.
Figure BDA0003623848230000104
The method may be used to characterize, for each third multimedia information, a third average value of distances between a third feature corresponding to the third multimedia information and third features corresponding to other third multimedia information. The smaller the third average value is, the greater the similarity between the third feature corresponding to the third multimedia information and the third features corresponding to other third multimedia information is.
Figure BDA0003623848230000105
May be configured to determine, for each third multimedia information, a fourth average of distances between a third feature corresponding to the third multimedia information and a fourth feature corresponding to the fourth multimedia information. The larger the fourth average value is, the larger the difference between the third feature corresponding to the third multimedia information and the fourth feature corresponding to the fourth multimedia information is.
Further, the server may train the recommendation model for each first multimedia message with an optimization goal of minimizing a deviation between the first feature corresponding to the first multimedia message and the first features corresponding to other first multimedia messages and maximizing a deviation between the first feature corresponding to the first multimedia message and the second feature, and for each third multimedia message with an optimization goal of minimizing a deviation between the third feature corresponding to the third multimedia message and the third features corresponding to other third multimedia messages and maximizing a deviation between the third feature corresponding to the third multimedia message and the fourth feature. The specific formula is as follows:
Figure BDA0003623848230000111
in the above formula, Σ j∈+ L tri (f q1j ,f q1 ) Can be used for characterization to minimize the deviation between the first feature corresponding to the first multimedia information and the first feature corresponding to other first multimedia information, and to maximize the deviation between the first feature corresponding to the first multimedia information and the second feature. Sigma j∈+ L tri (f q2j ,f q2 ) Can be used for characterization to minimize the deviation between the third feature corresponding to the third multimedia information, the third feature corresponding to other third multimedia information, and maximize the deviation between the third feature corresponding to the third multimedia information and the fourth feature.
In practical application, after different random transformations are performed on the same image, image features corresponding to a plurality of transformed images obtained in models with different parameters have a similar relationship, and based on the relationship, the server can reduce the distance between the image features corresponding to the plurality of transformed images of the same image, improve the distance between the image features corresponding to different images, train the recommendation model, and enable the image features determined by the recommendation model to better represent the characteristics of the image.
In the embodiments of the present specification, the recommendation model includes: a characteristic submodel and an auxiliary submodel. The feature submodel has the same structure as the auxiliary submodel, but the feature submodel has different model parameters from the auxiliary submodel.
In this embodiment, the server may input each first transformed multimedia information and each second transformed multimedia information into the feature submodel to be trained, and determine a feature corresponding to each first transformed multimedia information as a first model feature, and a feature corresponding to each second transformed multimedia information as a second model feature.
Similarly, the server may input each first converted multimedia information and each second converted multimedia information into the auxiliary submodel to be trained, determine a feature corresponding to each first converted multimedia information as a first auxiliary feature, and determine a feature corresponding to each second converted multimedia information as a second auxiliary feature.
Further, the server may determine, for each piece of recommended multimedia information, a similarity between a first model feature corresponding to the piece of recommended multimedia information and a second assistant feature corresponding to the piece of recommended multimedia information as a first similarity, and determine a difference between the first model feature corresponding to the piece of recommended multimedia information and the second assistant feature corresponding to another piece of recommended multimedia information as a first difference. And training the recommendation model by taking the maximized first similarity and the maximized first difference as optimization targets. The specific formula is as follows:
Figure BDA0003623848230000112
in the above formula, q 1 The method can be used for characterizing the characteristics corresponding to the first transformed multimedia information output by the characteristic submodel. k is a radical of 2 And the method can be used for representing the corresponding characteristics of the second transformed multimedia information output by the auxiliary submodel. τ may be used to characterize a hyper-parameter that is manually set based on expert experience.
Figure BDA0003623848230000113
Can be used for characterizing the corresponding first model of each recommended multimedia informationSimilarity between the feature and a second auxiliary feature corresponding to the recommended multimedia information.
Figure BDA0003623848230000121
The method can be used for characterizing the sum of the difference degree between the first model characteristic corresponding to each recommended multimedia information and the second auxiliary characteristic corresponding to other recommended multimedia information.
As can be seen from the above formula, for each recommended multimedia information,
Figure BDA0003623848230000122
the greater the value of (A), the higher the similarity between the first model feature corresponding to the recommended multimedia information and the second auxiliary feature corresponding to the recommended multimedia information, L nce (q 1 ,k 2 ) The smaller.
Figure BDA0003623848230000123
The smaller the value of (A), the higher the difference between the first model feature corresponding to the recommended multimedia information and the second auxiliary feature corresponding to other recommended multimedia information, L nce (q 1 ,k 2 ) The smaller.
Based on this, the server may train the recommendation model for each first multimedia message with the optimization objectives of minimizing a deviation between the first feature corresponding to the first multimedia message and the first features corresponding to other first multimedia messages and maximizing a deviation between the first feature corresponding to the first multimedia message and the second feature, and with the optimization objectives of maximizing the first similarity and the first difference.
Similarly, for each piece of recommended multimedia information, the server may determine, as the second similarity, a similarity between the second model feature corresponding to the piece of recommended multimedia information and the first assistant feature corresponding to the piece of recommended multimedia information, and determine, as the second difference, a difference between the second model feature corresponding to the piece of recommended multimedia information and the first assistant feature corresponding to the other piece of recommended multimedia information. And training the recommendation model by taking the second similarity and the second difference as optimization targets. The specific formula is as follows:
Figure BDA0003623848230000124
in the above formula, q 2 The method can be used for characterizing the characteristics corresponding to the second transformed multimedia information output by the characteristic submodel. k is a radical of 1 The method can be used for representing the corresponding characteristics of the first transformed multimedia information output by the auxiliary submodel.
Figure BDA0003623848230000125
The method can be used for characterizing the similarity between the second model feature corresponding to the recommended multimedia information and the first auxiliary feature corresponding to the recommended multimedia information for each piece of recommended multimedia information.
Figure BDA0003623848230000126
The method can be used for characterizing the sum of the difference degree between the second model characteristic corresponding to each recommended multimedia information and the first auxiliary characteristic corresponding to other recommended multimedia information.
As can be seen from the above formula, for each recommended multimedia information,
Figure BDA0003623848230000127
the greater the value of (A), the higher the similarity between the second model feature corresponding to the recommended multimedia information and the first auxiliary feature corresponding to the recommended multimedia information, L nce (q 2 ,k 1 ) The smaller.
Figure BDA0003623848230000128
The smaller the value of (A), the higher the difference between the second model feature corresponding to the recommended multimedia information and the first auxiliary feature corresponding to other recommended multimedia information, L nce (q 1 ,k 2 ) The smaller.
Based on this, the server may train the recommendation model for each first multimedia message with the optimization objectives of minimizing a deviation between the first feature corresponding to the first multimedia message and the first features corresponding to other first multimedia messages and maximizing a deviation between the first feature corresponding to the first multimedia message and the second feature, and with the optimization objectives of maximizing the first similarity, the first difference, the second similarity, and the second difference.
In practical application, in an early stage of model training of a recommendation model, characteristics corresponding to multimedia information determined by the recommendation model may be inaccurate, which may cause errors in the determined deviation between the first characteristic corresponding to the first multimedia information and the first characteristics corresponding to other first multimedia information and the deviation between the first characteristic corresponding to the first multimedia information and the second characteristic corresponding to the maximized first multimedia information, for each piece of first multimedia information, thereby reducing efficiency of model training of the recommendation model. Based on the method, the server can reduce the similarity between the recommended multimedia information browsed by the user and the weight of the difference between the recommended multimedia information browsed by the user and the recommended multimedia information not browsed by the user in the model training process in the early stage, so that the accuracy of the characteristics corresponding to the determined recommended multimedia information is improved in the early stage of model training.
With the continuous optimization of the training process of the model, the recommendation model can determine the characteristics corresponding to the more accurate recommended multimedia information. Then, the server can improve the similarity between the recommended multimedia information browsed by the user and the weight of the difference between the recommended multimedia information browsed by the user and the recommended multimedia information not browsed by the user in the model training process at the later stage of model training, so that the later stage of model training focuses more on improving the similarity between the characteristics corresponding to the recommended multimedia information of the same category.
In this embodiment, the server may determine, for each first multimedia information, a deviation between the first feature corresponding to the first multimedia information and the first feature corresponding to the other first multimedia information as a first deviation, and determine a deviation between the first feature corresponding to the first multimedia information and the second feature as a second deviation. Next, for each round of training, a weight corresponding to the first deviation and a weight corresponding to the second deviation are determined as round weights according to the round of training, wherein the round weight is larger as the round corresponding to the round of training is larger.
Finally, the server can train the recommendation model according to the first deviation, the second deviation, the first similarity, the first difference, the second similarity, the second difference and the turn weight.
L=L nce +β(t)*L tri
Figure BDA0003623848230000131
In the above formula, L nce May be used to characterize the first degree of similarity, the first degree of difference, the second degree of similarity, and the second degree of difference. L is tri May be used to characterize the first deviation as well as the second deviation. β (t) may be used to characterize the round weights. Alpha can be used to characterize a hyper-parameter determined empirically by a human. T may be used to characterize the total training round of the training model. t may be used to characterize the current training round of the training model. It can be seen from the above formula that the more training rounds, the greater the weight of the rounds. That is, in the early stage of model training, attention is paid to improving the accuracy of the determined features corresponding to the recommended multimedia information. In the later stage of model training, attention is paid to improving the similarity between the characteristics corresponding to the recommended multimedia information of the same category and the difference between the recommended multimedia information browsed by the user and the recommended multimedia information not browsed by the user.
According to the method, the characteristics corresponding to the multimedia information of the same category are drawn through the recommendation model, so that the situation that the recommendation model recommends highly similar multimedia information to the user in the process of recommending the multimedia information based on the user operation is avoided, the multimedia information recommended by the recommendation model and the multimedia information operated by the user are of the same category and have difference, and the probability that the multimedia information meets the expectation of the user is improved.
In practical applications, a user usually operates the recommended multimedia information according to a target requirement for a period of time, but there may be a case where the user operates other recommended multimedia information than the target requirement. Based on this, for each first multimedia information, the server may determine a plurality of first multimedia information closer to the first multimedia information, and then zoom in the distance between the first multimedia information and the plurality of first multimedia information closer to the first multimedia information. And determining a plurality of second multimedia information far away from the first multimedia information, and then, moving the distance between the first multimedia information and the plurality of second multimedia information far away from the first multimedia information.
In this embodiment, the server may determine a distance between the first feature corresponding to the first multimedia information and the first features corresponding to the other first multimedia information, as a first distance, sort the first distances, and filter out the first features corresponding to the set number of other first multimedia information. Secondly, determining the distance between the first feature corresponding to the first multimedia information and the second feature corresponding to the second multimedia information as a second distance, and sorting the second distances to screen out the second features corresponding to the set number of second multimedia information.
Similarly, the server may determine a distance between the third feature corresponding to the third multimedia information and the third features corresponding to other third multimedia information, as a third distance, sort the third distances, and screen out the third features corresponding to a set number of other third multimedia information. And secondly, determining the distance between the third feature corresponding to the third multimedia information and the fourth feature corresponding to the fourth multimedia information as a fourth distance, sequencing the fourth distances, and screening out the fourth features corresponding to the set number of fourth multimedia information.
And finally, aiming at each piece of first multimedia information, training a recommendation model by taking the minimum deviation between the first feature corresponding to the first multimedia information and the first feature corresponding to the screened other set number of first multimedia information, the maximum deviation between the first feature corresponding to the first multimedia information and the screened second feature corresponding to the screened set number of second multimedia information, and aiming at each piece of third multimedia information, as optimization targets, the minimum deviation between the third feature corresponding to the third multimedia information, the third feature corresponding to the screened other set number of third multimedia information, and the maximum deviation between the third feature corresponding to the third multimedia information and the screened fourth feature corresponding to the screened set number of fourth multimedia information. Through multiple rounds of iterative training, the deviation can be continuously reduced and converged in a numerical range, and then the training process of the recommendation model is completed.
The method for determining the recommended model training direction may be a Stochastic Gradient Descent (SGD) method.
It should be noted that, in the recommended model, the deviation can be continuously reduced through multiple rounds of iterative training, the trained feature submodel is the feature submodel, and the auxiliary submodel updates the momentum according to the model parameter adjustment and the set weight of the feature submodel.
Fig. 2 is a schematic diagram of a model structure provided in an embodiment of the present disclosure.
In fig. 2, the server may randomly transform each recommended multimedia information in the operation information of the user within the history set time length to obtain each first transformed multimedia information and each second transformed multimedia information. And inputting each first transformed multimedia information and each second transformed multimedia information into a feature submodel of the recommendation model to obtain a first model feature and a second model feature, and inputting each first transformed multimedia information and each second transformed multimedia information into an auxiliary submodel of the recommendation model to obtain a first auxiliary feature and a second auxiliary feature.
Then, for each piece of recommended multimedia information, the server may determine, as a first similarity, a similarity between a first model feature corresponding to the piece of recommended multimedia information and a second assistant feature corresponding to the piece of recommended multimedia information, and determine, as a first difference, a difference between the first model feature corresponding to the piece of recommended multimedia information and the second assistant feature corresponding to another piece of recommended multimedia information.
And determining the similarity between the second model characteristic corresponding to the recommended multimedia information and the first auxiliary characteristic corresponding to the recommended multimedia information as a second similarity, and determining the difference between the second model characteristic corresponding to the recommended multimedia information and the first auxiliary characteristic corresponding to other recommended multimedia information as a second difference for each piece of recommended multimedia information.
Then, the server can determine, according to each first model feature, a feature corresponding to each first multimedia information in each first converted multimedia information as a first feature, and a feature corresponding to each second multimedia information in each first converted multimedia information as a second feature;
and determining the feature corresponding to each first multimedia information in each second converted multimedia information as a third feature and the feature corresponding to each second multimedia information in each second converted multimedia information as a fourth feature according to each second model feature.
Finally, the server may train the recommendation model for each first multimedia message by minimizing a deviation between the first feature corresponding to the first multimedia message and the first features corresponding to other first multimedia messages, and minimizing a deviation between the third feature corresponding to the first multimedia message and the third features corresponding to other first multimedia messages, by maximizing a deviation between the first feature corresponding to the first multimedia message and the second feature, and by maximizing a deviation between the third feature corresponding to the first multimedia message and the fourth feature, as optimization objectives, and by maximizing the first similarity, the first difference, the second similarity, and the second difference as optimization objectives.
It should be noted that, the framework used by the recommendation model mentioned above may be an Enc-Dec Network structure such as a full link Forward propagation Network (FFN), a full link Connected Neural Network (FCNN), a Multi-head Attention mechanism Network (MSA), or other forms of Neural Network structures, and this specification does not limit the specific form of the framework used by the recommendation model.
In the process, the similarity between the recommended multimedia information browsed by the user can be determined according to the recommended multimedia information browsed by the user, and the difference between the recommended multimedia information browsed by the user and the recommended multimedia information not browsed by the user can be determined according to the recommended multimedia information browsed by the user and the recommended multimedia information not browsed by the user. And finally, training a recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information and the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature corresponding to other first multimedia information as optimization targets, so that the correlation between the first features of the recommended multimedia information browsed by the user can be ensured, the difference between the first features of the recommended multimedia information browsed by the user and the second features of the recommended multimedia information not browsed by the user can also be ensured, and the accuracy of the multimedia information recommended to the user is improved. Furthermore, the server can train the recommendation model by taking the maximized first similarity, the maximized first difference, the maximized second similarity and the maximized second difference as optimization targets, so that the accuracy of the determined characteristics corresponding to the recommended multimedia information is improved.
After training of the recommendation model is completed, the embodiment of the description may recommend information to the user through the recommendation model, and a specific process is shown in fig. 3.
Fig. 3 is a flowchart illustrating a method for information recommendation provided in an embodiment of the present disclosure.
S300: and responding to an information acquisition request of a target user, and acquiring candidate recommended multimedia information and the preference characterization of the target user.
In this embodiment, the server may obtain, in response to an information obtaining request of a target user, candidate recommended multimedia information and a preference representation of the target user, where the target user refers to a user who is performing a service at a current time. The candidate recommendation information may refer to information that has been filtered in a business scenario, or may refer to all information in the business scenario. The preference characterization of the target user may be determined according to historical order data of the user and historical operation information.
S302: and inputting the candidate recommended multimedia information and the preference characterization of the target user into a pre-trained recommendation model aiming at each candidate recommended multimedia information, and predicting the click rate corresponding to the candidate recommended multimedia information, wherein the recommendation model is obtained by training through the model training method.
S304: and determining recommended multimedia information recommended to the target user according to the click rate corresponding to each candidate recommended multimedia information, taking the recommended multimedia information as target recommended multimedia information, and recommending the target recommended multimedia information to the target user.
In this embodiment, the server may input, for each candidate recommended multimedia information, the candidate recommended multimedia information and the preference characterization of the target user into a pre-trained recommendation model, and predict a click rate corresponding to the candidate recommended multimedia information.
The method for determining the features corresponding to the candidate recommendation information is basically the same as the method mentioned in the model training process, and is not described in detail herein.
And determining recommended multimedia information recommended to the target user according to the click rate corresponding to each candidate recommended multimedia information, taking the recommended multimedia information as target recommended multimedia information, and recommending the target recommended multimedia information to the target user.
Specifically, the server may determine a click rate corresponding to each candidate recommendation information, sort each candidate recommendation information in a manner that the click rate is from large to small, and use the candidate recommendation information sorted before the set sorting position as the target recommendation information output at the current time.
From the above, the server can improve the recommendation effect of information recommendation to the target user through the features corresponding to the candidate recommendation information determined by the recommendation model.
Based on the same idea, the present specification further provides a corresponding model training apparatus, as shown in fig. 4.
Fig. 4 is a schematic structural diagram of a model training apparatus provided in an embodiment of this specification, which specifically includes:
an obtaining module 400, configured to obtain operation information of a user for each piece of recommended multimedia information within a history set time;
a determining module 402, configured to determine, according to the operation information, recommended multimedia information browsed by the user from the recommended multimedia information as each first multimedia information, and determine recommended multimedia information not browsed by the user as each second multimedia information;
an input module 404, configured to input the first multimedia information and the second multimedia information into a recommendation model to be trained, determine a feature corresponding to each first multimedia information as a first feature, and determine a feature corresponding to each second multimedia information as a second feature;
the training module 406 is configured to train the recommendation model for each piece of first multimedia information with the optimization objectives of minimizing a deviation between the first feature corresponding to the piece of first multimedia information and the first features corresponding to other pieces of first multimedia information, and maximizing a deviation between the first feature corresponding to the piece of first multimedia information and the second feature.
Optionally, the determining module 402 is specifically configured to, according to the operation information, randomly transform each piece of recommended multimedia information to obtain each piece of first transformed multimedia information and each piece of second transformed multimedia information, determine, from each piece of first transformed multimedia information, recommended multimedia information browsed by the user as each piece of first multimedia information, determine recommended multimedia information not browsed by the user as each piece of second multimedia information, determine, from each piece of second transformed multimedia information, recommended multimedia information browsed by the user as each piece of third multimedia information, and determine recommended multimedia information not browsed by the user as each piece of fourth multimedia information.
Optionally, the input module 404 is specifically configured to input the first multimedia information, the second multimedia information, the third multimedia information, and the fourth multimedia information into a recommendation model to be trained, determine a feature corresponding to each first multimedia information in the first transformed multimedia information as a first feature, a feature corresponding to each second multimedia information in the first transformed multimedia information as a second feature, a feature corresponding to each third multimedia information in the second transformed multimedia information as a third feature, and a feature corresponding to each fourth multimedia information in the second transformed multimedia information as a fourth feature.
Optionally, the training module 406 is specifically configured to, for each first multimedia information, train the recommendation model with optimization objectives of minimizing a deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information, and maximizing a deviation between the first feature corresponding to the first multimedia information and the second feature, and for each third multimedia information, minimizing a deviation between the third feature corresponding to the third multimedia information and the third features corresponding to other third multimedia information, and maximizing a deviation between the third feature corresponding to the third multimedia information and the fourth feature.
Optionally, the input module 404 is specifically configured to, the recommendation model includes: a characteristic submodel and an auxiliary submodel;
inputting the first converted multimedia information and the second converted multimedia information into a feature submodel to be trained, determining a feature corresponding to each first converted multimedia information as a first model feature, and a feature corresponding to each second converted multimedia information as a second model feature, inputting each first converted multimedia information and each second converted multimedia information into an auxiliary submodel to be trained, determining a feature corresponding to each first converted multimedia information as a first auxiliary feature, and determining a feature corresponding to each second converted multimedia information as a second auxiliary feature.
Optionally, the training module 406 is specifically configured to, for each piece of recommended multimedia information, determine a similarity between the first model feature corresponding to the piece of recommended multimedia information and the second assistant feature corresponding to the piece of recommended multimedia information as a first similarity, determine a difference between the first model feature corresponding to the piece of recommended multimedia information and the second assistant feature corresponding to other pieces of recommended multimedia information as a first difference, for each piece of first multimedia information, take minimizing a deviation between the first feature corresponding to the piece of first multimedia information and the first feature corresponding to other pieces of first multimedia information, and maximizing a deviation between the first feature corresponding to the piece of first multimedia information and the second feature corresponding to the piece of first multimedia information as an optimization objective, and take maximizing the first similarity and the first difference as optimization objectives, and training the recommendation model.
Optionally, the training module 406 is specifically configured to, for each piece of recommended multimedia information, determine a similarity between the second model feature corresponding to the piece of recommended multimedia information and the first assistant feature corresponding to the piece of recommended multimedia information as a second similarity, and determine a difference between the second model feature corresponding to the piece of recommended multimedia information and the first assistant feature corresponding to the other piece of recommended multimedia information as a second difference, for each piece of first multimedia information, with an optimization goal of minimizing a deviation between the first feature corresponding to the piece of first multimedia information and the first feature corresponding to the other piece of first multimedia information, and maximizing a deviation between the first feature corresponding to the piece of first multimedia information and the second feature, and with optimization goals of maximizing the first similarity, the first difference, the second similarity, and the second difference, and training the recommendation model.
Optionally, the training module 406 is specifically configured to, for each first multimedia information, determine, as a first deviation, a deviation between a first feature corresponding to the first multimedia information and a first feature corresponding to another first multimedia information, and determine, as a second deviation, a deviation between the first feature corresponding to the first multimedia information and the second feature, and determine, as a round weight, a weight corresponding to the first deviation and a weight corresponding to the second deviation according to a round of the round of training for each round of training, where the round weight is larger as the round of training is larger, and the recommendation model is trained according to the first deviation, the second deviation, the first similarity, the first difference, the second similarity, the second difference, and the round weight.
Fig. 5 is a schematic structural diagram of an information recommendation apparatus provided in an embodiment of this specification, which specifically includes:
a response module 500, configured to respond to an information acquisition request of a target user, and acquire candidate recommended multimedia information and a preference characterization of the target user;
the prediction module 502 is configured to, for each candidate recommended multimedia information, input the candidate recommended multimedia information and the preference characterization of the target user into a pre-trained recommendation model, and predict a click rate corresponding to the candidate recommended multimedia information, where the recommendation model is obtained by training through the model training method;
and a recommending module 504, configured to determine recommended multimedia information recommended to the target user according to the click rate corresponding to each candidate recommended multimedia information, serve as target recommended multimedia information, and recommend the target recommended multimedia information to the target user.
The present specification also provides a computer-readable storage medium storing a computer program, which can be used to execute the method of model training provided in fig. 1 above and the method of information recommendation provided in fig. 3 above.
The present specification also provides a schematic structural diagram of the electronic device shown in fig. 6. As shown in fig. 6, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads a corresponding computer program from the non-volatile memory into the memory and then runs the computer program to implement the model training method described in fig. 1 and the information recommendation method provided in fig. 3. Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
It should be noted that all actions of acquiring signals, information or data in the present application are performed under the premise of complying with the corresponding data protection regulation policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: the ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any alterations, equivalents, modifications and the like which come within the spirit and principles of the specification are desired to be embraced therein.

Claims (13)

1. A method of model training, comprising:
acquiring operation information of a user for each recommended multimedia information within a historical set time;
according to the operation information, determining recommended multimedia information browsed by the user from the recommended multimedia information to serve as first multimedia information, and determining recommended multimedia information not browsed by the user to serve as second multimedia information;
inputting the first multimedia information and the second multimedia information into a recommendation model to be trained, and determining a characteristic corresponding to each first multimedia information as a first characteristic and a characteristic corresponding to each second multimedia information as a second characteristic;
and aiming at each piece of first multimedia information, training the recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other pieces of first multimedia information and the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature as optimization targets.
2. The method according to claim 1, wherein determining, from the recommended multimedia information according to the operation information, recommended multimedia information browsed by the user as first multimedia information, and recommended multimedia information not browsed by the user as second multimedia information specifically includes:
randomly transforming the recommended multimedia information according to the operation information to obtain first transformed multimedia information and second transformed multimedia information;
determining recommended multimedia information browsed by the user from the first converted multimedia information to serve as first multimedia information, and determining recommended multimedia information not browsed by the user to serve as second multimedia information;
and determining recommended multimedia information browsed by the user from the second converted multimedia information to be used as third multimedia information, and determining recommended multimedia information not browsed by the user to be used as fourth multimedia information.
3. The method as claimed in claim 2, wherein the step of inputting the first multimedia information and the second multimedia information into a recommendation model to be trained, and determining a feature corresponding to each first multimedia information as a first feature and a feature corresponding to each second multimedia information as a second feature specifically comprises:
inputting the first multimedia information, the second multimedia information, the third multimedia information and the fourth multimedia information into a recommendation model to be trained, determining a feature corresponding to each first multimedia information in the first transformed multimedia information as a first feature, a feature corresponding to each second multimedia information in the first transformed multimedia information as a second feature, a feature corresponding to each third multimedia information in the second transformed multimedia information as a third feature, and a feature corresponding to each fourth multimedia information in the second transformed multimedia information as a fourth feature.
4. The method of claim 3, wherein for each first multimedia message, the training of the recommendation model with the optimization objectives of minimizing a deviation between the first feature corresponding to the first multimedia message and the first features corresponding to other first multimedia messages, and maximizing a deviation between the first feature corresponding to the first multimedia message and the second feature comprises:
and aiming at each piece of first multimedia information, training the recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information, the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature, and the maximization of the deviation between the third feature corresponding to the third multimedia information and the third features corresponding to other third multimedia information and the maximization of the deviation between the third feature corresponding to the third multimedia information and the fourth feature as optimization targets.
5. The method of claim 2, wherein the recommendation model comprises: a characteristic submodel and an auxiliary submodel;
inputting the first multimedia information and the second multimedia information into a recommendation model to be trained, determining a feature corresponding to each first multimedia information as a first feature, and determining a feature corresponding to each second multimedia information as a second feature, specifically comprising:
inputting the first converted multimedia information and the second converted multimedia information into a feature submodel to be trained, determining a feature corresponding to each first converted multimedia information as a first model feature, and determining a feature corresponding to each second converted multimedia information as a second model feature;
and inputting the first converted multimedia information and the second converted multimedia information into an auxiliary sub-model to be trained, and determining the characteristic corresponding to each first converted multimedia information as a first auxiliary characteristic and the characteristic corresponding to each second converted multimedia information as a second auxiliary characteristic.
6. The method of claim 5, wherein for each first multimedia message, training the recommendation model with the optimization objectives of minimizing a deviation between the first feature corresponding to the first multimedia message and the first features corresponding to other first multimedia messages, and maximizing a deviation between the first feature corresponding to the first multimedia message and the second feature comprises:
for each piece of recommended multimedia information, determining the similarity between the first model feature corresponding to the piece of recommended multimedia information and the second auxiliary feature corresponding to the piece of recommended multimedia information as a first similarity, and determining the difference between the first model feature corresponding to the piece of recommended multimedia information and the second auxiliary feature corresponding to other pieces of recommended multimedia information as a first difference;
and aiming at each piece of first multimedia information, training the recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information and the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature as optimization targets and taking the maximization of the first similarity and the first difference as optimization targets.
7. The method of claim 6, wherein for each first multimedia message, the training of the recommendation model with the optimization objectives of minimizing deviation between the first feature corresponding to the first multimedia message and the first features corresponding to other first multimedia messages and maximizing deviation between the first feature corresponding to the first multimedia message and the second feature, and maximizing the first similarity and the first difference comprises:
for each piece of recommended multimedia information, determining the similarity between the second model feature corresponding to the piece of recommended multimedia information and the first auxiliary feature corresponding to the piece of recommended multimedia information as a second similarity, and determining the difference between the second model feature corresponding to the piece of recommended multimedia information and the first auxiliary feature corresponding to other pieces of recommended multimedia information as a second difference;
and for each piece of first multimedia information, training the recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information and the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature as optimization targets and the maximization of the first similarity, the first difference, the second similarity and the second difference as optimization targets.
8. The method of claim 7, wherein for each first multimedia message, training the recommendation model with the optimization objectives of minimizing a deviation between the first feature corresponding to the first multimedia message and the first features corresponding to other first multimedia messages and maximizing a deviation between the first feature corresponding to the first multimedia message and the second feature, and maximizing the first similarity, the first difference, the second similarity, and the second difference comprises:
regarding each piece of first multimedia information, taking a deviation between a first feature corresponding to the first multimedia information and a first feature corresponding to other pieces of first multimedia information as a first deviation, and taking a deviation between the first feature corresponding to the first multimedia information and the second feature as a second deviation;
determining a weight corresponding to the first deviation and a weight corresponding to the second deviation as round weights according to the round of training for each round of training, wherein the round weight is larger as the round corresponding to the round of training is larger;
and training the recommendation model according to the first deviation, the second deviation, the first similarity, the first difference, the second similarity, the second difference and the turn weight.
9. A method for information recommendation, comprising:
responding to an information acquisition request of a target user, and acquiring candidate recommended multimedia information and a preference characterization of the target user;
for each candidate recommended multimedia information, inputting the candidate recommended multimedia information and the preference characterization of the target user into a pre-trained recommendation model, and predicting the click rate corresponding to the candidate recommended multimedia information, wherein the recommendation model is obtained by training through the method of any one of claims 1-8;
and determining recommended multimedia information recommended to the target user according to the click rate corresponding to each candidate recommended multimedia information, taking the recommended multimedia information as target recommended multimedia information, and recommending the target recommended multimedia information to the target user.
10. An apparatus for model training, comprising:
the acquisition module is used for acquiring operation information of a user aiming at each recommended multimedia information within a historical set time length;
the determining module is used for determining recommended multimedia information browsed by the user from the recommended multimedia information as first multimedia information and determining recommended multimedia information not browsed by the user as second multimedia information according to the operation information;
the input module is used for inputting the first multimedia information and the second multimedia information into a recommendation model to be trained, determining a characteristic corresponding to each first multimedia information as a first characteristic, and determining a characteristic corresponding to each second multimedia information as a second characteristic;
and the training module is used for training the recommendation model by taking the minimization of the deviation between the first feature corresponding to the first multimedia information and the first features corresponding to other first multimedia information and the maximization of the deviation between the first feature corresponding to the first multimedia information and the second feature as optimization targets aiming at each piece of first multimedia information.
11. An apparatus for information recommendation, comprising:
the response module is used for responding to an information acquisition request of a target user and acquiring candidate recommended multimedia information and a preference representation of the target user;
the prediction module is used for inputting the candidate recommended multimedia information and the preference characterization of the target user into a pre-trained recommendation model aiming at each candidate recommended multimedia information, and predicting the click rate corresponding to the candidate recommended multimedia information, wherein the recommendation model is obtained by training through the method of any one of claims 1-8;
and the recommending module is used for determining recommended multimedia information recommended to the target user according to the click rate corresponding to each candidate recommended multimedia information, using the recommended multimedia information as target recommended multimedia information, and recommending the target recommended multimedia information to the target user.
12. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1 to 9.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 9 when executing the program.
CN202210473098.7A 2022-04-29 2022-04-29 Model training method, information recommendation method and device Pending CN114860967A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210473098.7A CN114860967A (en) 2022-04-29 2022-04-29 Model training method, information recommendation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210473098.7A CN114860967A (en) 2022-04-29 2022-04-29 Model training method, information recommendation method and device

Publications (1)

Publication Number Publication Date
CN114860967A true CN114860967A (en) 2022-08-05

Family

ID=82634930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210473098.7A Pending CN114860967A (en) 2022-04-29 2022-04-29 Model training method, information recommendation method and device

Country Status (1)

Country Link
CN (1) CN114860967A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115545002A (en) * 2022-11-29 2022-12-30 支付宝(杭州)信息技术有限公司 Method, device, storage medium and equipment for model training and business processing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115545002A (en) * 2022-11-29 2022-12-30 支付宝(杭州)信息技术有限公司 Method, device, storage medium and equipment for model training and business processing

Similar Documents

Publication Publication Date Title
CN111144937B (en) Advertisement material determining method, device, equipment and storage medium
CN110717099B (en) Method and terminal for recommending film
CN114202370A (en) Information recommendation method and device
CN112966186A (en) Model training and information recommendation method and device
CN113688313A (en) Training method of prediction model, information pushing method and device
CN113641896A (en) Model training and recommendation probability prediction method and device
US20160328466A1 (en) Label filters for large scale multi-label classification
CN113643119A (en) Model training method, business wind control method and business wind control device
CN116822651A (en) Large model parameter fine adjustment method, device, equipment and medium based on incremental learning
CN115146731A (en) Model training method, business wind control method and business wind control device
CN111241391A (en) Task recommendation method and device
CN111507726A (en) Message generation method, device and equipment
CN114860967A (en) Model training method, information recommendation method and device
CN112966577B (en) Method and device for model training and information providing
CN117113174A (en) Model training method and device, storage medium and electronic equipment
CN116824331A (en) Model training and image recognition method, device, equipment and storage medium
CN113343085B (en) Information recommendation method and device, storage medium and electronic equipment
CN114119139A (en) Information recommendation method and device, storage medium and electronic equipment
CN110837596B (en) Intelligent recommendation method and device, computer equipment and storage medium
CN114331602A (en) Model training method based on transfer learning, information recommendation method and device
CN113344590A (en) Method and device for model training and complaint rate estimation
CN113205377A (en) Information recommendation method and device
CN116611497B (en) Click rate estimation model training method and device
CN114792256B (en) Crowd expansion method and device based on model selection
CN116468096B (en) Model training method, device, equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination