Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be understood that "system", "apparatus", "unit" and/or "module" as used herein is a method for distinguishing different components, elements, parts or assemblies at different levels. However, other words may be substituted by other expressions if they accomplish the same purpose.
As used in this application and the appended claims, the terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are intended to be inclusive in the plural unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that steps and elements are included which are explicitly identified, that the steps and elements do not form an exclusive list, and that a method or apparatus may include other steps or elements. An element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two. The terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
Additionally, flow charts are used herein to illustrate operations performed by systems according to embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed in the exact order in which they are performed. Rather, the various steps may be processed in reverse order or simultaneously. Meanwhile, other operations may be added to the processes, or a certain step or several steps of operations may be removed from the processes.
Aiming at the prior information recommendation method described in the background technology part, in order to realize personalized recommendation for different users and improve recommendation accuracy and flexibility, the method provides that when recommendation information is obtained, the access sequence of the access objects of the users on an application platform (such as the click sequence of each post on a community website) is considered, so that the interest transition and interest accumulation of the users are accurately positioned, and meanwhile, long-term historical interest and short-term historical interest of the users can be considered, so that the purposes of improving recommendation accuracy and efficiency and meeting personalized recommendation requirements of different users are achieved.
Based on this, the method and the device set a Markov chain transition matrix (namely a probability transition matrix) for each user by using an FPMC (finite Personalized Markov chains) model, and acquire the long-term preference and recent attention of the user so as to realize Personalized recommendation. However, in the prediction process of the FPMC model, the access object at the current moment is usually predicted according to the access data at the previous moment, and so on, and the interested objects of the user within a period of time are not comprehensively considered, which affects the accuracy of the recommendation result.
In order to improve the above problems, the present application further proposes to combine an Attention Mechanism (Attention Mechanism) with the FPMC algorithm, so as to accurately and efficiently capture the long-term interest and the short-term interest of the user, to complete the sequence recommendation, and improve the accuracy of the recommendation.
Wherein, the attention mechanism can be a resource allocation method for allocating computing resources to more important tasks under the condition of limited computing capacity of the computer equipment and solving the problem of information overload. In neural network learning (i.e. a machine learning algorithm), generally, the more parameters of a model, the stronger the expressive power of the model, and the larger the amount of information stored by the model, especially when capturing the long-term interest of a user, the problem of information overload is easily caused by analyzing a large amount of historical access data. By introducing the attention mechanism, the information which is more critical to the current task (namely the history access object which is more concerned by the user) is focused on a plurality of input information, the attention degree to other information is reduced, and even irrelevant information is filtered, so that the problem of information overload can be solved, and the information processing efficiency is improved. The operation principle of the attention mechanism is not described in detail in the present application.
Referring to fig. 1, a schematic flow chart of an optional example of the information recommendation method provided in the present application is shown, where the method may be applied to a computer device, where the computer device may be a server (i.e., a recommendation server) or a terminal device with certain data computation capability, such as a notebook computer, a desktop computer, and the present application does not limit a product type of the computer device. As shown in fig. 1, the information recommendation method provided in this embodiment may include:
step S11, obtaining a user access sequence and an object identifier of a candidate object;
in this embodiment, the user access sequence may be formed by object identifiers of historical access objects of the user on the application platform, and the object identifiers are arranged according to the access time sequence of the historical access objects. The object identifier may be identification information for distinguishing different access objects, and has a unique characteristic, specifically, an object ID, and the like.
In practical applications, a user accesses an object output by an application platform through a terminal device, that is, the user clicks the object output by the application platform, and corresponding historical access data is generated, where the historical access data may be stored in the terminal device or an application server corresponding to the application platform, and therefore, a computer device may obtain the historical access data of the user from the terminal device or the application server, where the historical access data may include: the computer device may then generate a user access sequence for the user using the object identifiers of the historical access objects in the historical range data.
It should be noted that the manner of generating the user access sequence is not limited to the implementation method described above. Moreover, based on the above description of the inventive concept of the present application, the present application needs to capture the long-term interest and the short-term interest of the user, and therefore, when generating the user access sequence, historical access data corresponding to a relatively long time period (denoted as a specific time period) needs to be acquired, and according to the above manner, the user access sequence capable of including the object identifier of the historical access object in the long time period is generated, and it is ensured that the user access sequence is subsequently analyzed to obtain the long-term interest of the user.
The specific time of the specific time period is not limited, for example, three months or 6 months are counted from the current time, the specific time period can be determined according to factors such as a specific recommendation scene, a recommendation accuracy requirement of a user and the like, and can be adjusted according to actual conditions.
Based on the above analysis, if x is usediThe object identifier of the ith historical access object stored in a specific time period is represented, and the user access sequence acquired by the computer equipment can be [ x [ ]1,x2,x3,…,xi,…]The number of elements included in the user access sequence may be determined according to the number of historical access objects stored in the specific time period. It should be understood that since the user access sequence is arranged according to the access time sequence, and the user access sequence is analyzed, the interest change and the interest accumulation of the user can be accurately positioned.
The candidate object obtained in step S11 may be an object output by the application platform that is screened in advance and has not been visited by the current user from all objects that can be output by the application platform, and specifically may be an object with a higher access rate on the application platform, an object related to a trending topic in a recent community website, an object with a larger access amount in a recent period of time, an object collected randomly at the application platform output object, and the like.
It should be understood that, since the interests or hot topics of the user generally change with time, the candidate objects pre-selected in the above manner may be updated continuously with time to improve the accuracy of determining the recommended objects according to the candidate objects, and the application does not limit the updating method of the candidate objects.
Step S12, inputting the user access sequence and the object identification of the candidate object into a probability prediction model to obtain the target interest probability of the current user to each candidate object;
in this embodiment, the probability prediction model may be obtained by training long-term sample data and short-term sample data based on an attention mechanism and a machine learning algorithm, and the training process of the probability prediction model is not described in detail in this application. The long-term sample data may refer to an object identifier of a history access object generated in a specific time period, and the short-term sample data may refer to an object identifier of a history access object generated at an adjacent previous time.
In a possible implementation manner, in combination with the above description of the inventive concept of the present application, the machine learning algorithm used for training the probability prediction model may be an FPMC algorithm, so that the present application may continuously train long-term sample data and short-term sample data according to the FPMC algorithm and the operation principle of the attention system to obtain the probability prediction model.
Step S13, obtaining a recommendation object in the candidate objects based on the target interest probability of each candidate object;
in step S14, the recommended object is output.
In practical application of the present application, since the larger the target interest probability of the candidate object is, the more interested the user is in the candidate object in the long term and the short term, that is, the higher the attention is, the more likely the candidate object is to be selected for access at the current moment, in this embodiment, according to the target interest probability of each candidate object, the candidate objects with a specific number of target interest probabilities and a larger interest probability are selected from the multiple candidate objects as recall objects, and then, the culling logic in the recommendation system of the computer device may screen out at least one recommendation object that the user may be interested from the multiple recall objects and send the recommendation object to the user client for output.
Wherein, the present application is not limited to the specific implementation process of the selected logic in the above recommendation system, and reference can be made to but not limited to the description of the corresponding parts of the following embodiments,
in addition, in combination with the description of the product types of the computer devices, the specific implementation manner of step S14 may be different for different types of computer devices, for example, the obtained recommended object is sent to other terminal devices for display, the recommended object is stored in a preset storage directory, the recommended object is output through a display screen, and the like, and the method can be determined according to actual situations, and detailed description is not given in this application.
In summary, in this embodiment, modeling is performed by combining an attention mechanism and a machine learning algorithm, so that the constructed probability prediction model can give consideration to both long-term interest and short-term interest of the user, and meanwhile, model input is obtained in a sequential manner, that is, a user access sequence and object identifiers of candidate objects are obtained as model input for prediction, and considering access sequences of different historical access objects, interest transition and interest accumulation of the user can be more accurately located, accuracy of the target interest probability of each obtained candidate object is improved, and further, accuracy of the obtained recommended object, that is, accuracy of personalized recommendation of different users is improved. The personalized recommendation accuracy rate is improved.
Based on the above analysis, taking the computer device as the recommendation server, and taking the application scenario in which the user uses the terminal device to access the community website a as an example, how the recommendation server pushes the recommendation post that may be interested in the user for the user is described. Referring to the scene flow diagram shown in fig. 2, a user may access the community website a on a terminal device, that is, access an application server corresponding to the community website, historical access data generated in the access process may be stored in the application server, for example, the user may click one or more posts from among posts output by the community website a to generate a corresponding click record, which includes information such as click time, click post ID, and the like, and these information may be stored in the application server or the terminal device as historical access data.
When the user views the post output by the community network a, the recommendation server may obtain the historical access data in the specific time period corresponding to the user ID from the application server in the manner described in the above embodiment, and form the user access sequence by using the post ID of the historical click post included in the historical access data. Moreover, the recommendation server can also preliminarily screen a plurality of candidate posts from the plurality of posts which are not clicked by the user and are contained in the application server, the candidate posts can be continuously updated along with the time, and the specific implementation process is not described in detail.
Then, the recommendation server may input a user access sequence formed by the post IDs of the plurality of history click posts in sequence and the post IDs of the plurality of candidate posts into a probability prediction model obtained by pre-training, so as to obtain a target interest probability of the user with respect to each candidate post, and then may determine a recommended post for the user from the plurality of candidate posts according to the target interest probability of each candidate post, and directly send the recommended post to the terminal device of the user for output by using the user ID. Of course, the terminal device may also output corresponding prompt information, and output the corresponding recommended post after detecting a determination instruction for the user to view the recommended post, and the specific output mode of the recommended post is not limited in the present application.
Of course, as shown in fig. 2, the recommendation server may feed back the recommendation post for the user to the terminal device of the user for output through the application server, and the specific implementation manner of how to feed back at least one recommendation post for the user to the user community site a for output is not limited in the present application.
It should be noted that, in some embodiments, the application server and the recommendation server may be the same computer device, that is, a recommendation system may be deployed in the application server of the community website a and used as a recommendation server; of course, in still other embodiments, the recommendation server and the terminal device may be the same computer device, which is not limited in this application and may be determined according to actual requirements.
In addition, as shown in fig. 2, the implementation process of the recommendation server pushing personalized recommendation posts to different users is similar, but due to different user access sequences corresponding to different users, even if the types of posts clicked and viewed by multiple users are the same in a specific time period, due to different click orders of viewing posts, the recommendation posts pushed to the multiple users respectively are different according to the above manner.
Referring to fig. 3, a flowchart illustrating another optional example of the information recommendation method provided by the present application is shown, where this embodiment may be an optional detailed implementation manner of the information recommendation method described in the foregoing embodiment, and as shown in fig. 3, the information recommendation method provided by this embodiment may include:
step S21, obtaining a user access sequence and an object identifier of a candidate object;
with regard to the content of the user access sequence and the obtaining manner thereof, and the obtaining manner of the object identifier of the candidate object, reference may be made to the description of the corresponding parts of the above-described embodiments.
Step S22, based on the user access sequence and the object identification of the candidate object, obtaining the predicted access probability of accessing the candidate object at the current moment;
in combination with the above description of the inventive concept of the present application, in order to implement personalized recommendation, the present application constructs a probability transition matrix for each user, where the constituent elements of the probability transition matrix are the predicted access probability of the user for accessing the candidate object at the current time, and thus, step S22 is actually a process of constructing a probability transition matrix for the current user, and the present application does not describe the specific construction process of the probability transition matrix in detail.
Assuming that the user 1 makes click access to the post a, the post b and the post c output by the community website at the time t-3, makes click access to the post b and the post c output by the community website at the time t-2, and makes click access to the post a and the post b output by the community website at the time t-1, the application needs to predict which one or more posts output by the community website will make click access to at the time t by the user according to the click access, and specifically, the application can predict the probability of click access to each candidate post output by the community website by the user at the time t by using the historical data.
Specifically, in order to accurately position the interest migration and interest accumulation of the user, as shown in a schematic diagram of a probability transition matrix obtaining process shown in fig. 4, the probability that the user clicks each candidate post at the time t-2 can be obtained by using the post clicked and accessed by the user at the time t-3; and utilizing the click access post of the user at the time t-2 to obtain the probability of clicking each candidate post by the user at the time t-1, and repeating the steps to finally obtain the probability of clicking each candidate post by the user at the time t.
In practical application, as shown in fig. 4, data of the obtained probability transition matrix is sparse, for this reason, the present application fits the sparse matrix into a dense matrix in a matrix decomposition manner to determine the predicted access probability of the position corresponding to the question mark in fig. 4, and the specific implementation process is not described in detail in the present application.
Based on the above analysis, the step S22 may include: and constructing a probability transition matrix by using the user access sequence and the object identification of the candidate object, and processing the probability transition matrix in a matrix decomposition mode to obtain the predicted access probability of the current user for accessing the candidate object at the current moment.
In some embodiments, according to the requirements of a specific application scenario, the present application may further combine an attention mechanism with a conventional matrix decomposition manner to improve the accuracy of the predicted access probability of the user accessing the candidate object at the current time obtained after the matrix decomposition.
Step S23, performing correlation analysis on the candidate object and the historical access object generated in a specific time period by using the predicted access probability of the candidate object to obtain a first interest probability of the current user on the candidate object;
in combination with the above analysis of the inventive concept of the present application, the present application combines the attention mechanism with the FPMC algorithm, and analyzes the probability transition matrix constructed for the user, so as to obtain what object output by the community website is interested by the user for a long time and what object output by the community website is interested recently. In conjunction with the above description of the attention mechanism and the FPMC algorithm, for the analysis of the long-term interest of the user, the present application will be implemented in conjunction with the attention mechanism.
In a possible implementation manner, historical access data of different users accessing the community website may be obtained, and according to the above manner, user access sequences corresponding to the different users are obtained and recorded as a first user access sequence, and as a result, the first user access sequence is formed by object identifiers of access objects of the corresponding users accessing the application platform (i.e., the application platform where the community website is located) within a specific time period, and a specific generation process is not described in detail.
The computer equipment can learn the first user access sequences of different users through the attention mechanism to obtain the first attention of the current user to the historical access object of the current user. According to the processing mode, the first attention degree of the current user to each of the plurality of historical accesses in the specific time period can be obtained, and therefore the corresponding attention degree vector is generated.
Then, the computer device may obtain, by using the obtained predicted access probability of each of the plurality of candidate objects and the obtained first attention of each of the plurality of historical access objects, a correlation between the corresponding candidate object and an access object of the current user accessing the application platform within a specific time period, that is, a degree of correlation between each candidate object and the historical access object within the specific time period, so as to obtain a stable interest, that is, a long-term interest, of the current user within the specific time period, and may obtain, according to a result of the correlation analysis, a first interest probability of the current user with respect to the corresponding candidate object, in order to facilitate subsequent processing.
Optionally, after obtaining a correlation analysis result between each of the plurality of candidate objects and an access object accessed by the current user on the application platform within a specific time period, since the specific time period is usually a period of continuous time determined from a previous time adjacent to the current time, and includes a recent access object of the current user, the embodiment directly averages a plurality of correlation analysis results obtained between each candidate object and a plurality of historical access objects, and the average value is more capable of indicating a stable interest of the current user on the candidate object, so that the obtained first interest probability of the candidate object is more accurate according to the average value.
It should be understood that the greater the first interest probability of a candidate object, the greater the degree of association between the candidate object and the historical access object of the user in the past certain time period, i.e. the more similar the candidate object is to the object of interest of the user in the certain time period, the more likely the candidate object is to be the object of interest of the user at the present moment. The application does not limit the specific correspondence between the first interest probability and the correlation analysis result, for example, if the correlation analysis result is a score, the first interest probability may also be a corresponding score, or a probability value generated according to a certain proportional relationship based on the score, and the like.
Step S24, performing correlation analysis on the candidate object and the historical access object generated at the last moment by using the predicted access probability of the candidate object to obtain a second interest probability of the current user on the candidate object;
referring to the above description of the corresponding part of step S23, the content executed in step S24 is mainly used to obtain the recent interest of the current user, i.e. the degree of association between each candidate object at the current time and each historical access object at the previous time.
In a possible implementation manner, the content of step S24 may be implemented by using a first-order markov chain, and specifically, a second user access sequence of different users is analyzed to obtain a second attention of the current user to the historical access object at the previous time, where the second user access sequence is formed by object identifiers of access objects that the corresponding user accessed the application platform at the previous time, and a generation process of the first user access sequence is similar to that described above and is not described in detail.
As can be seen, the second attention indicates the program of interest of the current user to each historical access object at the previous time, and then, according to the predicted access probability of each candidate object and the second attention corresponding to each historical access object at the previous time, the correlation between the corresponding candidate object and the access object of the current user to the application platform at the previous time is obtained, so as to obtain the second probability of interest of the current user to the corresponding candidate object. Since the correlation analysis is similar to the long-term interest analysis process of the corresponding part of step S23, the analysis process of the short-term interest of the current user is not repeated in this application.
Step S25, carrying out weighted summation on the first interest probability and the second interest probability respectively corresponding to different candidate objects to obtain the target interest probability of the current user on the corresponding candidate objects;
following the above analysis, the first interest probability is obtained by analyzing the long-term interest (e.g., object access interest in a specific time period) of the current user, and the second interest probability is obtained by analyzing the short-term interest (e.g., object access interest at the previous time) of the current user.
When the target interest probability of a certain candidate object is obtained, the respective weights of the first interest probability and the second interest probability of the corresponding candidate object can be determined according to actual requirements, and the specific values of the weights are not limited in the application.
Step S26, selecting a specific number of candidate objects with high target interest probability as objects to be recommended from a plurality of candidate objects;
in general, the number of objects output by the community website and accessible to the user is very large, and increases continuously with the passage of time, and the number of candidate objects initially selected in this embodiment is often also large, and further screening needs to be performed on the candidate objects, so as to quickly and accurately obtain the recommended object for the current user. Therefore, in this embodiment, the target interest probabilities of the multiple candidate objects are obtained in the above manner, that is, after the probability that each candidate object is interested by the current user at the current time is predicted in combination with the long-term interest and the short-term interest of the current user, the candidate objects that are interested in the long term and the short term can be screened out from the multiple candidate objects as the object to be recommended according to the predicted probability, and the specific implementation process of step S26 is not limited in this embodiment.
In some embodiments, according to the target interest probability of each candidate object, after sorting, a specific number of candidate objects with higher target interest probability are selected as objects to be recommended, that is, recall objects in the recommendation system. Or, directly selecting the candidate object with the target interest probability larger than a specific probability threshold value as the object to be recommended, and the like.
Step S27, based on the attention mechanism and the Bayes personalized ranking algorithm, obtaining the ranking result of the interest degree of the current user to the recommended object by using the object identification of the access object on the application platform at the previous moment;
in some embodiments, after the object to be recommended that may be of interest to the current user is recalled from the large number of candidate objects in the manner described above, the object to be recommended may be ranked in a Bayesian Personalized Ranking (BPR) manner, specifically, the FPMC algorithm used for screening the object to be recommended from the plurality of candidate objects may be simplified to implement efficient Ranking of the object to be recommended, and a specific implementation process may be determined according to an operation principle of the Bayesian Personalized Ranking.
The Bayesian personalized sorting mode is realized by assuming that preference behaviors of each user are independent, namely, the preference of the user between the access object i and the access object j is irrelevant to other users; moreover, the preferences of the same user for different items are independent, i.e., the user's preferences between access object i and access object j are independent of other access objects. The embodiment can realize the personalized ranking of the obtained multiple objects to be recommended through a Bayesian personalized ranking mode on the basis of the two assumption conditions, obtain the ranking scores of the current user for the multiple objects to be recommended, and rank the multiple objects to be recommended according to the ranking scores. The ranking score can indicate the probability that the current user is interested in the corresponding object to be recommended, the greater the ranking score is, the greater the probability that the current user is interested in the corresponding object to be recommended is, and the specific process of ranking the objects to be recommended by using a Bayesian personalized ranking mode is not detailed in the application.
In practical application, because the interest preference of the user for the access object at the current moment does not suddenly change and is usually the same as the interest preference at the previous moment, for the recalled objects to be recommended, based on the attention mechanism, only the object identification of the access object of the current user on the application platform at the previous moment is used to obtain the interest probabilities of the current user for the multiple objects to be recommended, and according to the interest probabilities, the sequencing of the multiple objects to be recommended is realized to obtain the sequencing result of the interest degree of the current user for the objects to be recommended, and the specific implementation process is not described in detail. In the above process of obtaining the object to be recommended, how to analyze the long-term interest of the user by using the attention mechanism may be combined to determine the process of analyzing the short-term interest of the user by using the attention mechanism in this embodiment.
The information recommendation processing method based on the descriptions in the steps S22 to S27 is a specific implementation method for how to obtain the target interest probability of the current user on the candidate object by inputting the user access sequence and the object identifier of the candidate object into the probability prediction model.
Step S28, according to the interest degree sorting result, screening the recommendation object aiming at the current user from the objects to be recommended;
in step S29, the recommended object is output.
Step S28 may specifically be to screen out a certain number of recommendation objects with higher interest level of the current user from the objects to be recommended according to the interest level ranking result, and feed the recommendation objects back to the user client for display, or screen out the recommendation objects with interest level reaching a specific threshold for output, where a specific implementation process is not described in detail, and may refer to, but is not limited to, the implementation manner described in the scenario embodiment shown in fig. 2.
In summary, in the embodiment, at a recall stage in the recommendation system, the embodiment obtains a long-term interest of a current user in a historical access object output by an application platform by using an attention mechanism, that is, analyzes a correlation between each candidate object and the historical access object in a specific time period to obtain the long-term interest; the short-term interest of the current user to the historical access object output by the application platform is obtained by utilizing a first-order Markov chain, namely, the correlation between each candidate object and the historical access object at the last moment is analyzed to obtain the short-term interest, then, the first interest probability representing the long-term interest and the second interest probability representing the short-term interest are subjected to weighted summation to obtain the target interest probability of the current user to each candidate object, and the specific number of objects to be recommended, with larger target interest probability, recalled by the recommendation system are screened out according to the target interest probability. Therefore, the object to be recommended takes long-term interest and short-term interest of the user into consideration, and comprehensiveness and accuracy of the object to be recommended recalled by the recommendation system are improved.
In the ranking stage of the recommendation system, in combination with the attention mechanism, the present embodiment screens recommendation objects that are more interested in the short term of the current user from among the recalled objects to be recommended, and feeds the recommendation objects back to the current user.
Based on the information recommendation method provided by the embodiments, the information recommendation method provided by the application considers both long-term interest and short-term interest of a user, the information recommendation method realized by using an attention mechanism and an FPMC algorithm is recorded as a first information recommendation method, the information recommendation method realized by using a traditional FPMC algorithm is recorded as a second information recommendation method, the information recommendation method realized by using the FPMC algorithm is recorded as a third information recommendation method based on the long-term interest of the user, a public movielens data set, namely a data set related to movie scores, and click data of a website login user of a certain community are measured, and the obtained test results are as follows:
test results on movielenss dataset:
| information recommendation method
|
topN
|
Accuracy rate
|
Recall rate
|
F1 value
|
| Second information recommendation method
|
1
|
25.25
|
1.63
|
3.06
|
| First information recommendation method
|
1
|
28.33
|
1.92
|
3.60
|
| Third information recommendation method
|
1
|
28.01
|
1.84
|
3.45
|
| Second information recommendation method
|
3
|
22.14
|
4.27
|
7.16
|
| First information recommendation method
|
3
|
24.55
|
4.66
|
7.83
|
| Third information recommendation method
|
3
|
24.56
|
4.63
|
7.79
|
| Second information recommendation method
|
5
|
20.51
|
6.38
|
9.73
|
| First information recommendation method
|
5
|
22.93
|
7.03
|
10.76
|
| Third information recommendation method
|
5
|
22.79
|
6.93
|
10.63 |
TABLE 1
As can be seen from table 1 above, the comparison of the above-mentioned several information recommendation methods can be analyzed from the indicators such as accuracy (i.e., the above-mentioned accuracy), precision, recall, F1 value, and the like. The accuracy may be the percentage of the total sample that predicts correct results; the accuracy rate may be a probability that the sample is actually a positive sample among all samples predicted to be positive, that is, a probability that the user actually accesses the object among the recommended objects, which represents the overall prediction accuracy; the recall rate may be a probability of being predicted as a positive sample in an actually positive sample, that is, a probability of actually accessing an object to be recommended in the object; the F1 value, i.e., the F1 score, may be the score of the balance point when the precision rate and the recall rate are considered at the same time and the two reach the highest simultaneously to obtain the balance.
Based on this, no matter how many recommendation objects (topN) are finally obtained, the accuracy of the first information recommendation method provided by the application is basically the highest, even if Top3 is selected, the accuracy of the third information recommendation method is slightly higher than that of the first information recommendation method, but the recall rate and the F1 value of the first information recommendation method are both higher than those of the third information recommendation method and the F1 value; in addition, from the index of F1 value, as shown in the graph of the change in F1 value shown in fig. 5, according to the information recommendation method provided by the present application, the recommendation object pushed to the user can better meet the user's needs.
Similarly, a community website logs in the test result on the user click data (such as click posts):
| information recommendation method
|
topN
|
Accuracy rate
|
Recall rate
|
F1 value
|
| Second information recommendation method
|
1
|
18.49
|
4.55
|
7.30
|
| First information recommendation method
|
1
|
18.76
|
4.77
|
7.61
|
| Third information recommendation method
|
1
|
18.54
|
4.68
|
7.47
|
| Second information recommendation method
|
3
|
14.09
|
10.35
|
11.93
|
| First information recommendation method
|
3
|
14.56
|
10.36
|
12.11
|
| Third information recommendation method
|
3
|
14.15
|
10.38
|
11.98
|
| Second information recommendation method
|
5
|
11.93
|
14.43
|
13.06
|
| First information recommendation method
|
5
|
12.33
|
14.57
|
13.36
|
| Third information recommendation method
|
5
|
12.11
|
14.46
|
13.18 |
TABLE 1
By combining the data in table 1 and the variation curve of the F1 worth of the community notes corresponding to different information recommendation systems shown in fig. 6, it can be known that the recommended community notes pushed to the user by the information recommendation method provided by the present application can better meet the user requirements.
Referring to fig. 7, a schematic structural diagram of an alternative example of the information recommendation apparatus proposed in the present application, which may be applied to a computer device, is shown, and the apparatus may include:
the data acquisition module 11 is configured to acquire a user access sequence and object identifiers of candidate objects, where the user access sequence is formed by object identifiers of historical access objects of a user on an application platform;
the prediction module 12 is configured to input the user access sequence and the object identifier of the candidate object into a probability prediction model, so as to obtain a target interest probability of the current user on the candidate object;
the probability prediction model is obtained by training long-term sample data and short-term sample data based on an attention mechanism and a machine learning algorithm, wherein the long-term sample data refers to an object identifier of a historical access object generated in a specific time period, and the short-term sample data refers to an object identifier of a historical access object generated at the last adjacent moment;
a recommended object obtaining module 13, configured to obtain a recommended object in the candidate objects based on the target interest probability of the candidate objects;
and a recommended object output module 14, configured to output the recommended object.
In some embodiments, as shown in fig. 8, the prediction module 12 may include:
a predicted access probability obtaining unit 121, configured to obtain a predicted access probability of accessing the candidate object at the current time based on the user access sequence and the object identifier of the candidate object;
in a possible implementation manner, the predicted access probability obtaining unit 121 may include:
a probability transition matrix construction unit, configured to construct a probability transition matrix by using the user access sequence and the object identifier of the candidate object;
and the predicted access probability obtaining unit is used for processing the probability transition matrix in a matrix decomposition mode to obtain the predicted access probability of the current user accessing the candidate object at the current moment.
A correlation analysis unit 122, configured to perform correlation analysis on the candidate object and a historical access object generated in a specific time period by using the predicted access probability of the candidate object, to obtain a first interest probability of the current user on the candidate object, and perform correlation analysis on the candidate object and a historical access object generated at a previous time, to obtain a second interest probability of the current user on the candidate object;
in a possible implementation manner, the correlation analysis unit 122 may include:
a first attention obtaining unit, configured to learn, through an attention mechanism, first user access sequences of different users to obtain a first attention of a current user to the historical access object, where the first user access sequences are formed by object identifiers of access objects accessed by corresponding users on the application platform within a specific time period;
a first correlation obtaining unit, configured to obtain, according to the predicted access probability of the candidate object and the first attention, a correlation between the corresponding candidate object and an access object, which is accessed by the current user on the application platform within the specific time period, to obtain a first interest probability of the current user on the corresponding candidate object;
a second attention obtaining unit, configured to analyze a second user access sequence of different users to obtain a second attention of a current user to the historical access object, where the second user access sequence is formed by object identifiers of access objects of corresponding users accessing the application platform at a previous time;
and the second correlation obtaining unit is used for obtaining the correlation between the corresponding candidate object and the access object accessed by the current user on the application platform at the last moment according to the predicted access probability of the candidate object and the second attention degree, so as to obtain a second interest probability of the current user on the corresponding candidate object.
A target interest probability obtaining unit 123, configured to perform weighted summation on the first interest probability and the second interest probability corresponding to different candidate objects, respectively, so as to obtain a target interest probability of the current user for the corresponding candidate object.
In general, the number of candidate objects obtained by pre-screening is plural, in this case, as shown in fig. 9, the recommended object obtaining module 13 may include:
a to-be-recommended object selecting unit 131, configured to select a specific number of candidate objects with a high target interest probability from the multiple candidate objects as to-be-recommended objects;
the sorting unit 132 is configured to obtain a sorting result of the interest degree of the current user for the object to be recommended by using the object identifier of the access object on the application platform at the previous moment based on an attention mechanism and a bayesian personalized sorting algorithm;
a recommended object screening unit 133, configured to screen a recommended object for the current user from the objects to be recommended according to the interest degree ranking result.
It should be noted that, various modules, units, and the like in the embodiments of the foregoing apparatuses may be stored in the memory as program modules, and the processor executes the program modules stored in the memory to implement corresponding functions, and for the functions implemented by the program modules and their combinations and the achieved technical effects, reference may be made to the description of corresponding parts in the embodiments of the foregoing methods, which is not described in detail in this embodiment.
The present application also provides a storage medium, on which a program may be stored, where the program may be called and loaded by a processor to implement the steps of the information recommendation method described in the above embodiments.
Referring to fig. 10, a schematic diagram of a hardware structure of a computer device according to an embodiment of the present application is shown, where the computer device may include: at least one communication interface 21, at least one memory 22, and at least one processor 23, wherein:
communication interface 21 can be communication module's interface, like communication module's such as GSM module, WIFI module, GPRS module interface, can realize with the data interaction of other equipment, can also include such as interfaces such as USB interface, cluster/parallel port for realize the data interaction between the inside component part of computer equipment, can confirm according to the product type of this computer equipment, do not do the one by one detailed description in this application.
A memory 22 for storing a program for implementing the information recommendation method described in any of the above method embodiments; the processor 23 is configured to load and execute the program stored in the memory 22 to implement the steps of the information recommendation method described in the above corresponding method embodiment, and the specific implementation process may refer to the description of the corresponding parts of the above embodiment.
In the present embodiment, the memory 22 may include a high speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device or other volatile solid state storage device. The processor 23 may be a Central Processing Unit (CPU), an application-specific integrated circuit (ASIC), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices.
In one possible implementation, the memory 22 may include a program storage area and a data storage area, and the program storage area may store an operating system, and application programs required for at least one function, programs for implementing the information recommendation method proposed in the present application, and the like; the data storage area can store data generated in the using process of the computer equipment, such as historical access data of users accessing community websites, candidate objects, recommended objects and the like.
It should be understood that the structure of the computer device shown in fig. 10 is not limited to the computer device in the embodiment of the present application, and in practical applications, the computer device may include more or less components than those shown in fig. 10, or some components in combination, which is not listed here.
Finally, it should be noted that, in the present specification, the embodiments are described in a progressive or parallel manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device disclosed by the embodiment, the description is relatively simple because the device corresponds to the method disclosed by the embodiment, and the relevant part can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.