CN111368192A - Information recommendation method, device, equipment and storage medium - Google Patents
Information recommendation method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN111368192A CN111368192A CN202010138471.4A CN202010138471A CN111368192A CN 111368192 A CN111368192 A CN 111368192A CN 202010138471 A CN202010138471 A CN 202010138471A CN 111368192 A CN111368192 A CN 111368192A
- Authority
- CN
- China
- Prior art keywords
- information
- data
- model
- behavior
- behavior data
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 230000006399 behavior Effects 0.000 claims abstract description 264
- 238000012163 sequencing technique Methods 0.000 claims abstract description 21
- 238000012549 training Methods 0.000 claims description 43
- 230000006870 function Effects 0.000 claims description 30
- 238000004590 computer program Methods 0.000 claims description 24
- 230000003993 interaction Effects 0.000 claims description 15
- 230000004913 activation Effects 0.000 claims description 7
- 239000013598 vector Substances 0.000 description 24
- 230000008569 process Effects 0.000 description 13
- 238000012545 processing Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000010276 construction Methods 0.000 description 3
- 238000007796 conventional method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007499 fusion processing Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application relates to a recommendation method, device, equipment and storage medium of information. The method comprises the following steps: acquiring a first identifier of a current user and a second identifier of each piece of information to be recommended; inputting the first identification and each second identification into a preset prediction model to obtain a predicted value of the current user for various behaviors of each piece of information to be recommended, wherein the prediction model is a multi-input multi-output model; and sequencing the predicted values of the multiple behaviors, and recommending information to the current user according to a sequencing result. The method enables the obtained predicted values of various behaviors to have comparability, so that information can be recommended to the current user based on the comparison result among the predicted values, and compared with the recommendation result based on the predicted value of a single behavior, the accuracy of the recommendation result is improved.
Description
Technical Field
The present application relates to the field of internet, and in particular, to a method, an apparatus, a device, and a storage medium for recommending information.
Background
With the continuous development of big data technology, the information can be pushed more accurately for the user through big data analysis. The information may be video, audio, album, etc. In the traditional technology, the computer equipment can collect the feedback condition of the user on the information and perform personalized recommendation on the information for the user by utilizing the feedback condition. The feedback condition may include positive feedback information such as interest in information and high quality of information content, or negative feedback information such as uninteresting information and poor quality of information content. However, the conventional techniques recommend results with low accuracy.
Disclosure of Invention
Based on this, it is necessary to provide a method, an apparatus, a device and a storage medium for recommending information, aiming at the technical problem that the accuracy of the result recommended by the conventional method is low.
In a first aspect, an embodiment of the present application provides an information recommendation method, including:
acquiring a first identifier of a current user and a second identifier of each piece of information to be recommended;
inputting the first identification and each second identification into a preset prediction model to obtain a predicted value of the current user for various behaviors of each piece of information to be recommended, wherein the prediction model is a multi-input multi-output model;
and sequencing the predicted values of the multiple behaviors, and recommending information to the current user according to a sequencing result.
In a second aspect, an embodiment of the present application provides an information recommendation apparatus, including:
the acquisition module is used for acquiring a first identifier of a current user and a second identifier of each piece of information to be recommended;
the prediction module is used for inputting the first identification and each second identification into a preset prediction model to obtain a prediction value of the current user on various behaviors of each piece of information to be recommended, wherein the prediction model is a multi-input multi-output model;
and the recommending module is used for sequencing the predicted values of the various behaviors and recommending information to the current user according to a sequencing result.
In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the method for recommending information provided in the first aspect of the embodiment of the present application when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for recommending information provided in the first aspect of the embodiment of the present application.
According to the information recommendation method, device, equipment and storage medium provided by the embodiment of the application, after the first identification of the current user and the second identification of each piece of information to be recommended are obtained, the first identification of the current user and the second identification of each piece of information to be recommended are input into a preset prediction model by the computer equipment, the predicted values of various behaviors of each piece of information to be recommended by the current user are obtained, the obtained predicted values of the various behaviors are sequenced, and information recommendation is performed on the current user according to the sequencing result. The prediction model is a multi-input multi-output model, that is, the probability values of the current user for various behaviors of each piece of information to be recommended can be predicted through the prediction model, and the probability values of the current user for various behaviors of each piece of information to be recommended are all predicted by the same prediction model, so that the obtained probability values of various behaviors have comparability, and the information can be recommended to the current user based on the comparison result between the probability values, that is, the information can be recommended to the current user based on the prediction values of various behaviors in the embodiment of the application, and the accuracy of the recommendation result is improved compared with the recommendation result based on the prediction value of a single behavior.
Drawings
Fig. 1 is a schematic flowchart of a method for recommending information according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a prediction model provided in an embodiment of the present application;
fig. 3 is another schematic flow chart of a method for recommending information according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an information recommendation apparatus provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application are further described in detail by the following embodiments in combination with the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that the execution subject of the method embodiments described below may be an information recommendation apparatus, which may be implemented as part of or all of a computer device by software, hardware, or a combination of software and hardware. Optionally, the computer device may be an electronic device that has a data processing function and can interact with an external device or a user, such as a personal computer pc (personal computer), a mobile terminal, and a portable device, and the specific form of the computer device is not limited in this embodiment. The method embodiments described below are described by way of example with the execution subject being a computer device.
Fig. 1 is a schematic flow chart of a method for recommending information according to an embodiment of the present application. The embodiment of the application relates to a specific process of predicting the predicted values of various behaviors of various information to be recommended by a current user and recommending the information based on the predicted values of the various behaviors by computer equipment. As shown in fig. 1, the method may include:
s101, acquiring a first identifier of a current user and a second identifier of each piece of information to be recommended.
The current user is a user of information to be recommended. The information to be recommended can be videos to be recommended, audios to be recommended, albums to be recommended, articles to be recommended and the like.
S102, inputting the first identification and each second identification into a preset prediction model to obtain a predicted value of the current user for various behaviors of each piece of information to be recommended.
Wherein the prediction model is a multiple-input multiple-output model. The current various behaviors of the user comprise a viewing behavior, a subscribing behavior, a downloading behavior, a feedback behavior and the like of the information to be recommended. Assuming that the number of the multiple inputs and the multiple outputs supported by the prediction model is N, the computer device simultaneously inputs N groups of data into the prediction model, wherein each group of data in the N groups of data comprises a first identifier of the current user and a second identifier of each piece of information to be recommended. Through the prediction processing of the prediction model, the computer equipment can obtain N groups of data, the same group of data comprises the predicted values of the same behavior of the current user on each information to be recommended, and different groups of data respectively correspond to the predicted values of different behaviors of the current user. Wherein N is a positive integer of 2 or more.
For example, assume that the number N of multiple inputs supported by the predictive model is equal to 2, and the predictive model can predict the viewing behavior as well as the subscription behavior of the user. In this way, in the actual prediction process, the computer device inputs two groups of data into the prediction model, the two groups of data are both the first identification of the current user and the second identification of each piece of information to be recommended, and after the prediction processing of the prediction model, the computer device obtains two groups of data, one group of data is the predicted value of the viewing behavior of the current user on each piece of information to be recommended, and the other group of data is the predicted value of the subscription behavior of the current user on each piece of information to be recommended.
S103, sequencing the predicted values of the multiple behaviors, and recommending information to the current user according to a sequencing result.
The obtained predicted values of the multiple behaviors of the current user to the information to be recommended all come from the same prediction model, so the obtained predicted values of the multiple behaviors have comparability, and the computer equipment can put the predicted values of the multiple behaviors together for comprehensive sequencing and recommend the information to the current user according to the sequencing result. Optionally, the predicted value may be a probability value, and the computer device may recommend the information to be recommended with the maximum probability value in the ranking result to the current user.
Illustratively, the predicted values of the two behaviors obtained through prediction by the prediction model in S102 are taken as an example, that is, the predicted value of one behavior is the predicted value of the viewing behavior of the current user on each piece of information to be recommended, the predicted value of the other behavior is the predicted value of the subscription behavior of the current user on each piece of information to be recommended, and the computer device combines the predicted values of the viewing behavior and the subscription behavior for comprehensive ranking, that is, the computer device can rank according to the size of each predicted value, and recommend the information to be recommended with the largest predicted value to the current user. It can be understood that, if only one of the viewing behavior data or the subscription behavior data exists in the history record of the current user, when the information is recommended to the user by the method provided by the embodiment of the present application, when the user has a future behavior of the behavior data, the predicted value (i.e., the probability value) is high, and when the user predicts the future behavior of the other behavior, the predicted value (i.e., the probability value) is low, the two output results are comprehensively sorted, and the output recommendation result without the behavior data is sorted later, so that the recommendation result is not affected, the accuracy of the recommendation result is further improved, and the universality of the method is also improved.
According to the information recommendation method provided by the embodiment of the application, after the first identification of the current user and the second identification of each piece of information to be recommended are obtained, the first identification of the current user and the second identification of each piece of information to be recommended are input into a preset prediction model by the computer equipment, the predicted values of various behaviors of each piece of information to be recommended of the current user are obtained, the obtained predicted values of the various behaviors are sequenced, and information recommendation is performed on the current user according to the sequencing result. The prediction model is a multi-input multi-output model, that is, the probability values of the current user for various behaviors of each piece of information to be recommended can be predicted through the prediction model, and the probability values of the current user for various behaviors of each piece of information to be recommended are all predicted by the same prediction model, so that the obtained probability values of various behaviors have comparability, and the information can be recommended to the current user based on the comparison result between the probability values, that is, the information can be recommended to the current user based on the prediction values of various behaviors in the embodiment of the application, and the accuracy of the recommendation result is improved compared with the recommendation result based on the prediction value of a single behavior.
On the basis of the foregoing embodiment, optionally, the foregoing S102 may be: and inputting the first identifier and each second identifier into the prediction model according to the number of multiple inputs supported by the prediction model, and obtaining the predicted values of the current user for various behaviors of each piece of information to be recommended through the corresponding embedding operation of the embedding layer, the interaction operation of the interaction layer and the activation operation of the output layer.
Specifically, assuming that the number of the multiple inputs and the multiple outputs supported by the prediction model is N, the computer device simultaneously inputs N groups of data into the prediction model, where each group of data in the N groups of data includes a first identifier of a current user and a second identifier of each piece of information to be recommended. After the first identification and the second identification in each group of data are subjected to embedding operation of an embedding layer, respectively obtaining a first potential vector corresponding to the first identification and a second potential vector corresponding to the second identification; and after the first potential vector and the second potential vector are subjected to interactive operation of an interaction layer, obtaining the association characteristics between the first potential vector and the second potential vector, and respectively obtaining the predicted values of various behaviors of the current user on each piece of information to be recommended after the association characteristics are activated by an activation layer. The interactive operation of the interaction layer may be to multiply the first potential vector by the second potential vector, or may be to splice N first potential vectors and N second potential vectors, and multiply the spliced first potential vectors and the spliced second potential vectors.
For example, taking the number of the multiple inputs and multiple outputs supported by the prediction model as 2, and the prediction model may predict the viewing behavior and the subscription behavior of the user as an example, as shown in fig. 2, the process of S102 may be: the method comprises the steps that computer equipment inputs two groups of data into a prediction model, wherein the two groups of data are a first identification of a current user and a second identification of each piece of information to be recommended, the first identification of the first group and the first identification of the second group are subjected to embedding processing of an embedding layer (shared user embedding layer) to obtain a first potential vector corresponding to the first identification of the first group and a first potential vector corresponding to the first identification of the second group, and the first potential vector of the first group and the first potential vector of the second group are subjected to splicing operation to obtain a spliced first potential vector; meanwhile, the second identifiers of the first group and the second identifiers of the second group are subjected to embedding processing of an embedding layer (shared information embedding layer) to obtain second potential vectors corresponding to the second identifiers of the first group and second potential vectors corresponding to the second identifiers of the second group, and the second potential vectors of the first group and the second potential vectors of the second group are subjected to splicing operation to obtain spliced second potential vectors; and then, multiplying the spliced first potential vector and the spliced second potential vector, and processing the multiplied result by an activation function of an output layer to obtain a predicted value of the viewing behavior and a predicted value of the subscription behavior of the information to be recommended by the current user. The splicing operation and the multiplication operation are all processing procedures of an interaction layer in a prediction model.
In this embodiment, the computer device can input the first identifier and the second identifier into the prediction model based on the number of multiple inputs supported by the prediction model, and the first identifier and the second identifier are processed by the embedding layer, the interaction layer and the output layer to obtain the association characteristics between the current user and each piece of information to be recommended, and then obtain the predicted values of multiple behaviors of each piece of information to be recommended by the current user based on the association characteristics, that is, the predicted values of the multiple behaviors of the current user to be recommended can be obtained through the same model.
In an embodiment, an obtaining process of the prediction model is further provided, and optionally, as shown in fig. 3, before the step S101, the method may further include:
s201, model training data are constructed, wherein the model training data comprise various behavior data of the target user to the information, and the data volume of different behavior data is the same.
Specifically, the multiple behavior data of the target user for the information includes viewing behavior data, subscription behavior data, downloading behavior data, feedback behavior data, and the like of the target user for the information. The same data amount of each behavior data means that the range of the target users involved in each behavior data is the same, the range of the information involved in each behavior data is the same, and the number of samples included in each behavior data is the same.
In an optional implementation manner, the S201 may be: acquiring first behavior data and second behavior data of the target user pair information, wherein the first behavior data and the second behavior data comprise positive sample data and negative sample data; and fusing the first behavior data and the second behavior data according to a preset rule to obtain fused first behavior data and fused second behavior data, wherein the data volume of the fused first behavior data is the same as that of the fused second behavior data.
And the user behavior corresponding to the first behavior data is different from the user behavior corresponding to the second behavior data. The first behavior data and the second behavior data are described herein only for distinguishing different behavior data of the user, and are not limited to the number of kinds of behavior data of the user, and the second behavior data may include a plurality of kinds of behavior data. The first behavior data and the second behavior data both include positive sample data and negative sample data in a preset proportion. The positive sample data is used for representing that the target user has user behavior on the information, and the negative sample data is used for representing that the target user does not have user behavior on the information. Assuming that the information set is a, which includes m pieces of information, taking the information as a video as an example, that a is { a _1, a _2, … … a _ m }, and there are viewing behavior history and subscription behavior history for the video by the target user, meanwhile, assuming that the target users are user _1 and user _2, user _1 views videos a _1 and a _2, videos a _1 and a _5 are subscribed, user _2 views videos a _2, a _3 and a _10, and videos a _15 and a _20 are subscribed, so that the viewing behavior data of the target user is shown in table 1, and the subscription behavior data of the target user is shown in table 2:
TABLE 1
Identification of target user | Viewing behavior |
user_1 | A_1 |
user_1 | A_2 |
user_2 | A_2 |
user_2 | A_3 |
user_2 | A_10 |
TABLE 2
Identification of target user | Subscription behavior |
user_1 | A_1 |
user_1 | A_5 |
user_2 | A_15 |
user_2 | A_20 |
In order to ensure that the range of the target user and the range of the video related to the multiple behavior data are the same, the watching behavior data and the identification of the target user and the identification of the video in the subscription behavior data are used as key values, and the table 1 and the table 2 are fully connected to obtain the combined data of the video watched and subscribed by the target user, as shown in table 3:
TABLE 3
Identification of target user | Identification of video | Whether or not to watch | Whether to subscribe to |
user_1 | A_1 | 1 | 1 |
user_1 | A_2 | 1 | 0 |
user_1 | A_5 | 0 | 1 |
user_2 | A_2 | 1 | 0 |
user_2 | A_3 | 1 | 0 |
user_2 | A_10 | 1 | 0 |
user_2 | A_15 | 0 | 1 |
user_2 | A_20 | 0 | 1 |
Wherein, a "1" in the "see/not see" column in table 3 represents seen (which is the positive sample data of the viewing behavior), a "0" represents not seen (which is the negative sample data of the viewing behavior), a "1" in the "subscribe/not subscribe" column represents subscribed (which is the positive sample data of the subscription behavior), and a "0" represents not subscribed (which is the negative sample data of the subscription behavior).
In the model training process, in order to improve the accuracy of the prediction model, positive sample data and negative sample data in a preset proportion need to be present in the model training data. Therefore, negative sample data needs to be generated by negative sampling based on the positive sample data in table 3 above. Optionally, the computer device may select a preset number of pieces of information other than the positive sample data from the information set a as the negative sample data, where the preset number may be 4. Continuing to take table 3 as an example, when the target user has a viewing behavior or a subscription behavior for the video, the corresponding score is 1, otherwise, the corresponding score is 0. In this way, the sampling process of the negative sample data corresponding to the positive sample data "user _1 having a score of 1" on a _1 may be: 4 pieces of information except for a _1 and a _2 are selected from the information set as negative sample data, the selected negative sample data may be "user _1 has a score of 0 on a _5, user _1 has a score of 0 on a _8, user _1 has a score of 0 on a _11, and user _1 has a score of 0 on a _ 20", and according to the same procedure, each of the positive sample data in table 3 is sampled with the corresponding negative sample data, thereby obtaining the viewing behavior data of the target user on the information (i.e., the first behavior data) as shown in table 4 and the subscription behavior data of the target user on the information (i.e., the second behavior data) as shown in table 5.
TABLE 4
Identification of target user | Identification of video | Scoring |
user_1 | A_1 | 1 |
user_1 | A_5 | 0 |
user_1 | A_8 | 0 |
user_1 | A_11 | 0 |
user_1 | A_20 | 0 |
user_1 | A_2 | 1 |
user_1 | A_50 | 0 |
user_1 | A_9 | 0 |
user_1 | A_30 | 0 |
user_1 | A_39 | 0 |
…… | …… | …… |
TABLE 5
Identification of target user | Identification of video | Scoring |
user_1 | A_1 | 1 |
user_1 | A_2 | 0 |
user_1 | A_15 | 0 |
user_1 | A_21 | 0 |
user_1 | A_40 | 0 |
user_1 | A_5 | 1 |
user_1 | A_20 | 0 |
user_1 | A_33 | 0 |
user_1 | A_4 | 0 |
user_1 | A_38 | 0 |
…… | …… | …… |
Then, the viewing behavior data and the subscription behavior data are fused, and the preset rule for fusing the subscription behavior data into the viewing behavior data may be: for each sample data in the subscription behavior data, if the corresponding scores of the identifier of the target user and the identifier of the video included in the sample data in the viewing behavior data are 1, adding the sample data as positive sample data to the viewing behavior data, and otherwise, adding the sample data as negative sample data to the viewing behavior data. Likewise, the preset rule for fusing the viewing behavior data into the subscription behavior data may be: for each sample data in the viewing behavior data, if the corresponding scores of the identifier of the target user and the identifier of the video included in the sample data in the subscription behavior data are 1, adding the sample data as positive sample data to the subscription behavior data, and otherwise, adding the sample data as negative sample data to the subscription behavior data. Continuing with tables 4 and 5 as an example, the viewing behavior data (i.e., the first behavior data) and the subscription behavior data (i.e., the second behavior data) are fused according to the preset rule, so as to obtain the fused first behavior data shown in table 6 and the second behavior data shown in table 7.
TABLE 6
TABLE 7
S202, performing model training on a preset initial model according to the model training data to obtain the prediction model.
Specifically, the initial model includes an input layer, an embedding layer, an interaction layer, and an output layer. The initial model is a multiple-input multiple-output structure. Optionally, the model training process may be: inputting the model training data into a preset initial model, and determining the actual value of each layer of parameter of the initial model; and updating the initial values of the parameters of each layer to the actual values to obtain the prediction model.
Optionally, the multiple behavior data included in the model training data includes a third identifier of the target user, a fourth identifier of the information, and multiple behavior tags of the target user to the information, where the behavior tag may be 1 or 0, and when the target behavior tag in the multiple behaviors is 1, it may indicate that the target user has generated a target behavior for the information, and when the target behavior tag in the multiple behaviors is 0, it may indicate that the target user has not generated a target behavior for the information. The process of inputting the model training data into the initial model and determining the actual values of the parameters of each layer of the initial model may be as follows: inputting the third identifier, the fourth identifier and a target behavior label into the initial model aiming at target behavior data in the multiple kinds of behavior data, and determining a loss value of a loss function corresponding to the target behavior; and when the sum of the loss values of the loss functions corresponding to the target behaviors is less than or equal to a preset threshold value, determining the current value of each layer of parameter of the initial model as the actual value of each layer of parameter.
The different behaviors correspond to different loss functions, that is, the number of the multiple inputs supported by the initial model is matched with the number of the loss functions used in the model training process. Alternatively, the loss function may be a cross-entropy loss function. Continuing to take the model training data shown in tables 6 and 7 as an example, simultaneously inputting the viewing behavior data shown in table 6 and the subscription behavior data shown in table 7 into the initial model, respectively determining the loss values of the loss functions corresponding to the viewing behavior and the subscription behavior, and determining the current value of each layer of parameters of the initial model as the actual value of each layer of parameters when the sum of the loss values of the loss functions corresponding to the viewing behavior and the subscription behavior is less than or equal to the preset threshold value; when the sum of the loss values of the loss function corresponding to the viewing behavior and the loss function corresponding to the subscription behavior is larger than a preset threshold value, adjusting parameters of each layer in the initial model, and continuing model training based on the adjusted initial model and the model training data until the sum of the loss values of the loss function corresponding to the viewing behavior and the loss function corresponding to the subscription behavior is smaller than or equal to the preset threshold value, at the moment, determining the current value of each layer of parameters in the adjusted initial model as the actual value of each layer of parameters of the initial model.
In this embodiment, in the process of obtaining the prediction model, the constructed initial model is a multiple-input multiple-output model, and meanwhile, the multiple behavior data of the target user are subjected to fusion processing, so that the data volume of each behavior data used as model training data is the same, and each behavior data contains positive and negative sample data in a preset ratio, so that the accuracy of the prediction model obtained by training is higher. In addition, the trained prediction model can also support multiple input and multiple output, namely the probability values of multiple behaviors of the information to be recommended of the user can be predicted through the prediction model, so that the predicted values of the multiple behaviors are comparable, and the accuracy of a recommendation result is further improved.
Fig. 4 is a schematic structural diagram of an information recommendation device according to an embodiment of the present application. As shown in fig. 4, the apparatus may include: an acquisition module 10, a prediction module 11 and a recommendation module 12.
Specifically, the obtaining module 10 is configured to obtain a first identifier of a current user and a second identifier of each piece of information to be recommended;
the prediction module 11 is configured to input the first identifier and each second identifier into a preset prediction model to obtain a prediction value of the current user for multiple behaviors of each piece of information to be recommended, where the prediction model is a multiple-input multiple-output model;
the recommending module 12 is configured to sort the predicted values of the multiple behaviors and recommend information to the current user according to a sorting result.
According to the information recommendation device provided by the embodiment of the application, after the first identification of the current user and the second identification of each piece of information to be recommended are obtained, the first identification of the current user and the second identification of each piece of information to be recommended are input into the preset prediction model by the computer equipment, the predicted values of the current user for various behaviors of each piece of information to be recommended are obtained, the obtained predicted values of the various behaviors are sequenced, and information recommendation is performed on the current user according to the sequencing result. The prediction model is a multi-input multi-output model, that is, the probability values of the current user for various behaviors of each piece of information to be recommended can be predicted through the prediction model, and the probability values of the current user for various behaviors of each piece of information to be recommended are all predicted by the same prediction model, so that the obtained probability values of various behaviors have comparability, and the information can be recommended to the current user based on the comparison result between the probability values, that is, the information can be recommended to the current user based on the prediction values of various behaviors in the embodiment of the application, and the accuracy of the recommendation result is improved compared with the recommendation result based on the prediction value of a single behavior.
On the basis of the foregoing embodiment, optionally, the prediction module 11 is specifically configured to input the first identifier and each of the second identifiers into the prediction model according to the number of multiple inputs supported by the prediction model, and obtain the predicted values of the multiple behaviors of the current user on each piece of information to be recommended through the corresponding embedding operation of the embedding layer, the interaction operation of the interaction layer, and the activation operation of the output layer.
On the basis of the above embodiment, optionally, the apparatus further includes: a construction module and a model training module;
specifically, the construction module is configured to construct model training data before the obtaining module 10 obtains a first identifier of a current user and a second identifier of each piece of information to be recommended, where the model training data includes multiple pieces of behavior data of a target user for information, and data volumes of different pieces of behavior data are the same;
and the model training module is used for carrying out model training on a preset initial model according to the model training data to obtain the prediction model.
On the basis of the foregoing embodiment, optionally, the construction module is specifically configured to acquire first behavior data and second behavior data of the target user pair information, where the first behavior data and the second behavior data include positive sample data and negative sample data; and fusing the first behavior data and the second behavior data according to a preset rule to obtain fused first behavior data and fused second behavior data, wherein the data volume of the fused first behavior data is the same as that of the fused second behavior data.
On the basis of the foregoing embodiment, optionally, the model training module includes: a determination unit and an update unit;
specifically, the determining unit is configured to input the model training data into a preset initial model, and determine actual values of parameters of each layer of the initial model;
and the updating unit is used for updating the initial values of the parameters of each layer into the actual values to obtain the prediction model.
On the basis of the above embodiment, optionally, the multiple behavior data includes a third identifier of the target user, a fourth identifier of the information, and multiple behavior tags of the target user to the information;
the determining unit is specifically configured to input the third identifier, the fourth identifier, and a target behavior tag into the initial model for a target behavior data in the multiple behavior data, and determine a loss value of a loss function corresponding to the target behavior; and when the sum of the loss values of the loss functions corresponding to the target behaviors is less than or equal to a preset threshold value, determining the current value of each layer of parameter of the initial model as the actual value of each layer of parameter.
Optionally, the loss function is a cross-entropy loss function.
In one embodiment, a computer device is provided, a schematic structural diagram of which may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data in the recommendation process of information. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of recommending information.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a first identifier of a current user and a second identifier of each piece of information to be recommended;
inputting the first identification and each second identification into a preset prediction model to obtain a predicted value of the current user for various behaviors of each piece of information to be recommended, wherein the prediction model is a multi-input multi-output model;
and sequencing the predicted values of the multiple behaviors, and recommending information to the current user according to a sequencing result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and inputting the first identifier and each second identifier into the prediction model according to the number of multiple inputs supported by the prediction model, and obtaining the predicted values of the current user for various behaviors of each piece of information to be recommended through the corresponding embedding operation of the embedding layer, the interaction operation of the interaction layer and the activation operation of the output layer.
In one embodiment, the processor, when executing the computer program, further performs the steps of: constructing model training data, wherein the model training data comprise various behavior data of a target user on information, and the data volume of different behavior data is the same; and performing model training on a preset initial model according to the model training data to obtain the prediction model.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring first behavior data and second behavior data of the target user pair information, wherein the first behavior data and the second behavior data comprise positive sample data and negative sample data; and fusing the first behavior data and the second behavior data according to a preset rule to obtain fused first behavior data and fused second behavior data, wherein the data volume of the fused first behavior data is the same as that of the fused second behavior data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: inputting the model training data into a preset initial model, and determining the actual value of each layer of parameter of the initial model; and updating the initial values of the parameters of each layer to the actual values to obtain the prediction model.
In one embodiment, the plurality of behavior data includes a third identification of the target user, a fourth identification of the information, and a plurality of behavior tags of the target user for the information; the processor, when executing the computer program, further performs the steps of: inputting the third identifier, the fourth identifier and a target behavior label into the initial model aiming at target behavior data in the multiple kinds of behavior data, and determining a loss value of a loss function corresponding to the target behavior; and when the sum of the loss values of the loss functions corresponding to the target behaviors is less than or equal to a preset threshold value, determining the current value of each layer of parameter of the initial model as the actual value of each layer of parameter.
Optionally, the loss function is a cross-entropy loss function.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a first identifier of a current user and a second identifier of each piece of information to be recommended;
inputting the first identification and each second identification into a preset prediction model to obtain a predicted value of the current user for various behaviors of each piece of information to be recommended, wherein the prediction model is a multi-input multi-output model;
and sequencing the predicted values of the multiple behaviors, and recommending information to the current user according to a sequencing result.
In one embodiment, the computer program when executed by the processor further performs the steps of: and inputting the first identifier and each second identifier into the prediction model according to the number of multiple inputs supported by the prediction model, and obtaining the predicted values of the current user for various behaviors of each piece of information to be recommended through the corresponding embedding operation of the embedding layer, the interaction operation of the interaction layer and the activation operation of the output layer.
In one embodiment, the computer program when executed by the processor further performs the steps of: constructing model training data, wherein the model training data comprise various behavior data of a target user on information, and the data volume of different behavior data is the same; and performing model training on a preset initial model according to the model training data to obtain the prediction model.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring first behavior data and second behavior data of the target user pair information, wherein the first behavior data and the second behavior data comprise positive sample data and negative sample data; and fusing the first behavior data and the second behavior data according to a preset rule to obtain fused first behavior data and fused second behavior data, wherein the data volume of the fused first behavior data is the same as that of the fused second behavior data.
In one embodiment, the computer program when executed by the processor further performs the steps of: inputting the model training data into a preset initial model, and determining the actual value of each layer of parameter of the initial model; and updating the initial values of the parameters of each layer to the actual values to obtain the prediction model.
In one embodiment, the plurality of behavior data includes a third identification of the target user, a fourth identification of the information, and a plurality of behavior tags of the target user for the information; the computer program when executed by the processor further realizes the steps of: inputting the third identifier, the fourth identifier and a target behavior label into the initial model aiming at target behavior data in the multiple kinds of behavior data, and determining a loss value of a loss function corresponding to the target behavior; and when the sum of the loss values of the loss functions corresponding to the target behaviors is less than or equal to a preset threshold value, determining the current value of each layer of parameter of the initial model as the actual value of each layer of parameter.
Optionally, the loss function is a cross-entropy loss function.
The information recommendation device, the computer device and the storage medium provided in the above embodiments can execute the information recommendation method provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in the above embodiments may be referred to a recommendation method of information provided in any embodiments of the present application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A method for recommending information, comprising:
acquiring a first identifier of a current user and a second identifier of each piece of information to be recommended;
inputting the first identification and each second identification into a preset prediction model to obtain a predicted value of the current user for various behaviors of each piece of information to be recommended, wherein the prediction model is a multi-input multi-output model;
and sequencing the predicted values of the multiple behaviors, and recommending information to the current user according to a sequencing result.
2. The method according to claim 1, wherein the inputting the first identifier and each second identifier into a preset prediction model to obtain predicted values of a plurality of behaviors of the current user on each piece of information to be recommended includes:
and inputting the first identifier and each second identifier into the prediction model according to the number of multiple inputs supported by the prediction model, and obtaining the predicted values of the current user for various behaviors of each piece of information to be recommended through the corresponding embedding operation of the embedding layer, the interaction operation of the interaction layer and the activation operation of the output layer.
3. The method according to claim 1, further comprising, before the obtaining the first identifier of the current user and the second identifier of each piece of information to be recommended:
constructing model training data, wherein the model training data comprise various behavior data of a target user on information, and the data volume of different behavior data is the same;
and performing model training on a preset initial model according to the model training data to obtain the prediction model.
4. The method of claim 3, wherein the constructing model training data comprises:
acquiring first behavior data and second behavior data of the target user pair information, wherein the first behavior data and the second behavior data comprise positive sample data and negative sample data;
and fusing the first behavior data and the second behavior data according to a preset rule to obtain fused first behavior data and fused second behavior data, wherein the data volume of the fused first behavior data is the same as that of the fused second behavior data.
5. The method according to claim 3, wherein the performing model training on a preset initial model according to the model training data to obtain the prediction model comprises:
inputting the model training data into a preset initial model, and determining the actual value of each layer of parameter of the initial model;
and updating the initial values of the parameters of each layer to the actual values to obtain the prediction model.
6. The method of claim 5, wherein the plurality of behavior data comprises a third identification of the target user, a fourth identification of the information, and a plurality of behavior tags of the target user for the information;
inputting the model training data into the initial model, and determining actual values of parameters of each layer of the initial model, including:
inputting the third identifier, the fourth identifier and a target behavior label into the initial model aiming at target behavior data in the multiple kinds of behavior data, and determining a loss value of a loss function corresponding to the target behavior;
and when the sum of the loss values of the loss functions corresponding to the target behaviors is less than or equal to a preset threshold value, determining the current value of each layer of parameter of the initial model as the actual value of each layer of parameter.
7. The method of claim 6, wherein the loss function is a cross-entropy loss function.
8. An apparatus for recommending information, comprising:
the acquisition module is used for acquiring a first identifier of a current user and a second identifier of each piece of information to be recommended;
the prediction module is used for inputting the first identification and each second identification into a preset prediction model to obtain a prediction value of the current user on various behaviors of each piece of information to be recommended, wherein the prediction model is a multi-input multi-output model;
and the recommending module is used for sequencing the predicted values of the various behaviors and recommending information to the current user according to a sequencing result.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010138471.4A CN111368192A (en) | 2020-03-03 | 2020-03-03 | Information recommendation method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010138471.4A CN111368192A (en) | 2020-03-03 | 2020-03-03 | Information recommendation method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111368192A true CN111368192A (en) | 2020-07-03 |
Family
ID=71211620
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010138471.4A Pending CN111368192A (en) | 2020-03-03 | 2020-03-03 | Information recommendation method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111368192A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111859133A (en) * | 2020-07-21 | 2020-10-30 | 有半岛(北京)信息科技有限公司 | Recommendation method and online prediction model release method and device |
CN113269262A (en) * | 2021-06-02 | 2021-08-17 | 腾讯音乐娱乐科技(深圳)有限公司 | Method, apparatus and storage medium for training matching degree detection model |
CN113326203A (en) * | 2021-06-22 | 2021-08-31 | 深圳前海微众银行股份有限公司 | Information recommendation method, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109408731A (en) * | 2018-12-27 | 2019-03-01 | 网易(杭州)网络有限公司 | A kind of multiple target recommended method, multiple target recommended models generation method and device |
CN110807693A (en) * | 2019-11-04 | 2020-02-18 | 上海喜马拉雅科技有限公司 | Album recommendation method, device, equipment and storage medium |
-
2020
- 2020-03-03 CN CN202010138471.4A patent/CN111368192A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109408731A (en) * | 2018-12-27 | 2019-03-01 | 网易(杭州)网络有限公司 | A kind of multiple target recommended method, multiple target recommended models generation method and device |
CN110807693A (en) * | 2019-11-04 | 2020-02-18 | 上海喜马拉雅科技有限公司 | Album recommendation method, device, equipment and storage medium |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111859133A (en) * | 2020-07-21 | 2020-10-30 | 有半岛(北京)信息科技有限公司 | Recommendation method and online prediction model release method and device |
CN111859133B (en) * | 2020-07-21 | 2023-11-14 | 有半岛(北京)信息科技有限公司 | Recommendation method and release method and device of online prediction model |
CN113269262A (en) * | 2021-06-02 | 2021-08-17 | 腾讯音乐娱乐科技(深圳)有限公司 | Method, apparatus and storage medium for training matching degree detection model |
CN113326203A (en) * | 2021-06-22 | 2021-08-31 | 深圳前海微众银行股份有限公司 | Information recommendation method, equipment and storage medium |
CN113326203B (en) * | 2021-06-22 | 2022-08-12 | 深圳前海微众银行股份有限公司 | Information recommendation method, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111310053A (en) | Information recommendation method, device, equipment and storage medium | |
Zhao et al. | Deep reinforcement learning for page-wise recommendations | |
CN111797318B (en) | Information recommendation method, device, equipment and storage medium | |
CN108829808B (en) | Page personalized sorting method and device and electronic equipment | |
CN111368192A (en) | Information recommendation method, device, equipment and storage medium | |
CN111506820B (en) | Recommendation model, recommendation method, recommendation device, recommendation equipment and recommendation storage medium | |
CN110008397B (en) | Recommendation model training method and device | |
CN110413893B (en) | Object pushing method, device, computer equipment and storage medium | |
CN110837577A (en) | Video recommendation method, device, equipment and storage medium | |
US20230351147A1 (en) | Recommendation method and apparatus, and method and apparatus for publishing online prediction model | |
CN109800328B (en) | Video recommendation method, device thereof, information processing equipment and storage medium | |
CN111460290A (en) | Information recommendation method, device, equipment and storage medium | |
CN108345419B (en) | Information recommendation list generation method and device | |
CN112183994A (en) | Method and device for evaluating equipment state, computer equipment and storage medium | |
CN113873330B (en) | Video recommendation method and device, computer equipment and storage medium | |
CN111506821B (en) | Recommendation model, recommendation method, recommendation device, recommendation equipment and recommendation storage medium | |
CN111026970B (en) | Artificial intelligence based migration model training method and device and storage medium | |
CN110516164B (en) | Information recommendation method, device, equipment and storage medium | |
CN110990624A (en) | Video recommendation method, device, equipment and storage medium | |
CN110807693A (en) | Album recommendation method, device, equipment and storage medium | |
CN113918738A (en) | Multimedia resource recommendation method and device, electronic equipment and storage medium | |
CN113742578A (en) | Data recommendation method and device, electronic equipment and storage medium | |
CN110933504B (en) | Video recommendation method, device, server and storage medium | |
CN113836388A (en) | Information recommendation method and device, server and storage medium | |
CN114139046B (en) | Object recommendation method and device, electronic equipment and 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200703 |
|
RJ01 | Rejection of invention patent application after publication |